Finish entity actviation range

This commit is contained in:
md_5 2013-07-02 13:32:34 +10:00
parent ed6ba2a745
commit 40a2f5b7ad

View File

@ -1,4 +1,4 @@
From 1944d6e9f2134cf7b2fd046f92cf287cae4027a3 Mon Sep 17 00:00:00 2001 From 07f7942a349c3594957ec2d3028362ee1a07ad1f Mon Sep 17 00:00:00 2001
From: Aikar <aikar@aikar.co> From: Aikar <aikar@aikar.co>
Date: Sun, 3 Feb 2013 05:10:21 -0500 Date: Sun, 3 Feb 2013 05:10:21 -0500
Subject: [PATCH] Entity Activation Range Subject: [PATCH] Entity Activation Range
@ -100,7 +100,7 @@ index affeca6..f44f5e2 100644
public int shake; public int shake;
public Entity shooter; public Entity shooter;
diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java
index 0d9ba82..f043040 100644 index 0d9ba82..b7246fc 100644
--- a/src/main/java/net/minecraft/server/EntityLiving.java --- a/src/main/java/net/minecraft/server/EntityLiving.java
+++ b/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java
@@ -79,6 +79,13 @@ public abstract class EntityLiving extends Entity { @@ -79,6 +79,13 @@ public abstract class EntityLiving extends Entity {
@ -111,7 +111,7 @@ index 0d9ba82..f043040 100644
+ public void inactiveTick() + public void inactiveTick()
+ { + {
+ super.inactiveTick(); + super.inactiveTick();
+ ++this.bC; + ++this.aV;
+ } + }
+ // Spigot end + // Spigot end
@ -161,7 +161,7 @@ index f6e507e..4328ecf 100644
public static final HashMap<String, CustomTimingsHandler> pluginTaskTimingMap = new HashMap<String, CustomTimingsHandler>(); public static final HashMap<String, CustomTimingsHandler> pluginTaskTimingMap = new HashMap<String, CustomTimingsHandler>();
diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java
new file mode 100644 new file mode 100644
index 0000000..93ce20e index 0000000..71d8e59
--- /dev/null --- /dev/null
+++ b/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java
@@ -0,0 +1,296 @@ @@ -0,0 +1,296 @@
@ -341,20 +341,20 @@ index 0000000..93ce20e
+ switch ( entity.activationType ) + switch ( entity.activationType )
+ { + {
+ case 1: + case 1:
+ if ( monsterBB.a( entity.boundingBox ) ) + if ( monsterBB.b( entity.boundingBox ) )
+ { + {
+ entity.activatedTick = MinecraftServer.currentTick; + entity.activatedTick = MinecraftServer.currentTick;
+ } + }
+ break; + break;
+ case 2: + case 2:
+ if ( animalBB.a( entity.boundingBox ) ) + if ( animalBB.b( entity.boundingBox ) )
+ { + {
+ entity.activatedTick = MinecraftServer.currentTick; + entity.activatedTick = MinecraftServer.currentTick;
+ } + }
+ break; + break;
+ case 3: + case 3:
+ default: + default:
+ if ( miscBB.a( entity.boundingBox ) ) + if ( miscBB.b( entity.boundingBox ) )
+ { + {
+ entity.activatedTick = MinecraftServer.currentTick; + entity.activatedTick = MinecraftServer.currentTick;
+ } + }
@ -401,14 +401,14 @@ index 0000000..93ce20e
+ { + {
+ return true; + return true;
+ } + }
+ if ( entity instanceof EntityVillager && ( (EntityVillager) entity ).n() ) + if ( entity instanceof EntityVillager && ( (EntityVillager) entity ).bQ() /* Getter for first boolean */ )
+ { + {
+ return true; + return true;
+ } + }
+ if ( entity instanceof EntityAnimal ) + if ( entity instanceof EntityAnimal )
+ { + {
+ EntityAnimal animal = (EntityAnimal) entity; + EntityAnimal animal = (EntityAnimal) entity;
+ if ( animal.isBaby() || animal.r() /*love*/ ) + if ( animal.isBaby() || animal.bU() /*love*/ )
+ { + {
+ return true; + return true;
+ } + }