Author: PSIRobot Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
Ursprung
ae1e10ecc6
Commit
106a1a8fb0
@ -136,22 +136,22 @@ public class TNTElementGUI {
|
||||
// Alignment
|
||||
inv.setItem(23, new SWItem(Material.OAK_BUTTON, BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_NEGATIVE_Z", player), clickType -> { // Z negative
|
||||
if (clickType == ClickType.DOUBLE_CLICK) return;
|
||||
tntElement.align(new Vector(0.5, 0, 0.49));
|
||||
tntElement.align(new Vector(0, 0, 0.49));
|
||||
tntElement.change();
|
||||
}));
|
||||
inv.setItem(25, new SWItem(Material.OAK_BUTTON, BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_POSITIVE_Z", player), clickType -> { // Z positive
|
||||
if (clickType == ClickType.DOUBLE_CLICK) return;
|
||||
tntElement.align(new Vector(0.5, 0, 0.51));
|
||||
tntElement.align(new Vector(0, 0, 0.51));
|
||||
tntElement.change();
|
||||
}));
|
||||
inv.setItem(15, new SWItem(Material.OAK_BUTTON, BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_POSITIVE_X", player), clickType -> { // X positive
|
||||
if (clickType == ClickType.DOUBLE_CLICK) return;
|
||||
tntElement.align(new Vector(0.51, 0, 0.5));
|
||||
tntElement.align(new Vector(0.51, 0, 0));
|
||||
tntElement.change();
|
||||
}));
|
||||
inv.setItem(33, new SWItem(Material.OAK_BUTTON, BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_NEGATIVE_X", player), clickType -> { // X negative
|
||||
if (clickType == ClickType.DOUBLE_CLICK) return;
|
||||
tntElement.align(new Vector(0.49, 0, 0.5));
|
||||
tntElement.align(new Vector(0.49, 0, 0));
|
||||
tntElement.change();
|
||||
}));
|
||||
inv.setItem(24, new SWItem(Material.SUNFLOWER, BauSystem.MESSAGE.parse("SIMULATOR_ALIGNMENT_CENTER", player), clickType -> { // CENTER
|
||||
|
@ -293,22 +293,25 @@ public class TNTElement implements SimulatorElement {
|
||||
parentVector = tntGroup.getPosition();
|
||||
}
|
||||
|
||||
if (offset.getX() != 0) {
|
||||
if (vector.getX() - (int) vector.getX() == 0.49) {
|
||||
vector.setX(vector.getX() + 0.02);
|
||||
}
|
||||
if (vector.getX() - (int) vector.getX() == -0.49) {
|
||||
vector.setX(vector.getX() - 0.02);
|
||||
}
|
||||
vector.setX(vector.getBlockX() + offset.getX());
|
||||
}
|
||||
|
||||
if (offset.getZ() != 0) {
|
||||
if (vector.getZ() - (int) vector.getZ() == 0.49) {
|
||||
vector.setZ(vector.getZ() + 0.02);
|
||||
}
|
||||
if (vector.getZ() - (int) vector.getZ() == -0.49) {
|
||||
vector.setZ(vector.getZ() - 0.02);
|
||||
}
|
||||
|
||||
vector.setX(vector.getBlockX() + offset.getX());
|
||||
vector.setY(vector.getBlockY() + offset.getY());
|
||||
vector.setZ(vector.getBlockZ() + offset.getZ());
|
||||
}
|
||||
|
||||
setPosition(vector.subtract(parentVector));
|
||||
}
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren