diff --git a/src/main/java/net/minecraftforge/common/IPlantable.java b/src/main/java/net/minecraftforge/common/IPlantable.java index 453bf4fa4e..7f106a3d8e 100644 --- a/src/main/java/net/minecraftforge/common/IPlantable.java +++ b/src/main/java/net/minecraftforge/common/IPlantable.java @@ -9,23 +9,25 @@ import net.minecraft.world.level.block.CropBlock; import net.minecraft.world.level.block.FlowerBlock; import net.minecraft.world.level.block.SaplingBlock; import net.minecraft.world.level.block.state.BlockState; +import net.minecraft.world.level.block.AttachedStemBlock; import net.minecraft.world.level.block.Blocks; import net.minecraft.core.BlockPos; import net.minecraft.world.level.BlockGetter; -public interface IPlantable -{ +public interface IPlantable { default PlantType getPlantType(BlockGetter level, BlockPos pos) { - if (this instanceof CropBlock || this == Blocks.PITCHER_CROP) return PlantType.CROP; - if (this instanceof SaplingBlock) return PlantType.PLAINS; - if (this instanceof FlowerBlock) return PlantType.PLAINS; + if (this instanceof AttachedStemBlock) return PlantType.CROP; + if (this instanceof CropBlock) return PlantType.CROP; + if (this instanceof SaplingBlock) return PlantType.PLAINS; + if (this instanceof FlowerBlock) return PlantType.PLAINS; + if (this == Blocks.PITCHER_CROP) return PlantType.CROP; if (this == Blocks.DEAD_BUSH) return PlantType.DESERT; if (this == Blocks.LILY_PAD) return PlantType.WATER; if (this == Blocks.RED_MUSHROOM) return PlantType.CAVE; if (this == Blocks.BROWN_MUSHROOM) return PlantType.CAVE; if (this == Blocks.NETHER_WART) return PlantType.NETHER; if (this == Blocks.TALL_GRASS) return PlantType.PLAINS; - return net.minecraftforge.common.PlantType.PLAINS; + return PlantType.PLAINS; } BlockState getPlant(BlockGetter level, BlockPos pos);