summon falling block. ProtocolLib

Discussion in 'Plugin Development' started by 2m3v, Feb 17, 2023.

  1. Offline

    2m3v

    Help me please summon a falling block. He needs to set the material, but I don't know how. Looks on many forums, but found nothing.

    code (open)

    Code:
    PacketContainer packet = new PacketContainer(PacketType.Play.Server.SPAWN_ENTITY);
    
    packet.getIntegers().write(0, 22);
    packet.getUUIDs().write(0, UUID.randomUUID());
    packet.getEntityTypeModifier().write(0, EntityType.FALLING_BLOCK);
    
    packet.getDoubles()
    .write(0, fallingLoc.getX())
    .write(1, fallingLoc.getY())
    .write(2, fallingLoc.getZ());
     

Share This Page