use of net.glowstone.net.message.play.entity.SpawnObjectMessage in project Glowstone by GlowstoneMC.
the class GlowFallingBlock 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);
// Note the shift amount has changed previously,
// if block data doesn't appear to work check this value.
int blockIdData = getBlockId() | getBlockData() << 12;
return Arrays.asList(new SpawnObjectMessage(id, getUniqueId(), 70, x, y, z, pitch, yaw, blockIdData));
}
use of net.glowstone.net.message.play.entity.SpawnObjectMessage in project Glowstone by GlowstoneMC.
the class GlowFirework method createSpawnMessage.
@Override
public List<Message> createSpawnMessage() {
double x = location.getX();
double y = location.getY();
double z = location.getZ();
return Arrays.asList(new SpawnObjectMessage(entityId, UUID.randomUUID(), EntityNetworkUtil.getObjectId(EntityType.FIREWORK), x, y, z, 0, 0), new EntityMetadataMessage(entityId, metadata.getEntryList()));
}
use of net.glowstone.net.message.play.entity.SpawnObjectMessage in project Glowstone by GlowstoneMC.
the class GlowProjectile 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 Arrays.asList(new SpawnObjectMessage(entityId, getUniqueId(), getObjectId(), x, y, z, pitch, yaw), new EntityMetadataMessage(entityId, metadata.getEntryList()), new EntityVelocityMessage(entityId, getVelocity()));
}
use of net.glowstone.net.message.play.entity.SpawnObjectMessage in project Glowstone by GlowstoneMC.
the class GlowArmorStand 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 Arrays.asList(// TODO: once UUID is documented, actually use the appropriate ID here
new SpawnObjectMessage(id, UUID.randomUUID(), 78, x, y, z, pitch, yaw), new EntityMetadataMessage(id, metadata.getEntryList()), new EntityEquipmentMessage(id, EntityEquipmentMessage.HELD_ITEM, getItemInHand()), new EntityEquipmentMessage(id, EntityEquipmentMessage.BOOTS_SLOT, getBoots()), new EntityEquipmentMessage(id, EntityEquipmentMessage.LEGGINGS_SLOT, getLeggings()), new EntityEquipmentMessage(id, EntityEquipmentMessage.CHESTPLATE_SLOT, getChestplate()), new EntityEquipmentMessage(id, EntityEquipmentMessage.HELMET_SLOT, getHelmet()));
}
use of net.glowstone.net.message.play.entity.SpawnObjectMessage in project Glowstone by GlowstoneMC.
the class GlowTNTPrimed method createSpawnMessage.
@Override
public List<Message> createSpawnMessage() {
double x = location.getX();
double y = location.getY();
double z = location.getZ();
int pitch = Position.getIntPitch(location);
int yaw = Position.getIntYaw(location);
LinkedList<Message> result = new LinkedList<>();
result.add(new SpawnObjectMessage(id, getUniqueId(), 50, x, y, z, pitch, yaw));
return result;
}
Aggregations