diff --git a/src/main/java/org/minefortress/blueprints/world/BlueprintsWorld.java b/src/main/java/org/minefortress/blueprints/world/BlueprintsWorld.java index 4f1266ad..eff07ffd 100644 --- a/src/main/java/org/minefortress/blueprints/world/BlueprintsWorld.java +++ b/src/main/java/org/minefortress/blueprints/world/BlueprintsWorld.java @@ -169,7 +169,7 @@ public void prepareBlueprint(Map blueprintData, String blu } public void clearBlueprint(ServerPlayerEntity player) { - preparedBlueprintData.clear(); + preparedBlueprintData = new HashMap<>(); putBlueprintInAWorld(player, new Vec3i(1, 1, 1)); } diff --git a/src/main/java/org/minefortress/renderer/gui/blueprints/ClearBlueprintConfirmationScreen.java b/src/main/java/org/minefortress/renderer/gui/blueprints/ClearBlueprintConfirmationScreen.java index e9a64d13..0a7be9c7 100644 --- a/src/main/java/org/minefortress/renderer/gui/blueprints/ClearBlueprintConfirmationScreen.java +++ b/src/main/java/org/minefortress/renderer/gui/blueprints/ClearBlueprintConfirmationScreen.java @@ -29,11 +29,11 @@ protected void init() { super.init(); this.addDrawableChild(new ButtonWidget(this.width / 2 - 102, this.height / 4 + 24 - 16, 204, 20, new LiteralText("Yes"), button -> { sendClear(); - close(); - })); - this.addDrawableChild(new ButtonWidget(this.width / 2 - 102, this.height / 4 + 48 - 16, 204, 20, new LiteralText("No"), button -> { - close(); + if(super.client != null) { + super.client.setScreen(null); + } })); + this.addDrawableChild(new ButtonWidget(this.width / 2 - 102, this.height / 4 + 48 - 16, 204, 20, new LiteralText("No"), button -> close())); } @Override