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

Forces Inventorio to pull out the apropriate Mining tool all the time #361

Closed
1 task done
Enderteck opened this issue Jan 15, 2024 · 8 comments
Closed
1 task done

Comments

@Enderteck
Copy link

Enderteck commented Jan 15, 2024

Mod loader

NeoForge

Minecraft version

1.20.1

Mod version

11.7.1

Modloader version

Neoforge 47.1.85

Modpack info

Custom

If bug:

  • Can you reproduce this issue with relevant mods only?

If bug: The latest.log file

No response

Issue description

If Jade is enabled, the tool belt from Inventorio is always putting the appropriate tool to mine the block looked at:

Screenshoot 1

This doesn't happen if you disable the "Display Tooltip" is enabled:

Screenshoot 3

Without it, there is no problem, and the tool only comes out when starting to break a block but Jade's tooltip is disabled:

Screenshoot 2

This is very headache inducing as when running through fields or generally places with different block types. Your tool hand changes every second and its very annoying:

Screen-Recording-2024-01-15.16-31.video-converter.com.webm

Since it only happens because of this mod, others on the Inventorio Github page said it's a problem on jade's part, so that's why I'm submitting this bug report. This could also be fixed in Jade Addons with an integration.

@Enderteck
Copy link
Author

Will the mod update to fix this be published soon (for neforge1.20.1) ? Just wondering.

@Snownee
Copy link
Owner

Snownee commented Feb 29, 2024

This issue was closed by mistake. It is not actually fixed.

@Snownee Snownee reopened this Feb 29, 2024
@Enderteck
Copy link
Author

Better workaround:

RubixDev/Inventorio#298 (comment)

@RubixDev
Copy link

RubixDev commented Mar 28, 2024

Hi! Inventorio maintainer here. I'm pretty sure this is caused by the following line:

// player-sensitive method, used by Waystones
float destroyProgress = state.getDestroyProgress(player, level, pos);

the state.getDestroyProgress call internally calls a method which Inventorio injects into to auto-select the "best" tool. In vanilla, that method is only called when actually "attacking" a block. Now I'm not sure what the best way to resolve this is. I guess I could inspect the stack trace in Inventorio and not select the tool if the call comes from within Jade, but that seems very hacky and is also not very future proof with supporting other mods where the same thing might happen. But I also don't think Jade can do much about this. So I welcome any suggestions.

Thanks in advance!


I should also mention: A temporary "fix" is to disable the "Harvest Tool" setting in Jade, but that will obviously completely disable that feature.

@Snownee
Copy link
Owner

Snownee commented Mar 28, 2024

Based on what I understand, your mod only switches the tool visually. If that's the case, maybe you could change the display tool only when the player is mining block.

@RubixDev
Copy link

RubixDev commented Mar 28, 2024

As long as the displayTool is set to a non-empty stack it is treated as being in the player's main hand, even on the server. This is required for e.g. the durability to be used up correctly

@RubixDev
Copy link

Ok, because of how easy the stacktrace inspection is, I just did that for now to at least have it working with Jade specifically. I'm still open to other suggestions though.

@Snownee
Copy link
Owner

Snownee commented Mar 29, 2024

Good! So I can close this issue now

@Snownee Snownee closed this as completed Mar 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants