Posted March 14, 201510 yr Hello, I need to grab an entity and keep it stationary in air, i tried this code but it still trying to fall: x = player.posX + player.getLookVec().xCoord; y = player.posY + player.getLookVec().yCoord; z = player.posZ + player.getLookVec().zCoord; entity.prevPosX = x; entity.prevPosY = y; entity.prevPosZ = z; entity.setPosition(x, y, z); entity.fallDistance = 0.0F; entity.onGround = false; entity.isAirBorne = true; entity.timeUntilPortal = 5; entity.setInWeb(); help....
March 14, 201510 yr Author I tried to change any value but nothing works.... seems i'm using the wrong methods/fields/functions ...
March 15, 201510 yr Hello, I need to grab an entity and keep it stationary in air, i tried this code but it still trying to fall: x = player.posX + player.getLookVec().xCoord; y = player.posY + player.getLookVec().yCoord; z = player.posZ + player.getLookVec().zCoord; entity.prevPosX = x; entity.prevPosY = y; entity.prevPosZ = z; entity.setPosition(x, y, z); entity.fallDistance = 0.0F; entity.onGround = false; entity.isAirBorne = true; entity.timeUntilPortal = 5; entity.setInWeb(); help.... What do you mean by "trying to fall"? If you mean that it tries to fall and rolls back, then you should set its velocity to 0 on both side. I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.
March 15, 201510 yr Author What do you mean by "trying to fall"? If you mean that it tries to fall and rolls back, then you should set its velocity to 0 on both side. Yes, I added this code but nothing to do: entity.motionX = entity.motionZ = entity.motionY = 0.0D; The code is called by the item right click event on the entity ("itemInteractionForEntity") but the entity goes up and down like a glitch ...in short, I need to cancel the event (updateEntity or livingUpdate) where the entity perform the fall ...
March 15, 201510 yr Try canceling the LivingFallEvent . Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
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.