Skip to content

Commit

Permalink
Fix blocks only harvestable with tool not dropping item on last tool …
Browse files Browse the repository at this point in the history
…use (#108)
  • Loading branch information
zavdav authored Oct 24, 2024
1 parent 9636c90 commit a6f0278
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/java/net/minecraft/server/ItemInWorldManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,11 @@ public boolean c(int i, int j, int k) {
boolean flag = this.b(i, j, k);
ItemStack itemstack = this.player.G();

if (flag && this.player.b(Block.byId[l])) {
Block.byId[l].a(this.world, this.player, i, j, k, i1);
((EntityPlayer) this.player).netServerHandler.sendPacket(new Packet53BlockChange(i, j, k, this.world));
}

if (itemstack != null) {
itemstack.a(l, i, j, k, this.player);
if (itemstack.count == 0) {
Expand All @@ -185,11 +190,6 @@ public boolean c(int i, int j, int k) {
}
}

if (flag && this.player.b(Block.byId[l])) {
Block.byId[l].a(this.world, this.player, i, j, k, i1);
((EntityPlayer) this.player).netServerHandler.sendPacket(new Packet53BlockChange(i, j, k, this.world));
}

return flag;
}

Expand Down

0 comments on commit a6f0278

Please sign in to comment.