Fix Updating Issue while Tracing
Dieser Commit ist enthalten in:
Ursprung
8254fb6e5e
Commit
930e8dc7d0
@ -102,7 +102,7 @@ class TNTTracer_15 {
|
|||||||
private static float[] noValue = new float[0];
|
private static float[] noValue = new float[0];
|
||||||
|
|
||||||
private static void update(Player p, PlayerTraceCache_15 traceCache) {
|
private static void update(Player p, PlayerTraceCache_15 traceCache) {
|
||||||
if (tracerCallbackTracing.run()) {
|
if (tracerCallbackTracing.run(p)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,8 +1,10 @@
|
|||||||
package de.steamwar.bausystem.tracer.showcallback;
|
package de.steamwar.bausystem.tracer.showcallback;
|
||||||
|
|
||||||
|
import org.bukkit.entity.Player;
|
||||||
|
|
||||||
@FunctionalInterface
|
@FunctionalInterface
|
||||||
public interface TracerCallbackTracing_15 {
|
public interface TracerCallbackTracing_15 {
|
||||||
|
|
||||||
boolean run();
|
boolean run(Player p);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -45,7 +45,12 @@ public class TNTTracer15 {
|
|||||||
private static final float[] noValue = new float[0];
|
private static final float[] noValue = new float[0];
|
||||||
|
|
||||||
public static void initTNTTracer_15() {
|
public static void initTNTTracer_15() {
|
||||||
TNTTracer_15.init(BauSystem.getPlugin(), TNTTracer15::getTracePoints, TNTTracer15::getTraceUpdatePoints, TNTTracer15::getActionBar, TNTTracer15::showMode, p -> ShowManager.get(p).isDirty(), () -> System.currentTimeMillis() - lastExplosion < 4500);
|
TNTTracer_15.init(BauSystem.getPlugin(), TNTTracer15::getTracePoints, TNTTracer15::getTraceUpdatePoints, TNTTracer15::getActionBar, TNTTracer15::showMode, p -> ShowManager.get(p).isDirty(), p -> {
|
||||||
|
if (System.currentTimeMillis() - lastExplosion < 4500) {
|
||||||
|
ShowManager.get(p).dirty();
|
||||||
|
}
|
||||||
|
return System.currentTimeMillis() - lastExplosion < 4500;
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
private static float[] accumulate(LinkedList<TNTTrace> traces) {
|
private static float[] accumulate(LinkedList<TNTTrace> traces) {
|
||||||
|
@ -147,6 +147,10 @@ public class ShowStatus {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void dirty() {
|
||||||
|
dirty = true;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public String toString() {
|
public String toString() {
|
||||||
return "ShowStatus{" +
|
return "ShowStatus{" +
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren