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

feat: item model overrides #19

Merged
merged 8 commits into from
Feb 6, 2025

Conversation

Roelymole
Copy link
Contributor

This is the groundwork for fixing #351.

2025-02-04_16 09 30
2025-02-04_16 15 21

The top_item_override property can be be included in the data object with the texture resource location to be used for the top face of the machine when it is in item form and also in the side config tab, but not when it is placed in the world.

{
  "data": {
    "back": "galacticraft:block/machine_side",
    "front": "galacticraft:block/advanced_solar_panel",
    "left": "galacticraft:block/machine_side",
    "right": "galacticraft:block/machine_side",
    "top_item_override": "galacticraft:block/solar_panel"
  },
  "machinelib:type": "machine"
}

The item_override property can be provided with a model resource location to be used to override the entire item model, which is not preferable as this would not display the configured sides of the machine, however I have left this in as it might be useful for something and there was a comment saying it was on the todo list.

{
  "data": {...},
  "machinelib:type": "machine",
  "item_override": "namespace:item/overriding_model"
}

I have not currently allowed for other faces to be overriden with front_item_override, left_item_override, bottom_item_override, etc. because I could not think of a valid use case at the moment, however it is a simple enough matter to add these later if need be.

@Roelymole Roelymole merged commit 0343bb6 into TeamGalacticraft:minecraft/1.21 Feb 6, 2025
1 check passed
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.

1 participant