Merge branch 'master' of https://github.com/paulevsGitch/BetterEnd
This commit is contained in:
commit
0e8928f61e
4 changed files with 23 additions and 2 deletions
|
@ -17,6 +17,7 @@ import net.minecraft.entity.LivingEntity;
|
|||
import net.minecraft.entity.effect.StatusEffectInstance;
|
||||
import net.minecraft.entity.effect.StatusEffects;
|
||||
import net.minecraft.fluid.FluidState;
|
||||
import net.minecraft.util.Util;
|
||||
import net.minecraft.util.math.MathHelper;
|
||||
import net.minecraft.world.biome.Biome;
|
||||
import net.minecraft.world.biome.Biome.Category;
|
||||
|
@ -29,6 +30,7 @@ public class BackgroundRendererMixin {
|
|||
private static float lastFogDensity;
|
||||
private static float fogDensity;
|
||||
private static float lerp;
|
||||
private static long time;
|
||||
|
||||
@Shadow
|
||||
private static float red;
|
||||
|
@ -39,7 +41,9 @@ public class BackgroundRendererMixin {
|
|||
|
||||
@Inject(method = "render", at = @At("RETURN"))
|
||||
private static void onRender(Camera camera, float tickDelta, ClientWorld world, int i, float f, CallbackInfo info) {
|
||||
lerp += tickDelta * 0.01F;
|
||||
long l = Util.getMeasuringTimeMs() - time;
|
||||
time += l;
|
||||
lerp += l * 0.001F;
|
||||
if (lerp > 1) lerp = 1;
|
||||
|
||||
FluidState fluidState = camera.getSubmergedFluidState();
|
||||
|
|
|
@ -2,6 +2,7 @@ package ru.betterend.registry;
|
|||
|
||||
import net.fabricmc.fabric.api.tag.TagRegistry;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.tag.BlockTags;
|
||||
import net.minecraft.tag.Tag;
|
||||
import net.minecraft.tag.Tag.Identified;
|
||||
import ru.betterend.BetterEnd;
|
||||
|
@ -16,5 +17,6 @@ public class BlockTagRegistry {
|
|||
|
||||
public static void register() {
|
||||
TagHelper.addTag(END_GROUND, BlockRegistry.END_MOSS, BlockRegistry.END_MYCELIUM);
|
||||
TagHelper.addTag(BlockTags.NYLIUM, BlockRegistry.END_MOSS, BlockRegistry.END_MYCELIUM);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import net.minecraft.block.BlockState;
|
|||
import net.minecraft.block.Blocks;
|
||||
import net.minecraft.block.FallingBlock;
|
||||
import net.minecraft.state.property.Property;
|
||||
import net.minecraft.tag.BlockTags;
|
||||
import net.minecraft.util.BlockMirror;
|
||||
import net.minecraft.util.BlockRotation;
|
||||
import net.minecraft.util.math.BlockPos;
|
||||
|
@ -19,6 +20,7 @@ import net.minecraft.world.WorldAccess;
|
|||
import ru.betterend.blocks.BlockBlueVine;
|
||||
import ru.betterend.blocks.basis.BlockDoublePlant;
|
||||
import ru.betterend.blocks.basis.BlockGlowingFur;
|
||||
import ru.betterend.registry.BlockTagRegistry;
|
||||
|
||||
public class BlocksHelper {
|
||||
public static final int FLAG_UPDATE_BLOCK = 1;
|
||||
|
@ -28,7 +30,7 @@ public class BlocksHelper {
|
|||
public static final int FLAG_IGNORE_OBSERVERS = 16;
|
||||
|
||||
public static final int SET_SILENT = FLAG_UPDATE_BLOCK | FLAG_IGNORE_OBSERVERS | FLAG_SEND_CLIENT_CHANGES;
|
||||
public static final Direction[] HORIZONTAL = new Direction[] { Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST };
|
||||
public static final Direction[] HORIZONTAL = makeHorizontal();
|
||||
|
||||
private static final Mutable POS = new Mutable();
|
||||
protected static final BlockState AIR = Blocks.AIR.getDefaultState();
|
||||
|
@ -188,4 +190,16 @@ public class BlocksHelper {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static boolean isEndNylium(Block block) {
|
||||
return block.isIn(BlockTags.NYLIUM) && block.isIn(BlockTagRegistry.END_GROUND);
|
||||
}
|
||||
|
||||
public static boolean isEndNylium(BlockState state) {
|
||||
return isEndNylium(state.getBlock());
|
||||
}
|
||||
|
||||
public static Direction[] makeHorizontal() {
|
||||
return new Direction[] { Direction.NORTH, Direction.SOUTH, Direction.EAST, Direction.WEST };
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
"RecipeManagerMixin",
|
||||
"AbstractBlockMixin",
|
||||
"LivingEntityMixin",
|
||||
"BoneMealItemMixin",
|
||||
"SlimeEntityMixin",
|
||||
"BrewingAccessor",
|
||||
"BiomeMixin"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue