Jump to content

Recommended Posts

Posted

Hello all,

 

I'm trying to make player automatically move for few ticks. I wrote basic test to move player every tick using class that implements ITickHandler:

        public void tickStart(EnumSet<TickType> type, Object... tickData) {
       
                if (type.contains(TickType.PLAYER))
                {
                        assert ((tickData[0] instanceof EntityPlayer));
                        EntityPlayer player = (EntityPlayer)tickData[0];
                        player.motionY = 1;
                }
        }

In debugger i can see that line player.motionY = 1 is being fired but player do not move. If anyone have idea why this is happening it would be great to hear it.

 

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.