#Changing Entity Texture or Model Midgame

1 messages · Page 1 of 1 (latest)

digital epoch
#

I would like to use event commands to change the texture/model of an entity in the middle of the game, depending on special circumstances.

I'd prefer changing the model since that'll probably be less space than the resource pack, but I'm fine with either choice.

Outside of my background knowledge on how component groups work, though, I have no clue how to trigger the event to change the geo.json or the texture.png rendering of the mob.

#

For example: say there was a mob that was green holding an umbrella in a grassy area, but I have it triggered so that on top of sand, they turn yellow and have a cowboy hat instead.

I could keep all the textures in one file with the UVs organized appropriately. My question would be how to change the model when it reacts to the environment.

cold grail
#

You have a few choices

#

If you simply want to change colors you could use component color/dyes and a color change material.

#

If you want to swap the texture and/or geo then you need to set a Render Contoller with an array. Then you'd use a query or var to control that array. You'd use the event to toggle that query's logic. You can do these alot of ways too.

So next step is we need to define more information and what you want to do then come up with a few tests. I'd start with doing 1 step of the process first as there are a few.

digital epoch
#

Ah. I thought this was something I could refer to the entity.json for.

That sounds like I'll have to learn how render controllers work before I can do anything else.

cold grail
#

There are 2 entity.json files BP and RP

#

You need to modify both in some cases

#

For example if you want to change it on day/night you don't but if you want ot change it on interaction you do... just depends