From 829a3e9181dcc6a725e6263b0983eb3ebf265f4b Mon Sep 17 00:00:00 2001 From: md_5 Date: Fri, 31 May 2013 17:10:16 +1000 Subject: [PATCH] Allow 0 entity trackign range. Use at own risk --- CraftBukkit-Patches/0030-Entity-Tracking-Ranges.patch | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/CraftBukkit-Patches/0030-Entity-Tracking-Ranges.patch b/CraftBukkit-Patches/0030-Entity-Tracking-Ranges.patch index 555e25fe4c..d65cab1867 100644 --- a/CraftBukkit-Patches/0030-Entity-Tracking-Ranges.patch +++ b/CraftBukkit-Patches/0030-Entity-Tracking-Ranges.patch @@ -1,4 +1,4 @@ -From 9562c98d051c1af7030a149902c5f5326584e84f Mon Sep 17 00:00:00 2001 +From 4c3900fbf24c986c9f13dadaf9bca06e1794dac2 Mon Sep 17 00:00:00 2001 From: Aikar Date: Wed, 20 Feb 2013 11:58:47 -0500 Subject: [PATCH] Entity Tracking Ranges @@ -78,7 +78,7 @@ index 94cb855..fe7b8b0 100644 public Block getBlockAt(int x, int y, int z) { diff --git a/src/main/java/org/bukkit/craftbukkit/Spigot.java b/src/main/java/org/bukkit/craftbukkit/Spigot.java -index 4cbc796..fed3181 100644 +index 4cbc796..2422d29 100644 --- a/src/main/java/org/bukkit/craftbukkit/Spigot.java +++ b/src/main/java/org/bukkit/craftbukkit/Spigot.java @@ -16,12 +16,16 @@ import net.minecraft.server.EntityComplexPart; @@ -98,7 +98,7 @@ index 4cbc796..fed3181 100644 import net.minecraft.server.EntityPlayer; import net.minecraft.server.EntityProjectile; import net.minecraft.server.EntitySheep; -@@ -371,6 +375,32 @@ public class Spigot { +@@ -371,6 +375,30 @@ public class Spigot { } } @@ -122,9 +122,7 @@ index 4cbc796..fed3181 100644 + } else if (entity instanceof EntityItemFrame || entity instanceof EntityPainting || entity instanceof EntityItem || entity instanceof EntityExperienceOrb) { + range = world.miscTrackingRange; + } -+ if (range == 0) { -+ return defaultRange; -+ } ++ + return Math.min(world.maxTrackingRange, range); + } +