Mojira Archive
MC-80880

For some entities Motion gets always calculated regardless of value

It seems like for some entities Minecraft is constantly calculating their Motion regardless of the value.

I am not sure if this is really the case for 0, but at least any number below or above 0 gets constantly changed.

Affected Entities (where it seems to happen):

  • Items
  • Minecarts
  • Boats

While the effect is not so "extreme" for Items because the factor seems there pretty high, it creates unnecessary calculations for Minecarts and Boats.

Example:
Thrown item after about 2 minutes:

Motion:[0:-1.117E-321d,1:-0.0d,2:-8.45E-322d]

-1.117E-321d is an incredibly small number and has probably no effect at all, but the game still keeps calculating it.
Note: It either stops at Motion:[0:-4.9E-324d,1:-0.0d,2:-4.9E-324d] or this is the smallest number which is not 0 possible to represent with a double variable.

How to reproduce:

  1. Throw an item
  2. Run /entitydata @e[type=Item,c=1] {} a couple of times after waiting some time

Notes:

  • This might be also the bug, while standing on a boat causes the player to constantly change his Y position
  • For mobs it seems like -0.0784000015258789d is the smallest number for the Y Motion

Unresolved

Marcono1234

2015-05-31, 04:13 PM

2023-10-30, 10:20 PM

6

4

Confirmed

Entities, Performance

double, motion

Minecraft 1.8.6 - 23w43bMinecraft 1.8.6, Minecraft 1.10.2, Minecraft 16w41a, Minecraft 16w42a, Minecraft 1.11.2, 1.18.2, 22w16b, 23w43b

-