mirror of
https://github.com/Dreeam-qwq/Gale.git
synced 2025-12-22 16:29:26 +00:00
50 lines
2.9 KiB
Diff
50 lines
2.9 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
From: MartijnMuijsers <martijnmuijsers@live.nl>
|
|
Date: Tue, 29 Nov 2022 15:55:05 +0100
|
|
Subject: [PATCH] Fix cow rotation when shearing mooshroom
|
|
|
|
License: MIT (https://opensource.org/licenses/MIT)
|
|
|
|
This patch is based on the following patch:
|
|
"Fix cow rotation when shearing mooshroom"
|
|
By: William Blake Galbreath <blake.galbreath@gmail.com>
|
|
As part of: Purpur (https://github.com/PurpurMC/Purpur)
|
|
Licensed under: MIT (https://opensource.org/licenses/MIT)
|
|
|
|
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 c4441ef250b95663198cfc9607d714dbe346512c..81ca0f568e484b1d013a9abfa809f1ba9956933b 100644
|
|
--- a/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
|
|
+++ b/src/main/java/net/minecraft/world/entity/animal/MushroomCow.java
|
|
@@ -180,7 +180,17 @@ public class MushroomCow extends Cow implements Shearable {
|
|
|
|
entitycow.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
|
|
entitycow.setHealth(this.getHealth());
|
|
+ // Gale start - Purpur - fix cow rotation when shearing mooshroom
|
|
+ if (this.level.galeConfig().gameplayMechanics.fixes.keepMooshroomRotationAfterShearing) {
|
|
+ entitycow.copyPosition(this);
|
|
+ entitycow.yBodyRot = this.yBodyRot;
|
|
+ entitycow.setYHeadRot(this.getYHeadRot());
|
|
+ entitycow.yRotO = this.yRotO;
|
|
+ entitycow.xRotO = this.xRotO;
|
|
+ } else {
|
|
+ // Gale end - Purpur - fix cow rotation when shearing mooshroom
|
|
entitycow.yBodyRot = this.yBodyRot;
|
|
+ } // Gale - Purpur - fix cow rotation when shearing mooshroom
|
|
if (this.hasCustomName()) {
|
|
entitycow.setCustomName(this.getCustomName());
|
|
entitycow.setCustomNameVisible(this.isCustomNameVisible());
|
|
diff --git a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
index 075af07a5c0e8328fb411d22fd29cea9c2b07711..a774fbeaa3829b1ae702fb61a0acb9d69d18a081 100644
|
|
--- a/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
+++ b/src/main/java/org/galemc/gale/configuration/GaleWorldConfiguration.java
|
|
@@ -248,7 +248,8 @@ public class GaleWorldConfiguration extends ConfigurationPart {
|
|
public class Fixes extends ConfigurationPart {
|
|
|
|
public boolean sandDuping = true; // Gale - Purpur - make sand duping fix configurable
|
|
-
|
|
+ public boolean keepMooshroomRotationAfterShearing = true; // Gale - Purpur - fix cow rotation when shearing mooshroom
|
|
+
|
|
// Gale start - Purpur - fix MC-238526
|
|
@Setting("mc-238526")
|
|
public boolean mc238526 = false;
|