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

Added texture field to origins. #702

Open
wants to merge 37 commits into
base: 1.20.4/dev
Choose a base branch
from

Conversation

ThatRobin
Copy link
Contributor

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.

Moved background.png to background/window.png.
Added screen.png, as a default screen background acting as the default dirt texture.
Copy link
Collaborator

@eggohito eggohito left a 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<>())
Copy link
Collaborator

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

Copy link
Contributor Author

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

Copy link
Collaborator

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

@eggohito eggohito added this to the 1.13.x milestone Dec 22, 2023
* 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
@eggohito eggohito changed the base branch from 1.20 to 1.20.4/dev May 17, 2024 04:35
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

Successfully merging this pull request may close these issues.

None yet

2 participants