Add the default tick rate of the sensor to the timings (#6242)
This commit is contained in:
@@ -20,8 +20,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ return Timings.ofSafe("Behavior - " + type);
|
||||
+ }
|
||||
+
|
||||
+ public static Timing getSensorTimings(String type) {
|
||||
+ return Timings.ofSafe("Sensor - " + type);
|
||||
+ public static Timing getSensorTimings(String type, int rate) {
|
||||
+ return Timings.ofSafe("Sensor - " + type + " (Default rate: " + rate + ")");
|
||||
+ }
|
||||
+
|
||||
/**
|
||||
@@ -210,7 +210,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
||||
+ }
|
||||
+ }
|
||||
+ this.configKey = key.toLowerCase(java.util.Locale.ROOT);
|
||||
+ this.timing = co.aikar.timings.MinecraftTimings.getSensorTimings(configKey);
|
||||
+ this.timing = co.aikar.timings.MinecraftTimings.getSensorTimings(configKey, senseInterval);
|
||||
+ // Paper end
|
||||
this.scanRate = senseInterval;
|
||||
this.timeToTick = (long)RANDOM.nextInt(senseInterval);
|
||||
|
||||
Reference in New Issue
Block a user