Armorstand using PacketPlayOutSpawnEntityLiving is not displayed

Discussion in 'Plugin Development' started by whereisthemonkey, Jan 2, 2016.

Thread Status:
Not open for further replies.
  1. I have the following code:

    PHP:
    public void spawn(){
            
    PacketPlayOutSpawnEntityLiving  packet = new PacketPlayOutSpawnEntityLiving ();
            
    setValue(packet"a"entityID);
            
    setValue(packet"b", (byte)78);
         
            
    setValue(packet"c", (int) MathHelper.floor(location.getX() * 32.0D));
            
    setValue(packet"d", (int) MathHelper.floor(location.getY() * 32.0D));
            
    setValue(packet"e", (int) MathHelper.floor(location.getZ() * 32.0D));
         
            
    setValue(packet"f", (byte) ((int) location.getYaw() * 256.0F 360.0F));
            
    setValue(packet"g", (byte) ((int) location.getPitch() * 256.0F 360.0F));
            
    setValue(packet"h", (byte) ((int) location.getPitch() * 256.0F 360.0F));
         
            
    setValue(packet"i", (byte)0);
            
    setValue(packet"j", (byte)0);
            
    setValue(packet"k", (byte)0);
         
            
    w.a(620.0F);
         
            
    setValue(packet"l"w);
         
            
    setRotation((byte) ((int) location.getYaw() * 256.0F 360.0F), (byte) ((int) location.getPitch() * 256.0F 360.0F));
         
            
    npcList.add(this);
            
    packetList.put(thispacket);
         
            
    save();
         
            
    sendPacket(packet);
        }
    Whenever I spawn an armorstand, it is not created/displayed.
    Is that because armorstand is not a living entity?

    Thanks for any help
     
  2. Offline

    teej107

    When in doubt, check the JavaDocs. Try it on a different entity to see if it is actually a problem with the armor stand or all entities. I'm assuming your method names are self explanatory.
     
  3. It's only the armor stand that is not working. I know how to use Java Doc and I know what I am doing. So please if you want to help me give me a real explanation not a you can see the JavaDoc
     
  4. Offline

    teej107

Thread Status:
Not open for further replies.

Share This Page