2013-11-19 01:17:45 +00:00
|
|
|
--- ../src-base/minecraft/net/minecraft/block/BlockReed.java
|
|
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockReed.java
|
2013-12-21 08:10:35 +00:00
|
|
|
@@ -11,7 +11,11 @@
|
|
|
|
import net.minecraft.world.IBlockAccess;
|
2012-12-13 07:45:13 +00:00
|
|
|
import net.minecraft.world.World;
|
2012-09-21 02:53:43 +00:00
|
|
|
|
|
|
|
-public class BlockReed extends Block
|
|
|
|
+import net.minecraftforge.common.EnumPlantType;
|
2013-12-21 08:10:35 +00:00
|
|
|
+import net.minecraftforge.common.util.ForgeDirection;
|
2012-09-21 02:53:43 +00:00
|
|
|
+import net.minecraftforge.common.IPlantable;
|
|
|
|
+
|
|
|
|
+public class BlockReed extends Block implements IPlantable
|
|
|
|
{
|
2013-12-21 08:10:35 +00:00
|
|
|
private static final String __OBFID = "CL_00000300";
|
|
|
|
|
|
|
|
@@ -57,7 +61,7 @@
|
|
|
|
public boolean func_149742_c(World p_149742_1_, int p_149742_2_, int p_149742_3_, int p_149742_4_)
|
2012-11-18 09:36:21 +00:00
|
|
|
{
|
2013-12-21 08:10:35 +00:00
|
|
|
Block block = p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_ - 1, p_149742_4_);
|
|
|
|
- return block == this ? true : (block != Blocks.grass && block != Blocks.dirt && block != Blocks.sand ? false : (p_149742_1_.func_147439_a(p_149742_2_ - 1, p_149742_3_ - 1, p_149742_4_).func_149688_o() == Material.field_151586_h ? true : (p_149742_1_.func_147439_a(p_149742_2_ + 1, p_149742_3_ - 1, p_149742_4_).func_149688_o() == Material.field_151586_h ? true : (p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_ - 1, p_149742_4_ - 1).func_149688_o() == Material.field_151586_h ? true : p_149742_1_.func_147439_a(p_149742_2_, p_149742_3_ - 1, p_149742_4_ + 1).func_149688_o() == Material.field_151586_h))));
|
|
|
|
+ return block.canSustainPlant(p_149742_1_, p_149742_2_, p_149742_3_ - 1, p_149742_4_, ForgeDirection.UP, this);
|
2012-11-18 09:36:21 +00:00
|
|
|
}
|
|
|
|
|
2013-12-21 08:10:35 +00:00
|
|
|
public void func_149695_a(World p_149695_1_, int p_149695_2_, int p_149695_3_, int p_149695_4_, Block p_149695_5_)
|
|
|
|
@@ -120,4 +124,22 @@
|
2012-09-21 02:53:43 +00:00
|
|
|
{
|
2013-12-21 08:10:35 +00:00
|
|
|
return p_149720_1_.getBiomeGenForCoords(p_149720_2_, p_149720_4_).func_150558_b(p_149720_2_, p_149720_3_, p_149720_4_);
|
2012-09-21 02:53:43 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
2013-12-21 08:10:35 +00:00
|
|
|
+ public EnumPlantType getPlantType(IBlockAccess world, int x, int y, int z)
|
2012-09-21 02:53:43 +00:00
|
|
|
+ {
|
|
|
|
+ return EnumPlantType.Beach;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
2013-12-21 08:10:35 +00:00
|
|
|
+ public Block getPlant(IBlockAccess world, int x, int y, int z)
|
2012-09-21 02:53:43 +00:00
|
|
|
+ {
|
2013-12-21 08:10:35 +00:00
|
|
|
+ return this;
|
2012-09-21 02:53:43 +00:00
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ @Override
|
2013-12-21 08:10:35 +00:00
|
|
|
+ public int getPlantMetadata(IBlockAccess world, int x, int y, int z)
|
2012-09-21 02:53:43 +00:00
|
|
|
+ {
|
|
|
|
+ return world.getBlockMetadata(x, y, z);
|
|
|
|
+ }
|
|
|
|
}
|