1
0
Fork 0
mirror of https://github.com/PaperMC/Paper.git synced 2025-03-21 22:48:57 +01:00

Only add goat horn once ()

This commit is contained in:
Bjarne Koll 2025-01-22 18:20:24 +01:00 committed by GitHub
parent 30fdfb1aa1
commit 6b7650d81b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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
}