summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/net/minecraft/server')
-rw-r--r--src/main/java/net/minecraft/server/Entity.java6
-rw-r--r--src/main/java/net/minecraft/server/EntityLiving.java6
-rw-r--r--src/main/java/net/minecraft/server/EntitySquid.java2
-rw-r--r--src/main/java/net/minecraft/server/World.java3
4 files changed, 15 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/Entity.java b/src/main/java/net/minecraft/server/Entity.java
index 51a5b38c..d510392e 100644
--- a/src/main/java/net/minecraft/server/Entity.java
+++ b/src/main/java/net/minecraft/server/Entity.java
@@ -417,6 +417,12 @@ public abstract class Entity {
}
public void move(double d0, double d1, double d2) {
+ // CraftBukkit start - Don't do anything if we aren't moving
+ if (d0 == 0 && d1 == 0 && d2 == 0) {
+ return;
+ }
+ // CraftBukkit end
+
if (this.Z) {
this.boundingBox.d(d0, d1, d2);
this.locX = (this.boundingBox.a + this.boundingBox.d) / 2.0D;
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 21819eeb..fd1327a4 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -1411,6 +1411,12 @@ public abstract class EntityLiving extends Entity {
for (int i = 0; i < list.size(); ++i) {
Entity entity = (Entity) list.get(i);
+ // CraftBukkit start - Only handle mob (non-player) collisions every other tick
+ if (entity instanceof EntityLiving && !(this instanceof EntityPlayer) && this.ticksLived % 2 == 0) {
+ continue;
+ }
+ // CraftBukkit end
+
if (entity.L()) {
this.o(entity);
}
diff --git a/src/main/java/net/minecraft/server/EntitySquid.java b/src/main/java/net/minecraft/server/EntitySquid.java
index be8a5ed7..c6e8f786 100644
--- a/src/main/java/net/minecraft/server/EntitySquid.java
+++ b/src/main/java/net/minecraft/server/EntitySquid.java
@@ -63,9 +63,11 @@ public class EntitySquid extends EntityWaterAnimal {
// CraftBukkit end
}
+ /* CraftBukkit start - Delegate to Entity to use existing inWater value
public boolean G() {
return this.world.a(this.boundingBox.grow(0.0D, -0.6000000238418579D, 0.0D), Material.WATER, (Entity) this);
}
+ // CraftBukkit end */
public void c() {
super.c();
diff --git a/src/main/java/net/minecraft/server/World.java b/src/main/java/net/minecraft/server/World.java
index 03b71674..d896f692 100644
--- a/src/main/java/net/minecraft/server/World.java
+++ b/src/main/java/net/minecraft/server/World.java
@@ -30,7 +30,7 @@ public abstract class World implements IBlockAccess {
public boolean d = false;
public List entityList = new ArrayList();
protected List f = new ArrayList();
- public List tileEntityList = new ArrayList();
+ public Set tileEntityList = new HashSet(); // CraftBukkit - ArrayList -> HashSet
private List a = new ArrayList();
private List b = new ArrayList();
public List players = new ArrayList();
@@ -44,7 +44,6 @@ public abstract class World implements IBlockAccess {
protected float o;
protected float p;
public int q = 0;
- // public boolean suppressPhysics = false; // CraftBukkit (removed in vanilla)
public boolean callingPlaceEvent = false; // CraftBukkit
public int difficulty;
public Random random = new Random();