Update to 1.15

This commit is contained in:
William Blake Galbreath
2019-12-13 15:11:37 -06:00
parent af7f8f2bb5
commit 18ebfc0366
88 changed files with 1038 additions and 1068 deletions

View File

@@ -1,4 +1,4 @@
From 365204adec74f584e4009dbe535d916eb01cca2e Mon Sep 17 00:00:00 2001
From 8f5f46daa61cc43483f5fe2385799d8c6290b1bb Mon Sep 17 00:00:00 2001
From: William Blake Galbreath <blake.galbreath@gmail.com>
Date: Sat, 4 May 2019 01:10:30 -0500
Subject: [PATCH] cows to mooshroom when fed mushrooms
@@ -6,32 +6,32 @@ Subject: [PATCH] cows to mooshroom when fed mushrooms
---
.../java/net/minecraft/server/Entity.java | 2 +
.../java/net/minecraft/server/EntityCow.java | 70 +++++++++++++++++++
.../net/minecraft/server/EntityLiving.java | 10 ++-
.../net/minecraft/server/EntityLiving.java | 7 ++
.../java/net/pl3x/purpur/PurpurConfig.java | 5 ++
4 files changed, 85 insertions(+), 2 deletions(-)
4 files changed, 84 insertions(+)
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index e8def7f812..40ab9daade 100644
index f0d1a5b14d..682457e285 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -1049,6 +1049,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
@@ -1036,6 +1036,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
return false;
}
+ public void playSound(SoundEffect soundeffect, float volume, float pitch) { a(soundeffect, volume, pitch); } // Paper - OBFHELPER
public void a(SoundEffect soundeffect, float f, float f1) {
if (!this.isSilent()) {
this.world.playSound((EntityHuman) null, this.locX, this.locY, this.locZ, soundeffect, this.getSoundCategory(), f, f1);
@@ -2546,6 +2547,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.world.playSound((EntityHuman) null, this.locX(), this.locY(), this.locZ(), soundeffect, this.getSoundCategory(), f, f1);
@@ -2553,6 +2554,7 @@ public abstract class Entity implements INamableTileEntity, ICommandListener, Ke
this.invulnerable = flag;
}
+ public void copyPositionRotation(Entity entity) { this.u(entity); } // Purpur - OBFHELPER
public void u(Entity entity) {
this.setPositionRotation(entity.locX, entity.locY, entity.locZ, entity.yaw, entity.pitch);
this.setPositionRotation(entity.locX(), entity.locY(), entity.locZ(), entity.yaw, entity.pitch);
}
diff --git a/src/main/java/net/minecraft/server/EntityCow.java b/src/main/java/net/minecraft/server/EntityCow.java
index 2c8bbf20ae..2446e61c2b 100644
index 2c8bbf20ae..e1d0f0f38d 100644
--- a/src/main/java/net/minecraft/server/EntityCow.java
+++ b/src/main/java/net/minecraft/server/EntityCow.java
@@ -16,6 +16,7 @@ public class EntityCow extends EntityAnimal {
@@ -89,7 +89,7 @@ index 2c8bbf20ae..2446e61c2b 100644
+ } else {
+ mooshroom.setVariant(EntityMushroomCow.Type.RED);
+ }
+ mooshroom.setPositionRotation(this.locX, this.locY, this.locZ, this.yaw, this.pitch);
+ mooshroom.setPositionRotation(this.locX(), this.locY(), this.locZ(), this.yaw, this.pitch);
+ mooshroom.setHealth(this.getHealth());
+ mooshroom.setAge(getAge());
+ mooshroom.copyPositionRotation(this);
@@ -113,7 +113,7 @@ index 2c8bbf20ae..2446e61c2b 100644
+ }
+ for (int i = 0; i < 15; ++i) {
+ ((WorldServer) world).sendParticles(((WorldServer) world).players, null, Particles.HAPPY_VILLAGER,
+ locX + random.nextFloat(), locY + (random.nextFloat() * 2), locZ + random.nextFloat(), 1,
+ locX() + random.nextFloat(), locY() + (random.nextFloat() * 2), locZ() + random.nextFloat(), 1,
+ random.nextGaussian() * 0.05D, random.nextGaussian() * 0.05D, random.nextGaussian() * 0.05D, 0, true);
+ }
+ return true;
@@ -124,26 +124,23 @@ index 2c8bbf20ae..2446e61c2b 100644
public EntityCow createChild(EntityAgeable entityageable) {
return (EntityCow) EntityTypes.COW.a(this.world);
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index addbafe66a..f61784fab2 100644
index 80219f2df1..0e3062468b 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -2747,8 +2747,14 @@ public abstract class EntityLiving extends Entity {
this.aM = f;
@@ -2807,6 +2807,13 @@ public abstract class EntityLiving extends Entity {
this.aK = f;
}
- @Override
- public void l(float f) {
+ // Purpur start
+ public float getRenderYawOffset() {
+ return this.aK;
+ return this.aI;
+ }
+ // Purpur end
+
+ public void setRenderYawOffset(float f) { this.l(f); } // Purpur - OBFHELPER
+ @Override public void l(float f) {
this.aK = f;
}
@Override
public void l(float f) {
this.aI = f;
diff --git a/src/main/java/net/pl3x/purpur/PurpurConfig.java b/src/main/java/net/pl3x/purpur/PurpurConfig.java
index 6f378b5f69..26e95035b2 100644
--- a/src/main/java/net/pl3x/purpur/PurpurConfig.java