Add -water as for /trace show in WarShip regions
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
8217e9645b
Commit
1a93f2fc41
@ -156,9 +156,17 @@ public class TraceCommand extends SWCommand {
|
||||
// /trace show raw -auto at 0
|
||||
@Register(value = {"show"}, description = "TRACE_COMMAND_HELP_SHOW")
|
||||
public void showCommand(@Validator Player p, @OptionalValue("entity") ShowModeType showModeType, ShowModeParameterType... showModeParameterTypes) {
|
||||
Region region = Region.getRegion(p.getLocation());
|
||||
ShowModeParameter showModeParameter = new ShowModeParameter();
|
||||
if (region.getWaterLevel() != 0) { // Enable Water by default for regions with WaterLevel e.g. WarShip
|
||||
showModeParameter.enableWater();
|
||||
}
|
||||
for (ShowModeParameterType showModeParameterType : showModeParameterTypes) {
|
||||
showModeParameterType.getShowModeParameterConsumer().accept(showModeParameter);
|
||||
if (showModeParameterType == ShowModeParameterType.WATER && region.getWaterLevel() != 0) {
|
||||
showModeParameter.disableWater();
|
||||
} else {
|
||||
showModeParameterType.getShowModeParameterConsumer().accept(showModeParameter);
|
||||
}
|
||||
}
|
||||
TraceShowManager.show(p, showModeType.showModeBiFunction.apply(p, showModeParameter));
|
||||
BauSystem.MESSAGE.send("TRACE_MESSAGE_SHOW", p);
|
||||
|
@ -38,6 +38,10 @@ public class ShowModeParameter {
|
||||
public void enableWater() {
|
||||
this.water = true;
|
||||
}
|
||||
|
||||
public void disableWater() {
|
||||
this.water = false;
|
||||
}
|
||||
|
||||
public void enableInterpolateY() {
|
||||
this.interpolateY = true;
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren