mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-18 11:29:15 +00:00
Some things to note: Netty is screwy so currently can't join single player. @cpw Crafting has been MAJORY reworked. The current GameRegistry functions are nooped, this is IN THE WORKS. Just need to move the recipe list to a full class registry, and then re implement the in-code recipe registration. Also, it IS advised that modders move to JSON, because ideally we'll see a S->C recipe syncing system in 1.13 which would allow servers to have custom recipes. OreDictionary currently 1/2 works, need to write a better algorithm for replacing ingredients. Please be patient Rendering: A lot of functions got a new float parameter, this is similar to partial ticks, needs more research
59 lines
2.5 KiB
Diff
59 lines
2.5 KiB
Diff
--- ../src-base/minecraft/net/minecraft/block/BlockReed.java
|
|
+++ ../src-work/minecraft/net/minecraft/block/BlockReed.java
|
|
@@ -21,7 +21,7 @@
|
|
import net.minecraftforge.fml.relauncher.Side;
|
|
import net.minecraftforge.fml.relauncher.SideOnly;
|
|
|
|
-public class BlockReed extends Block
|
|
+public class BlockReed extends Block implements net.minecraftforge.common.IPlantable
|
|
{
|
|
public static final PropertyInteger field_176355_a = PropertyInteger.func_177719_a("age", 0, 15);
|
|
protected static final AxisAlignedBB field_185701_b = new AxisAlignedBB(0.125D, 0.0D, 0.125D, 0.875D, 1.0D, 0.875D);
|
|
@@ -55,6 +55,8 @@
|
|
{
|
|
int j = ((Integer)p_180650_3_.func_177229_b(field_176355_a)).intValue();
|
|
|
|
+ if(net.minecraftforge.common.ForgeHooks.onCropsGrowPre(p_180650_1_, p_180650_2_, p_180650_3_, true))
|
|
+ {
|
|
if (j == 15)
|
|
{
|
|
p_180650_1_.func_175656_a(p_180650_2_.func_177984_a(), this.func_176223_P());
|
|
@@ -64,6 +66,8 @@
|
|
{
|
|
p_180650_1_.func_180501_a(p_180650_2_, p_180650_3_.func_177226_a(field_176355_a, Integer.valueOf(j + 1)), 4);
|
|
}
|
|
+ net.minecraftforge.common.ForgeHooks.onCropsGrowPost(p_180650_1_, p_180650_2_, p_180650_3_, p_180650_1_.func_180495_p(p_180650_2_));
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
@@ -71,7 +75,9 @@
|
|
|
|
public boolean func_176196_c(World p_176196_1_, BlockPos p_176196_2_)
|
|
{
|
|
- Block block = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b()).func_177230_c();
|
|
+ IBlockState state = p_176196_1_.func_180495_p(p_176196_2_.func_177977_b());
|
|
+ Block block = state.func_177230_c();
|
|
+ if (block.canSustainPlant(state, p_176196_1_, p_176196_2_.func_177977_b(), EnumFacing.UP, this)) return true;
|
|
|
|
if (block == this)
|
|
{
|
|
@@ -165,6 +171,17 @@
|
|
return ((Integer)p_176201_1_.func_177229_b(field_176355_a)).intValue();
|
|
}
|
|
|
|
+ @Override
|
|
+ public net.minecraftforge.common.EnumPlantType getPlantType(IBlockAccess world, BlockPos pos)
|
|
+ {
|
|
+ return net.minecraftforge.common.EnumPlantType.Beach;
|
|
+ }
|
|
+ @Override
|
|
+ public IBlockState getPlant(IBlockAccess world, BlockPos pos)
|
|
+ {
|
|
+ return this.func_176223_P();
|
|
+ }
|
|
+
|
|
protected BlockStateContainer func_180661_e()
|
|
{
|
|
return new BlockStateContainer(this, new IProperty[] {field_176355_a});
|