Add implementation of the elder Guardian API

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2014-12-12 10:56:20 +11:00
parent 4a6bb1a983
commit c2571d4821
5 changed files with 81 additions and 4 deletions

View File

@@ -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;