Limited Barrel Compression Duping
Diviance opened this issue ยท 18 comments
I am... not entirely sure what happened. I made some Limited II barrels, put a compression upgrade in it with 4 diamond stack upgrades (custom settings were set to change the number of upgrades to scale in a linear fashion rather than staying at 1 for the first two versions) and put in a single Supremium Block from Mystical Agriculture. It was connected as external storage to my refined storage network. Then I picked up a few supremium essence to put into the chest and clicked on the uncompressed essence slot... and everything vanished. I clicked again, and suddenly the chest was filled, to the brim, with essence. Roughly 336 million essence... and it spit out I don't even know how much more onto the ground, millions upon millions more.
Don't know why it happened. The console for the server shows nothing. The only thing in the debug that is even slightly related is...
[02May2023 13:14:47.387] [Server thread/DEBUG] [sophisticatedcore/]: Compacting shapes not found in cache for "mysticalagriculture:supremium_block" - querying recipes to get these
[02May2023 13:14:50.586] [Server thread/DEBUG] [sophisticatedcore/]: Compacting shapes not found in cache for "mysticalagriculture:supremium_essence" - querying recipes to get these
I am unable to recreate that in my environment. I guess it may a barrel in incorrect state or something similar.
Are you actually able to recreate that with a brand new upgrade? if so what exact steps do you take?
And one more thing I noticed in that video - how did you get the stack on your cursor, I can kind of understand the duplication if that was an incorrect state, but don't get how those 9 items just on your cursor with what seems just a single click - whatever I try right click left click shift, ... it never picks up stack on my cursor so another suspicion I have is that some mod that helps with this interaction is acting incorrectly there.
and when you're speaking of these interactions I assume that all of them happened directly with the barrel and not through RS, right?
Ah right, versions, slipped my mind.
sophisticatedstorage-1.19.2-0.6.26.325.jar
sophisticatedcore-1.19.2-0.5.49.245.jar
And yes, it was interacting directly with the barrel.
It created somewhere around 400 million essence in total.
when you say it, you mean yourself or the rs system was interacting with it? basically I need to understand if you have interacted directly with the barrel or went into barrel's gui and interacted with the items there. Or on the other hand if you have just used RS terminal to get / stash the items.
Oh, sorry. I guess I wasn't clear.
I went into the barrel's GUI and did it directly. I only mentioned Refined Storage just in case it was some weird interaction causing it to happen that you might already be aware of.
Here we go, it appears to happen every time I do this, so I made a little clip and uploaded it to YouTube as unlisted so you can see it happen. The pause when I am hovering over the essence before trying to manually move it into the barrel is when I tried to hold shift and click to move it into the barrel.
Further investigation, it appears to only do it when I have the compression upgrade installed and four diamond stack upgrades.
I couldn't say. I am using a somewhat customized version of the MineColonies Official Modpack, but this is the first time I have used your mod and used the compression upgrade.
I will see if I can start with a few basic mods including yours in a new pack and just add in one half of my mods and see if it does it and disable those and switch to the other half to see if I can narrow it down when I have some spare time later.
Sorry that response from me was probably confusing. I mean figuring out minimal set of mods would be helpful as well, but before you do that could you try with a brand new limited barrel and see if you can recreate and if so tell me what exact steps you took to do that?
Oh, ok. I did that just now.
I went and created a brand new Limited Spruce Barrel II from scratch, cut down a whole tree to not use any existing materials for that part, and then upgraded it to Netherite. I then crafted 4 brand new Stack Upgrade Tier IV's and a new Compression Upgrade.
I went to a new part of the map, placed down the barrel, manually installed the upgrades through the GUI and, without leaving the GUI, picked up a single Block of Iron and placed it into the top slot of the barrel, then shift-left clicked a stack of 5 iron bars in my inventory which did nothing. Then I left clicked on the iron bars, then tried to place them into the bottom slot (which showed Iron Bars in the GUI) which, rather than placing the bars into the barrel, picked up the bars from the barrel and when I placed them into my inventory, well... the exact same thing happened as in the video, except with iron bars instead of supremium essence.
I tried one more time using creative mode to create brand new everything for it. Same thing. If I try to add two of the created stacks of bars into the barrel, they both vanish... and my inventory fills up again.
If I try it in a standalone single player word, using creative mode to get the stuff, the barrels work fine so long as you don't combine the compression upgrade with 4 tier 4 stack upgrades. If I use four of those stack upgrades and the compression upgrade, whenever I try to put something into a slot where something is already there (like more bars into the slot with bars), it will instead pick up the contents of the barrel and massively increase the number. By roughly, according to the tooltip, 939,524,224. If I click in the barrel twice again, that number will jump to around 1.8 billion. If I try a third time, the entire stack vanishes.
I am able to recreate with 5 stack upgrades, but I am guessing you may have changed base multiplier of the barrel as well as I can see now that it's an issue of incorrect slot limit calculation once this reaches max limit possible - 2,147,483,647
And I meant to say as well, now that I can see the issue I should be able to fix it for the next release
Oddly, I actually didn't change the base multiplier. Only the number of upgrades I can use at one time. I was wondering if it was some kind of overflow error, but my programming knowledge is quite shallow so I didn't want to make assumptions. This is from the config.
#Limited Barrel II Settings
[server.LimitedBarrelII]
#Multiplier that's used to calculate base slot limit
#Range: 1 ~ 8192
baseSlotLimitMultiplier = 16
#Number of upgrade slots in the storage
#Range: 0 ~ 10
upgradeSlotCount = 1
#Limited Iron Barrel II Settings
[server.LimitedIronBarrelII]
#Multiplier that's used to calculate base slot limit
#Range: 1 ~ 8192
baseSlotLimitMultiplier = 32
#Number of upgrade slots in the storage
#Range: 0 ~ 10
upgradeSlotCount = 2
#Limited Gold Barrel II Settings
[server.LimitedGoldBarrelII]
#Multiplier that's used to calculate base slot limit
#Range: 1 ~ 8192
baseSlotLimitMultiplier = 48
#Number of upgrade slots in the storage
#Range: 0 ~ 10
upgradeSlotCount = 3
#Limited Diamond Barrel II Settings
[server.LimitedDiamondBarrelII]
#Multiplier that's used to calculate base slot limit
#Range: 1 ~ 8192
baseSlotLimitMultiplier = 64
#Number of upgrade slots in the storage
#Range: 0 ~ 10
upgradeSlotCount = 4
#Limited Netherite Barrel II Settings
[server.LimitedNetheriteBarrelII]
#Multiplier that's used to calculate base slot limit
#Range: 1 ~ 8192
baseSlotLimitMultiplier = 80
#Number of upgrade slots in the storage
#Range: 0 ~ 10
upgradeSlotCount = 5
ohh in that case I guess you have a mod that allows you to compress iron blocks even further - there was one more issue which made it so that if the block in the first block could be potentially compressed even more it multiplied the limit on that first one already - like if the first slot had a limit of 64 and iron block in it this made it report 9 * 64 slot limit. That is fixed as well and could have potentially pushed the numbers of the max limit as well.
Hm. I don't have any recipes to compress it further according to JEI, but it probably is some mod doing something. Stranger things have happened.
But glad to see it is fixed. I will give it a go whenever the update is released. Thanks!