Fix Advanced Trace mode
Dieser Commit ist enthalten in:
Ursprung
cbc8a919a6
Commit
1afa2b9242
@ -47,13 +47,13 @@ public class Advanced extends Basic {
|
||||
if (!showModeParameter.isWater() && position.isExploded() && checkWater(position.getLocation())) {
|
||||
for(TNTPosition pos : position.getRecord().getPositions()){
|
||||
applyOnPosition(pos, updatePointPosition ->
|
||||
updateEntityMap.computeIfPresent(updatePointPosition, (p, point) -> point.hide(player, false) ? null : point));
|
||||
updateEntityMap.computeIfPresent(new RoundedTNTPosition(updatePointPosition), (p, point) -> point.hide(player, false) ? null : point));
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
applyOnPosition(position, updatePointPosition ->
|
||||
updateEntityMap.computeIfAbsent(updatePointPosition, pos -> createEntity(position.getLocation(), false))
|
||||
updateEntityMap.computeIfAbsent(new RoundedTNTPosition(updatePointPosition), pos -> createEntity(updatePointPosition, false))
|
||||
.display(player, position.isExploded()));
|
||||
}
|
||||
|
||||
@ -64,13 +64,13 @@ public class Advanced extends Basic {
|
||||
updateEntityMap.clear();
|
||||
}
|
||||
|
||||
private void applyOnPosition(TNTPosition position, Consumer<RoundedTNTPosition> function){
|
||||
private void applyOnPosition(TNTPosition position, Consumer<Vector> function){
|
||||
if (position.getPreviousLocation() == null) return;
|
||||
|
||||
if (showModeParameter.isInterpolate_Y()) {
|
||||
Vector updatePointY = position.getPreviousLocation().clone().setY(position.getLocation().getY());
|
||||
if(!position.getLocation().equals(updatePointY))
|
||||
function.accept(new RoundedTNTPosition(updatePointY));
|
||||
function.accept(updatePointY);
|
||||
}
|
||||
|
||||
if (showModeParameter.isInterpolate_XZ()){
|
||||
@ -79,7 +79,7 @@ public class Advanced extends Basic {
|
||||
? position.getLocation().clone().setZ(position.getPreviousLocation().getZ())
|
||||
: position.getLocation().clone().setX(position.getPreviousLocation().getX());
|
||||
if(!position.getLocation().equals(updatePointXZ))
|
||||
function.accept(new RoundedTNTPosition(updatePointXZ));
|
||||
function.accept(updatePointXZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren