Files
Purpur/patches/server/0036-Fix-cow-rotation-when-shearing-mooshroom.patch
2024-12-03 20:55:24 -08:00

25 lines
1.6 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Fri, 3 May 2019 23:53:16 -0500
Subject: [PATCH] Fix cow rotation when shearing mooshroom
diff --git a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
index 575a3f5e2c003474a4a4d09db4ba495eddad3ce7..e5d8f23032244c77b4e2bcb8ead0b20a27acadf7 100644
--- a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
+++ b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
@@ -218,6 +218,13 @@ public class MushroomCow extends Cow implements Shearable, VariantHolder<Mushroo
world.playSound((Player) null, (Entity) this, SoundEvents.MOOSHROOM_SHEAR, shearedSoundCategory, 1.0F, 1.0F);
this.convertTo(EntityType.COW, ConversionParams.single(this, false, false), (entitycow) -> {
world.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(0.5D), this.getZ(), 1, 0.0D, 0.0D, 0.0D, 0.0D);
+ // Purpur start
+ entitycow.copyPosition(this);
+ entitycow.yBodyRot = this.yBodyRot;
+ entitycow.setYHeadRot(this.getYHeadRot());
+ entitycow.yRotO = this.yRotO;
+ entitycow.xRotO = this.xRotO;
+ // Purpur end
// 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);