Sefiraat / Networks

A Slimefun4 addon that adds a new storage solution for mass and organised storage without harsh performance.
GNU General Public License v3.0
31 stars 48 forks source link

[Bug] Dupe item #188

Open balugaq opened 2 weeks ago

balugaq commented 2 weeks ago

The video is too big to upload at here. So I will report it with a lot of text.

The main way to dupe item: Step 1. Destory Network Cell without player interacting and turn the block to air

A way to implement Step 1:

balugaq commented 2 weeks ago

No, you can put some acutal items. and then check the grid quickly. You can see these items duped.

balugaq commented 2 weeks ago

Or.. you can put a Infinity Barrel with items, then take the duped Barrels and put them down.

balugaq commented 2 weeks ago

I try my best.. I'm in China so that I have big lag on youtube.

billyggoodboy1 commented 1 week ago

i can't recreate this, can u send the vid

balugaq commented 1 week ago

Maybe it fixed on the Chinese version with these prs. https://github.com/SlimefunGuguProject/Networks/pull/100 https://github.com/SlimefunGuguProject/Networks/pull/104 https://github.com/SlimefunGuguProject/Networks/pull/118

balugaq commented 1 week ago

Maybe it fixed on the Chinese version with these prs. It seems that these PRs still haven't had a repairing effect

balugaq commented 3 days ago

Here is a proposed solution to fix issues #188 and #192:

  1. Convert all slots in the Cell to output slots.
  2. Also, convert the receive slot in GreedyBlock to an output slot.
  3. In the registerNode function of NetworkRoot, check the transportable slots of the incoming location for both Cell and GreedyBlock.
  4. If the check passes, it indicates that the block is available. Otherwise, do not add it to the cells or greedyblocks lists. I would like to submit a pull request for this fix, but I currently have other ongoing work in the project’s branch.
balugaq commented 3 days ago

You can refer to https://github.com/balugaq/NetworksExpansion/blob/master/src/main/java/io/github/sefiraat/networks/network/NetworkRoot.java#L124 to https://github.com/balugaq/NetworksExpansion/blob/master/src/main/java/io/github/sefiraat/networks/network/NetworkRoot.java#L149. In some places, StorageCacheUtils.getMenu is used, which can be replaced with BlockStorage.getInventory. I'm not sure if this works in the official version, but it does work in the Chinese localization version. As for why I haven't submitted a PR, it's because I have many other modifications in these files.

balugaq commented 3 days ago

I have tested multiple times, and also involved a large number of professionals to test, but neither issue #188 nor issue #192 could be reproduced. So this is most likely an effective solution.

balugaq commented 3 days ago

A possible fix has been found ↑. @Sefiraat