Skip to content

Commit

Permalink
Fix issue with the blueprint clearing
Browse files Browse the repository at this point in the history
  • Loading branch information
remmintan committed May 20, 2023
1 parent 6dba589 commit 8d38ae9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ public void prepareBlueprint(Map<BlockPos, BlockState> blueprintData, String blu
}

public void clearBlueprint(ServerPlayerEntity player) {
preparedBlueprintData.clear();
preparedBlueprintData = new HashMap<>();
putBlueprintInAWorld(player, new Vec3i(1, 1, 1));
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8d38ae9

Please sign in to comment.