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

Terraform boat API initialization issues #70

Open
gniftygnome opened this issue Dec 8, 2022 · 1 comment
Open

Terraform boat API initialization issues #70

gniftygnome opened this issue Dec 8, 2022 · 1 comment

Comments

@gniftygnome
Copy link
Contributor

gniftygnome commented Dec 8, 2022

The 1.19.3 version of Terraform wood API's boat implementation originally would crash during startup if no mod defined a boat:

Caused by: java.lang.NoClassDefFoundError: Could not initialize class com.terraformersmc.terraform.boat.api.TerraformBoatTypeRegistry
    at com.terraformersmc.terraform.boat.impl.client.TerraformBoatEntityRenderer.<init>(TerraformBoatEntityRenderer.java:33) ~[terraform-wood-api-v1-5.0.0-alpha.3.1.jar:?]
    at com.terraformersmc.terraform.boat.impl.client.TerraformBoatClientInitializer.lambda$onInitializeClient$0(TerraformBoatClientInitializer.java:14) ~[terraform-wood-api-v1-5.0.0-alpha.3.1.jar:?]
    at net.minecraft.client.render.entity.EntityRenderers.redirect$zin000$createEntityRenderer(EntityRenderers.java:559) ~[minecraft-project-@-merged-named.jar:?]
[...]

I hackishly worked around the problem with this change:
65c2a96#diff-3aa7742763ec6703e9cc5d27b7ebc52970decc139eea351819a97b41f38b3580

However although using the wood API without any boats (a normal Nether implementation) now works correctly, it does issue an ERROR grade log line during start-up which may alarm somebody:

[12:52:38] [Render thread/ERROR] (Minecraft) Registry 'terraform:boat' was empty after loading

Perhaps the way to resolve this would be to add a dummy registry entry during startup, but I kind of hope somebody else knows a better way.

@haykam821
Copy link
Contributor

haykam821 commented May 31, 2024

Fabric API has an upstream issue tracking intentionally empty registries such as Terraform's boat types: FabricMC/fabric#3128. A mixin of our own shouldn't be too difficult either, but the injection point is within a lambda method and somewhat annoying to determine.

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

2 participants