Update HellsBells
Dieser Commit ist enthalten in:
Ursprung
e181c42b12
Commit
886fbbe535
@ -132,28 +132,14 @@ public class HellsBells {
|
|||||||
int zOffset = getLengthStart(direction.getLength(zLength, xLength), direction.getLength(width, length.get()));
|
int zOffset = getLengthStart(direction.getLength(zLength, xLength), direction.getLength(width, length.get()));
|
||||||
int yOffset = getHeightStart();
|
int yOffset = getHeightStart();
|
||||||
|
|
||||||
Point redStart;
|
Point redStart = direction.isNorthOrWest() ? new Point(Config.RedPasteRegion.getMaxX() - xOffset, Config.RedExtendRegion.getMaxY() + yOffset, Config.RedPasteRegion.getMaxZ() - zOffset) : new Point(Config.RedPasteRegion.getMinX() + xOffset, Config.RedExtendRegion.getMaxY() + yOffset, Config.RedPasteRegion.getMinZ() + zOffset);
|
||||||
Point blueStart;
|
Point blueStart = direction.isNorthOrWest() ? new Point(Config.BluePasteRegion.getMinX() + xOffset, Config.BlueExtendRegion.getMaxY() + yOffset, Config.BluePasteRegion.getMinZ() + zOffset) : new Point(Config.BluePasteRegion.getMaxX() - xOffset, Config.BlueExtendRegion.getMaxY() + yOffset, Config.BluePasteRegion.getMaxZ() - zOffset);
|
||||||
|
|
||||||
if (direction.isNorthOrWest()) {
|
|
||||||
redStart = new Point(Config.RedPasteRegion.getMaxX() - xOffset, Config.RedExtendRegion.getMaxY() + yOffset, Config.RedPasteRegion.getMaxZ() - zOffset);
|
|
||||||
blueStart = new Point(Config.BluePasteRegion.getMinX() + xOffset, Config.BlueExtendRegion.getMaxY() + yOffset, Config.BluePasteRegion.getMinZ() + zOffset);
|
|
||||||
} else {
|
|
||||||
redStart = new Point(Config.RedPasteRegion.getMinX() + xOffset, Config.RedExtendRegion.getMaxY() + yOffset, Config.RedPasteRegion.getMinZ() + zOffset);
|
|
||||||
blueStart = new Point(Config.BluePasteRegion.getMaxX() - xOffset, Config.BlueExtendRegion.getMaxY() + yOffset, Config.BluePasteRegion.getMaxZ() - zOffset);
|
|
||||||
}
|
|
||||||
|
|
||||||
currentDropping = Bukkit.getScheduler().runTaskTimer(FightSystem.getPlugin(), () -> {
|
currentDropping = Bukkit.getScheduler().runTaskTimer(FightSystem.getPlugin(), () -> {
|
||||||
|
int factor = direction.isNorthOrWest() ? 1 : -1;
|
||||||
for (int w = 0; w < width; w++) {
|
for (int w = 0; w < width; w++) {
|
||||||
if (direction.isNorthOrWest()) {
|
world.spawnEntity(redStart.subtractAndToLocation(world, (direction.dx * length.get() + w * direction.other().dx) * factor, 0, (direction.dz * length.get() + w * direction.other().dz) * factor), EntityType.PRIMED_TNT);
|
||||||
world.spawnEntity(redStart.subtractAndToLocation(world, direction.dx * length.get() + w * direction.other().dx, 0, direction.dz * length.get() + w * direction.other().dz), EntityType.PRIMED_TNT);
|
world.spawnEntity(blueStart.addAndToLocation(world, (direction.dx * length.get() + w * direction.other().dx) * factor, 0, (direction.dz * length.get() + w * direction.other().dz) * factor), EntityType.PRIMED_TNT);
|
||||||
|
|
||||||
world.spawnEntity(blueStart.addAndToLocation(world, direction.dx * length.get() + w * direction.other().dx, 0, direction.dz * length.get() + w * direction.other().dz), EntityType.PRIMED_TNT);
|
|
||||||
} else {
|
|
||||||
world.spawnEntity(redStart.addAndToLocation(world, direction.dx * length.get() + w * direction.other().dx, 0, direction.dz * length.get() + w * direction.other().dz), EntityType.PRIMED_TNT);
|
|
||||||
|
|
||||||
world.spawnEntity(blueStart.subtractAndToLocation(world, direction.dx * length.get() + w * direction.other().dx, 0, direction.dz * length.get() + w * direction.other().dz), EntityType.PRIMED_TNT);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (length.addAndGet(-2) <= 0) {
|
if (length.addAndGet(-2) <= 0) {
|
||||||
currentDropping.cancel();
|
currentDropping.cancel();
|
||||||
|
In neuem Issue referenzieren
Einen Benutzer sperren