Jump to content

[1.11] Need help setting noClip.[Solved]


camogamer

Recommended Posts

My Goal: Create spectator-like mode but allow ai and wander and spawn still.

 

My Problem: The noClip field is tied to a player's gametype.

 

I have looked through the EntityPlayer class and noClip is set by isSpectator()

early in the onUpdate, immediately after the first phase of PlayerTickEvent. The

next chance to set noClip to true appears to be in EntityLivingBase onUpdate and

that is where i am attempting to set it which is before any logic happens regarding noClip in EntityPlayer.  This is not working. 

I believe must have missed something in a child class or is this even possible through forge?

I have also attemped to change the collision box during GetCollisionBoxesEvent with no luck.

 

Any input appreciated.

 

EDIT:  As with everything that should work I made a simple mistake, I was not setting noClip on each side. Setting noClip in LivingUpdateEvent works as expected.

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.