ketwaroo / minetest-k-recycler

Recycle bin for mintest/mineclonia
GNU General Public License v3.0
0 stars 2 forks source link

Duplication issues [Keep Open] #5

Open JamesClarke7283 opened 8 months ago

JamesClarke7283 commented 8 months ago

If you have the portability mod installed, and put 3 bookshelves in the recyclebin, you can get unlimited enderperls and enchanting tables and bookshelves.

This is the link to the mod: https://content.minetest.net/packages/ThePython/portability/

As you have kindly made a protected_items list, setting i will use that for now, but you may want to improve the logic so this bug does not occur. maybe make the self_replicating_items algorithm smarter.

You can also duplicate the Wall_Sign, if you put 2 wall signs in, you get back the crafting input which you can then use to create 3 wall signs.

Also the Trims have a serious duplication issue because you can uncraft them into diamonds and enchanted golden apples, then recraft them using cobblestone and less diamonds.

I can see duplication issues being a thing for a long while, so please keep this issue open.

ketwaroo commented 8 months ago

not sure I can provide support for every mod out there.

Please provide a PR or some code snippets to make the algorithm smarter if you have an idea.

JamesClarke7283 commented 8 months ago

not sure I can provide support for every mod out there.

Please provide a PR or some code snippets to make the algorithm smarter if you have an idea.

I think its a very important thing to be able to patch this, because otherwise server owners won't add the mod if it gets abused. even if they can manually "protect" the item, there are so many items in the game and its hard to know which ones are self replicating.

I will work on some code for it in the near future because i love this mod and want it to succeed.

ketwaroo commented 7 months ago

Not sure if you're still following this issue but I don't really see a clever solution to this.

The best I can do is provide users a setting to specify a list for "output limits".

For exmaple default:diamods 3, mcl_nether:some_rare_thing 2 means that if the recycle output will only ever contains 3 diamonds per full stacks of recycled input. and that rare nether thing will only have 2.

so 1 diamond block would recycle to 3 diamonds instead of 9. And a stack of 2 diamond blocks -> 6 diamonds

I'll add that code if I get some time