summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authorFearThe137 <admin@fearthe1337.com>2014-12-06 22:45:51 +0100
committermd_5 <git@md-5.net>2014-12-24 09:11:25 +1100
commit2db3ea29a650c045fdaf155d636dbd77a07fa21f (patch)
tree5d1a585e9de82baefa1657b2215a92dbc4b5fb6e /nms-patches
parent81ab957aa53278e8642b0b30ec6aacc9d42fcd4e (diff)
downloadcraftbukkit-2db3ea29a650c045fdaf155d636dbd77a07fa21f.tar
craftbukkit-2db3ea29a650c045fdaf155d636dbd77a07fa21f.tar.gz
craftbukkit-2db3ea29a650c045fdaf155d636dbd77a07fa21f.tar.lz
craftbukkit-2db3ea29a650c045fdaf155d636dbd77a07fa21f.tar.xz
craftbukkit-2db3ea29a650c045fdaf155d636dbd77a07fa21f.zip
Implement Rabbit types.
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/EntityInsentient.patch17
-rw-r--r--nms-patches/EntityRabbit.patch25
2 files changed, 39 insertions, 3 deletions
diff --git a/nms-patches/EntityInsentient.patch b/nms-patches/EntityInsentient.patch
index 1672b0e4..36f6f715 100644
--- a/nms-patches/EntityInsentient.patch
+++ b/nms-patches/EntityInsentient.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/EntityInsentient.java 2014-11-28 17:43:43.105707435 +0000
-+++ src/main/java/net/minecraft/server/EntityInsentient.java 2014-11-28 17:38:23.000000000 +0000
+--- ../work/decompile-8eb82bde//net/minecraft/server/EntityInsentient.java Sat Dec 6 21:48:11 2014
++++ src/main/java/net/minecraft/server/EntityInsentient.java Sat Dec 6 21:18:38 2014
@@ -4,6 +4,15 @@
import java.util.List;
import java.util.UUID;
@@ -16,6 +16,17 @@
public abstract class EntityInsentient extends EntityLiving {
public int a_;
+@@ -13,8 +22,8 @@
+ protected ControllerJump g;
+ private EntityAIBodyControl b;
+ protected NavigationAbstract navigation;
+- protected final PathfinderGoalSelector goalSelector;
+- protected final PathfinderGoalSelector targetSelector;
++ public PathfinderGoalSelector goalSelector; // PAIL protected final to public
++ public PathfinderGoalSelector targetSelector; // PAIL protected final to public
+ private EntityLiving goalTarget;
+ private EntitySenses bi;
+ private ItemStack[] equipment = new ItemStack[5];
@@ -39,7 +48,9 @@
for (int i = 0; i < this.dropChances.length; ++i) {
this.dropChances[i] = 0.085F;
@@ -161,4 +172,4 @@
+ this.world.getServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit
this.unleash(false, true);
}
- }
+ } \ No newline at end of file
diff --git a/nms-patches/EntityRabbit.patch b/nms-patches/EntityRabbit.patch
new file mode 100644
index 00000000..27893375
--- /dev/null
+++ b/nms-patches/EntityRabbit.patch
@@ -0,0 +1,25 @@
+--- ../work/decompile-8eb82bde//net/minecraft/server/EntityRabbit.java Sat Dec 6 21:44:10 2014
++++ src/main/java/net/minecraft/server/EntityRabbit.java Sat Dec 6 21:33:23 2014
+@@ -21,6 +21,12 @@
+ this.g = new ControllerJumpRabbit(this, this);
+ this.moveController = new ControllerMoveRabbit(this);
+ ((Navigation) this.getNavigation()).a(true);
++ this.initializePathFinderGoals(); // CraftBukkit - moved code
++ this.b(0.0D);
++ }
++
++ // CraftBukkit start - code from constructor
++ public void initializePathFinderGoals(){
+ this.navigation.a(2.5F);
+ this.goalSelector.a(1, new PathfinderGoalFloat(this));
+ this.goalSelector.a(1, new PathfinderGoalRabbitPanic(this, 1.33D));
+@@ -31,8 +37,8 @@
+ this.goalSelector.a(11, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 10.0F));
+ this.bk = new PathfinderGoalRabbitAvoidTarget(this, new EntitySelectorRabbitWolf(this), 16.0F, 1.33D, 1.33D);
+ this.goalSelector.a(4, this.bk);
+- this.b(0.0D);
+ }
++ // CraftBukkit end
+
+ protected float bD() {
+ return this.moveController.a() && this.moveController.e() > this.locY + 0.5D ? 0.5F : this.br.b(); \ No newline at end of file