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

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot 2021-07-22 17:51:53 +10:00
parent 93f615157d
commit 9273a60cdb

View file

@ -41,3 +41,13 @@
this.shear(SoundCategory.PLAYERS);
this.a(GameEvent.SHEAR, (Entity) entityhuman);
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
}
}