Add the default tick rate of the sensor to the timings (#6242)

This commit is contained in:
Max Lee
2021-07-25 07:50:36 +01:00
parent 38e838b0c9
commit 0f090e7328

View File

@@ -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);