Elytra mechanics in Minecraft
My goal is to use ArmorStands wearing elytra for ray casting. So far I figured out how to make it travel horizontally in any direction. But my problem is that the speed of the entity changes and it results in a curved path when I try to make it travel other pitches than straight horizontal. The method I use teleports the entity upwards every tick by a fixed amount as it glides.
What I can change with commands:
- initial vertical momentum
- entity rotation
- upwards teleport amount
So I'd need the X and Z components of the momentum to be constant for this to be viable. Because I can counteract the Y momentum with the teleportation but not the X or Z. As long as the tp value can be calculated as some polynomial with trig-functions it's feasible to implement it.
How could I determine at what pitch does the X and Z momentum stay constant?
Here's a simplified snippet from the MCP:
Vec3d Look = getLookVec()
f = rotationPitch * 0.017453292 # pi/180
LookHorizontal = sqrt(Look.xCoord * Look.xCoord + Look.zCoord * Look.zCoord)
MotionHorizontal = sqrt(motionX * motionX + motionZ * motionZ)
LookLength = Look.lengthVector()
PitchCos = MathHelper.cos(f)
PitchCos = PitchCos * PitchCos * min(1.0, LookLength / 0.4)
motionY += -0.08 + PitchCos * 0.06
if (motionY < 0.0 and LookHorizontal > 0.0) #Moving DOWN and not looking straight up or down
{
d2 = motionY * -0.1 * PitchCos
motionY += d2
motionX += Look.xCoord * d2 / LookHorizontal
motionZ += Look.zCoord * d2 / LookHorizontal
}
if (f < 0.0) #Looking UP
{
d9 = MotionHorizontal * -sin(f) * 0.04
motionY += d9 * 3.2
motionX -= Look.xCoord * d9 / LookHorizontal
motionZ -= Look.zCoord * d9 / LookHorizontal
}
if (LookHorizontal > 0.0) #Not looking straight up or down
{
motionX += (Look.xCoord / LookHorizontal * MotionHorizontal - motionX) * 0.1
motionZ += (Look.zCoord / LookHorizontal * MotionHorizontal - motionZ) * 0.1
}
motionX *= 0.99
motionY *= 0.98
motionZ *= 0.99
moveEntity(motionX, motionY, motionZ)
Best Answer
Sorry to burst your bubble, but the Elytra can't be put on Armor Stands.
Also, you can't determine when X and Z postistions are constant. Remember that the Elytra don't give you the ability to actually fly (minus Creative mode), they only allow you to glide. And noting that they take up the Chestplate armor slot still makes players question why the Elytra can't be put on ArmorStands in the first place. The ability to but them on the stands may be in a future update. I tried this with my own game, and I came out with negative results. I died doing this, since Creative mode really makes the Elytra, um, unusable. Survival mode was the only way to do this.
Pictures about "Elytra mechanics in Minecraft"



Quick Answer about "Elytra mechanics in Minecraft"
- Elytra are equipped in the chestplate slot, either by placing the item directly in the slot, by pressing use item while held in hand, or by firing a point-blank dispenser at a target. ...
- To fly, the player must press the jump key while falling, and the elytra spread apart like a beetle's elytra.
How does an Elytra work in Minecraft?
To use the Elytra, you'll need to equip your wings to your character's chestplate slot. From there, climb to a great height, fall, and press the jump key once to start flying. While flying with Elytra, be mindful of real world physics. Flying at too sharp an angle can cause you to stall and fall from the sky.How does durability work on Elytras?
The durability of an Elytra will decrease by one point for every second it is being used in flight. When the durability of the Elytra reaches 1 point, it will stop working completely. Instead of completely breaking and not being able to be used anymore, the Elytra can actually be repaired.How do you fly fast with an Elytra?
Let's show you how to propel yourself even faster with elytra wings by using fireworks rockets.Can you put a pattern on an Elytra in Minecraft?
Place a banner next to your elytra in a crafting bench just as you would for a shield. This will produce an elytra labelled with your banner colors and patterns, it's that simple!Everything About How to Use Elytra in Minecraft 1.19
Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.
Images: Miguel Á. Padriñán, Miguel Á. Padriñán, Miguel Á. Padriñán, Miguel Á. Padriñán
