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);
|
+ return Timings.ofSafe("Behavior - " + type);
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
+ public static Timing getSensorTimings(String type) {
|
+ public static Timing getSensorTimings(String type, int rate) {
|
||||||
+ return Timings.ofSafe("Sensor - " + type);
|
+ return Timings.ofSafe("Sensor - " + type + " (Default rate: " + rate + ")");
|
||||||
+ }
|
+ }
|
||||||
+
|
+
|
||||||
/**
|
/**
|
||||||
@@ -210,7 +210,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
|
|||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
+ this.configKey = key.toLowerCase(java.util.Locale.ROOT);
|
+ 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
|
+ // Paper end
|
||||||
this.scanRate = senseInterval;
|
this.scanRate = senseInterval;
|
||||||
this.timeToTick = (long)RANDOM.nextInt(senseInterval);
|
this.timeToTick = (long)RANDOM.nextInt(senseInterval);
|
||||||
|
|||||||
Reference in New Issue
Block a user