Solved ArmorStand properties not updating

Discussion in 'Plugin Development' started by FoxinatorDev, Nov 24, 2020.

  1. Offline


    I'm trying to create a hologram using NMS but whenever I spawn in the ArmorStand using PacketPlayOutSpawnEntityLiving, it spawns the default armor stand and changes nothing else, even if I try changing its properties. Of course, I could just be really stupid and making a careless mistake but if you have an idea or you know, help is appreciated! :)

    VERSION = 1.16.3

    What I have checked so far:
    - If the properties are actually changing, which they are. They are just not showing in-game.
    - If the armor stand was added, which it is.
    - If the text is null, which it isn't.

     lines.forEach(text -> {
                EntityArmorStand armorStand = new EntityArmorStand(EntityTypes.ARMOR_STAND, worldServer);
                System.out.println("TEXT = " + text);
                armorStand.setCustomName(new ChatComponentText(ChatUtils.format(text)));
                armorStand.setPosition(location.getX(), location.getY(), location.getZ());
                System.out.println("CUSTOM NAME VIS = " + armorStand.getCustomNameVisible());
                System.out.println("INVSIIBLE = " + armorStand.isInvisible());
                System.out.println("SMALL = " + armorStand.isSmall());
                System.out.println("NOGRAV = " + armorStand.isNoGravity());
                System.out.println("BASEPLATE = " + armorStand.hasBasePlate());
                System.out.println("IS MARKER = " + armorStand.isMarker());
                System.out.println("ARMOR STAND ADDED!");
    Nvm I fixed it. I just had to send PacketPlayOutEntityMetadata as well. Why are there extra steps to spawning in mobs now :(
    Last edited: Nov 25, 2020

Share This Page