mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-05 10:20:53 +01:00
Improved our handling of player interactions.
This commit is contained in:
parent
67dbe71bd9
commit
bff4d0f696
@ -495,7 +495,11 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||
if (i1 < this.server.getSpawnRadius() && !flag) {
|
||||
this.player.netServerHandler.sendPacket(new Packet53BlockChange(i, j, k, worldserver));
|
||||
} else {
|
||||
this.player.itemInWorldManager.dig(i, j, k, packet14blockdig.face);
|
||||
// CraftBukkit start
|
||||
if (this.getPlayer().getTargetBlock(null, 6).getLocation().equals(new Location(worldserver.getWorld(), i, j, k))) {
|
||||
this.player.itemInWorldManager.dig(i, j, k, packet14blockdig.face);
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
} else if (packet14blockdig.e == 2) {
|
||||
this.player.itemInWorldManager.a(i, j, k);
|
||||
@ -587,11 +591,11 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
|
||||
return;
|
||||
}
|
||||
flag = true; // spawn protection moved to ItemBlock!!!
|
||||
// CraftBukkit end
|
||||
|
||||
if (j1 > 16 || flag) {
|
||||
if (j1 > 16 || flag && this.getPlayer().getTargetBlock(null, 6).getLocation().equals(new Location(worldserver.getWorld(), i, j, k))) {
|
||||
this.player.itemInWorldManager.interact(this.player, worldserver, itemstack, i, j, k, l);
|
||||
}
|
||||
// CraftBukkit end
|
||||
|
||||
this.player.netServerHandler.sendPacket(new Packet53BlockChange(i, j, k, worldserver));
|
||||
if (l == 0) {
|
||||
|
Loading…
Reference in New Issue
Block a user