This commit is contained in:
gnembon committed 2021-03-31 22:02:09 -03:00
1 parent b49b99aea6
commit 0320de5d6d
23 files changed
+78 -89

No files matched your search

@@ -470,7 +470,7 @@ public class ScriptCommand
CarpetScriptHost host = getHost(context);
BlockBox area = BlockBox.create(a, b);
CarpetExpression cexpr = new CarpetExpression(host.main, expr, source, origin);
int int_1 = area.getBlockCountX() * area.getBlockCountY() * area.getBlockCountZ();
int int_1 = area.getBlockCountX() * area.getBlockCountY() * area.method_35414(); // X Y Z
if (int_1 > CarpetSettings.fillLimit)
{
Messenger.m(source, "r too many blocks to evaluate: " + int_1);
@@ -480,11 +480,11 @@ public class ScriptCommand
CarpetSettings.impendingFillSkipUpdates = !CarpetSettings.fillUpdates;
try
{
for (int x = area.minX; x <= area.maxX; x++)
for (int x = area.method_35420(); x <= area.method_35417(); x++) //minx maxx
{
for (int y = area.minY; y <= area.maxY; y++)
for (int y = area.method_35415(); y <= area.method_35418(); y++) // miny maxy
{
for (int z = area.minZ; z <= area.maxZ; z++)
for (int z = area.method_35416(); z <= area.method_35419(); z++) // minz maxz
{
try
{
@@ -519,29 +519,29 @@ public class ScriptCommand
CarpetScriptHost host = getHost(context);
BlockBox area = BlockBox.create(a, b);
CarpetExpression cexpr = new CarpetExpression(host.main, expr, source, origin);
int int_1 = area.getBlockCountX() * area.getBlockCountY() * area.getBlockCountZ();
int int_1 = area.getBlockCountX() * area.getBlockCountY() * area.method_35414();
if (int_1 > CarpetSettings.fillLimit)
{
Messenger.m(source, "r too many blocks to evaluate: "+ int_1);
return 1;
}
boolean[][][] volume = new boolean[area.getBlockCountX()][area.getBlockCountY()][area.getBlockCountZ()];
boolean[][][] volume = new boolean[area.getBlockCountY()][area.method_35414()][area.getBlockCountX()]; //X then Y then Z got messedup
BlockPos.Mutable mbpos = origin.mutableCopy();
ServerWorld world = source.getWorld();
for (int x = area.minX; x <= area.maxX; x++)
for (int x = area.method_35420(); x <= area.method_35417(); x++) //minx maxx
{
for (int y = area.minY; y <= area.maxY; y++)
for (int y = area.method_35415(); y <= area.method_35418(); y++) // miny maxy
{
for (int z = area.minZ; z <= area.maxZ; z++)
for (int z = area.method_35416(); z <= area.method_35419(); z++) // minz maxz
{
try
{
if (cexpr.fillAndScanCommand(host, x, y, z))
{
volume[x-area.minX][y-area.minY][z-area.minZ]=true;
volume[x-area.method_35420()][y-area.method_35415()][z-area.method_35416()]=true;
}
}
catch (CarpetExpressionException e)
@@ -555,12 +555,12 @@ public class ScriptCommand
}
}
}
final int maxx = area.getBlockCountX()-1;
final int maxy = area.getBlockCountY()-1;
final int maxz = area.getBlockCountZ()-1;
final int maxx = area.getBlockCountY()-1; //x
final int maxy = area.method_35414()-1; //y
final int maxz = area.getBlockCountX()-1; //z
if ("outline".equalsIgnoreCase(mode))
{
boolean[][][] newVolume = new boolean[area.getBlockCountX()][area.getBlockCountY()][area.getBlockCountZ()];
boolean[][][] newVolume = new boolean[area.getBlockCountY()][area.method_35414()][area.getBlockCountX()]; //X then Y then Z got messedup
for (int x = 0; x <= maxx; x++)
{
for (int y = 0; y <= maxy; y++)
@@ -596,7 +596,7 @@ public class ScriptCommand
{
if (volume[x][y][z])
{
mbpos.set(x+area.minX, y+area.minY, z+area.minZ);
mbpos.set(x+area.method_35420(), y+area.method_35415(), z+area.method_35416());
if (replacement == null || replacement.test(
new CachedBlockPosition( world, mbpos, true)))
{
@@ -624,7 +624,7 @@ public class ScriptCommand
{
if (volume[x][y][z])
{
mbpos.set(x+area.minX, y+area.minY, z+area.minZ);
mbpos.set(x+area.method_35420(), y+area.method_35415(), z+area.method_35416());
Block blokc = world.getBlockState(mbpos).getBlock();
world.updateNeighbors(mbpos, blokc);
}
@@ -632,7 +632,7 @@ public class ScriptCommand
}
}
}
Messenger.m(source, "gi Affected "+affected+" blocks in "+area.getBlockCountX() * area.getBlockCountY() * area.getBlockCountZ()+" block volume");
Messenger.m(source, "gi Affected "+affected+" blocks in "+area.getBlockCountX() * area.getBlockCountY() * area.method_35414()+" block volume");
return 1;
}
}