Finish entity actviation range
This commit is contained in:
parent
ed6ba2a745
commit
40a2f5b7ad
1 changed files with 9 additions and 9 deletions
|
@ -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>
|
||||
Date: Sun, 3 Feb 2013 05:10:21 -0500
|
||||
Subject: [PATCH] Entity Activation Range
|
||||
|
@ -100,7 +100,7 @@ index affeca6..f44f5e2 100644
|
|||
public int shake;
|
||||
public Entity shooter;
|
||||
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
|
||||
+++ b/src/main/java/net/minecraft/server/EntityLiving.java
|
||||
@@ -79,6 +79,13 @@ public abstract class EntityLiving extends Entity {
|
||||
|
@ -111,7 +111,7 @@ index 0d9ba82..f043040 100644
|
|||
+ public void inactiveTick()
|
||||
+ {
|
||||
+ super.inactiveTick();
|
||||
+ ++this.bC;
|
||||
+ ++this.aV;
|
||||
+ }
|
||||
+ // Spigot end
|
||||
|
||||
|
@ -161,7 +161,7 @@ index f6e507e..4328ecf 100644
|
|||
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
|
||||
new file mode 100644
|
||||
index 0000000..93ce20e
|
||||
index 0000000..71d8e59
|
||||
--- /dev/null
|
||||
+++ b/src/main/java/org/spigotmc/ActivationRange.java
|
||||
@@ -0,0 +1,296 @@
|
||||
|
@ -341,20 +341,20 @@ index 0000000..93ce20e
|
|||
+ switch ( entity.activationType )
|
||||
+ {
|
||||
+ case 1:
|
||||
+ if ( monsterBB.a( entity.boundingBox ) )
|
||||
+ if ( monsterBB.b( entity.boundingBox ) )
|
||||
+ {
|
||||
+ entity.activatedTick = MinecraftServer.currentTick;
|
||||
+ }
|
||||
+ break;
|
||||
+ case 2:
|
||||
+ if ( animalBB.a( entity.boundingBox ) )
|
||||
+ if ( animalBB.b( entity.boundingBox ) )
|
||||
+ {
|
||||
+ entity.activatedTick = MinecraftServer.currentTick;
|
||||
+ }
|
||||
+ break;
|
||||
+ case 3:
|
||||
+ default:
|
||||
+ if ( miscBB.a( entity.boundingBox ) )
|
||||
+ if ( miscBB.b( entity.boundingBox ) )
|
||||
+ {
|
||||
+ entity.activatedTick = MinecraftServer.currentTick;
|
||||
+ }
|
||||
|
@ -401,14 +401,14 @@ index 0000000..93ce20e
|
|||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ if ( entity instanceof EntityVillager && ( (EntityVillager) entity ).n() )
|
||||
+ if ( entity instanceof EntityVillager && ( (EntityVillager) entity ).bQ() /* Getter for first boolean */ )
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
+ if ( entity instanceof EntityAnimal )
|
||||
+ {
|
||||
+ EntityAnimal animal = (EntityAnimal) entity;
|
||||
+ if ( animal.isBaby() || animal.r() /*love*/ )
|
||||
+ if ( animal.isBaby() || animal.bU() /*love*/ )
|
||||
+ {
|
||||
+ return true;
|
||||
+ }
|
||||
|
|
Loading…
Reference in a new issue