SteamWar/BauSystem2.0
Archiviert
12
0

SimRework2.0 #216

Zusammengeführt
YoyoNow hat 49 Commits von SimRework2.0 nach master 2023-12-16 12:30:57 +01:00 zusammengeführt
3 geänderte Dateien mit 5 neuen und 3 gelöschten Zeilen
Nur Änderungen aus Commit 273fba879e werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -25,6 +25,7 @@ import lombok.Setter;
@Getter @Getter
@Setter @Setter
public abstract class SimulatorSetting { public abstract class SimulatorSetting {
public static final int ORDER_LIMIT = 64;
protected int tickOffset; protected int tickOffset;
protected int lifetime = 80; protected int lifetime = 80;
protected int order = 1; protected int order = 1;

Datei anzeigen

@ -21,6 +21,7 @@ package de.steamwar.bausystem.features.simulator2.gui;
import de.steamwar.bausystem.features.simulator2.SimulatorWatcher; import de.steamwar.bausystem.features.simulator2.SimulatorWatcher;
import de.steamwar.bausystem.features.simulator2.data.Simulator; import de.steamwar.bausystem.features.simulator2.data.Simulator;
import de.steamwar.bausystem.features.simulator2.data.SimulatorSetting;
import de.steamwar.bausystem.features.simulator2.data.redstone.RedstoneElement; import de.steamwar.bausystem.features.simulator2.data.redstone.RedstoneElement;
import de.steamwar.bausystem.features.simulator2.data.redstone.RedstoneSetting; import de.steamwar.bausystem.features.simulator2.data.redstone.RedstoneSetting;
import de.steamwar.bausystem.features.simulator2.gui.base.SimulatorBaseGui; import de.steamwar.bausystem.features.simulator2.gui.base.SimulatorBaseGui;
@ -32,7 +33,6 @@ import org.bukkit.entity.Player;
import java.util.Arrays; import java.util.Arrays;
public class SimulatorRedstonePhaseGui extends SimulatorBaseGui { public class SimulatorRedstonePhaseGui extends SimulatorBaseGui {
private final RedstoneElement redstoneElement; private final RedstoneElement redstoneElement;
private final RedstoneSetting redstone; private final RedstoneSetting redstone;
private final SimulatorBaseGui back; private final SimulatorBaseGui back;
@ -115,7 +115,7 @@ public class SimulatorRedstonePhaseGui extends SimulatorBaseGui {
//Order //Order
int order = redstone.getOrder(); int order = redstone.getOrder();
inventory.setItem(14, SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> { inventory.setItem(14, SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
redstone.changeOrder(clickType.isShiftClick() ? 5 : 1); redstone.setOrder(Math.min(SimulatorSetting.ORDER_LIMIT, order + (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator); SimulatorWatcher.update(simulator);
}); });

Datei anzeigen

@ -21,6 +21,7 @@ package de.steamwar.bausystem.features.simulator2.gui;
import de.steamwar.bausystem.features.simulator2.SimulatorWatcher; import de.steamwar.bausystem.features.simulator2.SimulatorWatcher;
import de.steamwar.bausystem.features.simulator2.data.Simulator; import de.steamwar.bausystem.features.simulator2.data.Simulator;
import de.steamwar.bausystem.features.simulator2.data.SimulatorSetting;
import de.steamwar.bausystem.features.simulator2.data.redstone.RedstoneElement; import de.steamwar.bausystem.features.simulator2.data.redstone.RedstoneElement;
import de.steamwar.bausystem.features.simulator2.data.redstone.RedstoneSetting; import de.steamwar.bausystem.features.simulator2.data.redstone.RedstoneSetting;
import de.steamwar.bausystem.features.simulator2.data.tnt.TNTElement; import de.steamwar.bausystem.features.simulator2.data.tnt.TNTElement;
@ -136,7 +137,7 @@ public class SimulatorTntPhaseGui extends SimulatorBaseGui{
//Order //Order
int order = tnt.getOrder(); int order = tnt.getOrder();
inventory.setItem(13, SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> { inventory.setItem(13, SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
tnt.changeOrder(clickType.isShiftClick() ? 5 : 1); tnt.setOrder(Math.min(SimulatorSetting.ORDER_LIMIT, order + (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator); SimulatorWatcher.update(simulator);
}); });