Update to CraftBukkit 1.6.4

By: md_5 <md_5@live.com.au>
This commit is contained in:
Spigot
2013-09-20 11:46:45 +10:00
parent 759d56f0fb
commit d0f0d605bf
26 changed files with 129 additions and 177 deletions

View File

@@ -1,4 +1,4 @@
From 1d2d7a8171ed042710cb3fa421cb38d85b1b02f7 Mon Sep 17 00:00:00 2001
From 6649bf8e5ea40c1620570364905bb6d8deabbfa8 Mon Sep 17 00:00:00 2001
From: Dylan Xaldin <Puremin0rez515@gmail.com>
Date: Sat, 14 Sep 2013 11:02:34 +1000
Subject: [PATCH] Nerf Zombie Lag Issues
@@ -6,7 +6,7 @@ Subject: [PATCH] Nerf Zombie Lag Issues
Nerf the Zombie Lag issues in MC 1.6 - "Fixes" MC-17630
diff --git a/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java b/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java
index afd726f..faa46e0 100644
index a07c6cf..ee4bc7e 100644
--- a/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java
+++ b/src/main/java/net/minecraft/server/PathfinderGoalMeleeAttack.java
@@ -63,19 +63,88 @@ public class PathfinderGoalMeleeAttack extends PathfinderGoal {
@@ -26,12 +26,12 @@ index afd726f..faa46e0 100644
this.b.getControllerLook().a(entityliving, 30.0F, 30.0F);
+ double goalDistanceSq = this.b.e( entityliving.locX, entityliving.boundingBox.b, entityliving.locZ ); // Spigot
if ((this.e || this.b.getEntitySenses().canSee(entityliving)) && --this.h <= 0) {
- this.h = 4 + this.b.aC().nextInt(7);
- this.h = 4 + this.b.aD().nextInt(7);
- this.b.getNavigation().a((Entity) entityliving, this.d);
+ // Spigot start
+ double targetMovement = entityliving.e( pathX, pathY, pathZ );
+ // If this is true, then we are re-pathing
+ if ( ( this.h <= 0 && targetMovement >= 1.0D ) || ( this.h <= 0 && this.b.aC().nextInt( 200 ) == 0 ) ) /* EntityCreature random instance */
+ if ( ( this.h <= 0 && targetMovement >= 1.0D ) || ( this.h <= 0 && this.b.aD().nextInt( 200 ) == 0 ) ) /* EntityCreature random instance */
+
+ {
+ AttributeInstance rangeAttr = this.b.getAttributeInstance( GenericAttributes.b );
@@ -66,7 +66,7 @@ index afd726f..faa46e0 100644
+ pathX = entityliving.locX;
+ pathY = entityliving.boundingBox.b;
+ pathZ = entityliving.locZ;
+ this.h = 4 + this.b.aC().nextInt( 7 ); /* EntityCreature random instance */
+ this.h = 4 + this.b.aD().nextInt( 7 ); /* EntityCreature random instance */
+
+ if ( goalDistanceSq > 256.0D )
+ {
@@ -86,7 +86,7 @@ index afd726f..faa46e0 100644
+ {
+ if ( fullRangeSearchDelay <= 0 )
+ {
+ fullRangeSearchDelay = 4 + this.b.aC().nextInt( 4 ); /* EntityCreature random instance */
+ fullRangeSearchDelay = 4 + this.b.aD().nextInt( 4 ); /* EntityCreature random instance */
+ }
+ }
+ }
@@ -100,7 +100,7 @@ index afd726f..faa46e0 100644
+ if (goalDistanceSq <= d0) { // Spigot
if (this.c <= 0) {
this.c = 20;
if (this.b.aY() != null) {
if (this.b.aZ() != null) {
--
1.8.1.2