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

Dedicated Server Crashing when using TweakerJs #23

Open
pjlasl opened this issue Mar 3, 2020 · 4 comments
Open

Dedicated Server Crashing when using TweakerJs #23

pjlasl opened this issue Mar 3, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@pjlasl
Copy link

pjlasl commented Mar 3, 2020

Describe the bug
When I run my mod on a dedicated server It throws multiple errors.

To Reproduce
I have a script that uses libcd.util.TweakerUtils and lbcd.recipe.RecipeTweaker
I am using the following functions:
getItem() from TweakerUtils
removeRecipesFor() from RecipeTweaker

Expected behavior Optional
I expect it to run the TweakerJS script without error

Screenshots Optional
snippet of crash report
Code Example being run

Version of the (please complete the following information):

  • Corail Woodcutter Companion Addon
  • LibCD 2.3.0+1.15.2
  • Fabric API 0.4.32+build.292-1.15
  • Minecraft 1.15.2
@pjlasl pjlasl added the bug Something isn't working label Mar 3, 2020
@LemmaEOF
Copy link
Member

LemmaEOF commented Mar 3, 2020

It looks like the line causing this is if (itemFound.toString().indexOf('air') >= 0). I have no idea why it's causing that, since the error being thrown is that it can't find the TooltipContext class and Item#toString doesn't use TooltipContext, but that seems like the issue. The best thing I could do is add in a way to check if an item ID exists.

@pjlasl
Copy link
Author

pjlasl commented Mar 4, 2020

It is interesting that it does not throw this error when loading from the client. It only occurs on a dedicated server.
I'll try to write it another way on my end and see if I can also correct it.

@LemmaEOF
Copy link
Member

LemmaEOF commented Mar 4, 2020

That's due to the TooltipContext class being a client-only thing used for building tooltips. It doesn't exist on the server, so it can't be called. I need to figure out why it's looking for TooltipContext on server-side.

@pjlasl
Copy link
Author

pjlasl commented Mar 4, 2020

ok. I found a workaround for now.

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

2 participants