From 08c394154668f32af712d7b81272eba0e8f90822 Mon Sep 17 00:00:00 2001 From: Ray Neiheiser Date: Mon, 4 Nov 2024 10:24:08 +0100 Subject: [PATCH] fix porting issue with rally banner --- .../com/minecolonies/core/items/ItemBannerRallyGuards.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/minecolonies/core/items/ItemBannerRallyGuards.java b/src/main/java/com/minecolonies/core/items/ItemBannerRallyGuards.java index 69561f2e716..cfadaadf4fa 100644 --- a/src/main/java/com/minecolonies/core/items/ItemBannerRallyGuards.java +++ b/src/main/java/com/minecolonies/core/items/ItemBannerRallyGuards.java @@ -212,19 +212,20 @@ public static void toggleBanner(final ItemStack banner, final Player playerIn) return; } - boolean activeRaid = false; if (rallyData.towers().isEmpty()) { + rallyData.withActive(false).writeToItemStack(banner); MessageUtils.format(COM_MINECOLONIES_BANNER_RALLY_GUARDS_TOOLTIP_EMPTY).sendTo(playerIn); } else if (rallyData.active()) { + rallyData.withActive(false).writeToItemStack(banner); broadcastPlayerToRally(banner, playerIn.getCommandSenderWorld(), null); MessageUtils.format(TOOL_RALLY_BANNER_DEACTIVATED).sendTo(playerIn); } else { - activeRaid = true; + rallyData.withActive(true).writeToItemStack(banner); final IColony colony = getColony(banner, playerIn.level()); if (colony != null && colony.getPermissions().hasPermission(playerIn, Action.RALLY_GUARDS)) { @@ -240,8 +241,6 @@ else if (rallyData.active()) } } } - rallyData.withActive(activeRaid).writeToItemStack(banner); - } /**