From 9fa497cd5568f2c232ef19f6c085dcca1a971ce0 Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 12 Dec 2014 10:56:20 +1100 Subject: Add implementation of the elder Guardian API --- nms-patches/Entity.patch | 10 ++++++++++ nms-patches/EntityAgeable.patch | 13 +++++++++++-- nms-patches/EntityGuardian.patch | 21 +++++++++++++++++++++ nms-patches/EntityZombie.patch | 14 ++++++++++++-- 4 files changed, 54 insertions(+), 4 deletions(-) create mode 100644 nms-patches/EntityGuardian.patch (limited to 'nms-patches') diff --git a/nms-patches/Entity.patch b/nms-patches/Entity.patch index 610ffd47..4fcba5c0 100644 --- a/nms-patches/Entity.patch +++ b/nms-patches/Entity.patch @@ -50,6 +50,16 @@ public int getId() { return this.id; +@@ -135,7 +169,8 @@ + this.dead = true; + } + +- protected void a(float f, float f1) { ++ // PAIL: Access + rename please ++ public void a(float f, float f1) { // CraftBukkit - protected to public + if (f != this.width || f1 != this.length) { + float f2 = this.width; + @@ -150,6 +184,33 @@ } diff --git a/nms-patches/EntityAgeable.patch b/nms-patches/EntityAgeable.patch index b537248b..4abc0cf7 100644 --- a/nms-patches/EntityAgeable.patch +++ b/nms-patches/EntityAgeable.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/EntityAgeable.java 2014-11-28 17:43:43.061707436 +0000 -+++ src/main/java/net/minecraft/server/EntityAgeable.java 2014-11-28 17:38:22.000000000 +0000 +--- ../work/decompile-8eb82bde//net/minecraft/server/EntityAgeable.java Thu Dec 4 19:00:43 2014 ++++ src/main/java/net/minecraft/server/EntityAgeable.java Thu Dec 4 18:45:16 2014 @@ -7,6 +7,7 @@ protected int c; private float bk = -1.0F; @@ -46,3 +46,12 @@ if (this.c > 0) { if (this.c % 4 == 0) { this.world.addParticle(EnumParticle.VILLAGER_HAPPY, this.locX + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, this.locY + 0.5D + (double) (this.random.nextFloat() * this.length), this.locZ + (double) (this.random.nextFloat() * this.width * 2.0F) - (double) this.width, 0.0D, 0.0D, 0.0D, new int[0]); +@@ -146,7 +149,7 @@ + this.a(flag ? 0.5F : 1.0F); + } + +- protected final void a(float f, float f1) { ++ public final void a(float f, float f1) { // CraftBukkit - protected to public + boolean flag = this.bk > 0.0F; + + this.bk = f; diff --git a/nms-patches/EntityGuardian.patch b/nms-patches/EntityGuardian.patch new file mode 100644 index 00000000..8c419e56 --- /dev/null +++ b/nms-patches/EntityGuardian.patch @@ -0,0 +1,21 @@ +--- ../work/decompile-8eb82bde//net/minecraft/server/EntityGuardian.java Thu Dec 11 13:57:14 2014 ++++ src/main/java/net/minecraft/server/EntityGuardian.java Thu Dec 11 13:55:14 2014 +@@ -14,7 +14,7 @@ + private EntityLiving bn; + private int bo; + private boolean bp; +- private PathfinderGoalRandomStroll bq; ++ public PathfinderGoalRandomStroll bq; // CraftBukkit - private to public + + public EntityGuardian(World world) { + super(world); +@@ -35,7 +35,8 @@ + this.c = this.b = this.random.nextFloat(); + } + +- protected void aW() { ++ // PAIL: Access + rename please ++ public void aW() { // CraftBukkit - protected to public + super.aW(); + this.getAttributeInstance(GenericAttributes.e).setValue(6.0D); + this.getAttributeInstance(GenericAttributes.d).setValue(0.5D); diff --git a/nms-patches/EntityZombie.patch b/nms-patches/EntityZombie.patch index 42230d6e..25dadd99 100644 --- a/nms-patches/EntityZombie.patch +++ b/nms-patches/EntityZombie.patch @@ -1,5 +1,5 @@ ---- ../work/decompile-8eb82bde//net/minecraft/server/EntityZombie.java 2014-11-28 17:43:43.185707433 +0000 -+++ src/main/java/net/minecraft/server/EntityZombie.java 2014-11-28 17:38:22.000000000 +0000 +--- ../work/decompile-8eb82bde//net/minecraft/server/EntityZombie.java Thu Dec 11 13:57:17 2014 ++++ src/main/java/net/minecraft/server/EntityZombie.java Thu Dec 11 13:56:17 2014 @@ -4,6 +4,14 @@ import java.util.List; import java.util.UUID; @@ -106,3 +106,13 @@ entityvillager.addEffect(new MobEffect(MobEffectList.CONFUSION.id, 200, 0)); this.world.a((EntityHuman) null, 1017, new BlockPosition((int) this.locX, (int) this.locY, (int) this.locZ), 0); } +@@ -487,7 +516,8 @@ + this.a(flag ? 0.5F : 1.0F); + } + +- protected final void a(float f, float f1) { ++ // PAIL: Access + rename please ++ public final void a(float f, float f1) { // CraftBukkit - protected to public + boolean flag = this.bo > 0.0F && this.bp > 0.0F; + + this.bo = f; -- cgit v1.2.3