From cc7923368fa14344d0416d3ec2ab20a701b0112b Mon Sep 17 00:00:00 2001 From: Des Herriott Date: Tue, 28 May 2024 08:31:44 +0100 Subject: [PATCH] fix: opening map via sidebar button was ignoring gamestage limits https://github.com/FTBTeam/FTB-Mods-Issues/issues/185 --- .../ftb/mods/ftbchunks/client/FTBChunksClient.java | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/common/src/main/java/dev/ftb/mods/ftbchunks/client/FTBChunksClient.java b/common/src/main/java/dev/ftb/mods/ftbchunks/client/FTBChunksClient.java index 90b612d2..687202d6 100644 --- a/common/src/main/java/dev/ftb/mods/ftbchunks/client/FTBChunksClient.java +++ b/common/src/main/java/dev/ftb/mods/ftbchunks/client/FTBChunksClient.java @@ -321,12 +321,14 @@ public boolean skipBlock(BlockState state) { } public EventResult customClick(CustomClickEvent event) { - if (event.id().equals(BUTTON_ID_MAP)) { - openGui(); - return EventResult.interruptTrue(); - } else if (event.id().equals(BUTTON_ID_CLAIM)) { - ChunkScreen.openChunkScreen(); - return EventResult.interruptTrue(); + if (FTBChunksWorldConfig.playerHasMapStage(Minecraft.getInstance().player)) { + if (event.id().equals(BUTTON_ID_MAP)) { + openGui(); + return EventResult.interruptTrue(); + } else if (event.id().equals(BUTTON_ID_CLAIM)) { + ChunkScreen.openChunkScreen(); + return EventResult.interruptTrue(); + } } return EventResult.pass();