Search in sources :

Example 1 with MetadataMap

use of net.glowstone.entity.meta.MetadataMap in project Glowstone by GlowstoneMC.

the class GlowHorse method createSpawnMessage.

@Override
public List<Message> createSpawnMessage() {
    List<Message> messages = super.createSpawnMessage();
    MetadataMap map = new MetadataMap(GlowHorse.class);
    map.set(MetadataIndex.HORSE_STYLE, getHorseStyleData());
    map.set(MetadataIndex.HORSE_ARMOR, getHorseArmorData());
    messages.add(new EntityMetadataMessage(id, map.getEntryList()));
    return messages;
}
Also used : MetadataMap(net.glowstone.entity.meta.MetadataMap) EntityMetadataMessage(net.glowstone.net.message.play.entity.EntityMetadataMessage) Message(com.flowpowered.network.Message) EntityMetadataMessage(net.glowstone.net.message.play.entity.EntityMetadataMessage)

Example 2 with MetadataMap

use of net.glowstone.entity.meta.MetadataMap in project Glowstone by GlowstoneMC.

the class GlowAbstractHorse method createSpawnMessage.

@Override
public List<Message> createSpawnMessage() {
    List<Message> messages = super.createSpawnMessage();
    MetadataMap map = new MetadataMap(GlowHorse.class);
    map.set(MetadataIndex.ABSTRACT_HORSE_FLAGS, getHorseFlags());
    messages.add(new EntityMetadataMessage(id, map.getEntryList()));
    return messages;
}
Also used : MetadataMap(net.glowstone.entity.meta.MetadataMap) EntityMetadataMessage(net.glowstone.net.message.play.entity.EntityMetadataMessage) Message(com.flowpowered.network.Message) EntityMetadataMessage(net.glowstone.net.message.play.entity.EntityMetadataMessage)

Example 3 with MetadataMap

use of net.glowstone.entity.meta.MetadataMap in project Glowstone by GlowstoneMC.

the class GlowAgeable method createSpawnMessage.

@Override
public List<Message> createSpawnMessage() {
    List<Message> messages = super.createSpawnMessage();
    MetadataMap map = new MetadataMap(GlowAgeable.class);
    map.set(MetadataIndex.AGE_ISBABY, !isAdult());
    messages.add(new EntityMetadataMessage(id, map.getEntryList()));
    return messages;
}
Also used : MetadataMap(net.glowstone.entity.meta.MetadataMap) EntityMetadataMessage(net.glowstone.net.message.play.entity.EntityMetadataMessage) Message(com.flowpowered.network.Message) InteractEntityMessage(net.glowstone.net.message.play.player.InteractEntityMessage) EntityMetadataMessage(net.glowstone.net.message.play.entity.EntityMetadataMessage)

Aggregations

Message (com.flowpowered.network.Message)3 MetadataMap (net.glowstone.entity.meta.MetadataMap)3 EntityMetadataMessage (net.glowstone.net.message.play.entity.EntityMetadataMessage)3 InteractEntityMessage (net.glowstone.net.message.play.player.InteractEntityMessage)1