Jump to content

[1.7.10][SOLVED]Healing Entities via code?


BuddingDev

Recommended Posts

It does not seem right...

 

Here's my code:

 

EntityPlayer priority = the nearest player from tile entity;

if (!worldObj.isRemote) {

priority.heal(20);

}

 

I tried falling from a cliff and come back, but it does not heal me!

My debug printings suggest the TileEntity has found me as a target, but it does not heal!

Link to comment
Share on other sites

It does not seem right...

 

Here's my code:

 

EntityPlayer priority = the nearest player from tile entity;

if (!worldObj.isRemote) {

priority.heal(20);

}

 

I tried falling from a cliff and come back, but it does not heal me!

My debug printings suggest the TileEntity has found me as a target, but it does not heal!

Are you sure that player is not null? And that it's you? And that whole code block is getting called on server side? And that code succesfully reaches priority.heal?

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.