-
Couldn't load subscription status.
- Fork 1.2k
add SidedScrollOptionBehavior and made AllIcons usable with custom resource #8982
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
base: mc1.21.1/dev
Are you sure you want to change the base?
add SidedScrollOptionBehavior and made AllIcons usable with custom resource #8982
Conversation
|
Is the AllIcons change related to the scrolloptionbehaviour? That might be better in a separate PR if not. |
|
@slin-o, this pull request is targeting the wrong branch. Pull requests should target the branch corresponding to the earliest supported Minecraft version unless the changes are specific to code that only exists for a newer Minecraft version. Please change the target branch, resolve any merge conflicts, and leave a message here so we can continue with the process of reviewing and merging this pull request. Thanks! |
the ScrollOptionBehavior needs an INamedIcons enum wich requires an AllIcons to be returned in one method to render the correct selection |
|
why is this the wrong target @VoidLeech |
|
The earliest supported version atm is 1.20.1 |
|
ok |
|
|
||
| public static final ResourceLocation ICON_ATLAS = Create.asResource("textures/gui/icons.png"); | ||
| public static final int ICON_ATLAS_SIZE = 256; | ||
| public final ResourceLocation ICON_ATLAS ; |
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.
these fields should stay static. Add new instance fields that get set to these in the constructor.
|
|
||
| import net.minecraft.core.Direction; | ||
|
|
||
| public interface ISidedScrollValueBehavior<B extends ScrollValueBehaviour>{ |
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.
new interfaces should not be I-prefixed
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.
you're right, I thought I had a class named SidedScrollValueBehavior, will fix that
| * @param be The SmartBlockEntity this behavior is associated with. | ||
| * @param slot The ValueBoxTransform for the slot. | ||
| */ | ||
|
|
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.
weird extra line
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.
yeah, maybe a formatting issue or just accidentally left in there
added new behavior that acts like ScrollOptionBehavior that stores values per side instead of for the enttire block
added new constructor to AllIcons to create custom icons with your own icon texture