Remove even more useless stuff

This commit is contained in:
2026-05-16 22:21:06 +02:00
parent cfa650bcf4
commit fcc370c353
45 changed files with 278 additions and 589 deletions
@@ -210,7 +210,7 @@ public abstract class LoaderInteractionElement<T extends Enum<T> & LoaderSetting
}
if (currentElement.hasTicks(this)) {
swInventory.setItem(ticksStart + 3, new SWItem(SWItem.getDye(1), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
swInventory.setItem(ticksStart + 3, new SWItem(Material.RED_DYE, BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
long ticks = extraTicks.get(index);
ticks -= clickType.isShiftClick() ? 5 : 1;
if (ticks < 1) ticks = 1;
@@ -234,7 +234,7 @@ public abstract class LoaderInteractionElement<T extends Enum<T> & LoaderSetting
swAnvilInv.open();
});
swInventory.setItem(ticksStart + 5, new SWItem(SWItem.getDye(10), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
swInventory.setItem(ticksStart + 5, new SWItem(Material.LIME_DYE, BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
long ticks = extraTicks.get(index);
ticks += clickType.isShiftClick() ? 5 : 1;
extraTicks.set(index, ticks);
@@ -63,7 +63,7 @@ public class LoaderWait implements LoaderElement {
for (int i = 9; i < 18; i++) swInventory.setItem(i, new SWItem(Material.GRAY_STAINED_GLASS_PANE, "§7"));
swInventory.setItem(9, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LOADER_GUI_WAIT_BACK", player)).setCustomModelData(CMDs.BACK).getItemStack(), clickType -> backAction.run());
swInventory.setItem(3, new SWItem(SWItem.getDye(1), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
swInventory.setItem(3, new SWItem(Material.RED_DYE, BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_REMOVE_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
delay -= clickType.isShiftClick() ? 5 : 1;
if (delay < 0) delay = 0;
swInventory.setItem(4, menu(player));
@@ -80,7 +80,7 @@ public class LoaderWait implements LoaderElement {
});
swAnvilInv.open();
});
swInventory.setItem(5, new SWItem(SWItem.getDye(10), BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
swInventory.setItem(5, new SWItem(Material.LIME_DYE, BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE", player), Arrays.asList(BauSystem.MESSAGE.parse("LOADER_SETTING_TICKS_ADD_ONE_SHIFT", player)), false, clickType -> {}).getItemStack(), clickType -> {
delay += clickType.isShiftClick() ? 5 : 1;
swInventory.setItem(4, menu(player));
});
@@ -69,7 +69,7 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui {
// Base Tick
int baseTicks = simulatorGroup.getBaseTick();
inventory.setItem(9, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(9, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
simulatorGroup.changeBaseTicks(clickType.isShiftClick() ? 5 : 1);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED));
@@ -83,7 +83,7 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui {
});
baseTick.getItemStack().setAmount(Math.max(1, Math.min(baseTicks, 64)));
inventory.setItem(18, baseTick);
inventory.setItem(27, new SWItem(SWItem.getDye(baseTicks > 0 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(27, new SWItem(baseTicks > 0 ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (baseTicks - (clickType.isShiftClick() ? 5 : 1) < 0) {
simulatorGroup.changeBaseTicks(-baseTicks);
} else {
@@ -163,7 +163,7 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui {
}
//Pos X
inventory.setItem(15, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList(allTNT ? "§7Shift§8: §e+0.0625" : "§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(15, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList(allTNT ? "§7Shift§8: §e+0.0625" : "§7Shift§8: §e+5"), false, clickType -> {
simulatorGroup.move(clickType.isShiftClick() ? (allTNT ? 0.0625 : 5) : 1, 0, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED));
@@ -177,13 +177,13 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui {
return true;
}, this).setItem(Material.PAPER).open();
}));
inventory.setItem(33, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(33, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> {
simulatorGroup.move(clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1, 0, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
//Pos Y
inventory.setItem(16, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList(allTNT ? "§7Shift§8: §e+0.0625" : "§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(16, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList(allTNT ? "§7Shift§8: §e+0.0625" : "§7Shift§8: §e+5"), false, clickType -> {
simulatorGroup.move(0, clickType.isShiftClick() ? (allTNT ? 0.0625 : 5) : 1, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED));
@@ -197,13 +197,13 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui {
return true;
}, this).setItem(Material.PAPER).open();
}));
inventory.setItem(34, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(34, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> {
simulatorGroup.move(0, clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.ENABLED_OR_DISABLED));
//Pos Z
inventory.setItem(17, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList(allTNT ? "§7Shift§8: §e+0.0625" : "§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(17, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList(allTNT ? "§7Shift§8: §e+0.0625" : "§7Shift§8: §e+5"), false, clickType -> {
simulatorGroup.move(0, 0, clickType.isShiftClick() ? (allTNT ? 0.0625 : 5) : 1);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED));
@@ -217,7 +217,7 @@ public class SimulatorGroupSettingsGui extends SimulatorBaseGui {
return true;
}, this).setItem(Material.PAPER).open();
}));
inventory.setItem(35, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(35, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList(allTNT ? "§7Shift§8: §e-0.0625" : "§7Shift§8: §e-5"), false, clickType -> {
simulatorGroup.move(0, 0, clickType.isShiftClick() ? (allTNT ? -0.0625 : -5) : -1);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
@@ -149,13 +149,13 @@ public class SimulatorObserverGui extends SimulatorScrollGui<ObserverPhase> {
Supplier<Integer> getter = observerPhase::getTickOffset;
Consumer<Integer> setter = observerPhase::setTickOffset;
return new SWItem[] {
new SWItem(SWItem.getDye(getter.get() < max ? 10 : 8), "§e+1", Arrays.asList("§7Shift§8:§e +5"), false, clickType -> {
new SWItem(getter.get() < max ? Material.LIME_DYE : Material.GRAY_DYE, "§e+1", Arrays.asList("§7Shift§8:§e +5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
setter.accept(Math.min(max, getter.get() + (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED),
observer,
new SWItem(SWItem.getDye(getter.get() > min ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8:§e -5"), false, clickType -> {
new SWItem(getter.get() > min ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8:§e -5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
setter.accept(Math.max(min, getter.get() - (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -169,13 +169,13 @@ public class SimulatorObserverGui extends SimulatorScrollGui<ObserverPhase> {
@Override
public SWItem[] lastColumn() {
return new SWItem[]{
new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8:§e +5"), false, clickType -> {
new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8:§e +5"), false, clickType -> {
addNewPhase(clickType.isShiftClick());
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED),
new SWItem(Material.QUARTZ, "§eObserver§8:§a New Phase", clickType -> {
addNewPhase(false);
}).setCustomModelData(CMDs.Simulator.NEW_PHASE),
new SWItem(SWItem.getDye(8), "§7", clickType -> {
new SWItem(Material.GRAY_DYE, "§7", clickType -> {
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED),
};
}
@@ -96,7 +96,7 @@ public class SimulatorObserverPhaseSettingsGui extends SimulatorBaseGui {
//Tick Offset
int offset = observer.getTickOffset();
inventory.setItem(10, new SWItem(SWItem.getDye(offset < max ? 10 : 8), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(10, new SWItem(offset < max ? Material.LIME_DYE : Material.GRAY_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
observer.setTickOffset(Math.min(max, offset + (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -113,7 +113,7 @@ public class SimulatorObserverPhaseSettingsGui extends SimulatorBaseGui {
offsetItem.getItemStack().setAmount(Math.max(1, Math.min(offset, 64)));
inventory.setItem(19, offsetItem);
inventory.setItem(28, new SWItem(SWItem.getDye(offset > min ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(28, new SWItem(offset > min ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
observer.setTickOffset(Math.max(min, offset - (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -121,7 +121,7 @@ public class SimulatorObserverPhaseSettingsGui extends SimulatorBaseGui {
//Order
int order = observer.getOrder();
inventory.setItem(13, new SWItem(SWItem.getDye(order < SimulatorPhase.ORDER_LIMIT ? 10 : 8), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(13, new SWItem(order < SimulatorPhase.ORDER_LIMIT ? Material.LIME_DYE : Material.GRAY_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
observer.setOrder(Math.min(SimulatorPhase.ORDER_LIMIT, order + (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -139,7 +139,7 @@ public class SimulatorObserverPhaseSettingsGui extends SimulatorBaseGui {
orderItem.getItemStack().setAmount(Math.max(1, Math.min(Math.abs(order), 30)));
inventory.setItem(22, orderItem);
inventory.setItem(31, new SWItem(SWItem.getDye(order > -SimulatorPhase.ORDER_LIMIT ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(31, new SWItem(order > -SimulatorPhase.ORDER_LIMIT ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
observer.setOrder(Math.max(-SimulatorPhase.ORDER_LIMIT, order - (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -67,7 +67,7 @@ public class SimulatorObserverSettingsGui extends SimulatorBaseGui {
// Base Tick
int baseTicks = observer.getBaseTick();
inventory.setItem(9, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(9, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
observer.changeBaseTicks(clickType.isShiftClick() ? 5 : 1);
SimulatorWatcher.update(simulator);
@@ -82,7 +82,7 @@ public class SimulatorObserverSettingsGui extends SimulatorBaseGui {
});
baseTick.getItemStack().setAmount(Math.max(1, Math.min(baseTicks, 64)));
inventory.setItem(18, baseTick);
inventory.setItem(27, new SWItem(SWItem.getDye(baseTicks > 0 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(27, new SWItem(baseTicks > 0 ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
if (baseTicks - (clickType.isShiftClick() ? 5 : 1) < 0) {
observer.changeBaseTicks(-baseTicks);
@@ -93,7 +93,7 @@ public class SimulatorObserverSettingsGui extends SimulatorBaseGui {
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
//Pos X
inventory.setItem(15, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(15, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
observer.move(clickType.isShiftClick() ? 5 : 1, 0, 0);
SimulatorWatcher.update(simulator);
@@ -105,14 +105,14 @@ public class SimulatorObserverSettingsGui extends SimulatorBaseGui {
return true;
}, this).open();
}));
inventory.setItem(33, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(33, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
observer.move(clickType.isShiftClick() ? -5 : -1, 0, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
//Pos Y
inventory.setItem(16, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(16, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
observer.move(0, clickType.isShiftClick() ? 5 : 1, 0);
SimulatorWatcher.update(simulator);
@@ -124,14 +124,14 @@ public class SimulatorObserverSettingsGui extends SimulatorBaseGui {
return true;
}, this).open();
}));
inventory.setItem(34, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(34, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
observer.move(0, clickType.isShiftClick() ? -5 : -1, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
//Pos Z
inventory.setItem(17, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(17, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
observer.move(0, 0, clickType.isShiftClick() ? 5 : 1);
SimulatorWatcher.update(simulator);
@@ -143,7 +143,7 @@ public class SimulatorObserverSettingsGui extends SimulatorBaseGui {
return true;
}, this).open();
}));
inventory.setItem(35, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(35, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
observer.move(0, 0, clickType.isShiftClick() ? -5 : -1);
SimulatorWatcher.update(simulator);
@@ -164,13 +164,13 @@ public class SimulatorRedstoneGui extends SimulatorScrollGui<SimulatorRedstoneGu
Supplier<Integer> getter = redstoneSubPhase.place ? redstoneSubPhase.phase::getTickOffset : redstoneSubPhase.phase::getLifetime;
Consumer<Integer> setter = redstoneSubPhase.place ? redstoneSubPhase.phase::setTickOffset : redstoneSubPhase.phase::setLifetime;
return new SWItem[] {
new SWItem(SWItem.getDye(getter.get() < max ? 10 : 8), "§e+1", Arrays.asList("§7Shift§8:§e +5"), false, clickType -> {
new SWItem(getter.get() < max ? Material.LIME_DYE : Material.GRAY_DYE, "§e+1", Arrays.asList("§7Shift§8:§e +5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
setter.accept(Math.min(max, getter.get() + (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED),
redstone,
new SWItem(SWItem.getDye(getter.get() > min ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8:§e -5"), false, clickType -> {
new SWItem(getter.get() > min ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8:§e -5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
setter.accept(Math.max(min, getter.get() - (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -184,13 +184,13 @@ public class SimulatorRedstoneGui extends SimulatorScrollGui<SimulatorRedstoneGu
@Override
public SWItem[] lastColumn() {
return new SWItem[]{
new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8:§e +5"), false, clickType -> {
new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8:§e +5"), false, clickType -> {
addNewPhase(clickType.isShiftClick());
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED),
new SWItem(Material.REDSTONE, "§eRedstone§8:§a New Phase", clickType -> {
addNewPhase(false);
}).setCustomModelData(CMDs.Simulator.NEW_PHASE),
new SWItem(SWItem.getDye(8), "§7", clickType -> {
new SWItem(Material.GRAY_DYE, "§7", clickType -> {
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED),
};
}
@@ -97,7 +97,7 @@ public class SimulatorRedstonePhaseSettingsGui extends SimulatorBaseGui {
//Tick Offset
int offset = redstone.getTickOffset();
inventory.setItem(10, new SWItem(SWItem.getDye(offset < maxOffset ? 10 : 8), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(10, new SWItem(offset < maxOffset ? Material.LIME_DYE : Material.GRAY_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.setTickOffset(Math.min(maxOffset, offset + (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -114,7 +114,7 @@ public class SimulatorRedstonePhaseSettingsGui extends SimulatorBaseGui {
offsetItem.getItemStack().setAmount(Math.max(1, Math.min(offset, 64)));
inventory.setItem(19, offsetItem);
inventory.setItem(28, new SWItem(SWItem.getDye(offset > min ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(28, new SWItem(offset > min ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.setTickOffset(Math.max(min, offset - (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -122,7 +122,7 @@ public class SimulatorRedstonePhaseSettingsGui extends SimulatorBaseGui {
//Lifetime
int lifetime = redstone.getLifetime();
inventory.setItem(11, new SWItem(SWItem.getDye(lifetime < maxLifetime ? 10 : 8), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(11, new SWItem(lifetime < maxLifetime ? Material.LIME_DYE : Material.GRAY_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.setLifetime(Math.min(maxLifetime, lifetime + (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -139,7 +139,7 @@ public class SimulatorRedstonePhaseSettingsGui extends SimulatorBaseGui {
lifetimeItem.getItemStack().setAmount(Math.max(1, Math.min(lifetime, 64)));
inventory.setItem(20, lifetimeItem);
inventory.setItem(29, new SWItem(SWItem.getDye(lifetime > 0 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(29, new SWItem(lifetime > 0 ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.setLifetime(Math.max(0, lifetime - (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -147,7 +147,7 @@ public class SimulatorRedstonePhaseSettingsGui extends SimulatorBaseGui {
//Order
int order = redstone.getOrder();
inventory.setItem(13, new SWItem(SWItem.getDye(order < SimulatorPhase.ORDER_LIMIT ? 10 : 8), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(13, new SWItem(order < SimulatorPhase.ORDER_LIMIT ? Material.LIME_DYE : Material.GRAY_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.setOrder(Math.min(SimulatorPhase.ORDER_LIMIT, order + (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -165,7 +165,7 @@ public class SimulatorRedstonePhaseSettingsGui extends SimulatorBaseGui {
orderItem.getItemStack().setAmount(Math.max(1, Math.min(Math.abs(order), 30)));
inventory.setItem(22, orderItem);
inventory.setItem(31, new SWItem(SWItem.getDye(order > -SimulatorPhase.ORDER_LIMIT ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(31, new SWItem(order > -SimulatorPhase.ORDER_LIMIT ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.setOrder(Math.max(-SimulatorPhase.ORDER_LIMIT, order - (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -66,7 +66,7 @@ public class SimulatorRedstoneSettingsGui extends SimulatorBaseGui {
// Base Tick
int baseTicks = redstone.getBaseTick();
inventory.setItem(9, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(9, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.changeBaseTicks(clickType.isShiftClick() ? 5 : 1);
SimulatorWatcher.update(simulator);
@@ -81,7 +81,7 @@ public class SimulatorRedstoneSettingsGui extends SimulatorBaseGui {
});
baseTick.getItemStack().setAmount(Math.max(1, Math.min(baseTicks, 64)));
inventory.setItem(18, baseTick);
inventory.setItem(27, new SWItem(SWItem.getDye(baseTicks > 0 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(27, new SWItem(baseTicks > 0 ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
if (baseTicks - (clickType.isShiftClick() ? 5 : 1) < 0) {
redstone.changeBaseTicks(-baseTicks);
@@ -92,7 +92,7 @@ public class SimulatorRedstoneSettingsGui extends SimulatorBaseGui {
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
//Pos X
inventory.setItem(15, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(15, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.move(clickType.isShiftClick() ? 5 : 1, 0, 0);
SimulatorWatcher.update(simulator);
@@ -104,14 +104,14 @@ public class SimulatorRedstoneSettingsGui extends SimulatorBaseGui {
return true;
}, this).open();
}));
inventory.setItem(33, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(33, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.move(clickType.isShiftClick() ? -5 : -1, 0, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
//Pos Y
inventory.setItem(16, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(16, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.move(0, clickType.isShiftClick() ? 5 : 1, 0);
SimulatorWatcher.update(simulator);
@@ -123,14 +123,14 @@ public class SimulatorRedstoneSettingsGui extends SimulatorBaseGui {
return true;
}, this).open();
}));
inventory.setItem(34, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(34, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.move(0, clickType.isShiftClick() ? -5 : -1, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
//Pos Z
inventory.setItem(17, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(17, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.move(0, 0, clickType.isShiftClick() ? 5 : 1);
SimulatorWatcher.update(simulator);
@@ -142,7 +142,7 @@ public class SimulatorRedstoneSettingsGui extends SimulatorBaseGui {
return true;
}, this).open();
}));
inventory.setItem(35, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(35, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
redstone.move(0, 0, clickType.isShiftClick() ? -5 : -1);
SimulatorWatcher.update(simulator);
@@ -66,37 +66,37 @@ public class SimulatorSettingsGui extends SimulatorBaseGui {
}));
//Pos X
inventory.setItem(15, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(15, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
simulator.move(clickType.isShiftClick() ? 5 : 1, 0, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED));
inventory.setItem(24, new SWItem(Material.PAPER, "§eX", clickType -> {
}));
inventory.setItem(33, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(33, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
simulator.move(clickType.isShiftClick() ? -5 : -1, 0, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
//Pos Y
inventory.setItem(16, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(16, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
simulator.move(0, clickType.isShiftClick() ? 5 : 1, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED));
inventory.setItem(25, new SWItem(Material.PAPER, "§eY", clickType -> {
}));
inventory.setItem(34, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(34, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
simulator.move(0, clickType.isShiftClick() ? -5 : -1, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
//Pos Z
inventory.setItem(17, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(17, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
simulator.move(0, 0, clickType.isShiftClick() ? 5 : 1);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED));
inventory.setItem(26, new SWItem(Material.PAPER, "§eZ", clickType -> {
}));
inventory.setItem(35, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(35, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
simulator.move(0, 0, clickType.isShiftClick() ? -5 : -1);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
@@ -134,13 +134,13 @@ public class SimulatorTNTGui extends SimulatorScrollGui<TNTPhase> {
tnt.getItemStack().setAmount(Math.min(tntSetting.getCount(), 64));
return new SWItem[]{
new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8:§e +5"), false, clickType -> {
new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8:§e +5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tntSetting.setCount(tntSetting.getCount() + (clickType.isShiftClick() ? 5 : 1));
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED),
tnt,
new SWItem(SWItem.getDye(tntSetting.getCount() > 1 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8:§e -5"), false, clickType -> {
new SWItem(tntSetting.getCount() > 1 ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8:§e -5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tntSetting.setCount(Math.max(1, tntSetting.getCount() - (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -154,13 +154,13 @@ public class SimulatorTNTGui extends SimulatorScrollGui<TNTPhase> {
@Override
public SWItem[] lastColumn() {
return new SWItem[]{
new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8:§e +5"), false, clickType -> {
new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8:§e +5"), false, clickType -> {
addNewPhase(clickType.isShiftClick());
}).setCustomModelData(CMDs.Simulator.INCREMENT_OR_DISABLED),
new SWItem(Material.GUNPOWDER, "§eTNT§8:§a New Phase", clickType -> {
addNewPhase(false);
}).setCustomModelData(CMDs.Simulator.NEW_PHASE),
new SWItem(SWItem.getDye(8), "§7", clickType -> {
new SWItem(Material.GRAY_DYE, "§7", clickType -> {
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED),
};
}
@@ -77,7 +77,7 @@ public class SimulatorTNTPhaseSettingsGui extends SimulatorBaseGui {
//Count
int count = tnt.getCount();
inventory.setItem(9, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(9, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.setCount(count + (clickType.isShiftClick() ? 5 : 1));
SimulatorWatcher.update(simulator);
@@ -94,7 +94,7 @@ public class SimulatorTNTPhaseSettingsGui extends SimulatorBaseGui {
countItem.getItemStack().setAmount(Math.max(1, Math.min(count, 64)));
inventory.setItem(18, countItem);
inventory.setItem(27, new SWItem(SWItem.getDye(count > 1 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(27, new SWItem(count > 1 ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.setCount(Math.max(1, count - (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -102,7 +102,7 @@ public class SimulatorTNTPhaseSettingsGui extends SimulatorBaseGui {
//Tick Offset
int offset = tnt.getTickOffset();
inventory.setItem(10, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(10, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.setTickOffset(offset + (clickType.isShiftClick() ? 5 : 1));
SimulatorWatcher.update(simulator);
@@ -119,7 +119,7 @@ public class SimulatorTNTPhaseSettingsGui extends SimulatorBaseGui {
offsetItem.getItemStack().setAmount(Math.max(1, Math.min(offset, 64)));
inventory.setItem(19, offsetItem);
inventory.setItem(28, new SWItem(SWItem.getDye(offset > 0 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(28, new SWItem(offset > 0 ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.setTickOffset(Math.max(0, offset - (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -127,7 +127,7 @@ public class SimulatorTNTPhaseSettingsGui extends SimulatorBaseGui {
//Lifetime
int lifetime = tnt.getLifetime();
inventory.setItem(11, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(11, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.setLifetime(lifetime + (clickType.isShiftClick() ? 5 : 1));
SimulatorWatcher.update(simulator);
@@ -144,7 +144,7 @@ public class SimulatorTNTPhaseSettingsGui extends SimulatorBaseGui {
lifetimeItem.getItemStack().setAmount(Math.max(1, Math.min(lifetime, 64)));
inventory.setItem(20, lifetimeItem);
inventory.setItem(29, new SWItem(SWItem.getDye(lifetime > 0 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(29, new SWItem(lifetime > 0 ? Material.GRAY_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.setLifetime(Math.max(1, lifetime - (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -152,7 +152,7 @@ public class SimulatorTNTPhaseSettingsGui extends SimulatorBaseGui {
//Order
int order = tnt.getOrder();
inventory.setItem(13, new SWItem(SWItem.getDye(order < SimulatorPhase.ORDER_LIMIT ? 10 : 8), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(13, new SWItem(order < SimulatorPhase.ORDER_LIMIT ? Material.LIME_DYE : Material.GRAY_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.setOrder(Math.min(SimulatorPhase.ORDER_LIMIT, order + (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -170,7 +170,7 @@ public class SimulatorTNTPhaseSettingsGui extends SimulatorBaseGui {
orderItem.getItemStack().setAmount(Math.max(1, Math.min(Math.abs(order), 30)));
inventory.setItem(22, orderItem);
inventory.setItem(31, new SWItem(SWItem.getDye(order > -SimulatorPhase.ORDER_LIMIT ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(31, new SWItem(order > -SimulatorPhase.ORDER_LIMIT ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.setOrder(Math.max(-SimulatorPhase.ORDER_LIMIT, order - (clickType.isShiftClick() ? 5 : 1)));
SimulatorWatcher.update(simulator);
@@ -75,7 +75,7 @@ public class SimulatorTNTSettingsGui extends SimulatorBaseGui {
// Base Tick
int baseTicks = tnt.getBaseTick();
inventory.setItem(9, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
inventory.setItem(9, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.changeBaseTicks(clickType.isShiftClick() ? 5 : 1);
SimulatorWatcher.update(simulator);
@@ -90,7 +90,7 @@ public class SimulatorTNTSettingsGui extends SimulatorBaseGui {
});
baseTick.getItemStack().setAmount(Math.max(1, Math.min(baseTicks, 64)));
inventory.setItem(18, baseTick);
inventory.setItem(27, new SWItem(SWItem.getDye(baseTicks > 0 ? 1 : 8), "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
inventory.setItem(27, new SWItem(baseTicks > 0 ? Material.RED_DYE : Material.GRAY_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-5"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
if (baseTicks - (clickType.isShiftClick() ? 5 : 1) < 0) {
tnt.changeBaseTicks(-baseTicks);
@@ -138,7 +138,7 @@ public class SimulatorTNTSettingsGui extends SimulatorBaseGui {
inventory.setItem(30, positivXItem);
// Pos X
inventory.setItem(15, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+0.0625"), false, clickType -> {
inventory.setItem(15, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+0.0625"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.move(clickType.isShiftClick() ? 0.0625 : 1, 0, 0);
SimulatorWatcher.update(simulator);
@@ -150,14 +150,14 @@ public class SimulatorTNTSettingsGui extends SimulatorBaseGui {
return true;
}, this).open();
}));
inventory.setItem(33, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList("§7Shift§8: §e-0.0625"), false, clickType -> {
inventory.setItem(33, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-0.0625"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.move(clickType.isShiftClick() ? -0.0625 : -1, 0, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
// Pos Y
inventory.setItem(16, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+0.0625"), false, clickType -> {
inventory.setItem(16, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+0.0625"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.move(0, clickType.isShiftClick() ? 0.0625 : 1, 0);
SimulatorWatcher.update(simulator);
@@ -169,14 +169,14 @@ public class SimulatorTNTSettingsGui extends SimulatorBaseGui {
return true;
}, this).open();
}));
inventory.setItem(34, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList("§7Shift§8: §e-0.0625"), false, clickType -> {
inventory.setItem(34, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-0.0625"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.move(0, clickType.isShiftClick() ? -0.0625 : -1, 0);
SimulatorWatcher.update(simulator);
}).setCustomModelData(CMDs.Simulator.DECREMENT_OR_DISABLED));
// Pos Z
inventory.setItem(17, new SWItem(SWItem.getDye(10), "§e+1", Arrays.asList("§7Shift§8: §e+0.0625"), false, clickType -> {
inventory.setItem(17, new SWItem(Material.LIME_DYE, "§e+1", Arrays.asList("§7Shift§8: §e+0.0625"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.move(0, 0, clickType.isShiftClick() ? 0.0625 : 1);
SimulatorWatcher.update(simulator);
@@ -188,7 +188,7 @@ public class SimulatorTNTSettingsGui extends SimulatorBaseGui {
return true;
}, this).open();
}));
inventory.setItem(35, new SWItem(SWItem.getDye(1), "§e-1", Arrays.asList("§7Shift§8: §e-0.0625"), false, clickType -> {
inventory.setItem(35, new SWItem(Material.RED_DYE, "§e-1", Arrays.asList("§7Shift§8: §e-0.0625"), false, clickType -> {
if (clickType == ClickType.DOUBLE_CLICK) return;
tnt.move(0, 0, clickType.isShiftClick() ? -0.0625 : -1);
SimulatorWatcher.update(simulator);
@@ -23,6 +23,7 @@ import de.steamwar.bausystem.features.simulator.data.Simulator;
import de.steamwar.core.Core;
import de.steamwar.data.CMDs;
import de.steamwar.inventory.SWItem;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import java.util.List;
@@ -51,14 +52,14 @@ public abstract class SimulatorPageGui<T> extends SimulatorBaseGui {
headerAndFooter();
page = Math.min(page, maxPage());
inventory.setItem(size - 9, new SWItem(SWItem.getDye(page > 0 ? 10 : 8), page > 0 ? (byte) 10 : (byte) 8, Core.MESSAGE.parse(page > 0 ? "SWLISINV_PREVIOUS_PAGE_ACTIVE" : "SWLISINV_PREVIOUS_PAGE_INACTIVE", player), clickType -> {
inventory.setItem(size - 9, new SWItem(page > 0 ? Material.LIME_DYE : Material.GRAY_DYE, page > 0 ? (byte) 10 : (byte) 8, Core.MESSAGE.parse(page > 0 ? "SWLISINV_PREVIOUS_PAGE_ACTIVE" : "SWLISINV_PREVIOUS_PAGE_INACTIVE", player), clickType -> {
if (page > 0) {
page--;
open();
}
}).setCustomModelData(CMDs.PREVIOUS_PAGE));
boolean hasNext = page < maxPage() - (data.size() % (size - 18) == 0 ? 1 : 0);
inventory.setItem(size - 1, new SWItem(SWItem.getDye(hasNext ? 10 : 8), hasNext ? (byte) 10 : (byte) 8, Core.MESSAGE.parse(hasNext ? "SWLISINV_NEXT_PAGE_ACTIVE" : "SWLISINV_NEXT_PAGE_INACTIVE", player), clickType -> {
inventory.setItem(size - 1, new SWItem(hasNext ? Material.LIME_DYE : Material.GRAY_DYE, hasNext ? (byte) 10 : (byte) 8, Core.MESSAGE.parse(hasNext ? "SWLISINV_NEXT_PAGE_ACTIVE" : "SWLISINV_NEXT_PAGE_INACTIVE", player), clickType -> {
if (hasNext) {
page++;
open();
@@ -24,6 +24,7 @@ import de.steamwar.bausystem.features.simulator.data.Simulator;
import de.steamwar.core.Core;
import de.steamwar.data.CMDs;
import de.steamwar.inventory.SWItem;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import java.util.List;
@@ -51,14 +52,14 @@ public abstract class SimulatorScrollGui<T> extends SimulatorBaseGui {
headerAndFooter();
scroll = maxScroll();
inventory.setItem(size - 9, new SWItem(SWItem.getDye(scroll > 0 ? 10 : 8), scroll > 0 ? (byte) 10 : (byte) 8, Core.MESSAGE.parse(scroll > 0 ? "SWLISINV_PREVIOUS_PAGE_ACTIVE" : "SWLISINV_PREVIOUS_PAGE_INACTIVE", player), clickType -> {
inventory.setItem(size - 9, new SWItem(scroll > 0 ? Material.LIME_DYE : Material.GRAY_DYE, scroll > 0 ? (byte) 10 : (byte) 8, Core.MESSAGE.parse(scroll > 0 ? "SWLISINV_PREVIOUS_PAGE_ACTIVE" : "SWLISINV_PREVIOUS_PAGE_INACTIVE", player), clickType -> {
if (scroll > 0) {
scroll = Math.max(0, scroll - 9);
open();
}
}).setCustomModelData(CMDs.PREVIOUS_PAGE));
boolean hasNext = (data.size() + 1) - scroll > 9;
inventory.setItem(size - 1, new SWItem(SWItem.getDye(hasNext ? 10 : 8), hasNext ? (byte) 10 : (byte) 8, Core.MESSAGE.parse(hasNext ? "SWLISINV_NEXT_PAGE_ACTIVE" : "SWLISINV_NEXT_PAGE_INACTIVE", player), clickType -> {
inventory.setItem(size - 1, new SWItem(hasNext ? Material.LIME_DYE : Material.GRAY_DYE, hasNext ? (byte) 10 : (byte) 8, Core.MESSAGE.parse(hasNext ? "SWLISINV_NEXT_PAGE_ACTIVE" : "SWLISINV_NEXT_PAGE_INACTIVE", player), clickType -> {
if (hasNext) {
scroll = Math.min(scroll + 9, data.size() + 1 - 9);
open();
@@ -76,8 +76,8 @@ public class SmartPlaceListener implements Listener {
IGNORED.add(Material.TNT);
IGNORED.add(Material.REDSTONE_ORE);
IGNORED.add(SWItem.getMaterial("BEEHIVE"));
IGNORED.add(SWItem.getMaterial("SEA_PICKLE"));
IGNORED.add(Material.BEEHIVE);
IGNORED.add(Material.SEA_PICKLE);
IGNORED.remove(Material.STONE);
IGNORED.remove(Material.BARRIER);
}
@@ -23,7 +23,6 @@ import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.Permission;
import de.steamwar.bausystem.config.BauServer;
import de.steamwar.bausystem.utils.BauMemberUpdateEvent;
import de.steamwar.inventory.SWItem;
import de.steamwar.linkage.Linked;
import de.steamwar.sql.BauweltMember;
import de.steamwar.techhider.TechHider;
@@ -71,18 +70,18 @@ public class SpectatorListener implements Listener {
materials.add(value);
}
}
materials.add(SWItem.getMaterial("SCULK_SENSOR"));
materials.add(SWItem.getMaterial("CALIBRATED_SCULK_SENSOR"));
materials.add(SWItem.getMaterial("SCULK_SHRIEKER"));
materials.add(SWItem.getMaterial("AMETHYST_BLOCK"));
materials.add(SWItem.getMaterial("AMETHYST_CLUSTER"));
materials.add(SWItem.getMaterial("SMALL_AMETHYST_BUG"));
materials.add(SWItem.getMaterial("MEDIUM_AMETHYST_BUG"));
materials.add(SWItem.getMaterial("LARGE_AMETHYST_BUG"));
materials.add(Material.SCULK_SENSOR);
materials.add(Material.CALIBRATED_SCULK_SENSOR);
materials.add(Material.SCULK_SHRIEKER);
materials.add(Material.AMETHYST_BLOCK);
materials.add(Material.AMETHYST_CLUSTER);
materials.add(Material.SMALL_AMETHYST_BUD);
materials.add(Material.MEDIUM_AMETHYST_BUD);
materials.add(Material.LARGE_AMETHYST_BUD);
materials.add(Material.TRIPWIRE_HOOK);
materials.add(Material.TRIPWIRE);
materials.add(Material.DAYLIGHT_DETECTOR);
materials.add(SWItem.getMaterial("LIGHTNING_ROD"));
materials.add(Material.LIGHTNING_ROD);
materials.add(Material.PISTON);
materials.add(Material.PISTON_HEAD);
materials.add(Material.MOVING_PISTON);
@@ -96,7 +95,7 @@ public class SpectatorListener implements Listener {
materials.add(Material.ACTIVATOR_RAIL);
materials.add(Material.TNT);
materials.add(Material.REDSTONE_ORE);
materials.add(SWItem.getMaterial("SCAFFOLDING"));
materials.add(Material.SCAFFOLDING);
materials.add(Material.WATER);
materials.remove(Material.BARRIER);
materials.remove(Material.STONE);