diff --git a/BauSystem/BauSystem_Main/build.gradle.kts b/BauSystem/BauSystem_Main/build.gradle.kts
index c387bc36..c320e674 100644
--- a/BauSystem/BauSystem_Main/build.gradle.kts
+++ b/BauSystem/BauSystem_Main/build.gradle.kts
@@ -36,6 +36,7 @@ dependencies {
annotationProcessor(libs.classindex)
compileOnly(project(":SpigotCore", "default"))
compileOnly(project(":KotlinCore", "default"))
+ implementation(project(":HiderCore"))
compileOnly(libs.axiom)
compileOnly(libs.authlib)
diff --git a/BauSystem/BauSystem_Main/src/BauSystem.properties b/BauSystem/BauSystem_Main/src/BauSystem.properties
index 08312320..5ddd82ad 100644
--- a/BauSystem/BauSystem_Main/src/BauSystem.properties
+++ b/BauSystem/BauSystem_Main/src/BauSystem.properties
@@ -35,8 +35,7 @@ SCOREBOARD_LOADER = Loader
SCOREBOARD_TPS = TPS
SCOREBOARD_TPS_FROZEN = §eFrozen
SCOREBOARD_TRACE_TICKS = Ticks
-SCOREBOARD_TECHHIDER = TechHider§8: §aOn
-SCOREBOARD_XRAY = XRay§8: §aOn
+SCOREBOARD_VIEW = View§8: §a{0}
SCOREBOARD_LOCK_TEAM = Bau Lock§8: §eTeam
SCOREBOARD_LOCK_SUPERVISOR = Bau Lock§8: §eSupervisor
SCOREBOARD_LOCK_TEAM_AND_SERVERTEAM = Bau Lock§8: §e(Server) Team
@@ -1046,6 +1045,11 @@ XRAY_HELP = §8/§exray §8- §7Toggle Xray
XRAY_GLOBAL = §cNo xray in global region
XRAY_ON = §aXray activated
XRAY_OFF = §cXray deactivated
+# HULLHIDER
+HULLHIDER_HELP = §8/§ehullhider §8- §7Toggle Hullhider
+HULLHIDER_GLOBAL = §cNo hullhider in global region
+HULLHIDER_ON = §aHullhider activated
+HULLHIDER_OFF = §cHullhider deactivated
# WorldEdit
COLORREPLACE_HELP = §8//§ecolorreplace §8[§7color§8] §8[§7color§8] §8- §7Replace all blocks of one color with another
TYPEREPLACE_HELP = §8//§etypereplace §8[§7type§8] §8[§7type§8] §8- §7Replace all blocks of one type with another
diff --git a/BauSystem/BauSystem_Main/src/BauSystem_de.properties b/BauSystem/BauSystem_Main/src/BauSystem_de.properties
index b61c1f9a..f58c3502 100644
--- a/BauSystem/BauSystem_Main/src/BauSystem_de.properties
+++ b/BauSystem/BauSystem_Main/src/BauSystem_de.properties
@@ -35,8 +35,7 @@ SCOREBOARD_LOADER = Loader
SCOREBOARD_TPS = TPS
SCOREBOARD_TPS_FROZEN = §eEingefroren
SCOREBOARD_TRACE_TICKS = Ticks
-SCOREBOARD_TECHHIDER = TechHider§8: §aAn
-SCOREBOARD_XRAY = XRay§8: §aAn
+SCOREBOARD_VIEW = Ansicht§8: §a{0}
SCOREBOARD_LOCK_TEAM = Bau Lock§8: §eTeam
SCOREBOARD_LOCK_TEAM_AND_SERVERTEAM = Bau Lock§8: §e(Server-) Team
SCOREBOARD_LOCK_SERVERTEAM = Bau Lock§8: §eServerteam
@@ -978,6 +977,11 @@ XRAY_HELP = §8/§exray §8- §7Xray umschalten
XRAY_GLOBAL = §cKein Xray in der globalen region
XRAY_ON = §aXray aktiviert
XRAY_OFF = §cXray deaktiviert
+# HULLHIDER
+HULLHIDER_HELP = §8/§ehullhider §8- §7Hullhider umschalten
+HULLHIDER_GLOBAL = §cKein Hullhider in der globalen region
+HULLHIDER_ON = §aHullhider aktiviert
+HULLHIDER_OFF = §cHullhider deaktiviert
# WorldEdit
COLORREPLACE_HELP = §8//§ecolorreplace §8[§7color§8] §8[§7color§8] §8- §7Ersetzt eine Farbe mit einer anderen
TYPEREPLACE_HELP = §8//§etyreplace §8[§7type§8] §8[§7type§8] §8- §7Ersetzt einen Blockgruppe mit einer anderen
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java
index 041e4d83..c524c4d0 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/BauSystem.java
@@ -24,7 +24,6 @@ import de.steamwar.bausystem.config.ConfigStore;
import de.steamwar.bausystem.features.gui.BauGUI;
import de.steamwar.bausystem.features.script.lua.SteamWarLuaPlugin;
import de.steamwar.bausystem.features.script.lua.libs.LuaLib;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
import de.steamwar.bausystem.features.slaves.panzern.Panzern;
import de.steamwar.bausystem.features.slaves.panzern.PanzernAlgorithm;
import de.steamwar.bausystem.features.tracer.TraceManager;
@@ -41,7 +40,6 @@ import de.steamwar.core.CRIUSleepEvent;
import de.steamwar.core.Core;
import de.steamwar.core.WorldIdentifier;
import de.steamwar.core.worldedit.SteamEdit;
-import de.steamwar.core.worldedit.WorldEditRendererCUIEditor;
import de.steamwar.linkage.AbstractLinker;
import de.steamwar.linkage.SpigotLinker;
import de.steamwar.message.Message;
@@ -110,9 +108,9 @@ public class BauSystem extends JavaPlugin implements Listener {
if (any instanceof PanzernAlgorithm) {
Panzern.add((PanzernAlgorithm) any);
}
- if (any instanceof BoundingBoxLoader) {
- ((BoundingBoxLoader) any).load();
- }
+ // if (any instanceof BoundingBoxLoader) {
+ // ((BoundingBoxLoader) any).load();
+ // }
}
};
try {
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hullhider/HullHiderCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hullhider/HullHiderCommand.java
new file mode 100644
index 00000000..08669a80
--- /dev/null
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/hullhider/HullHiderCommand.java
@@ -0,0 +1,177 @@
+/*
+ * This file is a part of the SteamWar software.
+ *
+ * Copyright (C) 2026 SteamWar.de-Serverteam
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package de.steamwar.bausystem.features.hullhider;
+
+import de.steamwar.bausystem.BauSystem;
+import de.steamwar.bausystem.features.techhider.HiddenHull;
+import de.steamwar.bausystem.features.techhider.HidingRule;
+import de.steamwar.bausystem.features.techhider.TechHiderCommand;
+import de.steamwar.bausystem.features.xray.XrayCommand;
+import de.steamwar.bausystem.region.Point;
+import de.steamwar.bausystem.region.Region;
+import de.steamwar.command.SWCommand;
+import de.steamwar.hullhider.Hull;
+import de.steamwar.hullhider.HullHider;
+import de.steamwar.hullhider.HullRegion;
+import de.steamwar.hullhider.Viewers;
+import de.steamwar.linkage.Linked;
+import de.steamwar.linkage.LinkedInstance;
+import de.steamwar.linkage.LinkedTimer;
+import de.steamwar.techhider.ObfuscationConfig;
+import net.md_5.bungee.api.ChatMessageType;
+import org.bukkit.Bukkit;
+import org.bukkit.World;
+import org.bukkit.entity.Player;
+import org.bukkit.event.EventHandler;
+import org.bukkit.event.Listener;
+import org.bukkit.event.player.PlayerQuitEvent;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
+
+/**
+ * Hides the inside of the build area hull of a region from the players who toggle it, as the hull hider of a fight would.
+ */
+@Linked
+public class HullHiderCommand extends SWCommand implements Listener {
+
+ public HullHiderCommand() {
+ super("hullhider");
+ }
+
+ @Linked
+ // Only blocks are hidden, entities stay visible
+ private final HullHider hullHider = new HullHider<>(false);
+ // Read on netty threads by the BauTechHider
+ private final Map hulls = new ConcurrentHashMap<>();
+ private final Map hidingRules = new ConcurrentHashMap<>();
+ private final Map> hidden = new ConcurrentHashMap<>();
+
+ @LinkedInstance
+ public TechHiderCommand techHiderCommand;
+
+ @LinkedInstance
+ public XrayCommand xrayCommand;
+
+ @Register(description = "HULLHIDER_HELP")
+ public void toggleHider(@Validator Player player) {
+ Region region = Region.getRegion(player.getLocation());
+ if (region.getType().isGlobal()) {
+ BauSystem.MESSAGE.send("HULLHIDER_GLOBAL", player);
+ return;
+ }
+ if (!region.getGameModeConfig().Techhider.Active) {
+ return;
+ }
+
+ techHiderCommand.disable(region, player);
+ xrayCommand.disable(region, player);
+ if (hidden.getOrDefault(region, Collections.emptySet()).contains(player)) {
+ disable(region, player);
+ BauSystem.MESSAGE.sendPrefixless("HULLHIDER_OFF", player, ChatMessageType.ACTION_BAR);
+ } else {
+ enable(region, player);
+ BauSystem.MESSAGE.sendPrefixless("HULLHIDER_ON", player, ChatMessageType.ACTION_BAR);
+ }
+ }
+
+ private void enable(Region region, Player player) {
+ if (!hulls.containsKey(region)) {
+ Point min = region.getBuildArea().getMinPoint(true);
+ Point max = region.getBuildArea().getMaxPoint(true);
+ HullRegion hullRegion = HullRegion.fromInclusive(min.getX(), min.getY(), min.getZ(), max.getX(), max.getY(), max.getZ());
+
+ // The techhider of the gamemode is applied as well, its hidden blocks occlude as they are replaced by the obfuscation block
+ ObfuscationConfig obfuscation = ObfuscationConfig.of(region.getGameModeConfig().Techhider);
+ Hull hull = new Hull(BauSystem.getInstance(), world(), hullRegion, false, obfuscation, new Viewers.VisibleByDefault());
+ hullHider.addHull(region, hull);
+ hulls.put(region, new HiddenHull(hull, obfuscation.getObfuscationState()));
+ hidingRules.put(region, HidingRule.of(region.getBuildArea(), obfuscation));
+ }
+
+ hidden.computeIfAbsent(region, rg -> ConcurrentHashMap.newKeySet()).add(player);
+ // Added players see the hull blocks of a hull visible by default
+ hullHider.addViewer(player, region);
+ // Block changes by WorldEdit or Axiom do not update the hull, so it is rebuilt every time somebody enables it.
+ // This also resends the chunks to the player.
+ hullHider.initialize(region);
+ }
+
+ /**
+ * Stops hiding the hull of the region from the player, removing the hull if nobody uses it anymore.
+ */
+ public void disable(Region region, Player player) {
+ Set players = hidden.get(region);
+ if (players == null || !players.remove(player)) return;
+
+ if (players.isEmpty()) {
+ hidden.remove(region);
+ hulls.remove(region);
+ hidingRules.remove(region);
+ hullHider.removeHull(region);
+ } else {
+ hullHider.removeViewer(player, region);
+ hullHider.resendChunks(player, region);
+ }
+ }
+
+ public void addHidingRules(Player player, List rules) {
+ hidden.forEach((region, players) -> {
+ HidingRule rule = hidingRules.get(region);
+ if (rule != null && players.contains(player)) {
+ rules.add(rule);
+ }
+ });
+ }
+
+ public void addHiddenHulls(Player player, List hiddenHulls) {
+ hidden.forEach((region, players) -> {
+ HiddenHull hiddenHull = hulls.get(region);
+ if (hiddenHull != null && players.contains(player)) {
+ hiddenHulls.add(hiddenHull);
+ }
+ });
+ }
+
+ @LinkedTimer(delay = 1, period = 1)
+ private void onTick() {
+ if (hidden.isEmpty()) return;
+
+ hullHider.sendUncoveredBlocks();
+ }
+
+ private World world() {
+ return Bukkit.getWorlds().get(0);
+ }
+
+ @EventHandler
+ public void onPlayerQuit(PlayerQuitEvent event) {
+ for (Region region : hidden.keySet()) {
+ disable(region, event.getPlayer());
+ }
+ }
+
+ public boolean isActive(Region region, Player player) {
+ return hidden.getOrDefault(region, Collections.emptySet()).contains(player);
+ }
+}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java
index dd6e3f6d..398436db 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/loader/Loader.java
@@ -36,9 +36,11 @@ import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
+import org.bukkit.event.HandlerList;
import org.bukkit.event.Listener;
import org.bukkit.event.inventory.ClickType;
import org.bukkit.event.player.PlayerQuitEvent;
+import org.bukkit.scheduler.BukkitTask;
import java.util.ArrayList;
import java.util.List;
@@ -63,13 +65,14 @@ public class Loader implements Listener, SWPlayer.Component {
private List elements = new ArrayList<>();
private int currentElement = 0;
private long waitTime = 0;
+ private final BukkitTask task;
public Loader(Player p) {
this.p = p;
this.recorder = new LoaderRecorder(p, elements);
Bukkit.getPluginManager().registerEvents(this, BauSystem.getInstance());
- BauSystem.runTaskTimer(BauSystem.getInstance(), () -> {
+ task = BauSystem.runTaskTimer(BauSystem.getInstance(), () -> {
if (stage != Stage.RUNNING && stage != Stage.SINGLE) return;
if (!Permission.BUILD.hasPermission(p)) return;
if (waitTime > 0) {
@@ -136,13 +139,27 @@ public class Loader implements Listener, SWPlayer.Component {
}
public void stop() {
+ end();
+ if (getLoader(p) == this) {
+ SWPlayer.of(p).removeComponent(Loader.class);
+ }
+ }
+
+ // Also called when the loader is replaced by a new one
+ @Override
+ public void onUnmount(SWPlayer player) {
+ end();
+ }
+
+ private void end() {
stage = Stage.END;
if (recorder != null) {
recorder.stop();
recorder = null;
}
elements.clear();
- SWPlayer.of(p).removeComponent(Loader.class);
+ task.cancel();
+ HandlerList.unregisterAll(this);
}
public boolean setTicksBetweenShots(int delay) {
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerListener.java
index d823bff4..2cf8e639 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerListener.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/observer/ObserverTracerListener.java
@@ -24,6 +24,7 @@ import de.steamwar.bausystem.Permission;
import de.steamwar.bausystem.utils.BauMemberUpdateEvent;
import de.steamwar.core.SWPlayer;
import de.steamwar.linkage.Linked;
+import de.steamwar.linkage.LinkedTimer;
import org.bukkit.Bukkit;
import org.bukkit.GameMode;
import org.bukkit.Material;
@@ -43,13 +44,12 @@ public class ObserverTracerListener implements Listener {
static Set enabled = new HashSet<>();
- public ObserverTracerListener() {
- Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> {
- SWPlayer.allWithSingleComponent(ObserverTracer.class).forEach(pair -> {
- if (pair.getSwPlayer().getPlayer().getGameMode() != GameMode.SPECTATOR) return;
- pair.getComponent().show();
- });
- }, 15L, 15L);
+ @LinkedTimer(delay = 15, period = 15)
+ private void showTracers() {
+ SWPlayer.allWithSingleComponent(ObserverTracer.class).forEach(pair -> {
+ if (pair.getSwPlayer().getPlayer().getGameMode() != GameMode.SPECTATOR) return;
+ pair.getComponent().show();
+ });
}
@EventHandler
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/rayvisualizer/RayVisualizerCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/rayvisualizer/RayVisualizerCommand.java
index af5d4eb0..469db717 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/rayvisualizer/RayVisualizerCommand.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/rayvisualizer/RayVisualizerCommand.java
@@ -28,6 +28,7 @@ import de.steamwar.command.SWCommand;
import de.steamwar.entity.CRay;
import de.steamwar.entity.REntityServer;
import de.steamwar.linkage.Linked;
+import de.steamwar.linkage.LinkedTimer;
import org.bukkit.*;
import org.bukkit.block.data.BlockData;
import org.bukkit.entity.Player;
@@ -104,15 +105,16 @@ public class RayVisualizerCommand extends SWCommand implements Listener {
public RayVisualizerCommand() {
super("rayvisualizer");
+ }
- Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> {
- if (server.getPlayers().isEmpty()) return;
- List primedList = WORLD.getEntitiesByClass(TNTPrimed.class)
- .stream().toList();
- rayData.reset();
- if (primedList.isEmpty()) return;
- calculateRays(primedList, primedList);
- }, 1, 1);
+ @LinkedTimer(delay = 1, period = 1)
+ private void updateRays() {
+ if (server.getPlayers().isEmpty()) return;
+ List primedList = WORLD.getEntitiesByClass(TNTPrimed.class)
+ .stream().toList();
+ rayData.reset();
+ if (primedList.isEmpty()) return;
+ calculateRays(primedList, primedList);
}
private void calculateRays(List fromTNTs, List toTNTs) {
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java
index 6265cec4..995583b3 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/script/event/EventListener.java
@@ -27,6 +27,7 @@ import de.steamwar.bausystem.features.script.lua.libs.StorageLib;
import de.steamwar.bausystem.region.Region;
import de.steamwar.core.SWPlayer;
import de.steamwar.linkage.Linked;
+import de.steamwar.linkage.LinkedTimer;
import org.bukkit.Bukkit;
import org.bukkit.Material;
import org.bukkit.entity.EntityType;
@@ -47,13 +48,12 @@ import org.luaj.vm2.LuaValue;
@Linked
public class EventListener implements Listener {
- static {
- Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> {
- long millis = System.currentTimeMillis();
- SWPlayer.allWithSingleComponent(ScriptRunner.ScriptData.class)
- .filter(pair -> millis - pair.getComponent().getLastF() > 200)
- .forEach(pair -> pair.getComponent().setLastF(Long.MAX_VALUE));
- }, 1, 1);
+ @LinkedTimer(delay = 1, period = 1)
+ private static void resetLastF() {
+ long millis = System.currentTimeMillis();
+ SWPlayer.allWithSingleComponent(ScriptRunner.ScriptData.class)
+ .filter(pair -> millis - pair.getComponent().getLastF() > 200)
+ .forEach(pair -> pair.getComponent().setLastF(Long.MAX_VALUE));
}
@EventHandler(priority = EventPriority.MONITOR)
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCursor.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCursor.java
index 6f674a71..271316f8 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCursor.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/simulator/SimulatorCursor.java
@@ -44,9 +44,9 @@ import de.steamwar.entity.REntity;
import de.steamwar.entity.REntityServer;
import de.steamwar.inventory.SWAnvilInv;
import de.steamwar.linkage.Linked;
+import de.steamwar.linkage.LinkedTimer;
import lombok.AllArgsConstructor;
import lombok.Getter;
-import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
import org.bukkit.entity.Player;
@@ -136,11 +136,10 @@ public class SimulatorCursor implements Listener {
private static final Map LAST_SNEAKS = new HashMap<>();
- static {
- Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> {
- long millis = System.currentTimeMillis();
- LAST_SNEAKS.entrySet().removeIf(entry -> millis - entry.getValue() > 200);
- }, 1, 1);
+ @LinkedTimer(delay = 1, period = 1)
+ private static void clearLastSneaks() {
+ long millis = System.currentTimeMillis();
+ LAST_SNEAKS.entrySet().removeIf(entry -> millis - entry.getValue() > 200);
}
@EventHandler(priority = EventPriority.HIGH)
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BlockBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BlockBoundingBox.java
index 0df055af..a9d1cbc4 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BlockBoundingBox.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BlockBoundingBox.java
@@ -19,48 +19,97 @@
package de.steamwar.bausystem.features.slaves.laufbau;
-import com.sk89q.worldedit.blocks.SkullBlock;
-import com.sk89q.worldedit.world.block.BaseBlock;
-import de.steamwar.inventory.SWItem;
+import de.steamwar.bausystem.BauSystem;
+import de.steamwar.linkage.Linked;
+import de.steamwar.linkage.api.Enable;
import lombok.Getter;
import lombok.ToString;
+import net.minecraft.core.BlockPos;
+import net.minecraft.locale.Language;
+import net.minecraft.world.level.EmptyBlockGetter;
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.phys.shapes.CollisionContext;
import org.bukkit.Material;
-import org.bukkit.block.BlockFace;
-import org.bukkit.block.data.Bisected;
+import org.bukkit.Registry;
import org.bukkit.block.data.BlockData;
-import org.bukkit.block.data.Directional;
import org.bukkit.block.data.Waterlogged;
-import org.bukkit.block.data.type.*;
+import org.bukkit.block.data.type.Bed;
+import org.bukkit.block.data.type.Door;
+import org.bukkit.craftbukkit.block.CraftBlockType;
+import org.bukkit.craftbukkit.block.data.CraftBlockData;
+import org.bukkit.craftbukkit.util.CraftVoxelShape;
+import org.bukkit.util.BoundingBox;
+import org.bukkit.util.VoxelShape;
import java.util.ArrayList;
-import java.util.Arrays;
+import java.util.Collection;
+import java.util.Comparator;
import java.util.List;
-import java.util.Random;
-import java.util.function.Consumer;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
+import java.util.stream.Collectors;
@ToString
@Getter
public class BlockBoundingBox {
- private static List randomPlayerHead = new ArrayList<>();
- private static Random random = new Random();
+ @Linked
+ public static class Loader implements Enable {
- static {
- randomPlayerHead.add("zOnlyKroks");
- randomPlayerHead.add("YoyoNow");
- randomPlayerHead.add("Konstruktix");
- randomPlayerHead.add("Merling03");
- randomPlayerHead.add("Lord_Loading");
- /*
- randomPlayerHead.add(UUID.fromString("1623d4b1-b21c-41d3-93c2-eee2845b8497"));
- randomPlayerHead.add(UUID.fromString("f75632be-e3ec-4069-9bec-d13ac6891177"));
- randomPlayerHead.add(UUID.fromString("80382970-424b-4299-9296-d956beab9e7b"));
- randomPlayerHead.add(UUID.fromString("f395ce89-096d-48e9-b796-a2d88722c22b"));
- randomPlayerHead.add(UUID.fromString("db516394-d999-4b77-8d13-73cceec77dfe"));
- */
+ @Override
+ public void enable() {
+ long time = System.currentTimeMillis();
+ Registry.BLOCK.forEach(blockType -> {
+ Block block = CraftBlockType.bukkitToMinecraftNew(blockType);
+ Material material = blockType.asMaterial();
+ if (!material.isItem()) return;
+ if (!material.isBlock()) return;
+ if (material == Material.WATER) return;
+ if (material.getBlastResistance() <= 0.0) return;
+ if (material.getBlastResistance() > 9.0) return;
+
+ block.getStateDefinition().getPossibleStates().forEach(blockState -> {
+ VoxelShape voxelShape = new CraftVoxelShape(blockState.getCollisionShape(EmptyBlockGetter.INSTANCE, BlockPos.ZERO, CollisionContext.empty()));
+ Collection boundingBoxes = voxelShape.getBoundingBoxes();
+ if (boundingBoxes.isEmpty()) return;
+
+ double minX = Double.MAX_VALUE;
+ double minY = Double.MAX_VALUE;
+ double minZ = Double.MAX_VALUE;
+ double maxX = Double.MIN_VALUE;
+ double maxY = Double.MIN_VALUE;
+ double maxZ = Double.MIN_VALUE;
+ for (BoundingBox boundingBox : boundingBoxes) {
+ minX = Math.min(minX, boundingBox.getMinX());
+ minY = Math.min(minY, boundingBox.getMinY());
+ minZ = Math.min(minZ, boundingBox.getMinZ());
+
+ maxX = Math.max(maxX, boundingBox.getMaxX());
+ maxY = Math.max(maxY, boundingBox.getMaxY());
+ maxZ = Math.max(maxZ, boundingBox.getMaxZ());
+ }
+
+ // Ignore Full Blocks
+ if (maxX - minX == 1 && maxY - minY == 1 && maxZ - minZ == 1) return;
+
+ BlockData blockData = CraftBlockData.createData(blockState);
+ if (blockData instanceof Door) return; // Doors dont seem to be 2 blocks tall?
+ if (blockData instanceof Bed) return; // Beds dont seem to be 2 blocks tall?
+ if (blockData instanceof Waterlogged waterlogged && waterlogged.isWaterlogged()) return;
+
+ String key = material.isItem()
+ ? material.getItemTranslationKey() // "item.minecraft.diamond" / "block.minecraft.stone"
+ : material.getBlockTranslationKey(); // for block-only materials like WATER
+
+ new BlockBoundingBox(
+ blockData,
+ boundingBoxes.stream().map(Cuboid::new).collect(Collectors.toList()),
+ material,
+ "§f" + Language.getInstance().getOrDefault(key)
+ );
+ });
+ });
+ BauSystem.getInstance().getLogger().info("Laufbau init > " + (System.currentTimeMillis() - time) + "ms " + elements.size() + " blocks");
+ elements.sort(Comparator.comparingDouble(value -> value.material.getBlastResistance()).thenComparing(value -> value.name));
+ }
}
public static List elements = new ArrayList<>();
@@ -68,221 +117,32 @@ public class BlockBoundingBox {
public BlockData blockData;
public List cuboidList;
private double volume;
- public SWItem swItem;
+ public Material material;
+ public String name;
- public Consumer blockConsumer = null;
-
- public BlockBoundingBox(BlockData blockData, List cuboidList, SWItem swItem) {
+ public BlockBoundingBox(BlockData blockData, List cuboidList, Material material, String name) {
this.blockData = blockData;
this.cuboidList = cuboidList;
- this.swItem = swItem;
+ this.material = material;
+ this.name = name;
volume = cuboidList.stream().mapToDouble(Cuboid::volume).sum();
- elements.add(this);
- }
- public BlockBoundingBox(BlockData blockData, List cuboidList, SWItem swItem, Consumer blockConsumer) {
- this.blockData = blockData;
- this.cuboidList = cuboidList;
- this.swItem = swItem;
- volume = cuboidList.stream().mapToDouble(Cuboid::volume).sum();
+ // Override/Ignore items with worse/better blast resistance
+ for (int i = 0; i < elements.size(); i++) {
+ BlockBoundingBox other = elements.get(i);
+ if (other.cuboidList.equals(cuboidList)) {
+ if (other.material.getBlastResistance() < material.getBlastResistance()) {
+ elements.remove(i);
+ break;
+ } else {
+ return;
+ }
+ }
+ }
elements.add(this);
- this.blockConsumer = blockConsumer;
}
public double volume() {
return volume;
}
-
- static {
- addPixel(Material.AIR.createBlockData(), 0, 0, 0, 0, 0, 0, null);
- // addPixel(Material.COBWEB.createBlockData(), 0, 0, 0, 0, 0, 0, createItem("LAUFBAU_BLOCK_COBWEB", Material.COBWEB));
- addPixel(Material.END_STONE.createBlockData(), 0, 0, 0, 16, 16, 16, null);
-
- addPixel(Material.DIRT_PATH.createBlockData(), 0, 0, 0, 16, 15, 16, createItem("LAUFBAU_BLOCK_GRASS_PATH", Material.DIRT_PATH));
- addPixel(Material.MUD.createBlockData(), 0, 0, 0, 16, 14, 16, createItem("LAUFBAU_BLOCK_SOUL_SAND", Material.SOUL_SAND));
-
- Cocoa cocoaNorth = (Cocoa) Material.COCOA.createBlockData();
- cocoaNorth.setAge(2);
- cocoaNorth.setFacing(BlockFace.NORTH);
- addPixel(cocoaNorth, 4, 3, 1, 8, 9, 8, createItem("LAUFBAU_BLOCK_COCOA", Material.COCOA_BEANS, "LAUFBAU_FACING_NORTH"));
-
- Cocoa cocoaSouth = (Cocoa) Material.COCOA.createBlockData();
- cocoaSouth.setAge(2);
- cocoaSouth.setFacing(BlockFace.SOUTH);
- addPixel(cocoaSouth, 4, 3, 7, 8, 9, 8, createItem("LAUFBAU_BLOCK_COCOA", Material.COCOA_BEANS, "LAUFBAU_FACING_SOUTH"));
-
- Cocoa cocoaWest = (Cocoa) Material.COCOA.createBlockData();
- cocoaWest.setAge(2);
- cocoaWest.setFacing(BlockFace.WEST);
- addPixel(cocoaWest, 1, 3, 4, 8, 9, 8, createItem("LAUFBAU_BLOCK_COCOA", Material.COCOA_BEANS, "LAUFBAU_FACING_WEST"));
-
- Cocoa cocoaEast = (Cocoa) Material.COCOA.createBlockData();
- cocoaEast.setAge(2);
- cocoaEast.setFacing(BlockFace.EAST);
- addPixel(cocoaEast, 7, 3, 4, 8, 9, 8, createItem("LAUFBAU_BLOCK_COCOA", Material.COCOA_BEANS, "LAUFBAU_FACING_EAST"));
-
- TurtleEgg singleTurtleEgg = (TurtleEgg) Material.TURTLE_EGG.createBlockData();
- singleTurtleEgg.setEggs(1);
- singleTurtleEgg.setHatch(0);
- addPixel(singleTurtleEgg, 4, 0, 3, 9, 7, 9, createItem("LAUFBAU_BLOCK_TURTLE_EGG", Material.TURTLE_EGG, "LAUFBAU_COUNT_1"));
-
- TurtleEgg doubleTurtleEgg = (TurtleEgg) Material.TURTLE_EGG.createBlockData();
- doubleTurtleEgg.setEggs(2);
- doubleTurtleEgg.setHatch(0);
- addPixel(doubleTurtleEgg, 1, 0, 1, 14, 7, 14, createItem("LAUFBAU_BLOCK_TURTLE_EGG", Material.TURTLE_EGG, "LAUFBAU_COUNT_2"));
-
- addPixel(Material.CHEST.createBlockData(), 1, 0, 1, 14, 14, 14, createItem("LAUFBAU_BLOCK_CHEST", Material.CHEST));
-
- Snow snowLayers8 = (Snow) Material.SNOW.createBlockData();
- snowLayers8.setLayers(8);
- addPixel(snowLayers8, 0, 0, 0, 16, 14, 16, createItem("LAUFBAU_BLOCK_SNOW", Material.SNOW, "LAUFBAU_LAYERS_8"));
-
- Directional headNorth = (Directional) Material.PLAYER_WALL_HEAD.createBlockData();
- headNorth.setFacing(BlockFace.NORTH);
- addPixel(headNorth, 4, 4, 8, 8, 8, 8, createItem("LAUFBAU_BLOCK_PLAYER_WALL_HEAD", Material.PLAYER_HEAD, "LAUFBAU_FACING_NORTH"), BlockBoundingBox::randomPlayerHead);
-
- Directional headSouth = (Directional) Material.PLAYER_WALL_HEAD.createBlockData();
- headSouth.setFacing(BlockFace.SOUTH);
- addPixel(headSouth, 4, 4, 0, 8, 8, 8, createItem("LAUFBAU_BLOCK_PLAYER_WALL_HEAD", Material.PLAYER_HEAD, "LAUFBAU_FACING_SOUTH"), BlockBoundingBox::randomPlayerHead);
-
- Directional headWest = (Directional) Material.PLAYER_WALL_HEAD.createBlockData();
- headWest.setFacing(BlockFace.WEST);
- addPixel(headWest, 8, 4, 4, 8, 8, 8, createItem("LAUFBAU_BLOCK_PLAYER_WALL_HEAD", Material.PLAYER_HEAD, "LAUFBAU_FACING_WEST"), BlockBoundingBox::randomPlayerHead);
-
- Directional headEast = (Directional) Material.PLAYER_WALL_HEAD.createBlockData();
- headEast.setFacing(BlockFace.EAST);
- addPixel(headEast, 0, 4, 4, 8, 8, 8, createItem("LAUFBAU_BLOCK_PLAYER_WALL_HEAD", Material.PLAYER_HEAD, "LAUFBAU_FACING_EAST"), BlockBoundingBox::randomPlayerHead);
-
- Snow snowLayers7 = (Snow) Material.SNOW.createBlockData();
- snowLayers7.setLayers(7);
- addPixel(snowLayers7, 0, 0, 0, 16, 12, 16, createItem("LAUFBAU_BLOCK_SNOW", Material.SNOW, "LAUFBAU_LAYERS_7"));
-
- Snow snowLayers6 = (Snow) Material.SNOW.createBlockData();
- snowLayers6.setLayers(6);
- addPixel(snowLayers6, 0, 0, 0, 16, 10, 16, createItem("LAUFBAU_BLOCK_SNOW", Material.SNOW, "LAUFBAU_LAYERS_6"));
-
- addPixel(Material.STONECUTTER.createBlockData(), 0, 0, 0, 16, 9, 16, createItem("LAUFBAU_BLOCK_STONECUTTER", Material.STONECUTTER));
-
- addPixel(Material.PLAYER_HEAD.createBlockData(), 4, 0, 4, 8, 8, 8, createItem("LAUFBAU_BLOCK_PLAYER_HEAD", Material.PLAYER_HEAD), BlockBoundingBox::randomPlayerHead);
-
- addPixel(Material.CAKE.createBlockData(), 1, 0, 1, 14, 8, 14, createItem("LAUFBAU_BLOCK_CAKE", Material.CAKE));
-
- Slab bottomSlab = (Slab) Material.END_STONE_BRICK_SLAB.createBlockData();
- bottomSlab.setType(Slab.Type.BOTTOM);
- addPixel(bottomSlab, 0, 0, 0, 16, 8, 16, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_SLAB", Material.END_STONE_BRICK_SLAB, "LAUFBAU_TYPE_BOTTOM"));
-
- Slab topSlab = (Slab) Material.END_STONE_BRICK_SLAB.createBlockData();
- topSlab.setType(Slab.Type.TOP);
- addPixel(topSlab, 0, 8, 0, 16, 8, 16, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_SLAB", Material.END_STONE_BRICK_SLAB, "LAUFBAU_TYPE_TOP"));
-
- SeaPickle quadSeaPickle = (SeaPickle) Material.SEA_PICKLE.createBlockData();
- quadSeaPickle.setWaterlogged(false);
- quadSeaPickle.setPickles(4);
- addPixel(quadSeaPickle, 2, 0, 2, 12, 7, 12, createItem("LAUFBAU_BLOCK_SEA_PICKLE", Material.SEA_PICKLE, "LAUFBAU_COUNT_4"));
-
- Campfire campfire = (Campfire) Material.CAMPFIRE.createBlockData();
- campfire.setSignalFire(false);
- campfire.setLit(false);
- addPixel(campfire, 0, 0, 0, 16, 7, 16, createItem("LAUFBAU_BLOCK_CAMPFIRE", Material.CAMPFIRE));
-
- SeaPickle trippleSeaPickle = (SeaPickle) Material.SEA_PICKLE.createBlockData();
- trippleSeaPickle.setWaterlogged(false);
- trippleSeaPickle.setPickles(3);
- addPixel(trippleSeaPickle, 2, 0, 2, 12, 6, 12, createItem("LAUFBAU_BLOCK_SEA_PICKLE", Material.SEA_PICKLE, "LAUFBAU_COUNT_3"));
-
- SeaPickle doubleSeaPickle = (SeaPickle) Material.SEA_PICKLE.createBlockData();
- doubleSeaPickle.setWaterlogged(false);
- doubleSeaPickle.setPickles(2);
- addPixel(doubleSeaPickle, 3, 0, 3, 10, 6, 10, createItem("LAUFBAU_BLOCK_SEA_PICKLE", Material.SEA_PICKLE, "LAUFBAU_COUNT_2"));
-
- SeaPickle singleSeaPickle = (SeaPickle) Material.SEA_PICKLE.createBlockData();
- singleSeaPickle.setWaterlogged(false);
- singleSeaPickle.setPickles(1);
- addPixel(singleSeaPickle, 6, 0, 6, 4, 6, 4, createItem("LAUFBAU_BLOCK_SEA_PICKLE", Material.SEA_PICKLE, "LAUFBAU_COUNT_1"));
-
- addPixel(Material.FLOWER_POT.createBlockData(), 5, 0, 5, 6, 6, 6, createItem("LAUFBAU_BLOCK_FLOWER_POT", Material.FLOWER_POT));
-
- Snow snowLayers3 = (Snow) Material.SNOW.createBlockData();
- snowLayers3.setLayers(3);
- addPixel(snowLayers3, 0, 0, 0, 16, 4, 16, createItem("LAUFBAU_BLOCK_SNOW", Material.SNOW, "LAUFBAU_LAYERS_3"));
-
- TrapDoor bottomTrapDoor = (TrapDoor) Material.IRON_TRAPDOOR.createBlockData();
- bottomTrapDoor.setHalf(Bisected.Half.BOTTOM);
- addPixel(bottomTrapDoor, 0, 0, 0, 16, 3, 16, createItem("LAUFBAU_BLOCK_IRON_TRAPDOOR", Material.IRON_TRAPDOOR, "LAUFBAU_HALF_BOTTOM"));
-
- TrapDoor topTrapDoor = (TrapDoor) Material.IRON_TRAPDOOR.createBlockData();
- topTrapDoor.setHalf(Bisected.Half.TOP);
- addPixel(topTrapDoor, 0, 13, 0, 16, 3, 16, createItem("LAUFBAU_BLOCK_IRON_TRAPDOOR", Material.IRON_TRAPDOOR, "LAUFBAU_HALF_TOP"));
-
- Snow snowLayers2 = (Snow) Material.SNOW.createBlockData();
- snowLayers2.setLayers(2);
- addPixel(snowLayers2, 0, 0, 0, 16, 2, 16, createItem("LAUFBAU_BLOCK_SNOW", Material.SNOW, "LAUFBAU_LAYERS_2"));
-
- addPixel(Material.LILY_PAD.createBlockData(), 1, 0, 1, 14, 1.5, 14, createItem("LAUFBAU_BLOCK_LILY_PAD", Material.LILY_PAD));
- addPixel(Material.WHITE_CARPET.createBlockData(), 0, 0, 0, 16, 1, 16, createItem("LAUFBAU_BLOCK_WHITE_CARPET", Material.WHITE_CARPET));
-
- Directional endRodBottomTop = (Directional) Material.END_ROD.createBlockData();
- endRodBottomTop.setFacing(BlockFace.UP);
- addPixel(endRodBottomTop, 6, 0, 6, 4, 16, 4, createItem("LAUFBAU_BLOCK_END_ROD", Material.END_ROD, "LAUFBAU_FACING_UP", "LAUFBAU_FACING_DOWN"));
-
- Directional endRodNorthSouth = (Directional) Material.END_ROD.createBlockData();
- endRodNorthSouth.setFacing(BlockFace.NORTH);
- addPixel(endRodNorthSouth, 6, 6, 0, 4, 4, 16, createItem("LAUFBAU_BLOCK_END_ROD", Material.END_ROD, "LAUFBAU_FACING_NORTH", "LAUFBAU_FACING_SOUTH"));
-
- Directional endRodEastWest = (Directional) Material.END_ROD.createBlockData();
- endRodEastWest.setFacing(BlockFace.EAST);
- addPixel(endRodEastWest, 0, 6, 6, 16, 4, 4, createItem("LAUFBAU_BLOCK_END_ROD", Material.END_ROD, "LAUFBAU_FACING_EAST", "LAUFBAU_FACING_WEST"));
-
- Directional lightningRodBottomTop = (Directional) Material.LIGHTNING_ROD.createBlockData();
- lightningRodBottomTop.setFacing(BlockFace.UP);
- addPixel(lightningRodBottomTop, 6, 0, 6, 4, 16, 4, createItem("LAUFBAU_BLOCK_LIGHTNING_ROD", Material.LIGHTNING_ROD, "LAUFBAU_FACING_UP", "LAUFBAU_FACING_DOWN"));
-
- Directional lightningRodNorthSouth = (Directional) Material.LIGHTNING_ROD.createBlockData();
- lightningRodNorthSouth.setFacing(BlockFace.NORTH);
- addPixel(lightningRodNorthSouth, 6, 6, 0, 4, 4, 16, createItem("LAUFBAU_BLOCK_LIGHTNING_ROD", Material.LIGHTNING_ROD, "LAUFBAU_FACING_NORTH", "LAUFBAU_FACING_SOUTH"));
-
- Directional lightningRodEastWest = (Directional) Material.LIGHTNING_ROD.createBlockData();
- lightningRodEastWest.setFacing(BlockFace.EAST);
- addPixel(lightningRodEastWest, 0, 6, 6, 16, 4, 4, createItem("LAUFBAU_BLOCK_LIGHTNING_ROD", Material.LIGHTNING_ROD, "LAUFBAU_FACING_EAST", "LAUFBAU_FACING_WEST"));
-
- Waterlogged conduit = (Waterlogged) Material.CONDUIT.createBlockData();
- conduit.setWaterlogged(false);
- addPixel(conduit, 5, 5, 5, 6, 6, 6, createItem("LAUFBAU_BLOCK_CONDUIT", Material.CONDUIT));
-
- TrapDoor northTrapDoor = (TrapDoor) Material.IRON_TRAPDOOR.createBlockData();
- northTrapDoor.setFacing(BlockFace.NORTH);
- northTrapDoor.setOpen(true);
- addPixel(northTrapDoor, 0, 0, 13, 16, 16, 3, createItem("LAUFBAU_BLOCK_IRON_TRAPDOOR", Material.IRON_TRAPDOOR, "LAUFBAU_FACING_NORTH", "LAUFBAU_OPEN"));
-
- TrapDoor southTrapDoor = (TrapDoor) Material.IRON_TRAPDOOR.createBlockData();
- southTrapDoor.setFacing(BlockFace.SOUTH);
- southTrapDoor.setOpen(true);
- addPixel(southTrapDoor, 0, 0, 0, 16, 16, 3, createItem("LAUFBAU_BLOCK_IRON_TRAPDOOR", Material.IRON_TRAPDOOR, "LAUFBAU_FACING_SOUTH", "LAUFBAU_OPEN"));
-
- TrapDoor westTrapDoor = (TrapDoor) Material.IRON_TRAPDOOR.createBlockData();
- westTrapDoor.setFacing(BlockFace.WEST);
- westTrapDoor.setOpen(true);
- addPixel(westTrapDoor, 13, 0, 0, 3, 16, 16, createItem("LAUFBAU_BLOCK_IRON_TRAPDOOR", Material.IRON_TRAPDOOR, "LAUFBAU_FACING_WEST", "LAUFBAU_OPEN"));
-
- TrapDoor eastTrapDoor = (TrapDoor) Material.IRON_TRAPDOOR.createBlockData();
- eastTrapDoor.setFacing(BlockFace.EAST);
- eastTrapDoor.setOpen(true);
- addPixel(eastTrapDoor, 0, 0, 0, 3, 16, 16, createItem("LAUFBAU_BLOCK_IRON_TRAPDOOR", Material.IRON_TRAPDOOR, "LAUFBAU_FACING_EAST", "LAUFBAU_OPEN"));
- }
-
- private static void addPixel(BlockData blockData, double xPixel, double yPixel, double zPixel, double dxPixel, double dyPixel, double dzPixel, SWItem swItem) {
- new BlockBoundingBox(blockData, Arrays.asList(pixelCuboid(xPixel, yPixel, zPixel, dxPixel, dyPixel, dzPixel)), swItem);
- }
-
- private static void addPixel(BlockData blockData, double xPixel, double yPixel, double zPixel, double dxPixel, double dyPixel, double dzPixel, SWItem swItem, Consumer blockConsumer) {
- new BlockBoundingBox(blockData, Arrays.asList(pixelCuboid(xPixel, yPixel, zPixel, dxPixel, dyPixel, dzPixel)), swItem, blockConsumer);
- }
-
- @SuppressWarnings("deprecation")
- private static void randomPlayerHead(BaseBlock block) {
- if (block instanceof SkullBlock) {
- SkullBlock skullBlock = (SkullBlock) block;
- skullBlock.setOwner(randomPlayerHead.get(random.nextInt(randomPlayerHead.size())).toString());
- }
- }
}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Cuboid.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Cuboid.java
index ec959a69..877fef60 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Cuboid.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Cuboid.java
@@ -22,6 +22,7 @@ package de.steamwar.bausystem.features.slaves.laufbau;
import de.steamwar.bausystem.region.Point;
import lombok.AllArgsConstructor;
import lombok.Data;
+import org.bukkit.util.BoundingBox;
@Data
@AllArgsConstructor
@@ -33,6 +34,15 @@ public class Cuboid {
private double dy;
private double dz;
+ public Cuboid(BoundingBox boundingBox) {
+ this.x = boundingBox.getMinX();
+ this.y = boundingBox.getMinY();
+ this.z = boundingBox.getMinZ();
+ this.dx = boundingBox.getWidthX();
+ this.dy = boundingBox.getHeight();
+ this.dz = boundingBox.getWidthZ();
+ }
+
public boolean intersects(Cuboid cuboid) {
double minx = x - cuboid.dx;
double miny = y - cuboid.dy;
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Laufbau.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Laufbau.java
index 9a82f3a5..311f907b 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Laufbau.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/Laufbau.java
@@ -29,11 +29,15 @@ import org.bukkit.World;
import org.bukkit.entity.Player;
import org.bukkit.util.Vector;
+import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
public class Laufbau {
+ private static final Comparator BLAST_RESISTANCE = Comparator.comparingDouble(value -> -value.material.getBlastResistance());
+ private static final Comparator VOLUME = Comparator.comparingDouble(value -> -value.volume());
+
private World world;
private Location pos1;
private Location pos2;
@@ -61,26 +65,10 @@ public class Laufbau {
editSession = WorldEditUtils.getEditSession(player);
elements = BlockBoundingBox.elements.stream().filter(blockBoundingBox -> {
- return !LaufbauUtils.isDeactivated(player, blockBoundingBox);
+ return !LaufbauConfig.STORE.get(player).getDeactivated().contains(blockBoundingBox.getMaterial());
}).collect(Collectors.toList());
- if (preferingBlastResistance) {
- elements.sort((o1, o2) -> {
- int compared = Double.compare(o1.blockData.getMaterial().getBlastResistance(), o2.blockData.getMaterial().getBlastResistance());
- if (compared != 0) {
- return -compared;
- }
- return -Double.compare(o1.volume(), o2.volume());
- });
- } else {
- elements.sort((o1, o2) -> {
- int compared = Double.compare(o1.volume(), o2.volume());
- if (compared != 0) {
- return -compared;
- }
- return -Double.compare(o1.blockData.getMaterial().getBlastResistance(), o2.blockData.getMaterial().getBlastResistance());
- });
- }
+ elements.sort(preferingBlastResistance ? BLAST_RESISTANCE.thenComparing(VOLUME) : VOLUME.thenComparing(BLAST_RESISTANCE));
active = new ProcessingTracesState(world, this::inRegion, editSession, elements, factor);
}
@@ -107,19 +95,8 @@ public class Laufbau {
}
private boolean inRegion(Vector location, int expansion) {
- if (location.getBlockX() >= pos1.getBlockX() - expansion) {
- if (location.getBlockY() >= pos1.getBlockY() - expansion) {
- if (location.getBlockZ() >= pos1.getBlockZ() - expansion) {
- if (location.getBlockX() <= pos2.getBlockX() + expansion) {
- if (location.getBlockY() <= pos2.getBlockY() + expansion) {
- if (location.getBlockZ() <= pos2.getBlockZ() + expansion) {
- return true;
- }
- }
- }
- }
- }
- }
- return false;
+ return location.getBlockX() >= pos1.getBlockX() - expansion && location.getBlockX() <= pos2.getBlockX() + expansion
+ && location.getBlockY() >= pos1.getBlockY() - expansion && location.getBlockY() <= pos2.getBlockY() + expansion
+ && location.getBlockZ() >= pos1.getBlockZ() - expansion && location.getBlockZ() <= pos2.getBlockZ() + expansion;
}
}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauConfig.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauConfig.java
index c422807c..0fe7223e 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauConfig.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauConfig.java
@@ -21,10 +21,10 @@ package de.steamwar.bausystem.features.slaves.laufbau;
import de.steamwar.bausystem.config.ConfigStore;
import de.steamwar.bausystem.config.VersionedConfig;
-import de.steamwar.bausystem.features.slaves.laufbau.converter.LaufbauConfigV1ToV2Converter;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.Setter;
+import org.bukkit.Material;
import java.util.HashSet;
import java.util.Set;
@@ -43,14 +43,9 @@ import java.util.Set;
@Setter
public class LaufbauConfig implements VersionedConfig {
- public static final int VERSION = 2;
+ public static final int VERSION = 3;
- /**
- * LaufbauConfigV1 is stored as Base64 of gzipped YAPION, the current version as JSON
- */
public static final ConfigStore STORE = new ConfigStore<>(LaufbauConfig.class, VERSION, LaufbauConfig::new)
- .legacy(s -> !s.startsWith("{"), LaufbauConfigV1::parse)
- .converter(new LaufbauConfigV1ToV2Converter())
.userConfig("bausystem-laufbau")
.removeIf(config -> config.getDeactivated().isEmpty());
@@ -58,7 +53,7 @@ public class LaufbauConfig implements VersionedConfig {
protected int version = VERSION;
/**
- * Identifiers of the deactivated {@link BlockBoundingBox}es, see {@link LaufbauUtils#identifier(BlockBoundingBox)}
+ * Materials of the deactivated {@link BlockBoundingBox}es
*/
- protected Set deactivated = new HashSet<>();
+ protected Set deactivated = new HashSet<>();
}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauConfigV1.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauConfigV1.java
deleted file mode 100644
index d372ed5d..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauConfigV1.java
+++ /dev/null
@@ -1,65 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2026 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau;
-
-import de.steamwar.bausystem.config.VersionedConfig;
-import de.steamwar.bausystem.config.legacy.YapionReader;
-import lombok.AccessLevel;
-import lombok.Getter;
-import lombok.Setter;
-
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.UncheckedIOException;
-import java.nio.charset.StandardCharsets;
-import java.util.Base64;
-import java.util.HashSet;
-import java.util.Set;
-import java.util.zip.GZIPInputStream;
-
-/**
- * The legacy laufbau config that was stored as Base64 of the gzipped YAPION,
- * an object with the deactivated identifiers as keys.
- */
-@Getter
-@Setter
-@Deprecated
-public class LaufbauConfigV1 implements VersionedConfig {
-
- public static final int VERSION = 1;
-
- @Setter(AccessLevel.NONE)
- protected int version = VERSION;
-
- protected Set deactivated = new HashSet<>();
-
- public static LaufbauConfigV1 parse(String base64) {
- String yapion;
- try (InputStream inputStream = new GZIPInputStream(new ByteArrayInputStream(Base64.getDecoder().decode(base64)))) {
- yapion = new String(inputStream.readAllBytes(), StandardCharsets.UTF_8);
- } catch (IOException e) {
- throw new UncheckedIOException(e);
- }
- LaufbauConfigV1 config = new LaufbauConfigV1();
- config.deactivated.addAll(YapionReader.parse(yapion).keySet());
- return config;
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauSettings.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauSettings.java
index 88c91fc2..b15c51bd 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauSettings.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauSettings.java
@@ -21,7 +21,6 @@ package de.steamwar.bausystem.features.slaves.laufbau;
import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.shared.Pair;
-import de.steamwar.data.CMDs;
import de.steamwar.inventory.SWItem;
import de.steamwar.inventory.SWListInv;
import org.bukkit.Material;
@@ -32,13 +31,11 @@ import java.util.*;
public class LaufbauSettings {
- private static Map, List> groupMap = new LinkedHashMap<>();
+ private static Set> groups = new LinkedHashSet<>();
static {
BlockBoundingBox.elements.forEach(blockBoundingBox -> {
- if (blockBoundingBox.getSwItem() == null) return;
- String displayName = blockBoundingBox.getSwItem().getItemMeta().getDisplayName();
- groupMap.computeIfAbsent(new Pair<>(blockBoundingBox.getSwItem().getItemStack().getType(), displayName), k -> new ArrayList<>()).add(blockBoundingBox);
+ groups.add(new Pair<>(blockBoundingBox.getMaterial(), blockBoundingBox.getName()));
});
}
@@ -50,96 +47,35 @@ public class LaufbauSettings {
}
public void open() {
- List, List>>> list = new ArrayList<>();
- for (Map.Entry, List> entry : groupMap.entrySet()) {
- SWItem swItem = createItem(entry.getKey().getKey(), entry.getKey().getValue(), entry.getValue());
- list.add(new SWListInv.SWListEntry<>(swItem, entry));
+ List>> list = new ArrayList<>();
+ for (Pair group : groups) {
+ list.add(new SWListInv.SWListEntry<>(createItem(group.getKey(), group.getValue()), group));
}
- SWListInv, List>> inv = new SWListInv<>(p, BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_GUI_NAME", p), false, list, (clickType, entry) -> {
- if (entry.getValue().size() == 1) {
- LaufbauUtils.toggle(p, entry.getValue().get(0));
- open();
- return;
- }
- if (clickType.isLeftClick()) {
- open(entry.getKey());
- return;
- }
- toggle(entry.getValue());
+ SWListInv> inv = new SWListInv<>(p, BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_GUI_NAME", p), false, list, (clickType, group) -> {
+ toggle(group.getKey());
open();
});
inv.open();
}
- public void open(Pair key) {
- List blockBoundingBoxes = groupMap.get(key);
- List> list = new ArrayList<>();
- for (BlockBoundingBox bb : blockBoundingBoxes) {
- SWItem swItem = LaufbauUtils.translateItem(bb.getSwItem(), p);
- ItemMeta itemMeta = swItem.getItemMeta();
- List lore = new ArrayList<>();
- if (itemMeta.getLore() != null) {
- lore = itemMeta.getLore();
- }
- lore.add("");
- lore.add(BauSystem.MESSAGE.parse(LaufbauUtils.isDeactivated(p, bb) ? "LAUFBAU_SETTINGS_INACTIVE" : "LAUFBAU_SETTINGS_ACTIVE", p));
- itemMeta.setLore(lore);
- swItem.setItemMeta(itemMeta);
- list.add(new SWListInv.SWListEntry<>(swItem, bb));
+ public SWItem createItem(Material material, String name) {
+ SWItem swItem = new SWItem(material, name);
+ ItemMeta itemMeta = swItem.getItemMeta();
+ List lore = new ArrayList<>();
+ if (itemMeta != null && itemMeta.getLore() != null) {
+ lore = itemMeta.getLore();
}
- SWListInv inv = new SWListInv<>(p, BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_GUI_NAME", p), false, list, (clickType, blockBoundingBox) -> {
- LaufbauUtils.toggle(p, blockBoundingBox);
- open(key);
- });
- inv.setItem(49, new SWItem(Material.ARROW, BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_GUI_BACK", p), clickType -> {
- open();
- }).setCustomModelData(CMDs.BACK));
- inv.open();
+ lore.add("");
+ lore.add(BauSystem.MESSAGE.parse(LaufbauConfig.STORE.get(p).getDeactivated().contains(material) ? "LAUFBAU_SETTINGS_INACTIVE" : "LAUFBAU_SETTINGS_ACTIVE", p));
+ lore.add("");
+ lore.add(BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_TOGGLE", p));
+ if (itemMeta != null) itemMeta.setLore(lore);
+ swItem.setItemMeta(itemMeta);
+ return swItem;
}
- public SWItem createItem(Material material, String group, List blockBoundingBoxes) {
- if (blockBoundingBoxes.size() == 1) {
- BlockBoundingBox bb = blockBoundingBoxes.get(0);
- SWItem swItem = LaufbauUtils.translateItem(bb.getSwItem(), p);
- ItemMeta itemMeta = swItem.getItemMeta();
- List lore = new ArrayList<>();
- if (itemMeta.getLore() != null) {
- lore = itemMeta.getLore();
- }
- lore.add("");
- lore.add(BauSystem.MESSAGE.parse(LaufbauUtils.isDeactivated(p, bb) ? "LAUFBAU_SETTINGS_INACTIVE" : "LAUFBAU_SETTINGS_ACTIVE", p));
- lore.add("");
- lore.add(BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_TOGGLE", p));
- itemMeta.setLore(lore);
- swItem.setItemMeta(itemMeta);
- return swItem;
- } else {
- long count = blockBoundingBoxes.stream().filter(bb -> LaufbauUtils.isDeactivated(p, bb)).count();
- if (count == 0) {
- return new SWItem(material, BauSystem.MESSAGE.parse(group, p), Arrays.asList("", BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_ACTIVE", p), "", BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_ADVANCED", p), BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_TOGGLE", p)), false, clickType -> {
- });
- }
- if (count == blockBoundingBoxes.size()) {
- return new SWItem(material, BauSystem.MESSAGE.parse(group, p), Arrays.asList("", BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_INACTIVE", p), "", BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_ADVANCED", p), BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_TOGGLE", p)), false, clickType -> {
- });
- }
- return new SWItem(material, BauSystem.MESSAGE.parse(group, p), Arrays.asList("", BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_MIXED", p, blockBoundingBoxes.size() - count, blockBoundingBoxes.size()), "", BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_ADVANCED", p), BauSystem.MESSAGE.parse("LAUFBAU_SETTINGS_TOGGLE", p)), false, clickType -> {
- });
- }
- }
-
- public void toggle(List blockBoundingBoxes) {
- long count = blockBoundingBoxes.stream().filter(bb -> LaufbauUtils.isDeactivated(p, bb)).count();
- if (count != blockBoundingBoxes.size()) {
- blockBoundingBoxes.forEach(bb -> {
- if (!LaufbauUtils.isDeactivated(p, bb)) {
- LaufbauUtils.toggle(p, bb);
- }
- });
- } else {
- blockBoundingBoxes.forEach(bb -> {
- LaufbauUtils.toggle(p, bb);
- });
- }
+ public void toggle(Material material) {
+ Set deactivated = LaufbauConfig.STORE.get(p).getDeactivated();
+ if (!deactivated.remove(material)) deactivated.add(material);
}
}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauUtils.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauUtils.java
deleted file mode 100644
index 45b94482..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/LaufbauUtils.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau;
-
-import de.steamwar.bausystem.BauSystem;
-import de.steamwar.inventory.SWItem;
-import lombok.SneakyThrows;
-import lombok.experimental.UtilityClass;
-import org.bukkit.Material;
-import org.bukkit.entity.Player;
-import org.bukkit.inventory.meta.ItemMeta;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-import java.util.stream.Collectors;
-
-@UtilityClass
-public class LaufbauUtils {
-
- public static Cuboid pixelCuboid(double pixelX, double pixelY, double pixelZ, double pixelDX, double pixelDY, double pixelDZ) {
- return new Cuboid(pixelToBlock(pixelX), pixelToBlock(pixelY), pixelToBlock(pixelZ), pixelToBlock(pixelDX), pixelToBlock(pixelDY), pixelToBlock(pixelDZ));
- }
-
- public static double pixelToBlock(double pixel) {
- return 1.0 / 16 * pixel;
- }
-
- public static SWItem createItem(String name, Material material, String... lore) {
- return new SWItem(material, name, Arrays.asList(lore), false, clickType -> {
- });
- }
-
- public static SWItem translateItem(SWItem item, Player p) {
- ItemMeta itemMeta = item.getItemMeta();
- List lore = new ArrayList<>();
- if (itemMeta.getLore() != null) {
- lore = itemMeta.getLore().stream().map(s -> BauSystem.MESSAGE.parse(s, p)).collect(Collectors.toList());
- }
- return new SWItem(item.getItemStack().getType(), BauSystem.MESSAGE.parse(itemMeta.getDisplayName(), p), lore, false, clickType -> {
- });
- }
-
- public static String identifier(BlockBoundingBox bb) {
- if (bb.getSwItem() == null) {
- return null;
- }
- SWItem item = bb.getSwItem();
- ItemMeta itemMeta = item.getItemMeta();
- List lore = new ArrayList<>();
- if (itemMeta.getLore() != null) {
- lore = itemMeta.getLore()
- .stream()
- .map(s -> s.substring(8))
- .collect(Collectors.toList());
- }
- String name = itemMeta.getDisplayName().substring(14);
- return name + "[" + String.join(",", lore) + "]";
- }
-
- @SneakyThrows
- public static boolean isDeactivated(Player p, BlockBoundingBox bb) {
- if (bb.getSwItem() == null) {
- return false;
- }
- String identifier = identifier(bb);
- return LaufbauConfig.STORE.get(p).getDeactivated().contains(identifier);
- }
-
- @SneakyThrows
- public static void toggle(Player p, BlockBoundingBox bb) {
- if (bb.getSwItem() == null) {
- return;
- }
- String identifier = identifier(bb);
- Set deactivated = LaufbauConfig.STORE.get(p).getDeactivated();
- if (!deactivated.remove(identifier)) {
- deactivated.add(identifier);
- }
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AmethystBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AmethystBoundingBox.java
deleted file mode 100644
index d7aab7b2..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AmethystBoundingBox.java
+++ /dev/null
@@ -1,261 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.BlockFace;
-import org.bukkit.block.data.type.AmethystCluster;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class AmethystBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- floorSmallAmethystBud();
- ceilingSmallAmethystBud();
- northSmallAmethystBud();
- southSmallAmethystBud();
- eastSmallAmethystBud();
- westSmallAmethystBud();
-
- floorMediumAmethystBud();
- ceilingMediumAmethystBud();
- northMediumAmethystBud();
- southMediumAmethystBud();
- eastMediumAmethystBud();
- westMediumAmethystBud();
-
- floorLargeAmethystBud();
- ceilingLargeAmethystBud();
- northLargeAmethystBud();
- southLargeAmethystBud();
- eastLargeAmethystBud();
- westLargeAmethystBud();
-
- floorAmethystCluster();
- ceilingAmethystCluster();
- northAmethystCluster();
- southAmethystCluster();
- eastAmethystCluster();
- westAmethystCluster();
- }
-
- private void floorSmallAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.SMALL_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.UP);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 0, 4, 8, 3, 8));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_SMALL_AMETHYST_BUD", Material.SMALL_AMETHYST_BUD, "LAUFBAU_FACING_UP"));
- }
-
- private void ceilingSmallAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.SMALL_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.DOWN);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 13, 4, 8, 3, 8));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_SMALL_AMETHYST_BUD", Material.SMALL_AMETHYST_BUD, "LAUFBAU_FACING_DOWN"));
- }
-
- private void northSmallAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.SMALL_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 4, 13, 8, 8, 3));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_SMALL_AMETHYST_BUD", Material.SMALL_AMETHYST_BUD, "LAUFBAU_FACING_NORTH"));
- }
-
- private void southSmallAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.SMALL_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 4, 0, 8, 8, 3));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_SMALL_AMETHYST_BUD", Material.SMALL_AMETHYST_BUD, "LAUFBAU_FACING_SOUTH"));
- }
-
- private void eastSmallAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.SMALL_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 4, 4, 3, 8, 8));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_SMALL_AMETHYST_BUD", Material.SMALL_AMETHYST_BUD, "LAUFBAU_FACING_EAST"));
- }
-
- private void westSmallAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.SMALL_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(13, 4, 4, 3, 8, 8));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_SMALL_AMETHYST_BUD", Material.SMALL_AMETHYST_BUD, "LAUFBAU_FACING_WEST"));
- }
-
- private void floorMediumAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.MEDIUM_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.UP);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 0, 3, 10, 4, 10));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_MEDIUM_AMETHYST_BUD", Material.MEDIUM_AMETHYST_BUD, "LAUFBAU_FACING_UP"));
- }
-
- private void ceilingMediumAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.MEDIUM_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.DOWN);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 12, 3, 10, 4, 10));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_MEDIUM_AMETHYST_BUD", Material.MEDIUM_AMETHYST_BUD, "LAUFBAU_FACING_DOWN"));
- }
-
- private void northMediumAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.MEDIUM_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 3, 12, 10, 10, 4));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_MEDIUM_AMETHYST_BUD", Material.MEDIUM_AMETHYST_BUD, "LAUFBAU_FACING_NORTH"));
- }
-
- private void southMediumAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.MEDIUM_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 3, 0, 10, 10, 4));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_MEDIUM_AMETHYST_BUD", Material.MEDIUM_AMETHYST_BUD, "LAUFBAU_FACING_SOUTH"));
- }
-
- private void eastMediumAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.MEDIUM_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 3, 3, 4, 10, 10));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_MEDIUM_AMETHYST_BUD", Material.MEDIUM_AMETHYST_BUD, "LAUFBAU_FACING_EAST"));
- }
-
- private void westMediumAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.MEDIUM_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(12, 3, 3, 4, 10, 10));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_MEDIUM_AMETHYST_BUD", Material.MEDIUM_AMETHYST_BUD, "LAUFBAU_FACING_WEST"));
- }
-
- private void floorLargeAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.LARGE_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.UP);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 0, 3, 10, 5, 10));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_LARGE_AMETHYST_BUD", Material.LARGE_AMETHYST_BUD, "LAUFBAU_FACING_UP"));
- }
-
- private void ceilingLargeAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.LARGE_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.DOWN);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 11, 3, 10, 5, 10));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_LARGE_AMETHYST_BUD", Material.LARGE_AMETHYST_BUD, "LAUFBAU_FACING_DOWN"));
- }
-
- private void northLargeAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.LARGE_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 3, 11, 10, 10, 5));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_LARGE_AMETHYST_BUD", Material.LARGE_AMETHYST_BUD, "LAUFBAU_FACING_NORTH"));
- }
-
- private void southLargeAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.LARGE_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 3, 0, 10, 10, 5));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_LARGE_AMETHYST_BUD", Material.LARGE_AMETHYST_BUD, "LAUFBAU_FACING_SOUTH"));
- }
-
- private void eastLargeAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.LARGE_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 3, 3, 5, 10, 10));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_LARGE_AMETHYST_BUD", Material.LARGE_AMETHYST_BUD, "LAUFBAU_FACING_EAST"));
- }
-
- private void westLargeAmethystBud() {
- AmethystCluster cluster = (AmethystCluster) Material.LARGE_AMETHYST_BUD.createBlockData();
- cluster.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(11, 3, 3, 5, 10, 10));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_LARGE_AMETHYST_BUD", Material.LARGE_AMETHYST_BUD, "LAUFBAU_FACING_WEST"));
- }
-
- private void floorAmethystCluster() {
- AmethystCluster cluster = (AmethystCluster) Material.AMETHYST_CLUSTER.createBlockData();
- cluster.setFacing(BlockFace.UP);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 0, 3, 10, 7, 10));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_AMETHYST_CLUSTER", Material.AMETHYST_CLUSTER, "LAUFBAU_FACING_UP"));
- }
-
- private void ceilingAmethystCluster() {
- AmethystCluster cluster = (AmethystCluster) Material.AMETHYST_CLUSTER.createBlockData();
- cluster.setFacing(BlockFace.DOWN);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 9, 3, 10, 7, 10));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_AMETHYST_CLUSTER", Material.AMETHYST_CLUSTER, "LAUFBAU_FACING_DOWN"));
- }
-
- private void northAmethystCluster() {
- AmethystCluster cluster = (AmethystCluster) Material.AMETHYST_CLUSTER.createBlockData();
- cluster.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 3, 9, 10, 10, 7));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_AMETHYST_CLUSTER", Material.AMETHYST_CLUSTER, "LAUFBAU_FACING_NORTH"));
- }
-
- private void southAmethystCluster() {
- AmethystCluster cluster = (AmethystCluster) Material.AMETHYST_CLUSTER.createBlockData();
- cluster.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 3, 0, 10, 10, 7));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_AMETHYST_CLUSTER", Material.AMETHYST_CLUSTER, "LAUFBAU_FACING_SOUTH"));
- }
-
- private void eastAmethystCluster() {
- AmethystCluster cluster = (AmethystCluster) Material.AMETHYST_CLUSTER.createBlockData();
- cluster.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 3, 3, 7, 10, 10));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_AMETHYST_CLUSTER", Material.AMETHYST_CLUSTER, "LAUFBAU_FACING_EAST"));
- }
-
- private void westAmethystCluster() {
- AmethystCluster cluster = (AmethystCluster) Material.AMETHYST_CLUSTER.createBlockData();
- cluster.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(9, 3, 3, 7, 10, 10));
- new BlockBoundingBox(cluster, cuboidList, createItem("LAUFBAU_BLOCK_AMETHYST_CLUSTER", Material.AMETHYST_CLUSTER, "LAUFBAU_FACING_WEST"));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AzaleaBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AzaleaBoundingBox.java
deleted file mode 100644
index cc2368e7..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/AzaleaBoundingBox.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.data.BlockData;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class AzaleaBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- BlockData blockData = Material.FLOWERING_AZALEA.createBlockData();
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(6, 0, 6, 4, 8, 4));
- new BlockBoundingBox(blockData, cuboidList, createItem("LAUFBAU_BLOCK_AZALEA", Material.FLOWERING_AZALEA));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BellBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BellBoundingBox.java
deleted file mode 100644
index eb202645..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BellBoundingBox.java
+++ /dev/null
@@ -1,149 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.BlockFace;
-import org.bukkit.block.data.type.Bell;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class BellBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- ceilingBell();
-
- floorNorthBell();
- floorEastBell();
-
- doubleWallNorthBell();
- doubleWallEastBell();
-
- singleWallNorthBell();
- singleWallSouthBell();
- singleWallEastBell();
- singleWallWestBell();
- }
-
- public void ceilingBell() {
- Bell bell = (Bell) Material.BELL.createBlockData();
- bell.setAttachment(Bell.Attachment.CEILING);
- bell.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 4, 4, 8, 2, 8));
- cuboidList.add(pixelCuboid(5, 6, 5, 6, 8, 6));
- cuboidList.add(pixelCuboid(7, 13, 7, 2, 3, 2));
- new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_CEILING"));
- }
-
- public void floorNorthBell() {
- Bell bell = (Bell) Material.BELL.createBlockData();
- bell.setAttachment(Bell.Attachment.FLOOR);
- bell.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 4, 16, 16, 8));
- new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_FLOOR", "LAUFBAU_FACING_NORTH", "LAUFBAU_FACING_SOUTH"));
- }
-
- public void floorEastBell() {
- Bell bell = (Bell) Material.BELL.createBlockData();
- bell.setAttachment(Bell.Attachment.FLOOR);
- bell.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 0, 0, 8, 16, 16));
- new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_FLOOR", "LAUFBAU_FACING_EAST", "LAUFBAU_FACING_WEST"));
- }
-
- public void doubleWallNorthBell() {
- Bell bell = (Bell) Material.BELL.createBlockData();
- bell.setAttachment(Bell.Attachment.DOUBLE_WALL);
- bell.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 4, 4, 8, 2, 8));
- cuboidList.add(pixelCuboid(5, 6, 5, 6, 8, 6));
- cuboidList.add(pixelCuboid(7, 13, 0, 2, 2, 16));
- new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_DOUBLE_WALL", "LAUFBAU_FACING_NORTH"));
- }
-
- public void doubleWallEastBell() {
- Bell bell = (Bell) Material.BELL.createBlockData();
- bell.setAttachment(Bell.Attachment.DOUBLE_WALL);
- bell.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 4, 4, 8, 2, 8));
- cuboidList.add(pixelCuboid(5, 6, 5, 6, 8, 6));
- cuboidList.add(pixelCuboid(0, 13, 7, 16, 2, 2));
- new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_DOUBLE_WALL", "LAUFBAU_FACING_EAST"));
- }
-
- public void singleWallNorthBell() {
- Bell bell = (Bell) Material.BELL.createBlockData();
- bell.setAttachment(Bell.Attachment.SINGLE_WALL);
- bell.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 4, 4, 8, 2, 8));
- cuboidList.add(pixelCuboid(5, 6, 5, 6, 8, 6));
- cuboidList.add(pixelCuboid(7, 13, 0, 2, 2, 13));
- new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_SINGLE_WALL", "LAUFBAU_FACING_NORTH"));
- }
-
- public void singleWallSouthBell() {
- Bell bell = (Bell) Material.BELL.createBlockData();
- bell.setAttachment(Bell.Attachment.SINGLE_WALL);
- bell.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 4, 4, 8, 2, 8));
- cuboidList.add(pixelCuboid(5, 6, 5, 6, 8, 6));
- cuboidList.add(pixelCuboid(7, 13, 3, 2, 2, 13));
- new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_SINGLE_WALL", "LAUFBAU_FACING_SOUTH"));
- }
-
- public void singleWallEastBell() {
- Bell bell = (Bell) Material.BELL.createBlockData();
- bell.setAttachment(Bell.Attachment.SINGLE_WALL);
- bell.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 4, 4, 8, 2, 8));
- cuboidList.add(pixelCuboid(5, 6, 5, 6, 8, 6));
- cuboidList.add(pixelCuboid(3, 13, 7, 13, 2, 2));
- new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_SINGLE_WALL", "LAUFBAU_FACING_EAST"));
- }
-
- public void singleWallWestBell() {
- Bell bell = (Bell) Material.BELL.createBlockData();
- bell.setAttachment(Bell.Attachment.SINGLE_WALL);
- bell.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 4, 4, 8, 2, 8));
- cuboidList.add(pixelCuboid(5, 6, 5, 6, 8, 6));
- cuboidList.add(pixelCuboid(0, 13, 7, 13, 2, 2));
- new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_SINGLE_WALL", "LAUFBAU_FACING_WEST"));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BrewingStandBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BrewingStandBoundingBox.java
deleted file mode 100644
index 8e42712a..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/BrewingStandBoundingBox.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.data.type.BrewingStand;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class BrewingStandBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- BrewingStand brewingStand = (BrewingStand) Material.BREWING_STAND.createBlockData();
- List cuboids = new ArrayList<>();
- cuboids.add(pixelCuboid(1, 0, 1, 14, 2, 14));
- cuboids.add(pixelCuboid(7, 2, 7, 2, 12, 2));
- new BlockBoundingBox(brewingStand, cuboids, createItem("LAUFBAU_BLOCK_BREWING_STAND", Material.BREWING_STAND));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/CandleBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/CandleBoundingBox.java
deleted file mode 100644
index e9916f6f..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/CandleBoundingBox.java
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.data.Lightable;
-import org.bukkit.block.data.type.Candle;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class CandleBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- caked();
-
- single();
- }
-
- private void caked() {
- Lightable candleCake = (Lightable) Material.CYAN_CANDLE_CAKE.createBlockData();
- candleCake.setLit(true);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(7, 8, 7, 2, 6, 2));
- new BlockBoundingBox(candleCake, cuboidList, createItem("LAUFBAU_BLOCK_CANDLE_CAKE", Material.CAKE));
- }
-
- private void single() {
- Candle candle = (Candle) Material.CYAN_CANDLE.createBlockData();
- candle.setCandles(1);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(7, 0, 7, 2, 6, 2));
- new BlockBoundingBox(candle, cuboidList, createItem("LAUFBAU_BLOCK_CANDLE", Material.CYAN_CANDLE, "LAUFBAU_COUNT_1"));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChainBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChainBoundingBox.java
deleted file mode 100644
index 6d81b0e5..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChainBoundingBox.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Axis;
-import org.bukkit.Material;
-import org.bukkit.block.data.Orientable;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class ChainBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- bottomTopChain();
- northSouthChain();
- eastWestChain();
- }
-
- private void bottomTopChain() {
- Orientable chainBottomTop = (Orientable) Material.CHAIN.createBlockData();
- chainBottomTop.setAxis(Axis.Y);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(6.5, 0, 6.5, 3, 16, 3));
- new BlockBoundingBox(chainBottomTop, cuboidList, createItem("LAUFBAU_BLOCK_CHAIN", Material.CHAIN, "LAUFBAU_FACING_UP", "LAUFBAU_FACING_DOWN"));
- }
-
- private void northSouthChain() {
- Orientable chainBottomTop = (Orientable) Material.CHAIN.createBlockData();
- chainBottomTop.setAxis(Axis.Z);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(6.5, 6.5, 0, 3, 3, 16));
- new BlockBoundingBox(chainBottomTop, cuboidList, createItem("LAUFBAU_BLOCK_CHAIN", Material.CHAIN, "LAUFBAU_FACING_NORTH", "LAUFBAU_FACING_SOUTH"));
- }
-
- private void eastWestChain() {
- Orientable chainBottomTop = (Orientable) Material.CHAIN.createBlockData();
- chainBottomTop.setAxis(Axis.X);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 6.5, 6.5, 16, 3, 3));
- new BlockBoundingBox(chainBottomTop, cuboidList, createItem("LAUFBAU_BLOCK_CHAIN", Material.CHAIN, "LAUFBAU_FACING_EAST", "LAUFBAU_FACING_WEST"));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChorusPlantBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChorusPlantBoundingBox.java
deleted file mode 100644
index e1ace28e..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/ChorusPlantBoundingBox.java
+++ /dev/null
@@ -1,89 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.BlockFace;
-import org.bukkit.block.data.MultipleFacing;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class ChorusPlantBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- for (int nx = 0; nx < 2; nx++) {
- for (int ny = 0; ny < 2; ny++) {
- for (int nz = 0; nz < 2; nz++) {
- for (int px = 0; px < 2; px++) {
- for (int py = 0; py < 2; py++) {
- for (int pz = 0; pz < 2; pz++) {
- MultipleFacing chorusPlant = (MultipleFacing) Material.CHORUS_PLANT.createBlockData();
- List lore = new ArrayList<>();
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(3, 3, 3, 10, 10, 10));
- if (nx == 1) {
- lore.add("LAUFBAU_CONNECTION_WEST");
- chorusPlant.setFace(BlockFace.WEST, true);
- cuboidList.add(pixelCuboid(0, 3, 3, 3, 10, 10));
- }
- if (ny == 1) {
- lore.add("LAUFBAU_CONNECTION_DOWN");
- chorusPlant.setFace(BlockFace.DOWN, true);
- cuboidList.add(pixelCuboid(3, 0, 3, 10, 3, 10));
- }
- if (nz == 1) {
- lore.add("LAUFBAU_CONNECTION_NORTH");
- chorusPlant.setFace(BlockFace.NORTH, true);
- cuboidList.add(pixelCuboid(3, 3, 0, 10, 10, 3));
- }
- if (px == 1) {
- lore.add("LAUFBAU_CONNECTION_EAST");
- chorusPlant.setFace(BlockFace.EAST, true);
- cuboidList.add(pixelCuboid(13, 3, 3, 3, 10, 10));
- }
- if (py == 1) {
- lore.add("LAUFBAU_CONNECTION_UP");
- chorusPlant.setFace(BlockFace.UP, true);
- cuboidList.add(pixelCuboid(3, 13, 3, 10, 3, 10));
- }
- if (pz == 1) {
- lore.add("LAUFBAU_CONNECTION_SOUTH");
- chorusPlant.setFace(BlockFace.SOUTH, true);
- cuboidList.add(pixelCuboid(3, 3, 13, 10, 10, 3));
- }
- new BlockBoundingBox(chorusPlant, cuboidList, createItem("LAUFBAU_BLOCK_CHORUS_PLANT", Material.CHORUS_PLANT, lore.toArray(new String[0])));
- }
- }
- }
- }
- }
- }
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DragonEggBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DragonEggBoundingBox.java
deleted file mode 100644
index 19a709f5..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DragonEggBoundingBox.java
+++ /dev/null
@@ -1,45 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.data.BlockData;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class DragonEggBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- BlockData blockData = Material.DRAGON_EGG.createBlockData();
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(1, 0, 1, 14, 16, 14));
- new BlockBoundingBox(blockData, cuboidList, createItem("LAUFBAU_BLOCK_DRAGON_EGG", Material.DRAGON_EGG));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DripLeafBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DripLeafBoundingBox.java
deleted file mode 100644
index dae1eb06..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/DripLeafBoundingBox.java
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.data.type.BigDripleaf;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class DripLeafBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- tiltNone();
- tiltPartial();
- }
-
- private void tiltNone() {
- BigDripleaf bigDripleaf = (BigDripleaf) Material.BIG_DRIPLEAF.createBlockData();
- bigDripleaf.setTilt(BigDripleaf.Tilt.NONE);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 11, 0, 16, 4, 16));
- new BlockBoundingBox(bigDripleaf, cuboidList, createItem("LAUFBAU_BLOCK_BIG_DRIP_LEAF", Material.BIG_DRIPLEAF, "LAUFBAU_TILT_NONE"));
- }
-
- private void tiltPartial() {
- BigDripleaf bigDripleaf = (BigDripleaf) Material.BIG_DRIPLEAF.createBlockData();
- bigDripleaf.setTilt(BigDripleaf.Tilt.PARTIAL);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 11, 0, 16, 2, 16));
- new BlockBoundingBox(bigDripleaf, cuboidList, createItem("LAUFBAU_BLOCK_BIG_DRIP_LEAF", Material.BIG_DRIPLEAF, "LAUFBAU_TILT_PARTIAL"));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/FencesBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/FencesBoundingBox.java
deleted file mode 100644
index e19a72b5..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/FencesBoundingBox.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.BlockFace;
-import org.bukkit.block.data.type.Fence;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class FencesBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- for (int nx = 0; nx < 2; nx++) {
- for (int nz = 0; nz < 2; nz++) {
- for (int px = 0; px < 2; px++) {
- for (int pz = 0; pz < 2; pz++) {
- Fence fence = (Fence) Material.NETHER_BRICK_FENCE.createBlockData();
- List lore = new ArrayList<>();
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(6, 0, 6, 4, 24, 4));
- if (nz == 1) {
- lore.add("LAUFBAU_CONNECTION_NORTH");
- fence.setFace(BlockFace.NORTH, true);
- cuboidList.add(pixelCuboid(6, 0, 0, 4, 24, 6));
- }
- if (pz == 1) {
- lore.add("LAUFBAU_CONNECTION_SOUTH");
- fence.setFace(BlockFace.SOUTH, true);
- cuboidList.add(pixelCuboid(6, 0, 10, 4, 24, 6));
- }
- if (nx == 1) {
- lore.add("LAUFBAU_CONNECTION_WEST");
- fence.setFace(BlockFace.WEST, true);
- cuboidList.add(pixelCuboid(0, 0, 6, 6, 24, 4));
- }
- if (px == 1) {
- lore.add("LAUFBAU_CONNECTION_EAST");
- fence.setFace(BlockFace.EAST, true);
- cuboidList.add(pixelCuboid(10, 0, 6, 6, 24, 4));
- }
- new BlockBoundingBox(fence, cuboidList, createItem("LAUFBAU_BLOCK_NETHER_BRICK_FENCE", Material.NETHER_BRICK_FENCE, lore.toArray(new String[0])));
- }
- }
- }
- }
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/GrindstoneBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/GrindstoneBoundingBox.java
deleted file mode 100644
index 59d6310d..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/GrindstoneBoundingBox.java
+++ /dev/null
@@ -1,157 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.BlockFace;
-import org.bukkit.block.data.FaceAttachable;
-import org.bukkit.block.data.type.Grindstone;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class GrindstoneBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- floorNorthGrindstone();
- floorEastGrindstone();
-
- ceilingNorthGrindstone();
- ceilingEastGrindstone();
-
- wallNorthGrindstone();
- wallSouthGrindstone();
- wallEastGrindstone();
- wallWestGrindstone();
- }
-
- public void floorNorthGrindstone() {
- Grindstone grindstone = (Grindstone) Material.GRINDSTONE.createBlockData();
- grindstone.setAttachedFace(FaceAttachable.AttachedFace.FLOOR);
- grindstone.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 4, 2, 8, 12, 12));
- cuboidList.add(pixelCuboid(2, 0, 6, 2, 7, 4));
- cuboidList.add(pixelCuboid(12, 0, 6, 2, 7, 4));
- cuboidList.add(pixelCuboid(2, 7, 5, 2, 6, 6));
- cuboidList.add(pixelCuboid(12, 7, 5, 2, 6, 6));
- new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_FLOOR", "LAUFBAU_FACING_NORTH", "LAUFBAU_FACING_SOUTH"));
- }
-
- public void floorEastGrindstone() {
- Grindstone grindstone = (Grindstone) Material.GRINDSTONE.createBlockData();
- grindstone.setAttachedFace(FaceAttachable.AttachedFace.FLOOR);
- grindstone.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(2, 4, 4, 12, 12, 8));
- cuboidList.add(pixelCuboid(6, 0, 2, 4, 7, 2));
- cuboidList.add(pixelCuboid(6, 0, 12, 4, 7, 2));
- cuboidList.add(pixelCuboid(5, 7, 2, 6, 6, 2));
- cuboidList.add(pixelCuboid(5, 7, 12, 6, 6, 2));
- new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_FLOOR", "LAUFBAU_FACING_EAST", "LAUFBAU_FACING_WEST"));
- }
-
- public void ceilingNorthGrindstone() {
- Grindstone grindstone = (Grindstone) Material.GRINDSTONE.createBlockData();
- grindstone.setAttachedFace(FaceAttachable.AttachedFace.CEILING);
- grindstone.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 0, 2, 8, 12, 12));
- cuboidList.add(pixelCuboid(2, 9, 6, 2, 7, 4));
- cuboidList.add(pixelCuboid(12, 9, 6, 2, 7, 4));
- cuboidList.add(pixelCuboid(2, 3, 5, 2, 6, 6));
- cuboidList.add(pixelCuboid(12, 3, 5, 2, 6, 6));
- new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_CEILING", "LAUFBAU_FACING_NORTH", "LAUFBAU_FACING_SOUTH"));
- }
-
- public void ceilingEastGrindstone() {
- Grindstone grindstone = (Grindstone) Material.GRINDSTONE.createBlockData();
- grindstone.setAttachedFace(FaceAttachable.AttachedFace.CEILING);
- grindstone.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(2, 0, 4, 12, 12, 8));
- cuboidList.add(pixelCuboid(6, 9, 2, 4, 7, 2));
- cuboidList.add(pixelCuboid(6, 9, 12, 4, 7, 2));
- cuboidList.add(pixelCuboid(5, 3, 2, 6, 6, 2));
- cuboidList.add(pixelCuboid(5, 3, 12, 6, 6, 2));
- new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_CEILING", "LAUFBAU_FACING_EAST", "LAUFBAU_FACING_WEST"));
- }
-
- public void wallNorthGrindstone() {
- Grindstone grindstone = (Grindstone) Material.GRINDSTONE.createBlockData();
- grindstone.setAttachedFace(FaceAttachable.AttachedFace.WALL);
- grindstone.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 2, 0, 8, 12, 12));
- cuboidList.add(pixelCuboid(2, 6, 9, 2, 4, 7));
- cuboidList.add(pixelCuboid(12, 6, 9, 2, 4, 7));
- cuboidList.add(pixelCuboid(2, 5, 3, 2, 6, 6));
- cuboidList.add(pixelCuboid(12, 5, 3, 2, 6, 6));
- new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_WALL", "LAUFBAU_FACING_NORTH"));
- }
-
- public void wallSouthGrindstone() {
- Grindstone grindstone = (Grindstone) Material.GRINDSTONE.createBlockData();
- grindstone.setAttachedFace(FaceAttachable.AttachedFace.WALL);
- grindstone.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 2, 4, 8, 12, 12));
- cuboidList.add(pixelCuboid(2, 6, 0, 2, 4, 7));
- cuboidList.add(pixelCuboid(12, 6, 0, 2, 4, 7));
- cuboidList.add(pixelCuboid(2, 5, 7, 2, 6, 6));
- cuboidList.add(pixelCuboid(12, 5, 7, 2, 6, 6));
- new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_WALL", "LAUFBAU_FACING_SOUTH"));
- }
-
- public void wallEastGrindstone() {
- Grindstone grindstone = (Grindstone) Material.GRINDSTONE.createBlockData();
- grindstone.setAttachedFace(FaceAttachable.AttachedFace.WALL);
- grindstone.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 2, 4, 12, 12, 8));
- cuboidList.add(pixelCuboid(0, 6, 2, 7, 4, 2));
- cuboidList.add(pixelCuboid(0, 6, 12, 7, 4, 2));
- cuboidList.add(pixelCuboid(7, 5, 2, 6, 6, 2));
- cuboidList.add(pixelCuboid(7, 5, 12, 6, 6, 2));
- new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_WALL", "LAUFBAU_FACING_EAST"));
- }
-
- public void wallWestGrindstone() {
- Grindstone grindstone = (Grindstone) Material.GRINDSTONE.createBlockData();
- grindstone.setAttachedFace(FaceAttachable.AttachedFace.WALL);
- grindstone.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 2, 4, 12, 12, 8));
- cuboidList.add(pixelCuboid(9, 6, 2, 7, 4, 2));
- cuboidList.add(pixelCuboid(9, 6, 12, 7, 4, 2));
- cuboidList.add(pixelCuboid(3, 5, 2, 6, 6, 2));
- cuboidList.add(pixelCuboid(3, 5, 12, 6, 6, 2));
- new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_WALL", "LAUFBAU_FACING_WEST"));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/HopperBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/HopperBoundingBox.java
deleted file mode 100644
index 655ad055..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/HopperBoundingBox.java
+++ /dev/null
@@ -1,97 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.BlockFace;
-import org.bukkit.block.data.type.Hopper;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class HopperBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- downHopper();
- northHopper();
- southHopper();
- eastHopper();
- westHopper();
- }
-
- public void downHopper() {
- Hopper hopper = (Hopper) Material.HOPPER.createBlockData();
- hopper.setFacing(BlockFace.DOWN);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 10, 0, 16, 6, 16));
- cuboidList.add(pixelCuboid(4, 4, 4, 8, 6, 8));
- cuboidList.add(pixelCuboid(6, 0, 6, 4, 4, 4));
- new BlockBoundingBox(hopper, cuboidList, createItem("LAUFBAU_BLOCK_HOPPER", Material.HOPPER, "LAUFBAU_CONNECTION_FLOOR"));
- }
-
- public void northHopper() {
- Hopper hopper = (Hopper) Material.HOPPER.createBlockData();
- hopper.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 10, 0, 16, 6, 16));
- cuboidList.add(pixelCuboid(4, 4, 4, 8, 6, 8));
- cuboidList.add(pixelCuboid(6, 4, 0, 4, 4, 4));
- new BlockBoundingBox(hopper, cuboidList, createItem("LAUFBAU_BLOCK_HOPPER", Material.HOPPER, "LAUFBAU_CONNECTION_NORTH"));
- }
-
- public void southHopper() {
- Hopper hopper = (Hopper) Material.HOPPER.createBlockData();
- hopper.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 10, 0, 16, 6, 16));
- cuboidList.add(pixelCuboid(4, 4, 4, 8, 6, 8));
- cuboidList.add(pixelCuboid(6, 4, 12, 4, 4, 4));
- new BlockBoundingBox(hopper, cuboidList, createItem("LAUFBAU_BLOCK_HOPPER", Material.HOPPER, "LAUFBAU_CONNECTION_SOUTH"));
- }
-
- public void eastHopper() {
- Hopper hopper = (Hopper) Material.HOPPER.createBlockData();
- hopper.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 10, 0, 16, 6, 16));
- cuboidList.add(pixelCuboid(4, 4, 4, 8, 6, 8));
- cuboidList.add(pixelCuboid(12, 4, 6, 4, 4, 4));
- new BlockBoundingBox(hopper, cuboidList, createItem("LAUFBAU_BLOCK_HOPPER", Material.HOPPER, "LAUFBAU_CONNECTION_EAST"));
- }
-
- public void westHopper() {
- Hopper hopper = (Hopper) Material.HOPPER.createBlockData();
- hopper.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 10, 0, 16, 6, 16));
- cuboidList.add(pixelCuboid(4, 4, 4, 8, 6, 8));
- cuboidList.add(pixelCuboid(0, 4, 6, 4, 4, 4));
- new BlockBoundingBox(hopper, cuboidList, createItem("LAUFBAU_BLOCK_HOPPER", Material.HOPPER, "LAUFBAU_CONNECTION_WEST"));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/IronBarBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/IronBarBoundingBox.java
deleted file mode 100644
index e75afb93..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/IronBarBoundingBox.java
+++ /dev/null
@@ -1,75 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.BlockFace;
-import org.bukkit.block.data.type.Fence;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class IronBarBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- for (int nx = 0; nx < 2; nx++) {
- for (int nz = 0; nz < 2; nz++) {
- for (int px = 0; px < 2; px++) {
- for (int pz = 0; pz < 2; pz++) {
- Fence fence = (Fence) Material.IRON_BARS.createBlockData();
- List lore = new ArrayList<>();
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(7, 0, 7, 2, 16, 2));
- if (nz == 1) {
- lore.add("LAUFBAU_CONNECTION_NORTH");
- fence.setFace(BlockFace.NORTH, true);
- cuboidList.add(pixelCuboid(7, 0, 0, 2, 16, 7));
- }
- if (pz == 1) {
- lore.add("LAUFBAU_CONNECTION_SOUTH");
- fence.setFace(BlockFace.SOUTH, true);
- cuboidList.add(pixelCuboid(7, 0, 9, 2, 16, 7));
- }
- if (nx == 1) {
- lore.add("LAUFBAU_CONNECTION_WEST");
- fence.setFace(BlockFace.WEST, true);
- cuboidList.add(pixelCuboid(0, 0, 7, 7, 16, 2));
- }
- if (px == 1) {
- lore.add("LAUFBAU_CONNECTION_EAST");
- fence.setFace(BlockFace.EAST, true);
- cuboidList.add(pixelCuboid(9, 0, 7, 7, 16, 2));
- }
- new BlockBoundingBox(fence, cuboidList, createItem("LAUFBAU_BLOCK_IRON_BARS", Material.IRON_BARS, lore.toArray(new String[0])));
- }
- }
- }
- }
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LanternBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LanternBoundingBox.java
deleted file mode 100644
index 2320fbcc..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LanternBoundingBox.java
+++ /dev/null
@@ -1,61 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.data.type.Lantern;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class LanternBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- lantern();
- hangingLantern();
- }
-
- public void lantern() {
- Lantern lantern = (Lantern) Material.LANTERN.createBlockData();
- lantern.setHanging(false);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(5, 0, 5, 6, 7, 6));
- cuboidList.add(pixelCuboid(6, 7, 6, 4, 2, 4));
- new BlockBoundingBox(lantern, cuboidList, createItem("LAUFBAU_BLOCK_LANTERN", Material.LANTERN));
- }
-
- public void hangingLantern() {
- Lantern lantern = (Lantern) Material.LANTERN.createBlockData();
- lantern.setHanging(true);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(5, 1, 5, 6, 7, 6));
- cuboidList.add(pixelCuboid(6, 8, 6, 4, 2, 4));
- new BlockBoundingBox(lantern, cuboidList, createItem("LAUFBAU_BLOCK_LANTERN", Material.LANTERN, "LAUFBAU_HANGING"));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LecternBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LecternBoundingBox.java
deleted file mode 100644
index ab49f3ab..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/LecternBoundingBox.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.data.BlockData;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class LecternBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- BlockData blockData = Material.LECTERN.createBlockData();
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 2, 16));
- cuboidList.add(pixelCuboid(4, 2, 4, 8, 12, 8));
- new BlockBoundingBox(blockData, cuboidList, createItem("LAUFBAU_BLOCK_LECTERN", Material.LECTERN));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/StairBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/StairBoundingBox.java
deleted file mode 100644
index ff14d1b8..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/StairBoundingBox.java
+++ /dev/null
@@ -1,343 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.BlockFace;
-import org.bukkit.block.data.type.Stairs;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class StairBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- straightBottomNorthStair();
- straightBottomSouthStair();
- straightBottomEastStair();
- straightBottomWestStair();
-
- straightTopNorthStair();
- straightTopSouthStair();
- straightTopEastStair();
- straightTopWestStair();
-
- outerLeftBottomNorthStair();
- outerLeftBottomSouthStair();
- outerLeftBottomEastStair();
- outerLeftBottomWestStair();
-
- outerLeftTopNorthStair();
- outerLeftTopSouthStair();
- outerLeftTopEastStair();
- outerLeftTopWestStair();
-
- innerLeftBottomNorthStair();
- innerLeftBottomSouthStair();
- innerLeftBottomEastStair();
- innerLeftBottomWestStair();
-
- innerLeftTopNorthStair();
- innerLeftTopSouthStair();
- innerLeftTopEastStair();
- innerLeftTopWestStair();
- }
-
- public void straightBottomNorthStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.STRAIGHT);
- stairs.setHalf(Stairs.Half.BOTTOM);
- stairs.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_STRAIGHT", "LAUFBAU_HALF_BOTTOM", "LAUFBAU_FACING_NORTH"));
- }
-
- public void straightBottomSouthStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.STRAIGHT);
- stairs.setHalf(Stairs.Half.BOTTOM);
- stairs.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 8, 8, 16, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_STRAIGHT", "LAUFBAU_HALF_BOTTOM", "LAUFBAU_FACING_SOUTH"));
- }
-
- public void straightBottomEastStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.STRAIGHT);
- stairs.setHalf(Stairs.Half.BOTTOM);
- stairs.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(8, 8, 0, 8, 8, 16));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_STRAIGHT", "LAUFBAU_HALF_BOTTOM", "LAUFBAU_FACING_EAST"));
- }
-
- public void straightBottomWestStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.STRAIGHT);
- stairs.setHalf(Stairs.Half.BOTTOM);
- stairs.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 8, 0, 8, 8, 16));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_STRAIGHT", "LAUFBAU_HALF_BOTTOM", "LAUFBAU_FACING_WEST"));
- }
-
- public void straightTopNorthStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.STRAIGHT);
- stairs.setHalf(Stairs.Half.TOP);
- stairs.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_STRAIGHT", "LAUFBAU_HALF_TOP", "LAUFBAU_FACING_NORTH"));
- }
-
- public void straightTopSouthStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.STRAIGHT);
- stairs.setHalf(Stairs.Half.TOP);
- stairs.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 0, 8, 16, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_STRAIGHT", "LAUFBAU_HALF_TOP", "LAUFBAU_FACING_SOUTH"));
- }
-
- public void straightTopEastStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.STRAIGHT);
- stairs.setHalf(Stairs.Half.TOP);
- stairs.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(8, 0, 0, 8, 8, 16));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_STRAIGHT", "LAUFBAU_HALF_TOP", "LAUFBAU_FACING_EAST"));
- }
-
- public void straightTopWestStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.STRAIGHT);
- stairs.setHalf(Stairs.Half.TOP);
- stairs.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 0, 0, 8, 8, 16));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_STRAIGHT", "LAUFBAU_HALF_TOP", "LAUFBAU_FACING_WEST"));
- }
-
- public void outerLeftBottomNorthStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.OUTER_LEFT);
- stairs.setHalf(Stairs.Half.BOTTOM);
- stairs.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 8, 0, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_OUTER_LEFT", "LAUFBAU_HALF_BOTTOM", "LAUFBAU_FACING_NORTH"));
- }
-
- public void outerLeftBottomSouthStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.OUTER_LEFT);
- stairs.setHalf(Stairs.Half.BOTTOM);
- stairs.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(8, 8, 8, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_OUTER_LEFT", "LAUFBAU_HALF_BOTTOM", "LAUFBAU_FACING_SOUTH"));
- }
-
- public void outerLeftBottomEastStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.OUTER_LEFT);
- stairs.setHalf(Stairs.Half.BOTTOM);
- stairs.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(8, 8, 0, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_OUTER_LEFT", "LAUFBAU_HALF_BOTTOM", "LAUFBAU_FACING_EAST"));
- }
-
- public void outerLeftBottomWestStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.OUTER_LEFT);
- stairs.setHalf(Stairs.Half.BOTTOM);
- stairs.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 8, 8, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_OUTER_LEFT", "LAUFBAU_HALF_BOTTOM", "LAUFBAU_FACING_WEST"));
- }
-
- public void outerLeftTopNorthStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.OUTER_LEFT);
- stairs.setHalf(Stairs.Half.TOP);
- stairs.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 0, 0, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_OUTER_LEFT", "LAUFBAU_HALF_TOP", "LAUFBAU_FACING_NORTH"));
- }
-
- public void outerLeftTopSouthStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.OUTER_LEFT);
- stairs.setHalf(Stairs.Half.TOP);
- stairs.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(8, 0, 8, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_OUTER_LEFT", "LAUFBAU_HALF_TOP", "LAUFBAU_FACING_SOUTH"));
- }
-
- public void outerLeftTopEastStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.OUTER_LEFT);
- stairs.setHalf(Stairs.Half.TOP);
- stairs.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(8, 0, 0, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_OUTER_LEFT", "LAUFBAU_HALF_TOP", "LAUFBAU_FACING_EAST"));
- }
-
- public void outerLeftTopWestStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.OUTER_LEFT);
- stairs.setHalf(Stairs.Half.TOP);
- stairs.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 0, 8, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_OUTER_LEFT", "LAUFBAU_HALF_TOP", "LAUFBAU_FACING_WEST"));
- }
-
- public void innerLeftBottomNorthStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.INNER_LEFT);
- stairs.setHalf(Stairs.Half.BOTTOM);
- stairs.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 8));
- cuboidList.add(pixelCuboid(0, 8, 8, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_INNER_LEFT", "LAUFBAU_HALF_BOTTOM", "LAUFBAU_FACING_NORTH"));
- }
-
- public void innerLeftBottomSouthStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.INNER_LEFT);
- stairs.setHalf(Stairs.Half.BOTTOM);
- stairs.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 8, 8, 16, 8, 8));
- cuboidList.add(pixelCuboid(8, 8, 0, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_INNER_LEFT", "LAUFBAU_HALF_BOTTOM", "LAUFBAU_FACING_SOUTH"));
- }
-
- public void innerLeftBottomEastStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.INNER_LEFT);
- stairs.setHalf(Stairs.Half.BOTTOM);
- stairs.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 8));
- cuboidList.add(pixelCuboid(8, 8, 8, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_INNER_LEFT", "LAUFBAU_HALF_BOTTOM", "LAUFBAU_FACING_EAST"));
- }
-
- public void innerLeftBottomWestStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.INNER_LEFT);
- stairs.setHalf(Stairs.Half.BOTTOM);
- stairs.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 8, 8, 16, 8, 8));
- cuboidList.add(pixelCuboid(0, 8, 0, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_INNER_LEFT", "LAUFBAU_HALF_BOTTOM", "LAUFBAU_FACING_WEST"));
- }
-
- public void innerLeftTopNorthStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.INNER_LEFT);
- stairs.setHalf(Stairs.Half.TOP);
- stairs.setFacing(BlockFace.NORTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 8));
- cuboidList.add(pixelCuboid(0, 0, 8, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_INNER_LEFT", "LAUFBAU_HALF_TOP", "LAUFBAU_FACING_NORTH"));
- }
-
- public void innerLeftTopSouthStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.INNER_LEFT);
- stairs.setHalf(Stairs.Half.TOP);
- stairs.setFacing(BlockFace.SOUTH);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 0, 8, 16, 8, 8));
- cuboidList.add(pixelCuboid(8, 0, 0, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_INNER_LEFT", "LAUFBAU_HALF_TOP", "LAUFBAU_FACING_SOUTH"));
- }
-
- public void innerLeftTopEastStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.INNER_LEFT);
- stairs.setHalf(Stairs.Half.TOP);
- stairs.setFacing(BlockFace.EAST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 0, 0, 16, 8, 8));
- cuboidList.add(pixelCuboid(8, 0, 8, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_INNER_LEFT", "LAUFBAU_HALF_TOP", "LAUFBAU_FACING_EAST"));
- }
-
- public void innerLeftTopWestStair() {
- Stairs stairs = (Stairs) Material.END_STONE_BRICK_STAIRS.createBlockData();
- stairs.setShape(Stairs.Shape.INNER_LEFT);
- stairs.setHalf(Stairs.Half.TOP);
- stairs.setFacing(BlockFace.WEST);
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(0, 8, 0, 16, 8, 16));
- cuboidList.add(pixelCuboid(0, 0, 8, 16, 8, 8));
- cuboidList.add(pixelCuboid(0, 0, 0, 8, 8, 8));
- new BlockBoundingBox(stairs, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS", Material.END_STONE_BRICK_STAIRS, "LAUFBAU_SHAPE_INNER_LEFT", "LAUFBAU_HALF_TOP", "LAUFBAU_FACING_WEST"));
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/WallBoundingBox.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/WallBoundingBox.java
deleted file mode 100644
index dffe873d..00000000
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/boundingboxes/WallBoundingBox.java
+++ /dev/null
@@ -1,79 +0,0 @@
-/*
- * This file is a part of the SteamWar software.
- *
- * Copyright (C) 2025 SteamWar.de-Serverteam
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Affero General Public License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with this program. If not, see .
- */
-
-package de.steamwar.bausystem.features.slaves.laufbau.boundingboxes;
-
-import de.steamwar.bausystem.features.slaves.laufbau.BlockBoundingBox;
-import de.steamwar.bausystem.features.slaves.laufbau.BoundingBoxLoader;
-import de.steamwar.bausystem.features.slaves.laufbau.Cuboid;
-import de.steamwar.linkage.Linked;
-import org.bukkit.Material;
-import org.bukkit.block.BlockFace;
-import org.bukkit.block.data.type.Wall;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.createItem;
-import static de.steamwar.bausystem.features.slaves.laufbau.LaufbauUtils.pixelCuboid;
-
-@Linked
-public class WallBoundingBox implements BoundingBoxLoader {
-
- @Override
- public void load() {
- v18();
- }
-
- private void v18() {
- for (int nx = 0; nx < 2; nx++) {
- for (int nz = 0; nz < 2; nz++) {
- for (int px = 0; px < 2; px++) {
- for (int pz = 0; pz < 2; pz++) {
- Wall fence = (Wall) Material.END_STONE_BRICK_WALL.createBlockData();
- List lore = new ArrayList<>();
- List cuboidList = new ArrayList<>();
- cuboidList.add(pixelCuboid(4, 0, 4, 8, 24, 8));
- if (nz == 1) {
- lore.add("LAUFBAU_CONNECTION_NORTH");
- fence.setHeight(BlockFace.NORTH, Wall.Height.LOW);
- cuboidList.add(pixelCuboid(5, 0, 0, 6, 24, 4));
- }
- if (pz == 1) {
- lore.add("LAUFBAU_CONNECTION_SOUTH");
- fence.setHeight(BlockFace.SOUTH, Wall.Height.LOW);
- cuboidList.add(pixelCuboid(5, 0, 12, 6, 24, 4));
- }
- if (nx == 1) {
- lore.add("LAUFBAU_CONNECTION_WEST");
- fence.setHeight(BlockFace.WEST, Wall.Height.LOW);
- cuboidList.add(pixelCuboid(0, 0, 5, 4, 24, 6));
- }
- if (px == 1) {
- lore.add("LAUFBAU_CONNECTION_EAST");
- fence.setHeight(BlockFace.EAST, Wall.Height.LOW);
- cuboidList.add(pixelCuboid(12, 0, 5, 4, 24, 6));
- }
- new BlockBoundingBox(fence, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_WALL", Material.END_STONE_BRICK_WALL, lore.toArray(new String[0])));
- }
- }
- }
- }
- }
-}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingLaufState.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingLaufState.java
index 82b0f5f7..ff2b6d3b 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingLaufState.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/states/CreatingLaufState.java
@@ -145,7 +145,6 @@ public class CreatingLaufState implements LaufbauState {
}
try {
BaseBlock block = BukkitAdapter.adapt(highestBlockBoundingBox.blockData).toBaseBlock();
- if (highestBlockBoundingBox.blockConsumer != null) highestBlockBoundingBox.blockConsumer.accept(block);
editSession.setBlock(BukkitAdapter.asBlockVector(location), block);
} catch (MaxChangedBlocksException e) {
e.printStackTrace();
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/boundary/BoundaryViewer.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/boundary/BoundaryViewer.java
index fe242037..139155ef 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/boundary/BoundaryViewer.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/team/boundary/BoundaryViewer.java
@@ -19,11 +19,10 @@
package de.steamwar.bausystem.features.team.boundary;
-import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.region.Point;
import de.steamwar.bausystem.region.Region;
import de.steamwar.linkage.Linked;
-import org.bukkit.Bukkit;
+import de.steamwar.linkage.LinkedTimer;
import org.bukkit.Particle;
import org.bukkit.entity.Player;
import org.bukkit.event.EventHandler;
@@ -38,17 +37,16 @@ public class BoundaryViewer implements Listener {
public static Set viewers = new HashSet<>();
- {
- Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> {
- if (viewers.isEmpty()) {
- return;
- }
- viewers.forEach(player -> {
- Region region = Region.getRegion(player.getLocation());
- if (region.getType().isGlobal()) return;
- showRegion(region, player);
- });
- }, 20, 20);
+ @LinkedTimer(delay = 20, period = 20)
+ private void showBoundaries() {
+ if (viewers.isEmpty()) {
+ return;
+ }
+ viewers.forEach(player -> {
+ Region region = Region.getRegion(player.getLocation());
+ if (region.getType().isGlobal()) return;
+ showRegion(region, player);
+ });
}
private void showRegion(Region region, Player player) {
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/BauTechHider.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/BauTechHider.java
new file mode 100644
index 00000000..99a7f255
--- /dev/null
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/BauTechHider.java
@@ -0,0 +1,161 @@
+/*
+ * This file is a part of the SteamWar software.
+ *
+ * Copyright (C) 2026 SteamWar.de-Serverteam
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package de.steamwar.bausystem.features.techhider;
+
+import de.steamwar.bausystem.features.hullhider.HullHiderCommand;
+import de.steamwar.bausystem.features.world.SpectatorListener;
+import de.steamwar.bausystem.features.xray.XrayCommand;
+import de.steamwar.linkage.Linked;
+import de.steamwar.linkage.LinkedInstance;
+import de.steamwar.techhider.AccessPrivilegeProvider;
+import de.steamwar.techhider.TechHider;
+import net.minecraft.world.level.block.Block;
+import net.minecraft.world.level.block.Blocks;
+import net.minecraft.world.level.block.entity.BlockEntityType;
+import net.minecraft.world.level.block.state.BlockState;
+import org.bukkit.entity.Player;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * The single TechHider of the server. It combines the hiding rules of the spectator techhider, /techhider and /xray and the hulls of /hullhider per player.
+ * Entities are never hidden.
+ */
+@Linked
+public class BauTechHider implements AccessPrivilegeProvider {
+
+ private static final HidingRule[] NO_RULES = new HidingRule[0];
+ private static final HiddenHull[] NO_HULLS = new HiddenHull[0];
+
+ // Injected after construction, until then nothing is hidden
+ @LinkedInstance
+ public XrayCommand xrayCommand;
+ @LinkedInstance
+ public TechHiderCommand techHiderCommand;
+ @LinkedInstance
+ public SpectatorListener spectatorListener;
+ @LinkedInstance
+ public HullHiderCommand hullHiderCommand;
+
+ public BauTechHider() {
+ new TechHider(this);
+ }
+
+ @Override
+ public ForPlayer forPlayer(Player p) {
+ if (xrayCommand == null || techHiderCommand == null || spectatorListener == null || hullHiderCommand == null) {
+ return new BauPlayerAccess(p, NO_RULES, NO_HULLS);
+ }
+
+ // Region rules first: where rules overlap, the first one decides the obfuscation block
+ List rules = new ArrayList<>();
+ xrayCommand.addHidingRules(p, rules);
+ techHiderCommand.addHidingRules(p, rules);
+ hullHiderCommand.addHidingRules(p, rules);
+ spectatorListener.addHidingRules(p, rules);
+
+ List hulls = new ArrayList<>();
+ hullHiderCommand.addHiddenHulls(p, hulls);
+ return new BauPlayerAccess(p, rules.toArray(NO_RULES), hulls.toArray(NO_HULLS));
+ }
+
+ @Override
+ public boolean isPlayerPrivilegedToPerformAction(Player p) {
+ return true;
+ }
+
+ /**
+ * Snapshot of the hiding rules of one player, taken once per outgoing packet on the netty thread.
+ */
+ private record BauPlayerAccess(Player player, HidingRule[] rules, HiddenHull[] hulls) implements ForPlayer {
+
+ @Override
+ public Player getPlayer() {
+ return player;
+ }
+
+ @Override
+ public boolean canAccessAllDataWithinChunk(int chunkX, int chunkZ) {
+ for (HidingRule rule : rules) {
+ if (rule.coversChunk(chunkX, chunkZ)) return false;
+ }
+ for (HiddenHull hull : hulls) {
+ if (!hull.hull().getRegion().chunkOutside(chunkX, chunkZ)) return false;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean canAccessPosition(int blockX, int blockY, int blockZ) {
+ for (HiddenHull hull : hulls) {
+ if (hull.hull().isBlockHidden(player, blockX, blockY, blockZ)) return false;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean canAccessBlock(int blockX, int blockY, int blockZ, Block block) {
+ for (HidingRule rule : rules) {
+ if (rule.covers(blockX, blockY, blockZ) && rule.obfuscation().hidesBlock(block)) return false;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean canAccessBlockState(int blockX, int blockY, int blockZ, BlockState blockState) {
+ for (HidingRule rule : rules) {
+ if (rule.covers(blockX, blockY, blockZ) && rule.obfuscation().hidesBlockState(blockState)) return false;
+ }
+ return true;
+ }
+
+ @Override
+ public boolean canAccessEntity(int entityId) {
+ return true;
+ }
+
+ // Entities are not hidden, even if they spawn inside a hidden hull
+ @Override
+ public boolean canAccessEntitySpawn(int entityId, int blockX, int blockY, int blockZ) {
+ return true;
+ }
+
+ @Override
+ public boolean canAccessBlockEntity(int blockX, int blockY, int blockZ, BlockEntityType> type) {
+ for (HidingRule rule : rules) {
+ if (rule.covers(blockX, blockY, blockZ) && rule.obfuscation().hidesBlockEntity(type)) return false;
+ }
+ return true;
+ }
+
+ @Override
+ public BlockState getObfuscation(int blockX, int blockY, int blockZ) {
+ for (HidingRule rule : rules) {
+ if (rule.covers(blockX, blockY, blockZ)) return rule.obfuscation().getObfuscationState();
+ }
+ for (HiddenHull hull : hulls) {
+ if (hull.hull().getRegion().contains(blockX, blockY, blockZ)) return hull.obfuscation();
+ }
+ // Only asked for positions a rule or hull hides
+ return Blocks.END_STONE.defaultBlockState();
+ }
+ }
+}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BoundingBoxLoader.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/HiddenHull.java
similarity index 68%
rename from BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BoundingBoxLoader.java
rename to BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/HiddenHull.java
index 899c951c..e2cff0c8 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/slaves/laufbau/BoundingBoxLoader.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/HiddenHull.java
@@ -1,7 +1,7 @@
/*
* This file is a part of the SteamWar software.
*
- * Copyright (C) 2025 SteamWar.de-Serverteam
+ * Copyright (C) 2026 SteamWar.de-Serverteam
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as published by
@@ -17,9 +17,13 @@
* along with this program. If not, see .
*/
-package de.steamwar.bausystem.features.slaves.laufbau;
+package de.steamwar.bausystem.features.techhider;
-public interface BoundingBoxLoader {
+import de.steamwar.hullhider.Hull;
+import net.minecraft.world.level.block.state.BlockState;
- void load();
+/**
+ * A hull a player may not view, and the block sent instead of its hidden blocks.
+ */
+public record HiddenHull(Hull hull, BlockState obfuscation) {
}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/HidingRule.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/HidingRule.java
new file mode 100644
index 00000000..a7010e5a
--- /dev/null
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/HidingRule.java
@@ -0,0 +1,52 @@
+/*
+ * This file is a part of the SteamWar software.
+ *
+ * Copyright (C) 2026 SteamWar.de-Serverteam
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package de.steamwar.bausystem.features.techhider;
+
+import de.steamwar.bausystem.region.Point;
+import de.steamwar.bausystem.region.Region;
+import de.steamwar.hullhider.HullRegion;
+import de.steamwar.techhider.ObfuscationConfig;
+
+/**
+ * Hides the blocks of an obfuscation config within an area, or everywhere if the area is null.
+ */
+public record HidingRule(HullRegion area, ObfuscationConfig obfuscation) {
+
+ public static HidingRule everywhere(ObfuscationConfig obfuscation) {
+ return new HidingRule(null, obfuscation);
+ }
+
+ /**
+ * Covers the area including its extension.
+ */
+ public static HidingRule of(Region.Area area, ObfuscationConfig obfuscation) {
+ Point min = area.getMinPoint(true);
+ Point max = area.getMaxPoint(true);
+ return new HidingRule(HullRegion.fromInclusive(min.getX(), min.getY(), min.getZ(), max.getX(), max.getY(), max.getZ()), obfuscation);
+ }
+
+ public boolean covers(int x, int y, int z) {
+ return area == null || area.contains(x, y, z);
+ }
+
+ public boolean coversChunk(int chunkX, int chunkZ) {
+ return area == null || !area.chunkOutside(chunkX, chunkZ);
+ }
+}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/TechHiderCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/TechHiderCommand.java
index 2f401a59..0548e99a 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/TechHiderCommand.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/TechHiderCommand.java
@@ -21,17 +21,17 @@ package de.steamwar.bausystem.features.techhider;
import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.Permission;
+import de.steamwar.bausystem.features.hullhider.HullHiderCommand;
import de.steamwar.bausystem.features.world.SpectatorListener;
import de.steamwar.bausystem.features.xray.XrayCommand;
import de.steamwar.bausystem.region.Region;
-import de.steamwar.bausystem.utils.ScoreboardElement;
import de.steamwar.command.PreviousArguments;
import de.steamwar.command.SWCommand;
import de.steamwar.command.TypeMapper;
import de.steamwar.core.CraftbukkitWrapper;
import de.steamwar.linkage.Linked;
import de.steamwar.linkage.LinkedInstance;
-import de.steamwar.techhider.legacy.TechHider;
+import de.steamwar.techhider.ObfuscationConfig;
import net.md_5.bungee.api.ChatMessageType;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;
@@ -41,21 +41,26 @@ import org.bukkit.event.Listener;
import org.bukkit.event.player.PlayerQuitEvent;
import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.stream.Collectors;
@Linked
-public class TechHiderCommand extends SWCommand implements Listener, ScoreboardElement {
+public class TechHiderCommand extends SWCommand implements Listener {
public TechHiderCommand() {
super("techhider", "hider", "obfuscate", "hide", "hide-tech");
}
- private Map> techHiders = new HashMap<>();
- private Map> hidden = new HashMap<>();
+ // Read on netty threads by the BauTechHider
+ private Map> hidingRules = new ConcurrentHashMap<>();
+ private Map> hidden = new ConcurrentHashMap<>();
@LinkedInstance
public XrayCommand xrayCommand;
+ @LinkedInstance
+ public HullHiderCommand hullHiderCommand;
+
@Register(description = "TECHHIDER_HELP")
public void toggleHider(@Validator Player player) {
Region region = Region.getRegion(player.getLocation());
@@ -64,26 +69,20 @@ public class TechHiderCommand extends SWCommand implements Listener, ScoreboardE
return;
}
- Optional techHider = techHiders.computeIfAbsent(region, rg -> {
+ Optional hidingRule = hidingRules.computeIfAbsent(region, rg -> {
if (!region.getGameModeConfig().Techhider.Active) {
return Optional.empty();
}
- hidden.put(rg, new HashSet<>());
-
- TechHider current = new TechHider((p, cX, cY) -> {
- if (rg.getBuildArea().isChunkOutside(cX, cY)) return true;
- return !hidden.get(rg).contains(p);
- }, region.getGameModeConfig().Techhider.ObfuscateWith, region.getGameModeConfig().Techhider.HiddenBlocks, region.getGameModeConfig().Techhider.HiddenBlockEntities);
- current.enable();
-
- return Optional.of(current);
+ hidden.put(rg, ConcurrentHashMap.newKeySet());
+ return Optional.of(HidingRule.of(rg.getBuildArea(), ObfuscationConfig.of(rg.getGameModeConfig().Techhider)));
});
- if (!techHider.isPresent()) {
+ if (!hidingRule.isPresent()) {
return;
}
xrayCommand.disable(region, player);
+ hullHiderCommand.disable(region, player);
if (hidden.get(region).contains(player)) {
hidden.get(region).remove(player);
BauSystem.MESSAGE.sendPrefixless("TECHHIDER_OFF", player, ChatMessageType.ACTION_BAR);
@@ -128,6 +127,14 @@ public class TechHiderCommand extends SWCommand implements Listener, ScoreboardE
hidden.values().forEach(set -> set.remove(event.getPlayer()));
}
+ public void addHidingRules(Player player, List rules) {
+ hidden.forEach((region, players) -> {
+ if (players.contains(player)) {
+ hidingRules.getOrDefault(region, Optional.empty()).ifPresent(rules::add);
+ }
+ });
+ }
+
public void disable(Region region, Player player) {
hidden.computeIfPresent(region, (rg, set) -> {
set.remove(player);
@@ -135,19 +142,7 @@ public class TechHiderCommand extends SWCommand implements Listener, ScoreboardE
});
}
- @Override
- public ScoreboardGroup getGroup() {
- return ScoreboardGroup.OTHER;
- }
-
- @Override
- public int order() {
- return 0;
- }
-
- @Override
- public String get(Region region, Player p) {
- if (!hidden.getOrDefault(region, Collections.emptySet()).contains(p)) return null;
- return "§e" + BauSystem.MESSAGE.parse("SCOREBOARD_TECHHIDER", p);
+ public boolean isActive(Region region, Player player) {
+ return hidden.getOrDefault(region, Collections.emptySet()).contains(player);
}
}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/ViewScoreboardElement.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/ViewScoreboardElement.java
new file mode 100644
index 00000000..6b9dab13
--- /dev/null
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/techhider/ViewScoreboardElement.java
@@ -0,0 +1,70 @@
+/*
+ * This file is a part of the SteamWar software.
+ *
+ * Copyright (C) 2026 SteamWar.de-Serverteam
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see .
+ */
+
+package de.steamwar.bausystem.features.techhider;
+
+import de.steamwar.bausystem.BauSystem;
+import de.steamwar.bausystem.features.hullhider.HullHiderCommand;
+import de.steamwar.bausystem.features.xray.XrayCommand;
+import de.steamwar.bausystem.region.Region;
+import de.steamwar.bausystem.utils.ScoreboardElement;
+import de.steamwar.linkage.Linked;
+import de.steamwar.linkage.LinkedInstance;
+import org.bukkit.entity.Player;
+
+/**
+ * Shows which of /techhider, /xray and /hullhider is active, at most one of them can be per region.
+ */
+@Linked
+public class ViewScoreboardElement implements ScoreboardElement {
+
+ @LinkedInstance
+ public TechHiderCommand techHiderCommand;
+
+ @LinkedInstance
+ public XrayCommand xrayCommand;
+
+ @LinkedInstance
+ public HullHiderCommand hullHiderCommand;
+
+ @Override
+ public ScoreboardGroup getGroup() {
+ return ScoreboardGroup.OTHER;
+ }
+
+ @Override
+ public int order() {
+ return 0;
+ }
+
+ @Override
+ public String get(Region region, Player p) {
+ String view;
+ if (techHiderCommand.isActive(region, p)) {
+ view = "TechHider";
+ } else if (xrayCommand.isActive(region, p)) {
+ view = "XRay";
+ } else if (hullHiderCommand.isActive(region, p)) {
+ view = "HullHider";
+ } else {
+ return null;
+ }
+ return "§e" + BauSystem.MESSAGE.parse("SCOREBOARD_VIEW", p, view);
+ }
+}
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSSystem.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSSystem.java
index 2789c4bf..7c503168 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSSystem.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/tpslimit/TPSSystem.java
@@ -50,6 +50,9 @@ import java.util.Arrays;
@Linked
public class TPSSystem implements Listener {
+ @Linked
+ private final TickManager tickManager = TickManager.impl;
+
public TPSSystem() {
if (TickManager.impl.canFreeze()) {
new TPSFreezeCommand();
@@ -68,7 +71,6 @@ public class TPSSystem implements Listener {
new TickDefaultCommand();
new TPSBaseCommand();
new TickBaseCommand();
- Bukkit.getPluginManager().registerEvents(TickManager.impl, BauSystem.getInstance());
}
@EventHandler
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AFKStopperListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AFKStopperListener.java
index 5c061545..097ef2bc 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AFKStopperListener.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/AFKStopperListener.java
@@ -23,6 +23,7 @@ import de.steamwar.bausystem.BauSystem;
import de.steamwar.core.CRIUWakeupEvent;
import de.steamwar.core.CheckpointUtils;
import de.steamwar.linkage.Linked;
+import de.steamwar.linkage.LinkedTimer;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.entity.Player;
@@ -38,17 +39,16 @@ public class AFKStopperListener implements Listener {
private long lastMovementTime = System.currentTimeMillis();
- public AFKStopperListener() {
- Bukkit.getScheduler().runTaskTimer(BauSystem.getInstance(), () -> {
- long currentTime = System.currentTimeMillis();
- if (currentTime - lastMovementTime > 10 * 60000) { // 10 Minutes
- for (Player p : Bukkit.getOnlinePlayers()) {
- p.kickPlayer(BauSystem.MESSAGE.parse("AFK_KICK_MESSAGE", p));
- }
- } else if (currentTime - lastMovementTime > 9 * 60000) {
- BauSystem.MESSAGE.broadcast("AFK_WARNING_MESSAGE");
+ @LinkedTimer(delay = 1, period = 1, unit = LinkedTimer.Unit.MINUTES)
+ private void checkAfk() {
+ long currentTime = System.currentTimeMillis();
+ if (currentTime - lastMovementTime > 10 * 60000) { // 10 Minutes
+ for (Player p : Bukkit.getOnlinePlayers()) {
+ p.kickPlayer(BauSystem.MESSAGE.parse("AFK_KICK_MESSAGE", p));
}
- }, 1200, 1200); //every minute
+ } else if (currentTime - lastMovementTime > 9 * 60000) {
+ BauSystem.MESSAGE.broadcast("AFK_WARNING_MESSAGE");
+ }
}
@EventHandler
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SpectatorListener.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SpectatorListener.java
index 645600cd..ae32e0c1 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SpectatorListener.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/world/SpectatorListener.java
@@ -22,10 +22,11 @@ package de.steamwar.bausystem.features.world;
import de.steamwar.bausystem.BauSystem;
import de.steamwar.bausystem.Permission;
import de.steamwar.bausystem.config.BauServer;
+import de.steamwar.bausystem.features.techhider.HidingRule;
import de.steamwar.bausystem.utils.BauMemberUpdateEvent;
import de.steamwar.linkage.Linked;
import de.steamwar.sql.BauweltMember;
-import de.steamwar.techhider.legacy.TechHider;
+import de.steamwar.techhider.ObfuscationConfig;
import org.bukkit.Bukkit;
import org.bukkit.Location;
import org.bukkit.Material;
@@ -41,14 +42,18 @@ import org.bukkit.event.entity.EntityPickupItemEvent;
import org.bukkit.event.player.*;
import org.bukkit.util.Vector;
+import java.util.Collections;
import java.util.HashSet;
+import java.util.List;
import java.util.Set;
+import java.util.concurrent.ConcurrentHashMap;
@Linked
public class SpectatorListener implements Listener {
- private static final TechHider techHider;
- private static final Set NO_TECHHIDER = new HashSet<>();
+ private static final HidingRule SPECTATOR_RULE;
+ // Read on netty threads by the BauTechHider
+ private static final Set NO_TECHHIDER = ConcurrentHashMap.newKeySet();
static {
Set materials = new HashSet<>();
@@ -99,19 +104,12 @@ public class SpectatorListener implements Listener {
materials.add(Material.WATER);
materials.remove(Material.BARRIER);
materials.remove(Material.STONE);
- techHider = new TechHider((TechHider.LocationEvaluator) (player, i, i1) -> {
- return Permission.BUILD.hasPermission(player) || NO_TECHHIDER.contains(player);
- }, Material.END_STONE, materials, new HashSet<>());
+ SPECTATOR_RULE = HidingRule.everywhere(new ObfuscationConfig(Material.END_STONE, materials, Collections.emptySet()));
}
- private static void enableOrDisableTechhider() {
- boolean enable = Bukkit.getOnlinePlayers()
- .stream()
- .anyMatch(player -> !(Permission.BUILD.hasPermission(player) || NO_TECHHIDER.contains(player)));
- if (enable) {
- techHider.enable();
- } else {
- techHider.disable();
+ public void addHidingRules(Player player, List rules) {
+ if (!(Permission.BUILD.hasPermission(player) || NO_TECHHIDER.contains(player))) {
+ rules.add(SPECTATOR_RULE);
}
}
@@ -122,7 +120,6 @@ public class SpectatorListener implements Listener {
NO_TECHHIDER.add(player);
}
resendChunks(player);
- enableOrDisableTechhider();
}
private static void resendChunks(Player player) {
@@ -141,7 +138,6 @@ public class SpectatorListener implements Listener {
@EventHandler
public void onPlayerJoin(PlayerJoinEvent event) {
- enableOrDisableTechhider();
if (BauSystem.DEV_SERVER) return;
if (event.getPlayer().getUniqueId().equals(BauServer.getInstance().getOwner())) {
return;
@@ -163,7 +159,6 @@ public class SpectatorListener implements Listener {
@EventHandler
public void onBauMemberUpdate(BauMemberUpdateEvent event) {
- enableOrDisableTechhider();
if (!anySupervisorOnline(null) && !BauSystem.DEV_SERVER) {
Bukkit.getOnlinePlayers().forEach(player -> {
player.kickPlayer("");
@@ -180,7 +175,6 @@ public class SpectatorListener implements Listener {
@EventHandler
public void onPlayerQuit(PlayerQuitEvent event) {
NO_TECHHIDER.remove(event.getPlayer());
- Bukkit.getScheduler().runTaskLater(BauSystem.getInstance(), SpectatorListener::enableOrDisableTechhider, 1);
if (BauSystem.DEV_SERVER) return;
if (!anySupervisorOnline(event.getPlayer())) {
Bukkit.getOnlinePlayers().forEach(player -> {
diff --git a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/xray/XrayCommand.java b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/xray/XrayCommand.java
index aa90081c..c8f01679 100644
--- a/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/xray/XrayCommand.java
+++ b/BauSystem/BauSystem_Main/src/de/steamwar/bausystem/features/xray/XrayCommand.java
@@ -21,14 +21,15 @@ package de.steamwar.bausystem.features.xray;
import com.comphenix.tinyprotocol.TinyProtocol;
import de.steamwar.bausystem.BauSystem;
+import de.steamwar.bausystem.features.hullhider.HullHiderCommand;
+import de.steamwar.bausystem.features.techhider.HidingRule;
import de.steamwar.bausystem.features.techhider.TechHiderCommand;
import de.steamwar.bausystem.region.Region;
-import de.steamwar.bausystem.utils.ScoreboardElement;
import de.steamwar.command.SWCommand;
import de.steamwar.core.CraftbukkitWrapper;
import de.steamwar.linkage.Linked;
import de.steamwar.linkage.LinkedInstance;
-import de.steamwar.techhider.legacy.TechHider;
+import de.steamwar.techhider.ObfuscationConfig;
import net.md_5.bungee.api.ChatMessageType;
import net.minecraft.network.protocol.game.ServerboundMovePlayerPacket;
import net.minecraft.server.level.ServerPlayer;
@@ -43,22 +44,27 @@ import org.bukkit.event.player.PlayerInteractEvent;
import org.bukkit.event.player.PlayerQuitEvent;
import java.util.*;
+import java.util.concurrent.ConcurrentHashMap;
import java.util.function.BiFunction;
@Linked
-public class XrayCommand extends SWCommand implements Listener, ScoreboardElement {
+public class XrayCommand extends SWCommand implements Listener {
public XrayCommand() {
super("xray");
}
- private Map> techHiders = new HashMap<>();
+ // Read on netty threads by the BauTechHider and the movement filter
+ private Map> hidingRules = new ConcurrentHashMap<>();
private Map> xrayedBlocks = new HashMap<>();
- private Map> hidden = new HashMap<>();
+ private Map> hidden = new ConcurrentHashMap<>();
@LinkedInstance
public TechHiderCommand techHiderCommand;
+ @LinkedInstance
+ public HullHiderCommand hullHiderCommand;
+
@Register(description = "XRAY_HELP")
public void toggleHider(@Validator Player player) {
Region region = Region.getRegion(player.getLocation());
@@ -67,23 +73,24 @@ public class XrayCommand extends SWCommand implements Listener, ScoreboardElemen
return;
}
- Optional techHider = techHiders.computeIfAbsent(region, rg -> {
+ Optional hidingRule = hidingRules.computeIfAbsent(region, rg -> {
if (!region.getGameModeConfig().Techhider.Active) {
return Optional.empty();
}
- hidden.put(rg, new HashSet<>());
+ hidden.put(rg, ConcurrentHashMap.newKeySet());
Set blocks = new HashSet<>(Arrays.asList(region.getGameModeConfig().Techhider.ObfuscateWith));
if (blocks.contains(Material.END_STONE)) blocks.add(Material.END_STONE_BRICKS);
xrayedBlocks.put(region, blocks);
- return Optional.of(createXray(rg, blocks));
+ return Optional.of(HidingRule.of(rg.getBuildArea(), new ObfuscationConfig(Material.STRUCTURE_VOID, blocks, Collections.emptySet())));
});
- if (!techHider.isPresent()) {
+ if (!hidingRule.isPresent()) {
return;
}
techHiderCommand.disable(region, player);
+ hullHiderCommand.disable(region, player);
if (hidden.get(region).contains(player)) {
hidden.get(region).remove(player);
BauSystem.MESSAGE.sendPrefixless("XRAY_OFF", player, ChatMessageType.ACTION_BAR);
@@ -139,13 +146,12 @@ public class XrayCommand extends SWCommand implements Listener, ScoreboardElemen
}
}
- private TechHider createXray(Region rg, Set obfuscate) {
- TechHider current = new TechHider((TechHider.LocationEvaluator) (p, cX, cY) -> {
- if (rg.getBuildArea().isChunkOutside(cX, cY)) return true;
- return !hidden.get(rg).contains(p);
- }, Material.STRUCTURE_VOID, obfuscate, new HashSet<>());
- current.enable();
- return current;
+ public void addHidingRules(Player player, List rules) {
+ hidden.forEach((region, players) -> {
+ if (players.contains(player)) {
+ hidingRules.getOrDefault(region, Optional.empty()).ifPresent(rules::add);
+ }
+ });
}
@EventHandler
@@ -160,19 +166,7 @@ public class XrayCommand extends SWCommand implements Listener, ScoreboardElemen
});
}
- @Override
- public ScoreboardGroup getGroup() {
- return ScoreboardGroup.OTHER;
- }
-
- @Override
- public int order() {
- return 0;
- }
-
- @Override
- public String get(Region region, Player p) {
- if (!hidden.getOrDefault(region, Collections.emptySet()).contains(p)) return null;
- return "§e" + BauSystem.MESSAGE.parse("SCOREBOARD_XRAY", p);
+ public boolean isActive(Region region, Player player) {
+ return hidden.getOrDefault(region, Collections.emptySet()).contains(player);
}
}
diff --git a/CommandFramework/src/de/steamwar/command/AbstractSWCommand.java b/CommandFramework/src/de/steamwar/command/AbstractSWCommand.java
index 7ec88017..5062319f 100644
--- a/CommandFramework/src/de/steamwar/command/AbstractSWCommand.java
+++ b/CommandFramework/src/de/steamwar/command/AbstractSWCommand.java
@@ -91,9 +91,13 @@ public abstract class AbstractSWCommand {
if (commandList.stream().noneMatch(s -> s.invoke(errors::add, sender, alias, args))) {
errors.forEach(Runnable::run);
} else return;
- if (errors.isEmpty() && helpCommandList.stream().noneMatch(s -> s.invoke(errors::add, sender, alias, args))) {
- errors.forEach(Runnable::run);
+ if (!errors.isEmpty()) return;
+ for (SubCommand help : helpCommandList) {
+ // Generic help must not hide the error of a more specific command
+ if (help.noTabComplete && !errors.isEmpty()) break;
+ if (help.invoke(errors::add, sender, alias, args)) return;
}
+ errors.forEach(Runnable::run);
} catch (CommandFrameworkException e) {
commandSystemError(sender, e);
throw e;
diff --git a/CommonCore/Linkage/src/de/steamwar/linkage/AbstractLinker.java b/CommonCore/Linkage/src/de/steamwar/linkage/AbstractLinker.java
index 4a2db53d..9959ecef 100644
--- a/CommonCore/Linkage/src/de/steamwar/linkage/AbstractLinker.java
+++ b/CommonCore/Linkage/src/de/steamwar/linkage/AbstractLinker.java
@@ -22,12 +22,18 @@ package de.steamwar.linkage;
import de.steamwar.linkage.api.Disable;
import de.steamwar.linkage.api.Enable;
import lombok.NonNull;
+import lombok.SneakyThrows;
import lombok.experimental.StandardException;
import java.io.BufferedReader;
import java.io.InputStreamReader;
+import java.lang.invoke.MethodHandle;
+import java.lang.invoke.MethodHandles;
+import java.lang.invoke.MethodType;
import java.lang.reflect.Field;
+import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
+import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@@ -38,6 +44,7 @@ public abstract class AbstractLinker {
protected final T plugin;
private Map, Object> instances = new HashMap<>();
+ private final List