Added render deactivation before initialising the new one

Then, in the event that the schematic isn't deployed, and the renderers don't get reset, the existing structure wont stay
This commit is contained in:
cakeGit 2024-08-12 22:36:33 +01:00
parent f551107e6d
commit 969b226a00

View file

@ -112,8 +112,10 @@ public class SchematicHandler {
if (!active || !stack.getTag()
.getString("File")
.equals(displayedSchematic))
.equals(displayedSchematic)) {
renderers.forEach(r -> r.setActive(false));
init(player, stack);
}
if (!active)
return;
@ -160,7 +162,7 @@ public class SchematicHandler {
BlockPos pos;
pos = BlockPos.ZERO;
try {
schematic.placeInWorld(w, pos, pos, placementSettings, w.getRandom(), Block.UPDATE_CLIENTS);
} catch (Exception e) {