1.16.2-pre2

This commit is contained in:
gnembon committed 2020-08-05 19:54:20 -03:00
1 parent ba56fc7bd7
commit 1aadf361ec
6 files changed
+17 -12

No files matched your search

@@ -7,6 +7,7 @@ import net.minecraft.block.Blocks;
import net.minecraft.block.SaplingBlock;
import net.minecraft.server.world.ServerWorld;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.biome.Biome;
import net.minecraft.world.biome.Biomes;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.At;
@@ -23,7 +24,7 @@ public abstract class SaplingBlockMixin
cancellable = true)
private void onGenerate(ServerWorld serverWorld_1, BlockPos blockPos_1, BlockState blockState_1, Random random_1, CallbackInfo ci)
{
if(CarpetSettings.desertShrubs && serverWorld_1.getBiome(blockPos_1) == Biomes.DESERT && !BlockSaplingHelper.hasWater(serverWorld_1, blockPos_1))
if(CarpetSettings.desertShrubs && serverWorld_1.getBiome(blockPos_1).getCategory() == Biome.Category.DESERT && !BlockSaplingHelper.hasWater(serverWorld_1, blockPos_1))
{
serverWorld_1.setBlockState(blockPos_1, Blocks.DEAD_BUSH.getDefaultState(), 3);
ci.cancel();