Router with scythe interaction with claimed chunks
VoidTest opened this issue ยท 3 comments
Describe the bug
A router with a scythe from Mystical Agriculture and an activator module clicking on a block below it. The chunk that the router and the farm is within is claimed and the "Block Edit Mode" setting is set to private. The plants within the scythes range dont break but still summon resources. This is a very op exploit.
How to reproduce the bug
Make a modular router on a block with a scythe from Mystical agriculture inside it and an activator module interacting down. Claim the chunk the farm is in using FTB chunks and set Block Edit Mode setting to private. Plant something and grow it to mature and it will start summoning resources.
Expected behavior
The router with the scythe cant do anything when Block Edit Mode is disabled.
Additional details
This bug also works while the router is inside a minecolony. If any further information is needed feel free to contact me.
Which Minecraft version are you using?
1.20.1
Crash log
No response
Nope, can't reproduce. Diamond Scythe in a router with an activator module facing down into a field of crops (one block of air between router and crops). Crops are in a chunk protected by FTB Chunks, Block Interact = private.
- Without a Security Upgrade, it does nothing, as expected.
- With a Security Upgrade, the crops are harvested, items are dropped and crop growth is reset, as expected.
Add a block under the router that is the same level as the crop and allow all fake players in the chunk.
I managed to reproduce it with specifically block interaction = true, and block edit = false, and it's not a Modular Routers issue. I expect this would happen to any player who isn't on the team owning the protected chunk.
It's a Mystical Agriculture problem: in BaseScytheItem#useOn
they call level.setBlockAndUpdate(aoePos, crop.getStateForAge(0));
to reset the crop without knowing if the block should really be updateable.
But at this point Forge is already in "block snapshot" mode (see ForgeHooks#onPlaceItemIntoWorld
), and afterwards will restore the block snapshot, putting the mature crop back in place, because the player didn't really have permission to update the block (Forge fires a BlockEvent.EntityPlaceEvent
which is cancelled by FTB Chunks).