-
Notifications
You must be signed in to change notification settings - Fork 167
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
Added texture field to origins. #702
base: 1.20.4/dev
Are you sure you want to change the base?
Added texture field to origins. #702
Conversation
Moved background.png to background/window.png. Added screen.png, as a default screen background acting as the default dirt texture.
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.
Comments aside, I think this is very cool and will give users a lot of freedom in terms of customizability :D
@@ -33,13 +34,14 @@ public class Origin { | |||
.add("impact", OriginsDataTypes.IMPACT, Impact.NONE) | |||
.add("loading_priority", SerializableDataTypes.INT, 0) | |||
.add("upgrades", OriginsDataTypes.UPGRADES, null) | |||
.add("textures", ApoliDataTypes.IDENTIFIER_MAP, new LinkedHashMap<>()) |
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 think the name of the field should be texture_map
, just to be consistent with the texture_map
field of the status_bar_texture
power type that behaves the same
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.
oh yeah for sure, i forgot to check the name of the existing one, will change when i'm able to
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.
Just a minor nitpick: I think this util. class could be generalized for checking if a texture is loaded or if a sprite exists in an atlas, similar to what I did in my dynamic container type PR in Apoli
* The contents of the origin screen now looks a lot more seamless, where the text renders behind the window border frame and the window name plate * Simplified how the origin name widget is rendered
… power type * The action is now only executed if the entity condition specified in the power's `condition` field is fulfilled or absent
* Now accounts for layers that do not have any options (e.g: if a layer automatically chooses an origin conditionally, and if that condition is not fulfilled)
* Fixed Arachnid unable to hold its climb on sneak * Fixed Arachnid unable to go down on sneak while climbing cobweb-like blocks + Added NOT sneaking condition for webbing attacked entities
* Added a set of condition that evaluates whether the entity is not sneaking and if it's horizontally colliding with a block; to keep the old behavior of climbing
For some reason, writing to a buffer directly and using the Networking v1 API works for both singleplayer and multiplayer, while using the object-oriented Networking API (v2) doesn't 🤔
..where the result stack is not being modified by a power that uses the `modify_crafting` power type
Caused by trying to get a non-existent origin layer
This PR creates a textures field in the origin json files which can be used to replace any GUI element with a custom texture.
To avoid missing texture issues, the default textures are also used as fallback textures if the specified identifier does not exist in the gui sprite atlas.