mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-25 22:44:32 +00:00
38 lines
1.4 KiB
Diff
38 lines
1.4 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockCactus.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockCactus.java
|
|
@@ -18,7 +18,7 @@
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
|
|
-public class BlockCactus extends Block
|
|
+public class BlockCactus extends Block implements net.minecraftforge.common.IPlantable
|
|
{
|
|
public static final PropertyInteger field_176587_a = PropertyInteger.func_177719_a("age", 0, 15);
|
|
|
|
@@ -109,7 +109,7 @@
|
|
}
|
|
|
|
Block block = p_176586_1_.func_180495_p(p_176586_2_.func_177977_b()).func_177230_c();
|
|
- return block == Blocks.field_150434_aF || block == Blocks.field_150354_m;
|
|
+ return block.canSustainPlant(p_176586_1_, p_176586_2_.func_177977_b(), EnumFacing.UP, this);
|
|
}
|
|
|
|
public void func_180634_a(World p_180634_1_, BlockPos p_180634_2_, IBlockState p_180634_3_, Entity p_180634_4_)
|
|
@@ -137,4 +137,16 @@
|
|
{
|
|
return new BlockState(this, new IProperty[] {field_176587_a});
|
|
}
|
|
+
|
|
+ @Override
|
|
+ public net.minecraftforge.common.EnumPlantType getPlantType(net.minecraft.world.IBlockAccess world, BlockPos pos)
|
|
+ {
|
|
+ return net.minecraftforge.common.EnumPlantType.Desert;
|
|
+ }
|
|
+
|
|
+ @Override
|
|
+ public IBlockState getPlant(net.minecraft.world.IBlockAccess world, BlockPos pos)
|
|
+ {
|
|
+ return func_176223_P();
|
|
+ }
|
|
}
|