Jump to content

Modifying player motionY in ITickHandler


Recommended Posts

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.


Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now


  • Create New...

Important Information

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