Search in sources :

Example 1 with ParticleBuilder

use of com.destroystokyo.paper.ParticleBuilder in project Glowstone by GlowstoneMC.

the class GlowAreaEffectCloud method createSpawnMessage.

@Override
public List<Message> createSpawnMessage() {
    MetadataMap metadataMap = new MetadataMap(GlowAreaEffectCloud.class);
    metadataMap.set(MetadataIndex.AREAEFFECTCLOUD_COLOR, color);
    metadataMap.set(MetadataIndex.AREAEFFECTCLOUD_RADIUS, radius);
    if (particle != null) {
        metadataMap.set(MetadataIndex.AREAEFFECTCLOUD_PARTICLE, new ParticleBuilder(particle));
    }
    return Arrays.asList(new SpawnObjectMessage(entityId, getUniqueId(), NETWORK_TYPE_ID, location), new EntityMetadataMessage(entityId, metadataMap.getEntryList()));
}
Also used : MetadataMap(net.glowstone.entity.meta.MetadataMap) SpawnObjectMessage(net.glowstone.net.message.play.entity.SpawnObjectMessage) ParticleBuilder(com.destroystokyo.paper.ParticleBuilder) EntityMetadataMessage(net.glowstone.net.message.play.entity.EntityMetadataMessage)

Aggregations

ParticleBuilder (com.destroystokyo.paper.ParticleBuilder)1 MetadataMap (net.glowstone.entity.meta.MetadataMap)1 EntityMetadataMessage (net.glowstone.net.message.play.entity.EntityMetadataMessage)1 SpawnObjectMessage (net.glowstone.net.message.play.entity.SpawnObjectMessage)1