Skip to content

feat: item model overrides - #19

Merged
Roelymole merged 8 commits into
TeamGalacticraft:minecraft/1.21from
Roelymole:itemoverride
Feb 6, 2025
Merged

Roelymole merged 8 commits into
TeamGalacticraft:minecraft/1.21from
Roelymole:itemoverride

Conversation

@Roelymole

Copy link
Copy Markdown
Member

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
@Roelymole
Roelymole deleted the itemoverride branch April 30, 2025 15:51
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