Leads not rendering when spawned (attached to mob/fencepost) via command block/structure block
Whenever I use the command " /summon EntityHorse ~-1 ~ ~2 {Tame:1,Saddle:1,Leashed:1,Leash:{X:-530.3,Y:56.0,Z:747.4}} " the horse will spawn with a lead attached to a fence post, however the lead will not render. The only way to get the lead to render is to log out and log back into the world.
Steps to reproduce (command block)
- Run this command:
/summon Pig ~ ~ ~ {UUIDLeast:1l,UUIDMost:1l,Health:0.1} - Run this command:
/summon Pig ~ ~ ~ {Health:0.1,Leashed:1,Leash:{UUIDLeast:1l,UUIDMost:1l}} - Reopen the world
Steps to reproduce (structure block)
- Save a structure with a mob on a lead, attached to a fence
- Remove the mob
- Load that structure in the same place (
MC-102170) - Reopen the world
Created Issue:
Leads not rendering when spawned (attached to mob/fencepost) via command block
Whenever I use the command " /summon EntityHorse ~-1 ~ ~2 {Tame:1,Saddle:1,Leashed:1,Leash:{X:-530.3,Y:56.0,Z:747.4}} " the horse will spawn with a lead attached to a fence post, however the lead will not render. The only way to get the lead to render is to log out and log back into the world.
Whenever I use the command " /summon EntityHorse ~-1 ~ ~2 {Tame:1,Saddle:1,Leashed:1,Leash:{X:-530.3,Y:56.0,Z:747.4}} " the horse will spawn with a lead attached to a fence post, however the lead will not render. The only way to get the lead to render is to log out and log back into the world.
Leads not rendering when spawned (attached to mob/fencepost) via command block/structure block
Whenever I use the command " /summon EntityHorse ~-1 ~ ~2 {Tame:1,Saddle:1,Leashed:1,Leash:{X:-530.3,Y:56.0,Z:747.4}} " the horse will spawn with a lead attached to a fence post, however the lead will not render. The only way to get the lead to render is to log out and log back into the world.
Steps to reproduce (command block)
#
#
Whenever I use the command " /summon EntityHorse ~-1 ~ ~2 {Tame:1,Saddle:1,Leashed:1,Leash:{X:-530.3,Y:56.0,Z:747.4}} " the horse will spawn with a lead attached to a fence post, however the lead will not render. The only way to get the lead to render is to log out and log back into the world.
Steps to reproduce (command block)
#
#Whenever I use the command " /summon EntityHorse ~-1 ~ ~2 {Tame:1,Saddle:1,Leashed:1,Leash:{X:-530.3,Y:56.0,Z:747.4}} " the horse will spawn with a lead attached to a fence post, however the lead will not render. The only way to get the lead to render is to log out and log back into the world.
Steps to reproduce (command block)
- Run this command:
/summon Pig ~ ~ ~ {UUIDLeast:1l,UUIDMost:1l,Health:0.1}- Run this command:
/summon Pig ~ ~ ~ {Health:0.1,Leashed:1,Leash:{UUIDLeast:1l,UUIDMost:1l}}- Reopen the world
Steps to reproduce (structure block)
- Save a structure with a mob on a lead, attached to a fence
- Remove the mob
- Load that structure in the same place (
MC-102170)- Reopen the world
Steps to reproduce:
- Save a structure with a mob on a lead with a knot on a fence
- Remove the knot from the fence or
Remove the fence - Load the structure in any other place.
Result: a new knot will always appear on the old place, but a new lead won't appear until reopening the world (possibly because of MC-55851).
- If there is no fence and/or the new structure is far enough, the new lead will break and drop itself.
- If there is the fence, the knot will stay there (even if the lead breaks, but it'll disappear after reloading the world), or else it'll despawn.
The cause is that the coordinates of the knot are saved in the entity, but are not changed when loading the structure
Old description:
I used a Structure Block, saved a house, and loaded it but the lead, attaching a cow and a fence together, broke as soon as it was copied to its new position.


Does the lead render if you spawn the horse without the lead and attach it manually ?Yes, it does.Confirmed. Command used for screenshot:
summon EntityHorse ~-1 ~ ~2 {Tame:1,Saddle:1,Leashed:1,Leash:{X:2,Y:64,Z:2}}It is also possible to get the leash to render by going far enough from the leashed mob.
Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.
Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been delivered.
Confirmed for
Confirmed for
How to reproduce
/summon Pig ~ ~ ~ {UUIDLeast:1l,UUIDMost:1l,Health:0.1}/summon Pig ~ ~ ~ {Health:0.1,Leashed:1,Leash:{UUIDLeast:1l,UUIDMost:1l}}This occurs with all leashes, not just summoned leashes. I is an issue as of latest snapshot February 11, 2016 snapshots.
It is inconsistent, but leashes don't render sometimes on login.
Ron Smalec what you are describing could beMC-65040as wellPlease link to this comment in the description of the report.
The following is based on decompiled version of Minecraft 1.8 using MCP. All method and class names are the names used in the decompiled version.
There are two problems that cause these bugs:
Leads not rendering when summoning leashed mob
The problem here is that the public void readEntityFromNBT(NBTTagCompound tagCompund) method of the net.minecraft.entity.EntityLiving class which reads the NBT data only sets the Leash compound as value for the leashNBTTag variable. The entity this mob is leashed to is set once the protected void updateLeashedState() method is called which happens at some point when the mob is updated. The problem is that the packets send to the client do not contain this values of this tag. That is why the packet net.minecraft.network.play.server.S1BPacketEntityAttach exists. This packet is only send when the public void setLeashedToEntity(Entity entityIn, boolean sendAttachNotification) method of the net.minecraft.entity.EntityLiving class is called, or when the player loads a chunk. As the NBT reading method is also called when an entity is loaded calling the protected void updateLeashedState() method would send the packet twice (as the player loading the chunk would receive this packet as well).
Leads sometimes not rendering when loading a leashed mob
The problem here is that eventually the player is updated before another entity. This causes the entity to only have the NBT data of the entity it is leashed to set, but not the actual entity as leashedToEntity. This means no packet net.minecraft.network.play.server.S1BPacketEntityAttach will be send.
Possible fix
A possible fix would be to not send a net.minecraft.network.play.server.S1BPacketEntityAttach packet when a player loads a chunk, but instead have the private void recreateLeash() method call the public void setLeashedToEntity(Entity entityIn, boolean sendAttachNotification) method: