Jump to content

Recommended Posts

Posted

when I hit one of my mobs the respective method

 

public boolean attackEntityFrom(DamageSource damageSource, int tmpNaturalArmorRating)
{
   // ... doing some stuff, mostly checking if I want to allow the damage to the entity ...
   boolean check = super.attackEntityFrom(damageSource, tmpNaturalArmorRating);

   // checking side and doing some debug printout of the current damage

   return check;
}

 

will be called three times ...

- first on the client without any accounted damage (entities health at max)

- then on the server with the health reduced by the suffered damage

- last one once more on the client and again without any damage

 

what do I have to do to get the applied damage synchronised between client and server???

running minecraft on Mac OS X - Sierra --- creating code since 1986 ... --- मेरा दिल भारतवासी है!

width=289 height=100http://www.arno-saxena.de/pictures/chococraft/banner_signature.png[/img]

Posted

You would have to syncronize it yourself, entity health is not synced between client and server by default.

I do Forge for free, however the servers to run it arn't free, so anything is appreciated.
Consider supporting the team on Patreon

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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.