From 969b226a00c0f2b34b3bc5d80dc7a9104c41ef47 Mon Sep 17 00:00:00 2001 From: cakeGit <65340665+cakeGit@users.noreply.github.com> Date: Mon, 12 Aug 2024 22:36:33 +0100 Subject: [PATCH] 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 --- .../create/content/schematics/client/SchematicHandler.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java b/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java index b2f86344c..4bb8dc549 100644 --- a/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java +++ b/src/main/java/com/simibubi/create/content/schematics/client/SchematicHandler.java @@ -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) {