7c6468a9ea
Updated FML: MinecraftForge/FML@1774e2bf30 MCP names update
47 lines
1.4 KiB
Diff
47 lines
1.4 KiB
Diff
--- ../src_base/minecraft/net/minecraft/block/BlockCactus.java
|
|
+++ ../src_work/minecraft/net/minecraft/block/BlockCactus.java
|
|
@@ -12,7 +12,11 @@
|
|
import net.minecraft.util.Icon;
|
|
import net.minecraft.world.World;
|
|
|
|
-public class BlockCactus extends Block
|
|
+import net.minecraftforge.common.EnumPlantType;
|
|
+import net.minecraftforge.common.ForgeDirection;
|
|
+import net.minecraftforge.common.IPlantable;
|
|
+
|
|
+public class BlockCactus extends Block implements IPlantable
|
|
{
|
|
@SideOnly(Side.CLIENT)
|
|
private Icon cactusTopIcon;
|
|
@@ -158,7 +162,7 @@
|
|
else
|
|
{
|
|
int l = par1World.getBlockId(par2, par3 - 1, par4);
|
|
- return l == Block.cactus.blockID || l == Block.sand.blockID;
|
|
+ return blocksList[l] != null && blocksList[l].canSustainPlant(par1World, par2, par3 - 1, par4, ForgeDirection.UP, this);
|
|
}
|
|
}
|
|
|
|
@@ -182,4 +186,22 @@
|
|
this.cactusTopIcon = par1IconRegister.registerIcon("cactus_top");
|
|
this.cactusBottomIcon = par1IconRegister.registerIcon("cactus_bottom");
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public EnumPlantType getPlantType(World world, int x, int y, int z)
|
|
+ {
|
|
+ return EnumPlantType.Desert;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public int getPlantID(World world, int x, int y, int z)
|
|
+ {
|
|
+ return blockID;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public int getPlantMetadata(World world, int x, int y, int z)
|
|
+ {
|
|
+ return -1;
|
|
+ }
|
|
}
|