Connecting GUI Buttons to Entity Model Layers?

Started by Pickle's Modding on

Topic category: Help with Minecraft modding (Java Edition)

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Connecting GUI Buttons to Entity Model Layers?

I'm making a mod in MCreator 2025.3 Neoforge that adds one new item, Ink, and a few new mobs.

I want Ink to be used to swap the texture of the new mobs when pressing a button in the mob's inventory.
Ink would be placed into an input slot, then when the player clicks from a selection of buttons, the mob's texture will swap.

Example: I put ink into the input slot, press the third button, and the Texture3 Model Layer will display.

How would I code this? Thank you for reading and replying.

Joined Feb 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
add synced data to the…
Sun, 03/01/2026 - 13:50

add synced data to the entity, for example a string called "type" which you set to for example "ModelLayer1" on standard, then for the buttons you make procedures that change the entity data string to "ModelLayer2" etc, whatever you want to call them, then in entity model layers you create a single logic procedure for every layer that is:

[return [get entity data string of entity (entity) name: (string name)] = [text:"ModelLayer1"]]

 

you have to change the things inside of " ". and the things inside of ( ), and of course ModelLayerX to your name

Joined Sep 2024
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Thank you so much for the…
Mon, 03/02/2026 - 06:29

Thank you so much for the help!