Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Small fixes #9903

Merged
merged 2 commits into from
Apr 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,8 @@ public void set(@NotNull final ItemStack stack)
@Override
public ItemStack remove(final int slot)
{
final ItemStack stack = inventory.getArmorInSlot(equipmentSlot);
inventory.forceClearArmorInSlot(equipmentSlot, stack);
return stack;
inventory.forceClearArmorInSlot(equipmentSlot, inventory.getArmorInSlot(equipmentSlot));
return super.remove(slot);
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@

import com.ldtteam.blockui.Pane;
import com.ldtteam.blockui.PaneBuilders;
import com.ldtteam.blockui.controls.AbstractTextBuilder;
import com.ldtteam.blockui.controls.Button;
import com.ldtteam.blockui.controls.ButtonImage;
import com.ldtteam.blockui.controls.Text;
import com.ldtteam.blockui.views.DropDownList;
import com.ldtteam.structurize.client.gui.WindowSwitchPack;
import com.ldtteam.structurize.storage.StructurePacks;
import com.minecolonies.core.MineColonies;
import com.minecolonies.core.Network;
import com.minecolonies.core.client.gui.WindowBannerPicker;
import com.minecolonies.core.client.gui.map.WindowColonyMap;
Expand Down Expand Up @@ -281,18 +281,28 @@ public void onUpdate()
textPane.show();
}

PaneBuilders.tooltipBuilder().hoverPane(textPane).append(Component.translatable("com.minecolonies.core.townhall.patreon.textures"))

final AbstractTextBuilder.TooltipBuilder textPaneToolTipBuilder = PaneBuilders.tooltipBuilder().hoverPane(textPane).append(Component.translatable("com.minecolonies.core.townhall.patreon.textures"))
.paragraphBreak()
.appendNL(Component.empty())
.appendNL(Component.translatable("com.minecolonies.core.townhall.patreon"))
.paragraphBreak()
.build();
.paragraphBreak();


PaneBuilders.tooltipBuilder().hoverPane(namePane)
final AbstractTextBuilder.TooltipBuilder namePaneToolTipBuilder = PaneBuilders.tooltipBuilder().hoverPane(namePane)
.append(Component.translatable("com.minecolonies.core.townhall.patreon.names")).paragraphBreak()
.appendNL(Component.empty())
.appendNL(Component.translatable("com.minecolonies.core.townhall.patreon")).paragraphBreak()
.build();
.appendNL(Component.translatable("com.minecolonies.core.townhall.patreon")).paragraphBreak();

if (isFeatureUnlocked.get() && !building.getColony().getPermissions().getOwner().equals(Minecraft.getInstance().player.getUUID()))
{
textPaneToolTipBuilder.appendNL(Component.empty());
namePaneToolTipBuilder.appendNL(Component.empty());
textPaneToolTipBuilder.appendNL(Component.translatable("com.minecolonies.core.townhall.patreon.needs_owner"));
namePaneToolTipBuilder.appendNL(Component.translatable("com.minecolonies.core.townhall.patreon.needs_owner"));
}
textPaneToolTipBuilder.build();
namePaneToolTipBuilder.build();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2137,6 +2137,7 @@
"com.minecolonies.coremod.gui.townhall.picktexturestyle": "Citizen Style:",
"com.minecolonies.coremod.gui.townhall.picknamestyle": "Name Pack:",
"com.minecolonies.core.townhall.patreon": "Feature Limited to Contributors and Donors",
"com.minecolonies.core.townhall.patreon.needs_owner": "Need to be Colony Owner to adjust this Feature",
"com.minecolonies.coremod.gui.chat.drcat": "Miau, mew, mau, meee, mew, hiss, nyan, mew!!! brrrrrrrrrbrrrrrrbrrrrr",
"com.minecolonies.coremod.gui.chat.arston": "I am Arston, former military advisor and general of the draconian army. I can offer my expertise to run and strengthen your army",
"com.minecolonies.coremod.gui.chat.kedamono": "I am the Kedamono Dragon, I have traveled far and seek a fair place to reside. Do you have enough beds for me?",
Expand Down