Jump to content

How to create Wings [1.7.10]


SpinatSpion

Recommended Posts

OK. Although not exactly like Creative flying, the following code should work when placed inside the Item's class (hold down spacebar to fly up):

public void onUpdate(ItemStack itemStack, World worldIn, Entity entityIn, int i, boolean j){
        int jumpKeyCode = Minecraft.getMinecraft().gameSettings.keyBindJump.getKeyCode();
        if (Keyboard.isKeyDown(jumpKeyCode)) entityIn.setVelocity(entityIn.motionX, 1, entityIn.motionZ);
}

Link to comment
Share on other sites

Thanks bud c: Do u know a NoFallDMG event or something because when I do the flying I die like instantly :D

No problem :)

I'm not sure, but you should be able to use something like entityIn.setVelocity(entityIn.motionX, 0, entityIn.motionZ); to reset the player's vertical velocity.

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.