FTBTeam / FTB-Mods-Issues

Any mod issues, be it FTB Teams, Quests or any other of our mods can be reported here!
18 stars 1 forks source link

[Bug]: IMPORTANT Dupe Glitch FTB Chunks x FTB Teams x CREATE mod Wrench #1162

Open Arginou57 opened 2 months ago

Arginou57 commented 2 months ago

Mod

FTB TEAMS and FTB CHUNKS

Mod version

ftb-chunks-forge-2001.2.7.jar ftb-teams-forge-2001.2.0.jar ftb-library-forge-2001.1.5.jar

Forge / Fabric version

forge-1.20.1-47.2.20

Modpack & version

https://www.curseforge.com/minecraft/modpacks/serveur-create-france-communauty-friends-coop

What issue are you having?

When 2 player have a claims each other, and are not allies. If i enable Interact mod in my chunk on PUBLIC The other player can use the CREATE Wrench and duplicate all create blocks

Crashlogs

No response

Steps to reproduce

1 Claim a chunks image 2 Open inventories 3 Go to myteams upper left image

4 Go to Settings image

5 Put Block Interact mod on Public image

6 Bring Create block on the ground image

7 And give other player a wrench image

8 And let him sneak click on blocks to dupe all blocks he want ! image image

Anything else to note?

No response

wolfieboy09 commented 2 months ago

That is a CRAZY bug

Arginou57 commented 2 months ago

That is a CRAZY bug

Yes lol it's just like creative mod ^^

MadSciSlack commented 2 months ago

Wow...

desht commented 1 month ago

This isn't a bug in FTB Chunks itself. The problem is an unwanted interaction between the way Create's wrench drops blocks, and how Forge (badly) handles the using of the item.

(the above is happening in the ForgeHooks#onPlaceItemIntoWorld method, for reference)

I don't see a simple fix for this problem. The short-term workaround is to blacklist the Create wrench item, by adding it to the ftbchunks:right_click_blacklist item tag. I will do some more investigation and update this if I find anything out. It's probably also worth you raising an issue with Create to see if there's anything they can do.

Arginou57 commented 1 month ago

Thanks for the informations, temporary i may use the ftbchunks:right_click blacklist, so where do i need to put this config ? :)

Arginou57 commented 1 month ago

Thanks for the informations, temporary i may use the ftbchunks:right_click blacklist, so where do i need to put this config ? :)

This isn't a bug in FTB Chunks itself. The problem is an unwanted interaction between the way Create's wrench drops blocks, and how Forge (badly) handles the using of the item.

  • The item's action (to break the block and put a copy of it into the player's inventory) is run first.
  • Then Forge is firing a block place event including the block snapshot of the broken block. FTB Chunks receives this event, and correctly cancels it.
  • But Forge interprets this event cancellation as a failure in using the item, and restores the original block snapshot, putting the broken block back in place (and the player keeps the broken item).

(the above is happening in the ForgeHooks#onPlaceItemIntoWorld method, for reference)

I don't see a simple fix for this problem. The short-term workaround is to blacklist the Create wrench item, by adding it to the ftbchunks:right_click_blacklist item tag. I will do some more investigation and update this if I find anything out. It's probably also worth you raising an issue with Create to see if there's anything they can do.

desht commented 1 month ago

temporary i may use the ftbchunks:right_click blacklist, so where do i need to put this config

It's an item tag, so you create a data pack for it.

Thinking about this some more, this can only be fixed in Create itself. The way the Create wrench drops blocks is flawed - just copying the block into the player inventory doesn't work if the region is protected and the subsequent place event gets canceled. So an issue to Create is needed here.