diff --git a/src/main/java/winterly/block/FrozenFlowerBlock.java b/src/main/java/winterly/block/FrozenFlowerBlock.java index 109cc29..130f30a 100644 --- a/src/main/java/winterly/block/FrozenFlowerBlock.java +++ b/src/main/java/winterly/block/FrozenFlowerBlock.java @@ -1,5 +1,6 @@ package winterly.block; +import net.fabricmc.loader.api.FabricLoader; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; @@ -127,11 +128,13 @@ public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random world.setBlockState(pos, Objects.requireNonNullElse(cachedFlower, this).getDefaultState()); } } - else if(!state.get(PERSISTENT) && world.getLightLevel(LightType.SKY, pos) > 0 && world.getBiome(pos).value().getTemperature(pos) >= 0.15F) { - dropStacks(state, world, pos); - if(state.get(LAYERS) != 0) { - var cachedFlower = CachedFlowers.getFlower(world.getRegistryKey(), pos); - world.setBlockState(pos, Objects.requireNonNullElse(cachedFlower, this).getDefaultState()); + else if(FabricLoader.getInstance().isModLoaded("seasons")) { + if(!state.get(PERSISTENT) && world.getLightLevel(LightType.SKY, pos) > 0 && world.getBiome(pos).value().getTemperature(pos) >= 0.15F) { + dropStacks(state, world, pos); + if(state.get(LAYERS) != 0) { + var cachedFlower = CachedFlowers.getFlower(world.getRegistryKey(), pos); + world.setBlockState(pos, Objects.requireNonNullElse(cachedFlower, this).getDefaultState()); + } } } } diff --git a/src/main/java/winterly/block/FrozenGrassBlock.java b/src/main/java/winterly/block/FrozenGrassBlock.java index 241d99c..18d64a1 100644 --- a/src/main/java/winterly/block/FrozenGrassBlock.java +++ b/src/main/java/winterly/block/FrozenGrassBlock.java @@ -1,5 +1,6 @@ package winterly.block; +import net.fabricmc.loader.api.FabricLoader; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.block.Blocks; @@ -49,10 +50,11 @@ public void randomTick(BlockState state, ServerWorld world, BlockPos pos, Random dropStacks(state, world, pos); world.setBlockState(pos, Blocks.GRASS.getDefaultState()); } - - if(!state.get(PERSISTENT) && world.getLightLevel(LightType.SKY, pos) > 0 && world.getBiome(pos).value().getTemperature(pos) >= 0.15F) { - dropStacks(state, world, pos); - world.setBlockState(pos, Blocks.GRASS.getDefaultState()); + else if(FabricLoader.getInstance().isModLoaded("seasons")) { + if(!state.get(PERSISTENT) && world.getLightLevel(LightType.SKY, pos) > 0 && world.getBiome(pos).value().getTemperature(pos) >= 0.15F) { + dropStacks(state, world, pos); + world.setBlockState(pos, Blocks.GRASS.getDefaultState()); + } } } diff --git a/src/main/java/winterly/mixin/common/SnowBlockMixin.java b/src/main/java/winterly/mixin/common/SnowBlockMixin.java index f23bd49..34690e4 100644 --- a/src/main/java/winterly/mixin/common/SnowBlockMixin.java +++ b/src/main/java/winterly/mixin/common/SnowBlockMixin.java @@ -21,11 +21,11 @@ void getPlacementState(ItemPlacementContext ctx, CallbackInfoReturnable