renderer question

Started by Purple19842 on

Topic category: Advanced modding

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
renderer question

I'm coming back to MCreator after like 2 years.
I'm trying to make a mob that has texture variants.

The mob has an NBT tag assigned at spawn, which determines the correct variant.
The problem is, in MCreator, there is no way to change the entity's texture directly.

So after some digging, I found that I can edit the renderer file for the mob, and edit 'getTextureLocation()' to change the textures.

The problem is, I need a reference to the entity so that I can get the NBT tag, however, I don't know how.
I've tried LivingEntityRenderState.entity, and LivingEntityRenderState.GetEntity()
But those did not work.
And I see that 'entity' is already defined at the top of the file, but its being directly set to NULL.
So I don't know where to go from here.

Joined Apr 2023
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
The new model layers feature…
Tue, 05/20/2025 - 15:23

The new model layers feature does allow you to completely change an entity's texture entirely inside MCreator's interface without needing to go into the code at all.

All you need to do is create a model layer with a different texture, then set the condition for the model layer to be a procedure that is simply 'return logic: get entity custom number nbt tag (tag) = (number)'

You would need to create a different procedure for each different nbt tag value, but it shouldn't be hard at all using the new MCreator features.

Welcome back! There is no…
Tue, 05/20/2025 - 15:48

Welcome back!

There is no need for any code, you can change entity model layers that have different textures with simple procedure conditions.

Also don't use NBT as Catnip suggested, but rather use synced entity data

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
How would i set the synced…
Tue, 05/20/2025 - 22:17

How would i set the synced entity data?
i see blocks to set NBT tags, but not for synced entity data

Joined Feb 2022
Points:

User statistics:

  • Modifications:
  • Forum topics:
  • Wiki pages:
  • MCreator plugins:
  • Comments:
Never mind, i found it…
Tue, 05/20/2025 - 22:19

Never mind, i found it.
Thanks for the help!