mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-23 19:15:32 +01:00
Allow 0 entity trackign range. Use at own risk
This commit is contained in:
parent
e710c42e46
commit
829a3e9181
@ -1,4 +1,4 @@
|
||||
From 9562c98d051c1af7030a149902c5f5326584e84f Mon Sep 17 00:00:00 2001
|
||||
From 4c3900fbf24c986c9f13dadaf9bca06e1794dac2 Mon Sep 17 00:00:00 2001
|
||||
From: Aikar <aikar@aikar.co>
|
||||
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);
|
||||
+ }
|
||||
+
|
||||
|
Loading…
Reference in New Issue
Block a user