-
Notifications
You must be signed in to change notification settings - Fork 30
Mapper backend refactor and texture deco improvements #280
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
Conversation
WaitingIdly
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this was an issue prior to this PR, but what should be done about animated textures, if anything?
src/main/java/com/cleanroommc/groovyscript/mapper/AbstractObjectMapper.java
Outdated
Show resolved
Hide resolved
...om/cleanroommc/groovyscript/server/features/textureDecoration/TextureDecorationProvider.java
Outdated
Show resolved
Hide resolved
src/main/java/com/cleanroommc/groovyscript/mapper/TooltipEmbedding.java
Outdated
Show resolved
Hide resolved
...n/java/com/cleanroommc/groovyscript/server/features/textureDecoration/TextureDecoration.java
Outdated
Show resolved
Hide resolved
...n/java/com/cleanroommc/groovyscript/server/features/textureDecoration/TextureDecoration.java
Outdated
Show resolved
Hide resolved
|
|
||
| public boolean hasTextureBinder() { | ||
| if (this.hasTextureBinder == null) { | ||
| for (Method method : getClass().getDeclaredMethods()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why does this need reflection?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Its a default implementation to check if the method is overriden. Only then the texture binder can be defined
|
|
||
| public class BlockStateMapper extends AbstractObjectMapper<IBlockState> { | ||
|
|
||
| public static final BlockStateMapper INSTANCE = new BlockStateMapper("blockstate", null); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
since this is the only place you are going to init BlockStateMapper, why pass null here and not drop and argument and call super(name, null, IBlockState.class)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was doing that for item so that mods can extend that class for a template (for example gregtech metaitems). I guess its not very useful for blockstate
AbstractObjectMapper<T>class