SPIGOT-6665: Shearing a Snowman does not drop a carved pumpkin

This commit is contained in:
md_5 2021-07-22 17:51:53 +10:00
parent e8e3cbccf5
commit 0abf420c4b
No known key found for this signature in database
GPG Key ID: E8E901AC7C617C11

View File

@ -41,3 +41,13 @@
this.shear(SoundCategory.PLAYERS); this.shear(SoundCategory.PLAYERS);
this.a(GameEvent.SHEAR, (Entity) entityhuman); this.a(GameEvent.SHEAR, (Entity) entityhuman);
if (!this.level.isClientSide) { if (!this.level.isClientSide) {
@@ -166,7 +175,9 @@
this.level.playSound((EntityHuman) null, (Entity) this, SoundEffects.SNOW_GOLEM_SHEAR, soundcategory, 1.0F, 1.0F);
if (!this.level.isClientSide()) {
this.setHasPumpkin(false);
+ this.forceDrops = true; // CraftBukkit
this.a(new ItemStack(Items.CARVED_PUMPKIN), 1.7F);
+ this.forceDrops = false; // CraftBukkit
}
}