13
0
geforkt von Mirrors/Paper

Minor logic change and small cleanups

Dieser Commit ist enthalten in:
Erik Broes 2011-03-24 12:11:28 +01:00
Ursprung 748b71b3cc
Commit d6c3fe23e5
2 geänderte Dateien mit 6 neuen und 5 gelöschten Zeilen

Datei anzeigen

@ -204,7 +204,8 @@ public class ItemInWorldManager {
} else { } else {
result = Block.byId[i1].a(world, i, j, k, entityhuman); result = Block.byId[i1].a(world, i, j, k, entityhuman);
} }
if (itemstack != null && event.useItemInHand() != Event.Result.DENY && (!result || event.useItemInHand() == Event.Result.ALLOW)) { // If we have 'true' and no explicit deny *or* an explicit allow -- run the item part of the hook
if (itemstack != null && ((!result && event.useItemInHand() != Event.Result.DENY) || event.useItemInHand() == Event.Result.ALLOW)) {
result = itemstack.a(entityhuman, world, i, j, k, l); result = itemstack.a(entityhuman, world, i, j, k, l);
} }
} }

Datei anzeigen

@ -374,7 +374,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
} }
public void a(Packet15Place packet15place) { public void a(Packet15Place packet15place) {
// CraftBukkit // CraftBukkit start
// This is a horrible hack needed because the client sends 2 packets on 'right mouse click' // This is a horrible hack needed because the client sends 2 packets on 'right mouse click'
// aimed at a block. We shouldn't need to get the second packet if the data is handled // aimed at a block. We shouldn't need to get the second packet if the data is handled
// but we cannot know what the client will do, so we might still get it // but we cannot know what the client will do, so we might still get it
@ -409,7 +409,7 @@ public class NetServerHandler extends NetHandler implements ICommandListener {
return; return;
} }
// Don't call this event if using Buckets / signs // CraftBukkit start
PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.e, Action.RIGHT_CLICK_AIR, itemstack); PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.e, Action.RIGHT_CLICK_AIR, itemstack);
if (!event.isCancelled()) { if (!event.isCancelled()) {