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

Excplicit ItemStack -> Environment lookup system #1530

Closed
fnuecke opened this issue Nov 18, 2015 · 0 comments
Closed

Excplicit ItemStack -> Environment lookup system #1530

fnuecke opened this issue Nov 18, 2015 · 0 comments
Milestone

Comments

@fnuecke
Copy link
Member

fnuecke commented Nov 18, 2015

Trying to explain the workaround that's currently needed to make - in particular - SimpleComponents show their API doc in the NEI usage page, I realize it's more terrible than I thought. So I'll want to add an explicit system for registering ItemStack -> Environment resolvers (or rather ItemStack -> Object for SimpleComponents, since they only become Environments at runtime when the OC class transformer runs).

Something like

interface EnvironmentProvider {
  Object getEnvironment(ItemStack stack);
}

and allow registering thos in api.Driver or so.

This would deprecate the EnvironmentAware interface (would still work in 1.6, but I'd remove that in 1.7 then).

Feedback welcome.

@fnuecke fnuecke added this to the v1.6.0 milestone Nov 18, 2015
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

1 participant