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

1.21.1 - ATM10 - The Undergarden + Silent Gear + Baritone causes crash #4538

Open
4 tasks done
MirekStanek opened this issue Oct 28, 2024 · 4 comments
Open
4 tasks done
Labels
bug Something isn't working

Comments

@MirekStanek
Copy link

Some information

Operating system: Windows 11 Pro (23H2)
Java version: Java 8 Update 421
Minecraft version: 1.21.1
Baritone version: baritone-api-neoforge-1.10.2-9-g3b01f129
Other mods (if used): The Undergarden, Silent Gear (+lib)
Neoforge version: 21.1.72

Exception, error or logs

I will provide three files, just to be sure. One is with both mods enabled and the other two are with one disabled.
crash_silent_undergarden_on.txt
crash_silent_off.txt
crash_undergarden_off.txt

How to reproduce

Download ATM10 and add Baritone. You will not be able to create world as it always crashes game before it gets a chance.
OR
Create custom modpack with said mods and add baritone. Same behaviour.

Modified settings

None.

Final checklist

  • I know how to properly use check boxes
  • I have included the version of Minecraft I'm running, baritone's version and forge mods (if used).
  • I have included logs, exceptions and / or steps to reproduce the issue.
  • I have not used any OwO's or UwU's in this issue.

I think that this is my first time ever posting an issue, so if I missed something, just let me know. Thank you for making this mod as it saves my time so I can grind less and spend more time with family after job.

@MirekStanek MirekStanek added the bug Something isn't working label Oct 28, 2024
@MirekStanek MirekStanek changed the title ATM10 - The Undergarden + Silent Gear + Baritone causes crash 1.21.1 - ATM10 - The Undergarden + Silent Gear + Baritone causes crash Oct 28, 2024
@MirekStanek
Copy link
Author

Forgot to provide mod verions:
silent-gear-1.21.1-neoforge-4.0.8.
The_Undergarden-1.21.1-0.8.22

@ZacSharp
Copy link
Collaborator

This is two different incompatibilities.

  1. Undergarden seems to assume nobody will ever query the damage value of an ItemStack before a world is loaded. I'd blame that on them since Minecraft does construct ItemStacks before world load and assuming that no mod will query the damage of one of those stacks seems rather brittle.
  2. Silentlib somehow wants to construct a new ItemStack every time one of its items is asked for its damage, and Baritone reads the damage of every new ItemStack, leading to infinite recursion. While I think constructing a new ItemStack in getDamage is a weird thing to do, I also think this one is on Baritone to fix.

Also I might have to read some mc code again to check whether the hashing trick Baritone is doing is even needed/correct. Now that ItemStacks use immutable components there might be better ways to get what we want.

@MirekStanek
Copy link
Author

I have little to no idea what you just said here, but I am grateful for your knowledge! Happy coding!

@imfakeheart
Copy link

is there a way to fix it?

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

No branches or pull requests

3 participants