Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-16 21:10:17 +01:00
[Bleeding] Fixed blocks dropping when BlockBreakEvent is canceled. Fixes BUKKIT-1299
Dieser Commit ist enthalten in:
Ursprung
942c1c6a3e
Commit
9c7ffb6d3c
@ -564,7 +564,7 @@ public class Block {
|
|||||||
} else {
|
} else {
|
||||||
int i1 = EnchantmentManager.getBonusBlockLootEnchantmentLevel(entityhuman.inventory);
|
int i1 = EnchantmentManager.getBonusBlockLootEnchantmentLevel(entityhuman.inventory);
|
||||||
|
|
||||||
this.b(world, i, j, k, l, i1);
|
this.dropNaturally(world, i, j, k, l, 1.0F, i1); // CraftBukkit
|
||||||
}
|
}
|
||||||
return this.dropList; // CraftBukkit
|
return this.dropList; // CraftBukkit
|
||||||
}
|
}
|
||||||
|
@ -539,6 +539,7 @@ public class CraftEventFactory {
|
|||||||
world.getServer().getPluginManager().callEvent(event);
|
world.getServer().getPluginManager().callEvent(event);
|
||||||
|
|
||||||
if (event.isCancelled()) {
|
if (event.isCancelled()) {
|
||||||
|
blockType.setDrops(new ArrayList<ItemStack>());
|
||||||
// Let the client know the block still exists
|
// Let the client know the block still exists
|
||||||
((EntityPlayer) player).netServerHandler.sendPacket(new Packet53BlockChange(x, y, z, world));
|
((EntityPlayer) player).netServerHandler.sendPacket(new Packet53BlockChange(x, y, z, world));
|
||||||
return true;
|
return true;
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren