
[1.12.2] Conduit Replace Dupe / Config Option
yepidoodles opened this issue · 5 comments
Issue Description:
Conduit replace dupes the conduit being placed
This dupe only happens on the server (it is also SpongeForge, not able to test on normal forge). I know that many mod developers do not support SpongeForge, so if you are not able or willing to fix this, I only ask for a config option to disable the replace.
What happens:
https://i.gyazo.com/eafe88a3bee2ff89ba3edc3127b13294.mp4
What you expected to happen:
One is replaced with the other, and that one is used.
Steps to reproduce:
See GIF
Affected Versions (Do not use "latest"):
- EnderIO: 5.0.29
- EnderCore: 0.5.35
- Minecraft: 1.12.2
- Forge: 14.23.4.2708
- SpongeForge: 3291
Your most recent log file where the issue was present:
N/A
Many thanks for your time,
~ Alice
@HenryLoenwind You seem to be returning a result of EnumActionResult.FAIL
here
https://github.com/SleepyTrousers/EnderIO/blob/master/enderio-conduits/src/main/java/crazypants/enderio/conduits/conduit/AbstractItemConduit.java#L157
Sponge relies on this result being returned properly. If a result of FAIL is returned, Sponge will restore the item to its previous state. You should be returning EnumActionResult.TRUE
when this method is successful.
Sponge will restore the item to its previous state
---so, you're doing things differently than Forge.
This is onItemUseFirst()
, so: PASS=pass on to the next item, FAIL=end processing here, SUCCESS=end processing here+swing arm+reset animations. So, while there's no reason we don't want the arm swing in this case, our usage of FAIL is correct.
Regardless of animations on client, a result of FAIL
has always meant there were no changes made. There are no cases, that I can find, where vanilla is making changes on item use and returning a result of FAIL
just to avoid client-side animations. And yes I know this is onItemUseFirst
but Forge copied this from onItemUse
so the results should be treated the same.
This is only running on server side so a result of FAIL has no affect on client-side animations.
On client you swing arm and return PASS.
Let's not argue semantics when this is clearly a bug on our end. You can see it was added accidentally here: e67a982