Conversation
WaitingIdly
requested changes
Dec 9, 2024
Collaborator
WaitingIdly
left a comment
There was a problem hiding this comment.
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()) { |
Collaborator
There was a problem hiding this comment.
why does this need reflection?
Member
Author
There was a problem hiding this comment.
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); |
Collaborator
There was a problem hiding this comment.
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)?
Member
Author
There was a problem hiding this comment.
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
AbstractObjectMapper<T>class