Jump to content

Check distance a mob is from the player


Discult

Recommended Posts

1 minute ago, V0idWa1k3r said:

Which player? There can be a lot of players on the server... And you have to account for that if your mod isn't client only. 

You can get the list of all players with World#playerEntities.

Its any player as soon as any player is a certain distance to the mob it changes the model all works fine in client but on server it does not 

i will try the World#playerEntities

Link to comment
Share on other sites

12 minutes ago, Discult said:

i figured out a fix i simple made the method Sideonly Client and it works for now

If your code has any reference to that method that is invoked from common code you will crash the server.

 

15 minutes ago, Discult said:

any player is a certain distance to the mob it changes the model

The client will not observe the model changing as soon as another player comes into range with your current implementation.

Link to comment
Share on other sites

On 10/27/2018 at 12:29 AM, V0idWa1k3r said:

If your code has any reference to that method that is invoked from common code you will crash the server.

 

The client will not observe the model changing as soon as another player comes into range with your current implementation.

how do you think i should go about doing it then

 

Link to comment
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.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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 Terms of Use.