Merge branch 'master' into 1.17
This commit is contained in:
commit
c2436f1f09
8 files changed
+88
-24
No files matched your search
@@ -777,6 +777,21 @@ public class WorldAccess {
|
||||
}
|
||||
args = ((ListValue) args.get(0)).getItems();
|
||||
}
|
||||
else if (args.get(0) instanceof MapValue)
|
||||
{
|
||||
if (args.size() == 2)
|
||||
{
|
||||
Value dataValue = NBTSerializableValue.fromValue( args.get(1));
|
||||
if (dataValue instanceof NBTSerializableValue)
|
||||
{
|
||||
data = ((NBTSerializableValue) dataValue).getCompoundTag();
|
||||
}
|
||||
}
|
||||
Map<Value, Value> state = ((MapValue) args.get(0)).getMap();
|
||||
List<Value> mapargs = new ArrayList<>();
|
||||
state.forEach( (k, v) -> {mapargs.add(k); mapargs.add(v);});
|
||||
args = mapargs;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ((args.size() & 1) == 1)
|
||||
@@ -812,7 +827,7 @@ public class WorldAccess {
|
||||
{
|
||||
Clearable.clear(world.getBlockEntity(targetPos));
|
||||
boolean success = world.setBlockState(targetPos, finalSourceBlockState, 2);
|
||||
if (success && finalData != null)
|
||||
if (finalData != null)
|
||||
{
|
||||
BlockEntity be = world.getBlockEntity(targetPos);
|
||||
if (be != null)
|
||||
@@ -823,6 +838,7 @@ public class WorldAccess {
|
||||
destTag.putInt("z", targetPos.getZ());
|
||||
be.fromTag(destTag);
|
||||
be.markDirty();
|
||||
success = true;
|
||||
}
|
||||
}
|
||||
result[0] = success;
|
||||
|
||||
Reference in new issue
Block a user