Infinite EMC with Mining Dimensions mod
valous2 opened this issue ยท 5 comments
Fabric version: 0.14.14
Item-alchemy version: 0.4.6
Mining Dimensions [FABRIC] version: 1.19.2-1.4.27
I noticed that the portal blocks created in the mining dimensions mod can be exploited to obtain infinite emc because emc value assigned to blocks is equal to the handheld teleporter plus the emc of the original stone brick. This would be okay is the handheld teleporter was consumed when used to make the block but it is not.
Steps to reproduce:
- Buy a stone brick for 1 emc.
- Place stone brick into crafting grid with any teleporter to make a portal block.
- Turn portal block back into emc value equal to both blocks.
- repeat
I realize there a newer version of this mod at the time of this posting and will try to see if it fixes this but thought I'd report it just in case it does not as I had not seen this mentioned before.
This is a bit of a tricky issue. It looks like it will take some time to fix. /itemalchemy setemc [item] [emc] As a temporary measure, EMC can be set for each item with the above command.
Ok take your time and thanks for letting me know about the command. That should fix the issue for the time being.
Or maybe using the emc of the items that will get consumed would make more sense, then it would have the emc of 1 like the stone brick it came from ^
interesting... maybe we could check if an item has a recipe which takes in an item that will not get consumed and just set the emc to 0?
Looking at the code, it should be as easy as a
if (stack.getRecipeRemainer().getItem() == stack.getItem()) continue;
in the EMCManager.addEmcFromRecipe
method. That should filter out items that don't get used.
Might make sense to store the remainder item and input item as more variables for readability but whatever.
I would try that and then make a pr but I'm leaving in a few minutes and wont be back until next week.