Fix harvest logic running in addition to shearable logic
This commit is contained in:
parent
b2033d642c
commit
fe2c4c569d
3 changed files with 19 additions and 3 deletions
|
@ -45,7 +45,16 @@
|
||||||
{
|
{
|
||||||
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_);
|
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_);
|
||||||
}
|
}
|
||||||
@@ -296,6 +293,32 @@
|
@@ -220,8 +217,6 @@
|
||||||
|
else
|
||||||
|
{
|
||||||
|
p_176489_4_.func_71029_a(StatList.field_75934_C[Block.func_149682_b(this)]);
|
||||||
|
- int i = (enumplanttype == BlockDoublePlant.EnumPlantType.GRASS ? BlockTallGrass.EnumType.GRASS : BlockTallGrass.EnumType.FERN).func_177044_a();
|
||||||
|
- func_180635_a(p_176489_1_, p_176489_2_, new ItemStack(Blocks.field_150329_H, 2, i));
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@@ -296,6 +291,32 @@
|
||||||
return Block.EnumOffsetType.XZ;
|
return Block.EnumOffsetType.XZ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,13 @@
|
||||||
--- ../src-base/minecraft/net/minecraft/block/BlockOldLeaf.java
|
--- ../src-base/minecraft/net/minecraft/block/BlockOldLeaf.java
|
||||||
+++ ../src-work/minecraft/net/minecraft/block/BlockOldLeaf.java
|
+++ ../src-work/minecraft/net/minecraft/block/BlockOldLeaf.java
|
||||||
@@ -155,4 +155,11 @@
|
@@ -148,11 +148,17 @@
|
||||||
|
if (!p_180657_1_.field_72995_K && p_180657_2_.func_71045_bC() != null && p_180657_2_.func_71045_bC().func_77973_b() == Items.field_151097_aZ)
|
||||||
|
{
|
||||||
|
p_180657_2_.func_71029_a(StatList.field_75934_C[Block.func_149682_b(this)]);
|
||||||
|
- func_180635_a(p_180657_1_, p_180657_3_, new ItemStack(Item.func_150898_a(this), 1, ((BlockPlanks.EnumType)p_180657_4_.func_177229_b(field_176239_P)).func_176839_a()));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_);
|
super.func_180657_a(p_180657_1_, p_180657_2_, p_180657_3_, p_180657_4_, p_180657_5_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
+ @Override
|
+ @Override
|
||||||
+ public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, net.minecraft.entity.player.EntityPlayer player)
|
+ public boolean onBlockStartBreak(ItemStack itemstack, BlockPos pos, net.minecraft.entity.player.EntityPlayer player)
|
||||||
+ {
|
+ {
|
||||||
+ if (player.field_70170_p.field_72995_K)
|
+ if (player.field_70170_p.field_72995_K || player.field_71075_bZ.field_75098_d)
|
||||||
+ {
|
+ {
|
||||||
+ return false;
|
+ return false;
|
||||||
+ }
|
+ }
|
||||||
|
|
Loading…
Reference in a new issue