Jump to content

[1.7.10] (Solved) my on tick entity event is not working! what am i doing wrong?


sigurd4

Recommended Posts

isn't this supposed to run every tick for any living entities?

event handler:


@SubscribeEvent
public void livingEvent(LivingEvent event)
{
	if(event.entity instanceof EntityPlayer && EntityExtendedPlayer.get((EntityPlayer) event.entity) != null)
	{
		EntityExtendedPlayer props = EntityExtendedPlayer.get((EntityPlayer)event.entity);
		if(props.getDrunkness() > 0)
		{
			props.setDrunkness(props.getDrunkness()-1);
		}
		if(props.getMaxShields() > 0)
		{
			if(props.getShieldsTimer() > 0)
			{
				props.setShieldsTimer(props.getShieldsTimer()-1);
			}
			else
			{
				props.setCurrentShields(props.getCurrentShields()+0.2F);
			}
		}
	}
}

the other events work, so i know that i set up the event handler correctly. am i supposed to use a different event? according to tutorials i found this is supposed to work.

http://www.planetminecraft.com/member/sigurd4

I'm making the bioshock mod!

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.