Add SWItem to BlockBoundingBox and update every constructor call Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
dc277b052a
Commit
016707d23b
@ -1127,7 +1127,6 @@ LAUFBAU_STATE_FILTERING_TRACES = Traces filtern
|
||||
LAUFBAU_STATE_PROCESSING_TRACES = Traces verbinden
|
||||
LAUFBAU_STATE_EXPANDING_TRACES = Traces aufblähen
|
||||
LAUFBAU_STATE_SPLITTING_POINTS = Punkte trennen
|
||||
LAUFBAU_STATE_SHRINKING_POINTS = Punkte ausdünnen
|
||||
LAUFBAU_STATE_CREATING_INNER_BLOCKS = Innenraum füllen
|
||||
LAUFBAU_STATE_CREATING_OUTER_BLOCKS = Mantel bauen
|
||||
LAUFBAU_SIMPLE_PROGRESS = §e{0}§8: §e{1}§8/§e{2}
|
||||
@ -1152,6 +1151,16 @@ LAUFBAU_BLOCK_LILY_PAD =
|
||||
LAUFBAU_BLOCK_WHITE_CARPET =
|
||||
LAUFBAU_BLOCK_END_ROD =
|
||||
LAUFBAU_BLOCK_CONDUIT =
|
||||
LAUFBAU_BLOCK_BREWING_STAND =
|
||||
LAUFBAU_BLOCK_BELL =
|
||||
LAUFBAU_BLOCK_GRINDSTONE =
|
||||
LAUFBAU_BLOCK_HOPPER =
|
||||
LAUFBAU_BLOCK_LANTERN =
|
||||
LAUFBAU_BLOCK_END_STONE_BRICK_STAIRS =
|
||||
LAUFBAU_BLOCK_CHORUS_PLANT =
|
||||
LAUFBAU_BLOCK_NETHER_BRICK_FENCE =
|
||||
LAUFBAU_BLOCK_IRON_BARS =
|
||||
LAUFBAU_BLOCK_END_STONE_BRICK_WALL =
|
||||
|
||||
LAUFBAU_FACING_NORTH =
|
||||
LAUFBAU_FACING_SOUTH =
|
||||
@ -1179,6 +1188,26 @@ LAUFBAU_HALF_TOP =
|
||||
|
||||
LAUFBAU_OPEN =
|
||||
|
||||
LAUFBAU_ATTACHMENT_CEILING =
|
||||
LAUFBAU_ATTACHMENT_FLOOR =
|
||||
LAUFBAU_ATTACHMENT_DOUBLE_WALL =
|
||||
LAUFBAU_ATTACHMENT_SINGLE_WALL =
|
||||
LAUFBAU_ATTACHMENT_WALL =
|
||||
|
||||
LAUFBAU_CONNECTION_FLOOR =
|
||||
LAUFBAU_CONNECTION_NORTH =
|
||||
LAUFBAU_CONNECTION_SOUTH =
|
||||
LAUFBAU_CONNECTION_EAST =
|
||||
LAUFBAU_CONNECTION_WEST =
|
||||
LAUFBAU_CONNECTION_DOWN =
|
||||
LAUFBAU_CONNECTION_UP =
|
||||
|
||||
LAUFBAU_HANGING =
|
||||
|
||||
LAUFBAU_SHAPE_STRAIGHT =
|
||||
LAUFBAU_SHAPE_OUTER_LEFT =
|
||||
LAUFBAU_SHAPE_INNER_LEFT =
|
||||
|
||||
# UTILS
|
||||
SELECT_HELP = §8/§eselect §8[§7RegionsTyp§8] §8- §7Wähle einen RegionsTyp aus
|
||||
SELECT_EXTENSION_HELP = §8/§eselect §8[§7RegionsTyp§8] §8[§7Extension§8] §8- §7Wähle einen RegionsTyp aus mit oder ohne Extension
|
||||
|
@ -29,7 +29,6 @@ import org.bukkit.entity.Player;
|
||||
import org.bukkit.util.Vector;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
|
||||
public class Laufbau {
|
||||
@ -44,7 +43,6 @@ public class Laufbau {
|
||||
private ProcessingTracesState processingTracesState = null;
|
||||
private ExpandingTracesState expandingTracesState = null;
|
||||
private SplittingPointsState splittingPointsState = null;
|
||||
private ShrinkingOuterPointsState shrinkingOuterPointsState = null;
|
||||
private CreatingInnerBlocksState creatingInnerBlocksState = null;
|
||||
private CreatingOuterBlocksState creatingOuterBlocksState = null;
|
||||
|
||||
@ -82,9 +80,6 @@ public class Laufbau {
|
||||
if (creatingInnerBlocksState != null) {
|
||||
return creatingInnerBlocksState;
|
||||
}
|
||||
if (shrinkingOuterPointsState != null) {
|
||||
return shrinkingOuterPointsState;
|
||||
}
|
||||
if (splittingPointsState != null) {
|
||||
return splittingPointsState;
|
||||
}
|
||||
@ -102,15 +97,11 @@ public class Laufbau {
|
||||
return;
|
||||
}
|
||||
if (creatingInnerBlocksState != null) {
|
||||
creatingOuterBlocksState = new CreatingOuterBlocksState(shrinkingOuterPointsState.getShrunkOuterPoints(), world, editSession);
|
||||
return;
|
||||
}
|
||||
if (shrinkingOuterPointsState != null) {
|
||||
creatingInnerBlocksState = new CreatingInnerBlocksState(splittingPointsState.getInnerPoints(), world, processingTracesState.getCuboidList(), splittingPointsState.getIntersectedCuboid(), editSession, elements, preferingBlastResistance);
|
||||
creatingOuterBlocksState = new CreatingOuterBlocksState(splittingPointsState.getOuterPoints(), splittingPointsState.getInnerPoints(), world, editSession);
|
||||
return;
|
||||
}
|
||||
if (splittingPointsState != null) {
|
||||
shrinkingOuterPointsState = new ShrinkingOuterPointsState(splittingPointsState.getOuterPoints(), splittingPointsState.getInnerPoints());
|
||||
creatingInnerBlocksState = new CreatingInnerBlocksState(splittingPointsState.getInnerPoints(), world, processingTracesState.getCuboidList(), splittingPointsState.getIntersectedCuboid(), editSession, elements, preferingBlastResistance);
|
||||
return;
|
||||
}
|
||||
if (expandingTracesState != null) {
|
||||
|
@ -19,13 +19,24 @@
|
||||
|
||||
package de.steamwar.bausystem.features.slaves.laufbau;
|
||||
|
||||
import de.steamwar.inventory.SWListInv;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class LaufbauSettings {
|
||||
|
||||
private Player p;
|
||||
|
||||
public LaufbauSettings(Player p) {
|
||||
this.p = p;
|
||||
List<SWListInv.SWListEntry<BlockBoundingBox>> list = new ArrayList<>();
|
||||
for (BlockBoundingBox bb : BlockBoundingBox.elements) {
|
||||
list.add(new SWListInv.SWListEntry<>(bb.getSwItem(), bb));
|
||||
}
|
||||
SWListInv<BlockBoundingBox> inv = new SWListInv<>(p, "§6Laufbau", false, list, (clickType, blockBoundingBox) -> {
|
||||
});
|
||||
inv.open();
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ 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(LinkageType.ENABLE_LINK)
|
||||
@ -60,7 +61,7 @@ public class BellBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_CEILING"));
|
||||
}
|
||||
|
||||
public void floorNorthBell() {
|
||||
@ -69,7 +70,7 @@ public class BellBoundingBox implements Enable {
|
||||
bell.setFacing(BlockFace.NORTH);
|
||||
List<Cuboid> cuboidList = new ArrayList<>();
|
||||
cuboidList.add(pixelCuboid(0, 0, 4, 16, 16, 8));
|
||||
new BlockBoundingBox(bell, cuboidList);
|
||||
new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_FLOOR", "LAUFBAU_FACING_NORTH", "LAUFBAU_FACING_SOUTH"));
|
||||
}
|
||||
|
||||
public void floorEastBell() {
|
||||
@ -78,7 +79,7 @@ public class BellBoundingBox implements Enable {
|
||||
bell.setFacing(BlockFace.EAST);
|
||||
List<Cuboid> cuboidList = new ArrayList<>();
|
||||
cuboidList.add(pixelCuboid(4, 0, 0, 8, 16, 16));
|
||||
new BlockBoundingBox(bell, cuboidList);
|
||||
new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_FLOOR", "LAUFBAU_FACING_EAST", "LAUFBAU_FACING_WEST"));
|
||||
}
|
||||
|
||||
public void doubleWallNorthBell() {
|
||||
@ -89,7 +90,7 @@ public class BellBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_DOUBLE_WALL", "LAUFBAU_FACING_NORTH"));
|
||||
}
|
||||
|
||||
public void doubleWallEastBell() {
|
||||
@ -100,7 +101,7 @@ public class BellBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_DOUBLE_WALL", "LAUFBAU_FACING_EAST"));
|
||||
}
|
||||
|
||||
public void singleWallNorthBell() {
|
||||
@ -111,7 +112,7 @@ public class BellBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_SINGLE_WALL", "LAUFBAU_FACING_NORTH"));
|
||||
}
|
||||
|
||||
public void singleWallSouthBell() {
|
||||
@ -122,7 +123,7 @@ public class BellBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_SINGLE_WALL", "LAUFBAU_FACING_SOUTH"));
|
||||
}
|
||||
|
||||
public void singleWallEastBell() {
|
||||
@ -133,7 +134,7 @@ public class BellBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_SINGLE_WALL", "LAUFBAU_FACING_EAST"));
|
||||
}
|
||||
|
||||
public void singleWallWestBell() {
|
||||
@ -144,6 +145,6 @@ public class BellBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(bell, cuboidList, createItem("LAUFBAU_BLOCK_BELL", Material.BELL, "LAUFBAU_ATTACHMENT_SINGLE_WALL", "LAUFBAU_FACING_WEST"));
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ 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(LinkageType.ENABLE_LINK)
|
||||
@ -41,6 +42,6 @@ public class BrewingStandBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
new BlockBoundingBox(brewingStand, cuboids, createItem("LAUFBAU_BLOCK_BREWING_STAND", Material.BREWING_STAND));
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ 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(LinkageType.ENABLE_LINK)
|
||||
@ -45,33 +46,40 @@ public class ChorusPlantBoundingBox implements Enable {
|
||||
for (int py = 0; py < 2; py++) {
|
||||
for (int pz = 0; pz < 2; pz++) {
|
||||
MultipleFacing chorusPlant = (MultipleFacing) Material.CHORUS_PLANT.createBlockData();
|
||||
List<String> lore = new ArrayList<>();
|
||||
List<Cuboid> 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);
|
||||
new BlockBoundingBox(chorusPlant, cuboidList, createItem("LAUFBAU_BLOCK_CHORUS_PLANT", Material.CHORUS_PLANT, lore.toArray(new String[0])));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ 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(LinkageType.ENABLE_LINK)
|
||||
@ -43,25 +44,30 @@ public class FencesBoundingBox implements Enable {
|
||||
for (int px = 0; px < 2; px++) {
|
||||
for (int pz = 0; pz < 2; pz++) {
|
||||
Fence fence = (Fence) Material.NETHER_BRICK_FENCE.createBlockData();
|
||||
List<String> lore = new ArrayList<>();
|
||||
List<Cuboid> 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);
|
||||
new BlockBoundingBox(fence, cuboidList, createItem("LAUFBAU_BLOCK_NETHER_BRICK_FENCE", Material.NETHER_BRICK_FENCE, lore.toArray(new String[0])));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -32,6 +32,7 @@ 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(LinkageType.ENABLE_LINK)
|
||||
@ -61,7 +62,7 @@ public class GrindstoneBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_FLOOR", "LAUFBAU_FACING_NORTH", "LAUFBAU_FACING_SOUTH"));
|
||||
}
|
||||
|
||||
public void floorEastGrindstone() {
|
||||
@ -74,7 +75,7 @@ public class GrindstoneBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_FLOOR", "LAUFBAU_FACING_EAST", "LAUFBAU_FACING_WEST"));
|
||||
}
|
||||
|
||||
public void ceilingNorthGrindstone() {
|
||||
@ -87,7 +88,7 @@ public class GrindstoneBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_CEILING", "LAUFBAU_FACING_NORTH", "LAUFBAU_FACING_SOUTH"));
|
||||
}
|
||||
|
||||
public void ceilingEastGrindstone() {
|
||||
@ -100,7 +101,7 @@ public class GrindstoneBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_CEILING", "LAUFBAU_FACING_EAST", "LAUFBAU_FACING_WEST"));
|
||||
}
|
||||
|
||||
public void wallNorthGrindstone() {
|
||||
@ -113,7 +114,7 @@ public class GrindstoneBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_WALL", "LAUFBAU_FACING_NORTH"));
|
||||
}
|
||||
|
||||
public void wallSouthGrindstone() {
|
||||
@ -126,7 +127,7 @@ public class GrindstoneBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_WALL", "LAUFBAU_FACING_SOUTH"));
|
||||
}
|
||||
|
||||
public void wallEastGrindstone() {
|
||||
@ -139,7 +140,7 @@ public class GrindstoneBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_WALL", "LAUFBAU_FACING_EAST"));
|
||||
}
|
||||
|
||||
public void wallWestGrindstone() {
|
||||
@ -152,6 +153,6 @@ public class GrindstoneBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(grindstone, cuboidList, createItem("LAUFBAU_BLOCK_GRINDSTONE", Material.GRINDSTONE, "LAUFBAU_ATTACHMENT_WALL", "LAUFBAU_FACING_WEST"));
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ 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(LinkageType.ENABLE_LINK)
|
||||
@ -52,7 +53,7 @@ public class HopperBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(hopper, cuboidList, createItem("LAUFBAU_BLOCK_HOPPER", Material.HOPPER, "LAUFBAU_CONNECTION_FLOOR"));
|
||||
}
|
||||
|
||||
public void northHopper() {
|
||||
@ -62,7 +63,7 @@ public class HopperBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(hopper, cuboidList, createItem("LAUFBAU_BLOCK_HOPPER", Material.HOPPER, "LAUFBAU_CONNECTION_NORTH"));
|
||||
}
|
||||
|
||||
public void southHopper() {
|
||||
@ -72,7 +73,7 @@ public class HopperBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(hopper, cuboidList, createItem("LAUFBAU_BLOCK_HOPPER", Material.HOPPER, "LAUFBAU_CONNECTION_SOUTH"));
|
||||
}
|
||||
|
||||
public void eastHopper() {
|
||||
@ -82,7 +83,7 @@ public class HopperBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(hopper, cuboidList, createItem("LAUFBAU_BLOCK_HOPPER", Material.HOPPER, "LAUFBAU_CONNECTION_EAST"));
|
||||
}
|
||||
|
||||
public void westHopper() {
|
||||
@ -92,6 +93,6 @@ public class HopperBoundingBox implements Enable {
|
||||
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);
|
||||
new BlockBoundingBox(hopper, cuboidList, createItem("LAUFBAU_BLOCK_HOPPER", Material.HOPPER, "LAUFBAU_CONNECTION_WEST"));
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ 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(LinkageType.ENABLE_LINK)
|
||||
@ -43,25 +44,30 @@ public class IronBarBoundingBox implements Enable {
|
||||
for (int px = 0; px < 2; px++) {
|
||||
for (int pz = 0; pz < 2; pz++) {
|
||||
Fence fence = (Fence) Material.IRON_BARS.createBlockData();
|
||||
List<String> lore = new ArrayList<>();
|
||||
List<Cuboid> 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);
|
||||
new BlockBoundingBox(fence, cuboidList, createItem("LAUFBAU_BLOCK_IRON_BARS", Material.IRON_BARS, lore.toArray(new String[0])));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -30,6 +30,7 @@ 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(LinkageType.ENABLE_LINK)
|
||||
@ -47,7 +48,7 @@ public class LanternBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
new BlockBoundingBox(lantern, cuboidList, createItem("LAUFBAU_BLOCK_LANTERN", Material.LANTERN, "LAUFBAU_HANGING"));
|
||||
}
|
||||
|
||||
public void hangingLantern() {
|
||||
@ -56,6 +57,6 @@ public class LanternBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
new BlockBoundingBox(lantern, cuboidList, createItem("LAUFBAU_BLOCK_LANTERN", Material.LANTERN));
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ 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(LinkageType.ENABLE_LINK)
|
||||
@ -77,7 +78,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -88,7 +89,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -99,7 +100,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -110,7 +111,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -121,7 +122,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -132,7 +133,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -143,7 +144,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -154,7 +155,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -165,7 +166,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -176,7 +177,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -187,7 +188,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -198,7 +199,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -209,7 +210,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -220,7 +221,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -231,7 +232,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -242,7 +243,7 @@ public class StairBoundingBox implements Enable {
|
||||
List<Cuboid> 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);
|
||||
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() {
|
||||
@ -254,7 +255,7 @@ public class StairBoundingBox implements Enable {
|
||||
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);
|
||||
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() {
|
||||
@ -266,7 +267,7 @@ public class StairBoundingBox implements Enable {
|
||||
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);
|
||||
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() {
|
||||
@ -278,7 +279,7 @@ public class StairBoundingBox implements Enable {
|
||||
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);
|
||||
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() {
|
||||
@ -290,7 +291,7 @@ public class StairBoundingBox implements Enable {
|
||||
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);
|
||||
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() {
|
||||
@ -302,7 +303,7 @@ public class StairBoundingBox implements Enable {
|
||||
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);
|
||||
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() {
|
||||
@ -314,7 +315,7 @@ public class StairBoundingBox implements Enable {
|
||||
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);
|
||||
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() {
|
||||
@ -326,7 +327,7 @@ public class StairBoundingBox implements Enable {
|
||||
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);
|
||||
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() {
|
||||
@ -338,6 +339,6 @@ public class StairBoundingBox implements Enable {
|
||||
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);
|
||||
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"));
|
||||
}
|
||||
}
|
||||
|
@ -31,6 +31,7 @@ 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(LinkageType.ENABLE_LINK)
|
||||
@ -43,25 +44,30 @@ public class WallBoundingBox implements Enable {
|
||||
for (int px = 0; px < 2; px++) {
|
||||
for (int pz = 0; pz < 2; pz++) {
|
||||
Fence fence = (Fence) Material.END_STONE_BRICK_WALL.createBlockData();
|
||||
List<String> lore = new ArrayList<>();
|
||||
List<Cuboid> cuboidList = new ArrayList<>();
|
||||
cuboidList.add(pixelCuboid(4, 0, 4, 8, 24, 8));
|
||||
if (nz == 1) {
|
||||
lore.add("LAUFBAU_CONNECTION_NORTH");
|
||||
fence.setFace(BlockFace.NORTH, true);
|
||||
cuboidList.add(pixelCuboid(5, 0, 0, 6, 24, 4));
|
||||
}
|
||||
if (pz == 1) {
|
||||
lore.add("LAUFBAU_CONNECTION_SOUTH");
|
||||
fence.setFace(BlockFace.SOUTH, true);
|
||||
cuboidList.add(pixelCuboid(5, 0, 12, 6, 24, 4));
|
||||
}
|
||||
if (nx == 1) {
|
||||
lore.add("LAUFBAU_CONNECTION_WEST");
|
||||
fence.setFace(BlockFace.WEST, true);
|
||||
cuboidList.add(pixelCuboid(0, 0, 5, 4, 24, 6));
|
||||
}
|
||||
if (px == 1) {
|
||||
lore.add("LAUFBAU_CONNECTION_EAST");
|
||||
fence.setFace(BlockFace.EAST, true);
|
||||
cuboidList.add(pixelCuboid(12, 0, 5, 4, 24, 6));
|
||||
}
|
||||
new BlockBoundingBox(fence, cuboidList);
|
||||
new BlockBoundingBox(fence, cuboidList, createItem("LAUFBAU_BLOCK_END_STONE_BRICK_WALL", Material.END_STONE_BRICK_WALL, lore.toArray(new String[0])));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -42,13 +42,15 @@ public class CreatingOuterBlocksState implements LaufbauState {
|
||||
}
|
||||
|
||||
private List<Point> outerBlocks;
|
||||
private List<Point> innerPoints;
|
||||
private int index = 0;
|
||||
|
||||
private World world;
|
||||
private EditSession editSession;
|
||||
|
||||
public CreatingOuterBlocksState(List<Point> outerBlocks, World world, EditSession editSession) {
|
||||
public CreatingOuterBlocksState(List<Point> outerBlocks, List<Point> innerPoints, World world, EditSession editSession) {
|
||||
this.outerBlocks = outerBlocks;
|
||||
this.innerPoints = innerPoints;
|
||||
this.world = world;
|
||||
this.editSession = editSession;
|
||||
}
|
||||
@ -68,6 +70,34 @@ public class CreatingOuterBlocksState implements LaufbauState {
|
||||
Point point = outerBlocks.get(index);
|
||||
index++;
|
||||
|
||||
boolean isRim = false;
|
||||
Point p1 = new Point(point.getX() - 1, point.getY(), point.getZ());
|
||||
if (innerPoints.contains(p1)) isRim = true;
|
||||
if (!isRim) {
|
||||
Point p2 = new Point(point.getX() + 1, point.getY(), point.getZ());
|
||||
if (innerPoints.contains(p2)) isRim = true;
|
||||
}
|
||||
if (!isRim) {
|
||||
Point p3 = new Point(point.getX(), point.getY() - 1, point.getZ());
|
||||
if (innerPoints.contains(p3)) isRim = true;
|
||||
}
|
||||
if (!isRim) {
|
||||
Point p4 = new Point(point.getX(), point.getY() + 1, point.getZ());
|
||||
if (innerPoints.contains(p4)) isRim = true;
|
||||
}
|
||||
if (!isRim) {
|
||||
Point p5 = new Point(point.getX(), point.getY(), point.getZ() - 1);
|
||||
if (innerPoints.contains(p5)) isRim = true;
|
||||
}
|
||||
if (!isRim) {
|
||||
Point p6 = new Point(point.getX(), point.getY(), point.getZ() + 1);
|
||||
if (innerPoints.contains(p6)) isRim = true;
|
||||
}
|
||||
|
||||
if (!isRim) {
|
||||
return;
|
||||
}
|
||||
|
||||
Location location = new Location(world, point.getX(), point.getY(), point.getZ());
|
||||
if (!location.getBlock().getType().isAir()) {
|
||||
return;
|
||||
|
@ -1,90 +0,0 @@
|
||||
/*
|
||||
* This file is a part of the SteamWar software.
|
||||
*
|
||||
* Copyright (C) 2022 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 <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.bausystem.features.slaves.laufbau.states;
|
||||
|
||||
import de.steamwar.bausystem.BauSystem;
|
||||
import de.steamwar.bausystem.region.Point;
|
||||
import lombok.Getter;
|
||||
import org.bukkit.entity.Player;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
public class ShrinkingOuterPointsState implements LaufbauState {
|
||||
|
||||
private List<Point> outerPoints;
|
||||
private List<Point> innerPoints;
|
||||
private int index = 0;
|
||||
|
||||
@Getter
|
||||
private List<Point> shrunkOuterPoints = new ArrayList<>();
|
||||
|
||||
public ShrinkingOuterPointsState(List<Point> outerPoints, List<Point> innerPoints) {
|
||||
this.outerPoints = outerPoints;
|
||||
this.innerPoints = innerPoints;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String actionBarMessage(Player p) {
|
||||
return BauSystem.MESSAGE.parse("LAUFBAU_SIMPLE_PROGRESS", p, BauSystem.MESSAGE.parse("LAUFBAU_STATE_SHRINKING_POINTS", p), index, outerPoints.size());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean hasNext() {
|
||||
return index < outerPoints.size();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void next() {
|
||||
Point point = outerPoints.get(index);
|
||||
index++;
|
||||
|
||||
Point p1 = new Point(point.getX() - 1, point.getY(), point.getZ());
|
||||
if (innerPoints.contains(p1)) {
|
||||
shrunkOuterPoints.add(point);
|
||||
return;
|
||||
}
|
||||
Point p2 = new Point(point.getX() + 1, point.getY(), point.getZ());
|
||||
if (innerPoints.contains(p2)) {
|
||||
shrunkOuterPoints.add(point);
|
||||
return;
|
||||
}
|
||||
Point p3 = new Point(point.getX(), point.getY() - 1, point.getZ());
|
||||
if (innerPoints.contains(p3)) {
|
||||
shrunkOuterPoints.add(point);
|
||||
return;
|
||||
}
|
||||
Point p4 = new Point(point.getX(), point.getY() + 1, point.getZ());
|
||||
if (innerPoints.contains(p4)) {
|
||||
shrunkOuterPoints.add(point);
|
||||
return;
|
||||
}
|
||||
Point p5 = new Point(point.getX(), point.getY(), point.getZ() - 1);
|
||||
if (innerPoints.contains(p5)) {
|
||||
shrunkOuterPoints.add(point);
|
||||
return;
|
||||
}
|
||||
Point p6 = new Point(point.getX(), point.getY(), point.getZ() + 1);
|
||||
if (innerPoints.contains(p6)) {
|
||||
shrunkOuterPoints.add(point);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
In neuem Issue referenzieren
Einen Benutzer sperren