ForgePatch/patches/common/net/minecraft/src/ItemSeeds.java.patch

36 lines
957 B
Diff

--- ../src_base/common/net/minecraft/src/ItemSeeds.java
+++ ../src_work/common/net/minecraft/src/ItemSeeds.java
@@ -1,6 +1,9 @@
package net.minecraft.src;
-public class ItemSeeds extends Item
+import net.minecraftforge.common.EnumPlantType;
+import net.minecraftforge.common.IPlantable;
+
+public class ItemSeeds extends Item implements IPlantable
{
/**
* The type of block this seed turns into (wheat or pumpkin stems for instance)
@@ -48,4 +51,22 @@
return false;
}
}
+
+ @Override
+ public EnumPlantType getPlantType(World world, int x, int y, int z)
+ {
+ return (blockType == Block.netherStalk.blockID ? EnumPlantType.Nether : EnumPlantType.Crop);
+ }
+
+ @Override
+ public int getPlantID(World world, int x, int y, int z)
+ {
+ return blockType;
+ }
+
+ @Override
+ public int getPlantMetadata(World world, int x, int y, int z)
+ {
+ return 0;
+ }
}