Posted November 5, 20195 yr Hi, I want to change between two models for an entity I have, depending on whether or not it is being ridden. I was thinking of something like an if(isBeingRidden) statement inside the entity's Model class to change the model, but this is an EntityType, not an EntityModel, method. I tried to see how Minecraft does it (let's say for a Zombie attacking) but as of now, I can't access any vanilla Entity or Render class. I did notice the use of DataParameters in Entity classes; and thus used one to store and update whether or not my entity is being ridden. I'm not sure how, and where to use it, though. Thanks, Kres 'Everyone is a genius, But if you judge a fish by its ability to climb trees, it will live its whole life believing that it is stupid.' -Albert Einstein ---------------------------------------------------------- If Arthas's horse is named "Invincible", then why can I clearly see him?
November 8, 20195 yr Author I've sorted myself out so I'm answering this in order for this thread to be closed. All I had to do was to create a boolean isMounted in my entity's model class, and call the doRender() method in my entity's renderer class; where inside I would have checked if the entity isBeingRidden() and change the isMounted boolean accordingly within doRender(). Example: public void doRender(ScorpionEntity entity, double x, double y, double z, float entityYaw, float partialTicks) { boolean state = entity.isBeingRidden(); ScorpionModel<ScorpionEntity> scorpion = this.getEntityModel(); scorpion.isMounted = state; super.doRender(entity, x, y, z, entityYaw, partialTicks); } Works like a charm 'Everyone is a genius, But if you judge a fish by its ability to climb trees, it will live its whole life believing that it is stupid.' -Albert Einstein ---------------------------------------------------------- If Arthas's horse is named "Invincible", then why can I clearly see him?
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.