optimize a little

This commit is contained in:
gnembon committed 2020-06-18 22:22:49 -03:00
1 parent 4145280bcd
commit 4fe18a402c
1 file changed
+6 -6
@@ -768,14 +768,14 @@ public class CarpetExpression
BlockArgument sourceLocator = BlockArgument.findIn(cc, lv, targetLocator.offset, true);
BlockState sourceBlockState = sourceLocator.block.getBlockState();
BlockState targetBlockState = world.getBlockState(targetLocator.block.getPos());
List<Value> args = new ArrayList<>();
for (int i = sourceLocator.offset, m = lv.size(); i < m; i++)
{
args.add(lv.get(i).evalValue(c));
}
CompoundTag data = null;
if (!args.isEmpty())
if (lv.size() > sourceLocator.offset)
{
List<Value> args = new ArrayList<>();
for (int i = sourceLocator.offset, m = lv.size(); i < m; i++)
{
args.add(lv.get(i).evalValue(c));
}
if (args.get(0) instanceof ListValue)
{
if (args.size() == 2)