X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=src%2Fmain%2Fjava%2Fcom%2Firtimaled%2Fbbor%2Fclient%2Finterop%2FSpawnableBlocksHelper.java;fp=src%2Fmain%2Fjava%2Fcom%2Firtimaled%2Fbbor%2Fclient%2Finterop%2FSpawnableBlocksHelper.java;h=6d44fcd1edc2bcd3749020b7f97179610f157f26;hb=4ecbb3c7f754e87716fe602c557683adeabb8bf2;hp=99d3371e3f7fd75eef64970cc2868e8268234adc;hpb=c02a0cbb765d91a75ac568e253547b904664616f;p=BoundingBoxOutlineReloaded.git diff --git a/src/main/java/com/irtimaled/bbor/client/interop/SpawnableBlocksHelper.java b/src/main/java/com/irtimaled/bbor/client/interop/SpawnableBlocksHelper.java index 99d3371..6d44fcd 100644 --- a/src/main/java/com/irtimaled/bbor/client/interop/SpawnableBlocksHelper.java +++ b/src/main/java/com/irtimaled/bbor/client/interop/SpawnableBlocksHelper.java @@ -1,6 +1,7 @@ package com.irtimaled.bbor.client.interop; import com.irtimaled.bbor.common.models.Coords; +import com.irtimaled.bbor.mixin.access.IBiome; import net.minecraft.block.Block; import net.minecraft.block.BlockState; import net.minecraft.client.MinecraftClient; @@ -49,9 +50,9 @@ public class SpawnableBlocksHelper { static boolean isSpawnable(World world, BlockPos pos, BlockState spawnBlockState, BlockState upperBlockState) { VoxelShape collisionShape = upperBlockState.getCollisionShape(world, pos); - Biome biome = world.getBiome(pos); - boolean isNether = biome.getCategory() == Biome.Category.NETHER; - return biome.getCategory() != Biome.Category.MUSHROOM && + Biome biome = world.getBiome(pos).value(); + boolean isNether = ((IBiome) biome).bbor$getCategory() == Biome.Category.NETHER; + return ((IBiome) biome).bbor$getCategory() != Biome.Category.MUSHROOM && spawnBlockState.allowsSpawning(world, pos.down(), isNether ? EntityType.ZOMBIFIED_PIGLIN : entityType) && !Block.isFaceFullSquare(collisionShape, Direction.UP) && !upperBlockState.emitsRedstonePower() &&