mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Fix cow rotation when shearing mooshroom
This commit is contained in:
committed by
granny
parent
5b5266b61b
commit
ae7a31be29
@@ -1,24 +0,0 @@
|
||||
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/net/minecraft/world/entity/animal/MushroomCow.java b/net/minecraft/world/entity/animal/MushroomCow.java
|
||||
index 215ec83077a1d40fdcee5bf4cd1af0d46fdd695e..96078cf11f13c85a3f019f70fa02668c43dbc559 100644
|
||||
--- a/net/minecraft/world/entity/animal/MushroomCow.java
|
||||
+++ b/net/minecraft/world/entity/animal/MushroomCow.java
|
||||
@@ -219,6 +219,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);
|
||||
@@ -0,0 +1,16 @@
|
||||
--- a/net/minecraft/world/entity/animal/MushroomCow.java
|
||||
+++ b/net/minecraft/world/entity/animal/MushroomCow.java
|
||||
@@ -192,6 +_,13 @@
|
||||
level.playSound(null, this, SoundEvents.MOOSHROOM_SHEAR, soundSource, 1.0F, 1.0F);
|
||||
this.convertTo(EntityType.COW, ConversionParams.single(this, false, false), mob -> {
|
||||
level.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(0.5), this.getZ(), 1, 0.0, 0.0, 0.0, 0.0);
|
||||
+ // Purpur start - Fix cow rotation when shearing mooshroom
|
||||
+ mob.copyPosition(this);
|
||||
+ mob.yBodyRot = this.yBodyRot;
|
||||
+ mob.setYHeadRot(this.getYHeadRot());
|
||||
+ mob.yRotO = this.yRotO;
|
||||
+ mob.xRotO = this.xRotO;
|
||||
+ // Purpur end - Fix cow rotation when shearing mooshroom
|
||||
// Paper start - custom shear drops; moved drop generation to separate method
|
||||
drops.forEach(drop -> {
|
||||
this.spawnAtLocation(level, new ItemEntity(this.level(), this.getX(), this.getY(1.0), this.getZ(), drop));
|
||||
Reference in New Issue
Block a user