geforkt von Mirrors/Paper
Fix drops for shearing mushroom cow (#11632)
Dieser Commit ist enthalten in:
Ursprung
1cc1ee1676
Commit
5ada2514df
@ -113,13 +113,12 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
- }
|
||||
- worldserver1.addFreshEntity(entityitem);
|
||||
- // CraftBukkit end
|
||||
+ // Paper start - custom shear drops; moved drop generation to separate method
|
||||
+ drops.forEach(itemstack1 -> {
|
||||
+ for (final ItemStack drop : drops) {
|
||||
+ ItemEntity entityitem = new ItemEntity(this.level(), this.getX(), this.getY(1.0D), this.getZ(), drop);
|
||||
+ this.spawnAtLocation(world, entityitem);
|
||||
}
|
||||
- }
|
||||
-
|
||||
+ // Paper start - custom shear drops; moved drop generation to separate method
|
||||
+ drops.forEach(drop -> {
|
||||
+ ItemEntity entityitem = new ItemEntity(this.level(), this.getX(), this.getY(1.0D), this.getZ(), drop);
|
||||
+ this.spawnAtLocation(world, entityitem);
|
||||
+ // Paper end - custom shear drops; moved drop generation to separate method
|
||||
});
|
||||
}, EntityTransformEvent.TransformReason.SHEARED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SHEARED); // CraftBukkit
|
||||
@ -177,8 +176,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ drops.forEach(itemstack1 -> { // Paper - custom drops - loop in generated default drops
|
||||
+ if (true) { // Paper - custom drops - loop in generated default drops
|
||||
this.forceDrops = true; // CraftBukkit
|
||||
ItemEntity entityitem = this.spawnAtLocation(worldserver1, itemstack1.copyWithCount(1), 1.0F);
|
||||
- ItemEntity entityitem = this.spawnAtLocation(worldserver1, itemstack1.copyWithCount(1), 1.0F);
|
||||
+ ItemEntity entityitem = this.spawnAtLocation(worldserver1, itemstack1, 1.0F); // Paper - custom drops - copy already done above
|
||||
this.forceDrops = false; // CraftBukkit
|
||||
|
||||
if (entityitem != null) {
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java b/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
|
||||
index 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/animal/SnowGolem.java
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren