Development Assistance PacketPlayOutEntitySpawn

Discussion in 'Plugin Help/Development/Requests' started by Funergy, Feb 27, 2015.

Thread Status:
Not open for further replies.
  1. Offline

    Funergy

    Hello in 1.7 PacketPlayOutEntitySpawn was just
    new PacketPlayOutEntitySpawn(<my entity>);
    But now it takes 2 fields
    new PacketPlayOutEntitySpawn(<my entity>,<varInt>);
    Anyone knows for what the second arg means? the entity id?

    And BTW this is for an armorstand

    EDIT: found this http://wiki.vg/Protocol#Spawn_Mob but doesnt say that much

    Second EDIT here is my code (the entity doesn't spawn)
    Code:
     public Holograms(Location loc,String s,Player p){
            EntityArmorStand ea = new EntityArmorStand(((CraftWorld)loc.getWorld()).getHandle(),loc.getX(),loc.getY(),loc.getZ());
            ArmorStand as = (ArmorStand) ea.getBukkitEntity();
            as.setBasePlate(false);
            as.setCustomName(s);
            as.setCustomNameVisible(true);
            as.setGravity(false);
            as.setVisible(false);
            as.setSmall(true);
            as.setMaxHealth(10000);
            as.setHealth(as.getMaxHealth());
    
            PacketPlayOutSpawnEntity packet = new PacketPlayOutSpawnEntity(ea,30);
            ((CraftPlayer)p).getHandle().playerConnection.sendPacket(packet);
            System.out.println("Test");
        }
     
    Last edited: Feb 27, 2015
  2. Offline

    mine-care

    Through some back-tracing, i found a class called EntityTrackerEntry where your packet is used widely, mabe with some carefull reading you might be able to figure that out :3 please share it with us, its really intresting!
     
Thread Status:
Not open for further replies.

Share This Page