Jump to content

EntityPlayer Changes [1.10.2]


vin0m

Recommended Posts

I want to make some changes to the hunger/exhaustion system.  I created a class that extends the EntityPlayer class and created overrides to the methods I needed to change.  I'm guessing I need to initialize it somehow because it isn't overriding the default settings but, I'm not quite sure how to do it.  Any help would be appreciated.

Link to comment
Share on other sites

In the EntityPlayer class what are the p_71000_1_, p_71000_3_, and p_71000_5_?

 

	            if (player.isInsideOfMaterial(Material.WATER))
	            {
	                int i = Math.round(MathHelper.sqrt_double(p_71000_1_ * p_71000_1_ + p_71000_3_ * p_71000_3_ + p_71000_5_ * p_71000_5_) * 100.0F);

	                if (i > 0)
	                {
	                    player.addExhaustion(0.015F * (float)i * 0.01F);
	                }
	            }

 

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.

Announcements



×
×
  • Create New...

Important Information

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