Search in sources :

Example 6 with SpawnObjectMessage

use of net.glowstone.net.message.play.entity.SpawnObjectMessage in project Glowstone by GlowstoneMC.

the class GlowEvokerFangs method createSpawnMessage.

@Override
public List<Message> createSpawnMessage() {
    List<Message> result = new LinkedList<>();
    double x = location.getX();
    double y = location.getY();
    double z = location.getZ();
    int yaw = Position.getIntYaw(location);
    int pitch = Position.getIntPitch(location);
    result.add(new SpawnObjectMessage(id, UUID.randomUUID(), 79, x, y, z, pitch, yaw, 0, 0, 0, 0));
    return result;
}
Also used : SpawnObjectMessage(net.glowstone.net.message.play.entity.SpawnObjectMessage) Message(com.flowpowered.network.Message) SpawnObjectMessage(net.glowstone.net.message.play.entity.SpawnObjectMessage) LinkedList(java.util.LinkedList)

Example 7 with SpawnObjectMessage

use of net.glowstone.net.message.play.entity.SpawnObjectMessage in project Glowstone by GlowstoneMC.

the class GlowMinecart method createSpawnMessage.

@Override
public List<Message> createSpawnMessage() {
    double x = location.getX();
    double y = location.getY();
    double z = location.getZ();
    int yaw = Position.getIntYaw(location);
    int pitch = Position.getIntPitch(location);
    return Collections.singletonList(new SpawnObjectMessage(id, getUniqueId(), 10, x, y, z, pitch, yaw, type.ordinal()));
}
Also used : SpawnObjectMessage(net.glowstone.net.message.play.entity.SpawnObjectMessage)

Aggregations

SpawnObjectMessage (net.glowstone.net.message.play.entity.SpawnObjectMessage)7 Message (com.flowpowered.network.Message)2 LinkedList (java.util.LinkedList)2 UUID (java.util.UUID)1 EntityEquipmentMessage (net.glowstone.net.message.play.entity.EntityEquipmentMessage)1 EntityMetadataMessage (net.glowstone.net.message.play.entity.EntityMetadataMessage)1 PEInventorySlot (org.dragonet.inventory.PEInventorySlot)1 AddItemEntityPacket (org.dragonet.net.packet.minecraft.AddItemEntityPacket)1 PEPacket (org.dragonet.net.packet.minecraft.PEPacket)1