Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create Wrench can dupe blocks when sneak+clicked in protected areas #6465

Open
desht opened this issue May 7, 2024 · 6 comments · May be fixed by #6467
Open

Create Wrench can dupe blocks when sneak+clicked in protected areas #6465

desht opened this issue May 7, 2024 · 6 comments · May be fixed by #6467
Labels
type: bug Issue where something isn't working

Comments

@desht
Copy link

desht commented May 7, 2024

Describe the Bug

See FTBTeam/FTB-Mods-Issues#1162 (comment) for a detailed description of what's happening.

In short: if the Create wrench is used to break a block by sneak + right-clicking, in an area where the Forge BlockEvent.PlaceEvent gets cancelled, a dupe will occur. This is due to an interaction between the way the Create wrench works (breaking the block immediately and putting a copy of the item into the player's inventory), and the way Forge handles item use (specifically, firing a block place event later and restoring a block snapshot if the event is cancelled).

This means that in areas protected by FTB Chunks, or any other mod which cancels a block place event, the Create wrench can be used to dupe any block it's able to sneak+right-click.

Reproduction Steps

  1. Claim an area with FTB Chunks, or any other protection mod
  2. Place down any Create block (tested with a Depot)
  3. Sneak + right-click it with a wrench
  4. Repeat until inventory is full of Depots...

Expected Result

No block duping

Screenshots and Videos

No response

Crash Report or Log

No response

Operating System

Any

Mod Version

0.5.1f

Minecraft Version

1.20.1

Forge Version

47.2.30

Other Mods

No crash

Additional Context

No response

@desht desht added the type: bug Issue where something isn't working label May 7, 2024
@Attack8 Attack8 linked a pull request May 8, 2024 that will close this issue
@Attack8
Copy link
Contributor

Attack8 commented May 9, 2024

Can't reproduce with just Create, FTB Chunks, and their dependencies. Is there a reason this shouldn't be reproducable with standard version of the mods?

Nevermind, ignore me. I just can't read apparently

@Potatz
Copy link

Potatz commented May 31, 2024

I got a similar issue too. But I wasn't in a protected area...? I'm assuming its something similar to what you said with the block placement and removal. Are there any solutions yet?

@Attack8
Copy link
Contributor

Attack8 commented May 31, 2024

Yea, it’s in the linked pr

@Potatz
Copy link

Potatz commented May 31, 2024

Is the code a full fix/patch? If so how do I use it? (tried downloading it and compressing into a .class file to replace the one in the .jar from modrinth)

@Attack8
Copy link
Contributor

Attack8 commented May 31, 2024

you wait until it’s merged, then it will be fixed in the next release

@Potatz
Copy link

Potatz commented Jun 1, 2024

ok, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: bug Issue where something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants