Skip to content

Commit

Permalink
Backport: Only break one block when sneaking (#65)
Browse files Browse the repository at this point in the history
* only break one block on shift

* sportless

Signed-off-by: NexusNull <[email protected]>

* fixes https://github.com/GTNewHorizons/TinkersConstruct/pull/65/files/41a1ecea30cb0506d068da30c16fc27dcf64550f#r1071818922

Signed-off-by: NexusNull <[email protected]>

Signed-off-by: NexusNull <[email protected]>
  • Loading branch information
NexusNull authored Jan 17, 2023
1 parent bb87654 commit 54e24a2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/tconstruct/library/tools/AOEHarvestTool.java
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ public boolean onBlockStartBreak(ItemStack stack, int x, int y, int z, EntityPla
NBTTagCompound toolTags = stack.getTagCompound().getCompoundTag("InfiTool");
if (toolTags == null || toolTags.getBoolean("Broken")) return super.onBlockStartBreak(stack, x, y, z, player);

if (player.isSneaking()) return super.onBlockStartBreak(stack, x, y, z, player);

MovingObjectPosition mop = AbilityHelper.raytraceFromEntity(player.worldObj, player, false, 4.5d);
if (mop == null) return super.onBlockStartBreak(stack, x, y, z, player);
int sideHit = mop.sideHit;
Expand Down

0 comments on commit 54e24a2

Please sign in to comment.