mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-01 12:42:05 -07:00
Add DISPLAY tracking range type (#9668)
This commit is contained in:
@@ -1800,8 +1800,6 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ public IntOr.Default other = IntOr.Default.USE_DEFAULT;
|
||||
+
|
||||
+ public int get(Entity entity, int def) {
|
||||
+ if (entity instanceof Display) return display.or(def);
|
||||
+
|
||||
+ switch (TrackingRange.getTrackingRangeType(entity)) {
|
||||
+ case PLAYER -> {
|
||||
+ return player.or(def);
|
||||
@@ -1818,6 +1816,9 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ case ENDERDRAGON -> {
|
||||
+ return -1; // Ender dragon is exempt
|
||||
+ }
|
||||
+ case DISPLAY -> {
|
||||
+ return display.or(def);
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ return other.or(def);
|
||||
|
Reference in New Issue
Block a user