13
0
geforkt von Mirrors/Paper

SPIGOT-3020: Fix issue with BlockBreakEvent throwing AssertionError when setting a player's tool to AIR/NULL

Dieser Commit ist enthalten in:
Shane Bee 2020-08-09 18:42:07 +10:00 committet von md_5
Ursprung 8fb65851f1
Commit f6227934a3
Es konnte kein GPG-Schlüssel zu dieser Signatur gefunden werden
GPG-Schlüssel-ID: E8E901AC7C617C11

Datei anzeigen

@ -41,15 +41,17 @@
if (entityhuman instanceof EntityPlayer) {
CriterionTriggers.y.a((EntityPlayer) entityhuman, blockposition, itemstack);
}
@@ -55,7 +75,7 @@
@@ -55,8 +75,8 @@
SoundEffectType soundeffecttype = iblockdata1.getStepSound();
- world.playSound(entityhuman, blockposition, this.a(iblockdata1), SoundCategory.BLOCKS, (soundeffecttype.a() + 1.0F) / 2.0F, soundeffecttype.b() * 0.8F);
- if (entityhuman == null || !entityhuman.abilities.canInstantlyBuild) {
+ // world.playSound(entityhuman, blockposition, this.a(iblockdata1), SoundCategory.BLOCKS, (soundeffecttype.a() + 1.0F) / 2.0F, soundeffecttype.b() * 0.8F);
if (entityhuman == null || !entityhuman.abilities.canInstantlyBuild) {
+ if ((entityhuman == null || !entityhuman.abilities.canInstantlyBuild) && itemstack != ItemStack.b) { // CraftBukkit
itemstack.subtract(1);
}
@@ -92,6 +112,21 @@
if (nbttagcompound != null) {