Inventory Profiles Next

Inventory Profiles Next

24M Downloads

[1.20.1] Sorting inventory when Apotheosis gems are present results in errors in chat. (Unequal before and after item counts.)

Gbergz opened this issue ยท 16 comments

commented

Have you asked for help on discord?

NO

Minecraft Version/s

1.20.1

Modloader

Forge

Modloader Version

Forge: 47.1.3

Operating System

Windows

List of all other installed mods

screenshot

Describe the problem

With Apotheosis installed. There's errors in chat when attempting to sort inventory with Gems present in inventory.
(java.lang.IllegealStateException: Unequal before and after item counts.)

Steps to reproduce

  1. Acquire any Apotheosis gems from chests / mobs around the world.
  2. Open inventory.
    (have the gem in inventory when sorting)
  3. Attempt to sort inventory with buttons or keybind.
  4. See error in chat. Sorting failed: (java.lang.IllegealStateException: Unequal before and after item counts.)
  5. Profit.

Logs

https://gist.githubusercontent.com/Gbergz/d181a9483668a0d465751882b0105a2c/raw/08b5cab755c0a09ef028f4374cf442d98f39f45f/gistfile1.txt

I have tried to reproduce the problem with only or without "Inventory Profiles Next" and its dependencies installed.

  • I have tested without 'Inventory Profiles Next' and its dependencies
  • I have tested with only 'Inventory Profiles Next' and its dependencies and no other mods
commented

๐Ÿคท

Will be posted in a bit.

commented

my guess is you got stacked unstackable items from the chest.
try unstacking them

commented

They're not stacked. Single piece gems

commented

post a screenshot of the inventory that doesn't sort

commented

Not at the PC right now, but its two gems, found in chests in the world. And some logs & planks.

Edit: Happens most often when inventory is shuffled with items and then sorting with the keybind and the Z sorting button.

commented

still I prefer if you post a screenshot

commented
commented

I got a similar error message, but seems to be tied to a Corail Tombstone scroll, here the relevant excerpt from my logs (modpack is ATM9)

[04:51:08] [Render thread/WARN] [Inventory Profiles Next/]: [Inventory Profiles Next] Item tombstone:magic_scroll not present in the Creative Inventory Search Tab!
[04:51:08] [Render thread/WARN] [Inventory Profiles Next/]: [Inventory Profiles Next] Item tombstone:magic_scroll not present in the Creative Inventory Search Tab!
[04:51:08] [Render thread/WARN] [Inventory Profiles Next/]: [Inventory Profiles Next] Item tombstone:magic_scroll not present in the Creative Inventory Search Tab!
[04:51:08] [Render thread/WARN] [Inventory Profiles Next/]: [Inventory Profiles Next] Item tombstone:magic_scroll not present in the Creative Inventory Search Tab!
[04:51:08] [Render thread/WARN] [Inventory Profiles Next/]: [Inventory Profiles Next] Item tombstone:magic_scroll not present in the Creative Inventory Search Tab!
[04:51:08] [Render thread/WARN] [Inventory Profiles Next/]: [Inventory Profiles Next] Item tombstone:magic_scroll not present in the Creative Inventory Search Tab!
[04:51:08] [Render thread/WARN] [Inventory Profiles Next/]: [Inventory Profiles Next] Item tombstone:magic_scroll not present in the Creative Inventory Search Tab!
java.lang.IllegalStateException: Unequal before and after item counts
at TRANSFORMER/[email protected]/org.anti_ad.mc.ipnext.inventory.sandbox.ItemPlanner.tracker(Unknown Source)
at TRANSFORMER/[email protected]/org.anti_ad.mc.ipnext.inventory.AdvancedContainer.tracker(Unknown Source)
at TRANSFORMER/[email protected]/org.anti_ad.mc.ipnext.inventory.AdvancedContainer$Companion.tracker(Unknown Source)
at TRANSFORMER/[email protected]/org.anti_ad.mc.ipnext.inventory.AdvancedContainer$Companion.tracker$default(Unknown Source)
at TRANSFORMER/[email protected]/org.anti_ad.mc.ipnext.inventory.InnerActions.innerDoSort(Unknown Source)
at TRANSFORMER/[email protected]/org.anti_ad.mc.ipnext.inventory.InnerActions.doSort(Unknown Source)
at TRANSFORMER/[email protected]/org.anti_ad.mc.ipnext.inventory.GeneralInventoryActions.doSort(Unknown Source)
at TRANSFORMER/[email protected]/org.anti_ad.mc.ipnext.inventory.GeneralInventoryActions.doSort(Unknown Source)
at TRANSFORMER/[email protected]/org.anti_ad.mc.ipnext.inventory.GeneralInventoryActions.doSort$default(Unknown Source)
at TRANSFORMER/[email protected]/org.anti_ad.mc.ipnext.input.InventoryInputHandler.onInput(Unknown Source)
at TRANSFORMER/[email protected]/org.anti_ad.mc.ipnext.input.InputHandler.onInput(Unknown Source)
at TRANSFORMER/[email protected]/org.anti_ad.mc.common.input.GlobalInputHandler.onInput(GlobalInputHandler.kt:114)
at TRANSFORMER/[email protected]/org.anti_ad.mc.common.input.GlobalInputHandler.onKey(GlobalInputHandler.kt:91)
at TRANSFORMER/[email protected]/org.anti_ad.mc.common.input.GlobalInputHandler.onMouseButton(GlobalInputHandler.kt:209)
at TRANSFORMER/[email protected]/org.anti_ad.mc.common.forge.CommonForgeEventHandler.onScreenMouseButton(CommonForgeEventHandler.java:126)
at TRANSFORMER/[email protected]/org.anti_ad.mc.common.forge.CommonForgeEventHandler.onMouseClicked(CommonForgeEventHandler.java:100)
at TRANSFORMER/[email protected]/org.anti_ad.mc.common.forge.CommonForgeEventHandler_onMouseClicked_Pre.invoke(.dynamic)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.ASMEventHandler.invoke(ASMEventHandler.java:73)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:315)
at MC-BOOTSTRAP/net.minecraftforge.eventbus/net.minecraftforge.eventbus.EventBus.post(EventBus.java:296)
at TRANSFORMER/[email protected]/net.minecraftforge.client.ForgeHooksClient.onScreenMouseClickedPre(ForgeHooksClient.java:612)
at TRANSFORMER/[email protected]/net.minecraft.client.MouseHandler.m_168084
(MouseHandler.java:90)
at TRANSFORMER/[email protected]/net.minecraft.client.gui.screens.Screen.m_96579
(Screen.java:437)
at TRANSFORMER/[email protected]/net.minecraft.client.MouseHandler.m_91530_(MouseHandler.java:89)
at TRANSFORMER/[email protected]/net.minecraft.client.MouseHandler.m_168091_(MouseHandler.java:189)
at TRANSFORMER/[email protected]/net.minecraft.util.thread.BlockableEventLoop.execute(BlockableEventLoop.java:102)
at TRANSFORMER/[email protected]/net.minecraft.client.MouseHandler.m_91565_(MouseHandler.java:188)
at MC-BOOTSTRAP/[email protected]+7/org.lwjgl.glfw.GLFWMouseButtonCallbackI.callback(GLFWMouseButtonCallbackI.java:43)
at MC-BOOTSTRAP/[email protected]+7/org.lwjgl.system.JNI.invokeV(Native Method)
at MC-BOOTSTRAP/[email protected]+7/org.lwjgl.glfw.GLFW.glfwPollEvents(GLFW.java:3403)
at TRANSFORMER/[email protected]/com.mojang.blaze3d.systems.RenderSystem.pollEvents(RenderSystem.java:201)
at TRANSFORMER/[email protected]/com.mojang.blaze3d.systems.RenderSystem.flipFrame(RenderSystem.java:212)
at TRANSFORMER/[email protected]/com.mojang.blaze3d.platform.Window.m_85435_(Window.java:274)
at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1170)
at TRANSFORMER/[email protected]/net.minecraft.client.Minecraft.m_91374_(Minecraft.java:718)
at TRANSFORMER/[email protected]/net.minecraft.client.main.Main.main(Main.java:218)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111)
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99)
at MC-BOOTSTRAP/[email protected]/net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.run(Launcher.java:108)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.Launcher.main(Launcher.java:78)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26)
at MC-BOOTSTRAP/[email protected]/cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23)
at [email protected]/cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:568)
at io.github.zekerzhayard.forgewrapper.installer.Main.main(Main.java:57)
at org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:88)
at org.prismlauncher.EntryPoint.listen(EntryPoint.java:126)
at org.prismlauncher.EntryPoint.main(EntryPoint.java:71)
[04:51:08] [Render thread/INFO] [minecraft/ChatComponent]: [CHAT] java.lang.IllegalStateException: Unequal before and after item counts

commented

hmm the thing that is missing in the creative inventory search is the problem

commented

I think the gems and scrolls from Apotheosis and Corail Tombstone are created dynamically, with varying properties, so they won't be in the creative inventory...

commented

any idea how to create some so I can test?

commented

Hello you can do :
/loot give @p loot minecraft:chests/abandoned_mineshaft
Run it a couple times and you'll get gems from apotheosis rather quickly. To reproduce the error you need 2-4 of them in a chest.

commented

Any updates on this?
In 1.19.2 this wasn't an issue, iirc.

commented

I don't have time to work on the mod at the moment.

commented

Gotcha, no worries!

commented

I met the same error, too.

Here is the command to place the chest with items.

/setblock ~ ~ ~ minecraft:chest{Items:[{Count:1b,Slot:0b,id:"minecraft:turtle_helmet",tag:{Damage:0,affix_data:{affixes:{"apotheosis:armor/attribute/fortunate":0.58189046f,"apotheosis:armor/attribute/ironforged":0.0690096f,"apotheosis:armor/attribute/stalwart":0.7485494f,"apotheosis:armor/dmg_reduction/runed":0.7102695f,"apotheosis:durable":0.08f},name:'{"color":"#5555FF","translate":"misc.apotheosis.affix_name.three","with":[{"translate":"affix.apotheosis:armor/attribute/ironforged"},"",{"translate":"affix.apotheosis:armor/attribute/fortunate.suffix"}]}',rarity:"apotheosis:rare",sockets:1},apoth_rchest:1b}},{Count:1b,Slot:1b,id:"minecraft:chainmail_leggings",tag:{Damage:0,affix_data:{affixes:{"apotheosis:armor/attribute/blessed":0.6915807f,"apotheosis:armor/attribute/ironforged":0.39979088f},name:'{"color":"#33FF33","translate":"misc.apotheosis.affix_name.three","with":[{"translate":"affix.apotheosis:armor/attribute/blessed"},"",{"translate":"affix.apotheosis:armor/attribute/ironforged.suffix"}]}',rarity:"apotheosis:uncommon",sockets:1,uuids:[[I;1148128168,-1665710865,-2046254071,1467589615]]},apoth_rspawn:1b}},{Count:1b,Slot:2b,id:"minecraft:golden_leggings",tag:{Damage:0,Enchantments:[{id:"apotheosis:icy_thorns",lvl:3s}]}},{Count:1b,Slot:3b,id:"apotheosis:gem",tag:{affix_data:{rarity:"apotheosis:rare"},gem:"apotheosis:core/combatant"}},{Count:1b,Slot:4b,id:"apotheosis:gem",tag:{affix_data:{name:'{"color":"#33FF33","translate":"%s","with":[{"text":""}]}',rarity:"apotheosis:uncommon"},gem:"apotheosis:core/breach"}},{Count:1b,Slot:5b,id:"apotheosis:gem",tag:{affix_data:{rarity:"apotheosis:common"},gem:"apotheosis:core/warlord"}},{Count:1b,Slot:6b,id:"minecraft:iron_chestplate",tag:{Damage:25,affix_data:{affixes:{"apotheosis:armor/attribute/blessed":0.00984776f},name:'{"color":"#808080","translate":"misc.apotheosis.affix_name.two","with":[{"translate":"affix.apotheosis:armor/attribute/blessed"},"",""]}',rarity:"apotheosis:common",uuids:[[I;-1033874251,1164200406,-1189088052,926965163]]},apoth_rspawn:1b}},{Count:1b,Slot:7b,id:"minecraft:trident",tag:{Damage:0,affix_data:{affixes:{"apotheosis:durable":0.16f,"apotheosis:ranged/attribute/agile":0.60594314f,"apotheosis:ranged/mob_effect/ensnaring":0.76785785f,"apotheosis:sword/attribute/elongated":0.1147567f,"apotheosis:sword/attribute/lacerating":0.35439456f,"apotheosis:sword/mob_effect/weakening":0.8845854f},name:'{"color":"#5555FF","translate":"misc.apotheosis.affix_name.three","with":[{"translate":"affix.apotheosis:ranged/mob_effect/ensnaring"},"",{"translate":"affix.apotheosis:sword/attribute/elongated.suffix"}]}',rarity:"apotheosis:rare",sockets:1,uuids:[[I;-133158044,1342458011,-1894239298,-610149817]]},apoth_rchest:1b}},{Count:1b,Slot:8b,id:"apotheosis:gem",tag:{affix_data:{rarity:"apotheosis:common"},gem:"apotheosis:core/slipstream"}},{Count:1b,Slot:9b,id:"minecraft:chainmail_helmet",tag:{Damage:38,Enchantments:[{id:"minecraft:unbreaking",lvl:3s},{id:"minecraft:protection",lvl:2s}],affix_data:{affixes:{"apotheosis:armor/attribute/blessed":0.22949952f,"apotheosis:armor/attribute/ironforged":0.7748402f},name:'{"italic":false,"color":"#33FF33","translate":"misc.apotheosis.affix_name.four","with":["Derrel\'s",{"translate":"affix.apotheosis:armor/attribute/ironforged"},"",{"translate":"affix.apotheosis:armor/attribute/blessed.suffix"}]}',rarity:"apotheosis:uncommon",uuids:[[I;231376543,501760074,-1377097123,1595326452]]},apoth_boss:1b,display:{Name:'{"extra":[{"text":"Sallet"}],"text":""}'}}},{Count:1b,Slot:10b,id:"minecraft:chainmail_boots",tag:{Damage:135,Enchantments:[{id:"minecraft:feather_falling",lvl:3s}]}},{Count:1b,Slot:11b,id:"minecraft:iron_shovel",tag:{Damage:5,affix_data:{affixes:{"apotheosis:breaker/attribute/destructive":0.3493281f,"apotheosis:breaker/attribute/experienced":0.41696393f,"apotheosis:breaker/attribute/lengthy":0.06534284f,"apotheosis:breaker/special/radial":0.860001f,"apotheosis:durable":0.12f},name:'{"color":"#5555FF","translate":"misc.apotheosis.affix_name.three","with":[{"translate":"affix.apotheosis:breaker/attribute/destructive"},"",{"translate":"affix.apotheosis:breaker/attribute/lengthy.suffix"}]}',rarity:"apotheosis:rare",sockets:2,uuids:[[I;-412205526,-942784034,-1804223438,-1409344959]]},apoth_rspawn:1b}},{Count:1b,Slot:12b,id:"minecraft:iron_leggings",tag:{Damage:0,affix_data:{affixes:{"apotheosis:armor/attribute/fortunate":0.91006255f,"apotheosis:armor/attribute/ironforged":0.5803315f,"apotheosis:armor/attribute/spiritual":0.056647897f,"apotheosis:armor/dmg_reduction/dwarven":0.3362605f,"apotheosis:durable":0.09f},name:'{"color":"#5555FF","translate":"misc.apotheosis.affix_name.three","with":[{"translate":"affix.apotheosis:armor/dmg_reduction/dwarven"},"",{"translate":"affix.apotheosis:armor/attribute/fortunate.suffix"}]}',rarity:"apotheosis:rare",sockets:2},apoth_merchant:1b}},{Count:1b,Slot:13b,id:"minecraft:chainmail_boots",tag:{Damage:9,affix_data:{affixes:{"apotheosis:armor/attribute/fortunate":0.35664386f,"apotheosis:armor/attribute/ironforged":0.97499657f,"apotheosis:armor/attribute/steel_touched":0.79409796f,"apotheosis:armor/dmg_reduction/feathery":0.22731483f,"apotheosis:durable":0.12f},name:'{"color":"#5555FF","translate":"misc.apotheosis.affix_name.three","with":[{"translate":"affix.apotheosis:armor/dmg_reduction/feathery"},"",{"translate":"affix.apotheosis:armor/attribute/ironforged.suffix"}]}',rarity:"apotheosis:rare",sockets:1,uuids:[[I;1643869066,2054506844,-1658570554,-290886186]]},apoth_rspawn:1b}},{Count:1b,Slot:14b,id:"minecraft:trident",tag:{Damage:0,affix_data:{affixes:{"apotheosis:durable":0.060000002f,"apotheosis:ranged/attribute/windswept":0.37222224f,"apotheosis:ranged/mob_effect/grievous":0.5287352f,"apotheosis:sword/attribute/spellbreaking":0.5336607f,"apotheosis:sword/attribute/vampiric":0.5155784f},name:'{"color":"#5555FF","translate":"misc.apotheosis.affix_name.three","with":[{"translate":"affix.apotheosis:sword/attribute/spellbreaking"},"",{"translate":"affix.apotheosis:sword/attribute/vampiric.suffix"}]}',rarity:"apotheosis:rare",sockets:1,uuids:[[I;1298672648,-130462124,-1456761593,-1516410674]]},apoth_rspawn:1b}}]}