Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Change render for specific entity Instance

Recommended Posts

for example: I hit a Creeper and this Creeper changes its render Method and becomes red. All the other ones stay the same.


Edit: alternatively, maybe it works to give the entity instance to the render method to check the status of the entity.

Edited by Jeldrik
Link to post
Share on other sites

Use a capability to store the changed render state. Then use packets to sync this data to the clients tracking this creeper (more below). Then use RenderLivingEvent.Pre to override the creeper rendering for those creepers.


To send a packet to tracking players you need to send the packet:

  • When the data changes send it to PacketDistributor.TRACKING_ENTITY.
  • Use PlayerEvent.StartTracking to get notified when a player starts tracking ("seeing") an entity. In that case, you need to send the data to that player as well.
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.