mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 19:39:22 +00:00
Fix Melon/Pumpkin stems having wrong plant type causing them to remain after trampling farmland.
This commit is contained in:
1 parent
bbd8c2e07e
commit
cc75529ec4
1 file changed
+2
@@ -8,6 +8,7 @@ package net.minecraftforge.common;
|
||||
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.AttachedStemBlock;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.core.BlockPos;
|
||||
@@ -17,6 +18,7 @@ public interface IPlantable
|
||||
{
|
||||
default PlantType getPlantType(BlockGetter level, BlockPos pos) {
|
||||
if (this instanceof CropBlock) return PlantType.CROP;
|
||||
if (this instanceof AttachedStemBlock) return PlantType.CROP;
|
||||
if (this instanceof SaplingBlock) return PlantType.PLAINS;
|
||||
if (this instanceof FlowerBlock) return PlantType.PLAINS;
|
||||
if (this == Blocks.DEAD_BUSH) return PlantType.DESERT;
|
||||
|
||||
Reference in new issue
Block a user