9
0
mirror of https://github.com/VolmitSoftware/Iris.git synced 2025-12-19 15:09:18 +00:00

fix place commands causing unwanted block updates

This commit is contained in:
Julian Krings
2025-10-06 13:00:00 +02:00
parent 979ee4e7d8
commit d7039d120b
3 changed files with 8 additions and 9 deletions

View File

@@ -79,9 +79,9 @@ public class CommandObject implements DecreeExecutor {
futureBlockChanges.put(block, block.getBlockData()); futureBlockChanges.put(block, block.getBlockData());
if (d instanceof IrisCustomData data) { if (d instanceof IrisCustomData data) {
block.setBlockData(data.getBase()); block.setBlockData(data.getBase(), false);
Iris.warn("Tried to place custom block at " + x + ", " + y + ", " + z + " which is not supported!"); Iris.warn("Tried to place custom block at " + x + ", " + y + ", " + z + " which is not supported!");
} else block.setBlockData(d); } else block.setBlockData(d, false);
} }
@Override @Override

View File

@@ -225,7 +225,7 @@ public class TreeSVC implements IrisService {
if (d instanceof IrisCustomData data) { if (d instanceof IrisCustomData data) {
block.setBlockData(data.getBase(), false); block.setBlockData(data.getBase(), false);
Iris.service(ExternalDataSVC.class).processUpdate(engine, block, data.getCustom()); Iris.service(ExternalDataSVC.class).processUpdate(engine, block, data.getCustom());
} else block.setBlockData(d); } else block.setBlockData(d, false);
} }
} }
}); });

View File

@@ -59,6 +59,11 @@ public class WorldObjectPlacer implements IObjectPlacer {
slot = InventorySlotType.STORAGE; slot = InventorySlotType.STORAGE;
} }
if (d instanceof IrisCustomData data) {
block.setBlockData(data.getBase(), false);
Iris.warn("Tried to place custom block at " + x + ", " + y + ", " + z + " which is not supported!");
} else block.setBlockData(d, false);
if (slot != null) { if (slot != null) {
RNG rx = new RNG(Cache.key(x, z)); RNG rx = new RNG(Cache.key(x, z));
KList<IrisLootTable> tables = engine.getLootTables(rx, block); KList<IrisLootTable> tables = engine.getLootTables(rx, block);
@@ -78,12 +83,6 @@ public class WorldObjectPlacer implements IObjectPlacer {
Iris.reportError(e); Iris.reportError(e);
} }
} }
if (d instanceof IrisCustomData data) {
block.setBlockData(data.getBase());
Iris.warn("Tried to place custom block at " + x + ", " + y + ", " + z + " which is not supported!");
} else block.setBlockData(d);
} }
@Override @Override