fix: enchanting

fixes:
fishing rod crashing in enchantment table
updated more swfs that were not updated in a recent merge
sort costs in ascending order
randomise enchantment seeds for new players
This commit is contained in:
SevenToaster509
2026-04-17 08:26:13 +01:00
parent add784b259
commit 2b5a46a4fa
7 changed files with 36 additions and 9 deletions
@@ -275,10 +275,13 @@ void IUIScene_AbstractContainerMenu::handleEnchantButton(int slot, int iPad) {
EnchantmentMenu* menu = new EnchantmentMenu(Minecraft::GetInstance()->player->inventory, dynamic_cast<Level*>(Minecraft::GetInstance()->level), 0, 0, 0);
if (0 == 0) { //uhh don't worry that is temporary
int lapisCost = slot + 1; // slot 0 = 1 lapis, slot 1 = 2, slot 2 = 3
Minecraft* pMinecraft = Minecraft::GetInstance();
auto player = pMinecraft->player;
if (player->enchantmentEntries[slot].id == -3) return;
EnchantmentMenu* menu = dynamic_cast<EnchantmentMenu*>(player->containerMenu);
HtmlString title = HtmlString(
wstring(app.GetString(Enchantment::enchantments[player->enchantmentEntries[slot].id]->getDescriptionId())) +
L" " +