Only add goat horn once (#12001)

This commit is contained in:
Bjarne Koll
2025-01-22 18:20:24 +01:00
committed by GitHub
parent 30fdfb1aa1
commit 6b7650d81b

View File

@@ -25,10 +25,11 @@
this.playEatingSound();
}
@@ -350,7 +_,7 @@
@@ -349,8 +_,7 @@
double d1 = Mth.randomBetween(this.random, 0.3F, 0.7F);
double d2 = Mth.randomBetween(this.random, -0.2F, 0.2F);
ItemEntity itemEntity = new ItemEntity(this.level(), vec3.x(), vec3.y(), vec3.z(), itemStack, d, d1, d2);
this.level().addFreshEntity(itemEntity);
- this.level().addFreshEntity(itemEntity);
- return true;
+ return this.spawnAtLocation((net.minecraft.server.level.ServerLevel) this.level(), itemEntity) != null; // Paper - Call EntityDropItemEvent
}