I summoned a leash knot, walked into it and tested for it in a small radius, however it failed to show up. Testing it at a much larger radius, it does end up showing up. Using execute at it to summon an entity results in the entity appearing in the correct place as expected, and only the location selectors like radius or x y z dx dy dz on the leash knot seems to be incorrect. The nbt data of the leash knot shows the same location as it is visually as well.
It appears that if the knot is at 0 180 0, the location where it will search for it is 0 90 0. If you search for a leash knot at 0 180 0, the minimum radius will be the same as the y value so 180. If you search for a leash knot at 0 90 0, the minimum radius will be half the y value so 90. Any radii under 90 cannot find the knot anywhere in the world.
From Skylinerw - "The search area is being chopped up into a quarter of what it's supposed to be. See the attached image...The location of the Leash knot is correctly centered, but we're only seeing the result of a quarter of the search area, giving the illusion that the coordinates are incorrect."
To test:
Summon a leash knot. Summon it on a fence to keep it in existence.
Walk up to it and run
/execute if entity @e[type=leash_knot,distance=..5]
Keep increasing the radius until you can find it again. This radius should correspond with the knot's y value. Use the radius you found, and drop down half that distance and then check in that exact spot for a leash knot in half the radius you found. Decreasing the radius below that will no longer yield results no matter where in the world you are.
Run
/data get
on the leash knot to check the return feedback and notice that the position in its tags is still in fact correct to its actual location.Run an execute command to, for example, summon an entity at it or say the entity that is in a radius of 2 from it on the leash knot to see that it does indeed run from the correct location.
My results:
Leash knot location: 0 60 0
Leash knot data:
{Motion:[0:0.0d,1:0.0d,2:0.0d],FallDistance:0.0f,UUIDMost:-1629746060546258151L,Pos:[0:0.5d,1:60.5d,2:0.5d],UUIDLeast:-6959631846312418399L,Fire:0s,Invulnerable:0b,Air:0s,OnGround:0b,Dimension:0,PortalCooldown:0,Rotation:[0:0.0f,1:0.0f]}
First radius searchable while standing at 0 60 0: 60
/testfor @e[type=LeashKnot,r=60]
I determined that the position it was finding must be under y=60, however checking down below vertically from the leash_knot with different radius yielded ever more confusing results. r=60 only returned results while I was between y=0 and y=60, but not below y=0 nor above y=60. Checking r=30, I found it only detectable when I was at EXACTLY y=30. I could not get any results below r=30. It seems that radius check is scaled by half on the y axis and it thinks the knot is at y=30 and when you are at 0 30 0, it runs the r=30 as if it was checking r=0.
Code analysis
The following is based on a decompiled version of Minecraft 1.9 using MCP 9.24 beta.
The reason for this is very likely that the method net.minecraft.entity.EntityLeashKnot.updateBoundingBox()
which overrides the method of its parent class does not set the bounding box but only sets the position. Because of this, summoned LeashKnot
s have their bounding box at 0|0|0.
Attachments
Comments 19
By screenshot I mean if you type /entitydata @e[type=LeashKnot] {} and post the screenshot of the text in your chat after typing the command.
Sorry for late responce, but now I see that is the problem. Thanks for detailed explanations and testing! 🙂
Can confirm also for 1.12.2. This is an annoying bug, because in a command system I'm making I use leash knots for centering entities on a block.
Is this still a issue in the latest version of the game(currently 1.13.1)?
If so, please add it to the affected versions, thanks!
Wow, that is indeed really weird.