mirror of
https://github.com/essentials/Essentials.git
synced 2025-08-20 05:21:21 +02:00
Fix world heights
This commit is contained in:
@@ -293,7 +293,7 @@ public class Util
|
|||||||
while (isBlockUnsafe(world, x, y, z))
|
while (isBlockUnsafe(world, x, y, z))
|
||||||
{
|
{
|
||||||
y += 1;
|
y += 1;
|
||||||
if (y >= 127)
|
if (y >= world.getHighestBlockYAt(x, z))
|
||||||
{
|
{
|
||||||
x += 1;
|
x += 1;
|
||||||
break;
|
break;
|
||||||
@@ -304,8 +304,8 @@ public class Util
|
|||||||
y -= 1;
|
y -= 1;
|
||||||
if (y <= 1)
|
if (y <= 1)
|
||||||
{
|
{
|
||||||
y = 127;
|
|
||||||
x += 1;
|
x += 1;
|
||||||
|
y = world.getHighestBlockYAt(x, z);
|
||||||
if (x - 32 > loc.getBlockX())
|
if (x - 32 > loc.getBlockX())
|
||||||
{
|
{
|
||||||
throw new Exception(_("holeInFloor"));
|
throw new Exception(_("holeInFloor"));
|
||||||
|
@@ -51,7 +51,7 @@ public class Commandnuke extends EssentialsCommand
|
|||||||
{
|
{
|
||||||
for (int z = -10; z <= 10; z += 5)
|
for (int z = -10; z <= 10; z += 5)
|
||||||
{
|
{
|
||||||
final Location tntloc = new Location(world, loc.getBlockX() + x, 127, loc.getBlockZ() + z);
|
final Location tntloc = new Location(world, loc.getBlockX() + x, world.getMaxHeight(), loc.getBlockZ() + z);
|
||||||
final TNTPrimed tnt = world.spawn(tntloc, TNTPrimed.class);
|
final TNTPrimed tnt = world.spawn(tntloc, TNTPrimed.class);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user