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.10.2] Substitution alias should set delegate or registry name of replacement #3131

Closed
Choonster opened this issue Jul 29, 2016 · 3 comments
Labels
Bug This request reports or fixes a new or existing bug.

Comments

@Choonster
Copy link
Contributor

Choonster commented Jul 29, 2016

Forge version: 1.10.2-12.18.1.2039
Test case: link
FML logs: link

When an IForgeRegistryEntry is registered normally, it's expected to have its registry name set beforehand (or provided as an argument); this is then set as the name of its RegistryDelegate.

When an IForgeRegistryEntry (or more specifically a Block/Item) is added as a substitution alias, there's no check to see if its registry name has been set and the name of its RegistryDelegate is never updated.

If a replacement Block doesn't have a registry name, all of its variants display as the missing model in-world.

If a replacement Item doesn't have a registry name, it crashes the game with a NullPointerException thrown in ModelLoader#onPostBakeEvent.

I suggest that adding a substitution alias should set the registry and/or delegate name of the replacement object to the name that the substitution was added for.

@Actuarius
Copy link

@williewillus added labels [Bug]

@Actuarius Actuarius added the Bug This request reports or fixes a new or existing bug. label Aug 20, 2016
@Madsthunder
Copy link
Contributor

This shouldn't be an issue anymore since you need to set the registry name of the object you're trying to register to the registry name of the object you're trying to replace.

@Choonster
Copy link
Contributor Author

Choonster commented Jul 15, 2017

You're correct, this is superseded by the new registry system in 1.12.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This request reports or fixes a new or existing bug.
Projects
None yet
Development

No branches or pull requests

3 participants