Search in sources :

Example 1 with EntityAnimationMessage

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

the class GlowLivingEntity method playAnimation.

public void playAnimation(@NotNull EntityAnimation animation) {
    EntityAnimationMessage message = new EntityAnimationMessage(getEntityId(), animation.ordinal());
    getWorld().getRawPlayers().stream().filter(observer -> observer != this && observer.canSeeEntity(this)).forEach(observer -> observer.getSession().send(message));
}
Also used : EntityCategory(org.bukkit.entity.EntityCategory) GlowBlock(net.glowstone.block.GlowBlock) Arrays(java.util.Arrays) BlockType(net.glowstone.block.blocktype.BlockType) ItemTable(net.glowstone.block.ItemTable) SlimeSplitEvent(org.bukkit.event.entity.SlimeSplitEvent) EntityRemoveEffectMessage(net.glowstone.net.message.play.entity.EntityRemoveEffectMessage) PlayerUnleashEntityEvent(org.bukkit.event.player.PlayerUnleashEntityEvent) BlockIterator(org.bukkit.util.BlockIterator) TaskManager(net.glowstone.entity.ai.TaskManager) Location(org.bukkit.Location) Monster(org.bukkit.entity.Monster) Map(java.util.Map) EntityAnimation(org.bukkit.EntityAnimation) Material(org.bukkit.Material) EquipmentSlot(org.bukkit.inventory.EquipmentSlot) Position(net.glowstone.util.Position) Entity(org.bukkit.entity.Entity) Set(java.util.Set) Math.sin(java.lang.Math.sin) EntityResurrectEvent(org.bukkit.event.entity.EntityResurrectEvent) Action(net.glowstone.net.message.play.player.InteractEntityMessage.Action) ItemStack(org.bukkit.inventory.ItemStack) TargetEntityInfo(com.destroystokyo.paper.entity.TargetEntityInfo) MetadataIndex(net.glowstone.entity.meta.MetadataIndex) LootingManager(net.glowstone.util.loot.LootingManager) ProjectileLaunchEvent(org.bukkit.event.entity.ProjectileLaunchEvent) GlowSlime(net.glowstone.entity.monster.GlowSlime) PotionEffectType(org.bukkit.potion.PotionEffectType) Key(net.glowstone.entity.AttributeManager.Key) EntityToggleGlideEvent(org.bukkit.event.entity.EntityToggleGlideEvent) Message(com.flowpowered.network.Message) ArrayList(java.util.ArrayList) MobState(net.glowstone.entity.ai.MobState) GlowLeashHitch(net.glowstone.entity.objects.GlowLeashHitch) GameRules(net.glowstone.constants.GameRules) ThreadLocalRandom(java.util.concurrent.ThreadLocalRandom) MemoryKey(org.bukkit.entity.memory.MemoryKey) EventFactory(net.glowstone.EventFactory) Vector(org.bukkit.util.Vector) Criterias(org.bukkit.scoreboard.Criterias) EntityEffect(org.bukkit.EntityEffect) AttributeInstance(org.bukkit.attribute.AttributeInstance) Statistic(org.bukkit.Statistic) Projectile(org.bukkit.entity.Projectile) BlockFace(org.bukkit.block.BlockFace) Player(org.bukkit.entity.Player) Objective(org.bukkit.scoreboard.Objective) Block(org.bukkit.block.Block) GlowProjectile(net.glowstone.entity.projectile.GlowProjectile) EquipmentMonitor(net.glowstone.inventory.EquipmentMonitor) InteractEntityMessage(net.glowstone.net.message.play.player.InteractEntityMessage) EntityHeadRotationMessage(net.glowstone.net.message.play.entity.EntityHeadRotationMessage) ExperienceSplitter(net.glowstone.util.ExperienceSplitter) LootData(net.glowstone.util.loot.LootData) EntityDamageByEntityEvent(org.bukkit.event.entity.EntityDamageByEntityEvent) Math.cos(java.lang.Math.cos) DamageCause(org.bukkit.event.entity.EntityDamageEvent.DamageCause) CollectItemMessage(net.glowstone.net.message.play.entity.CollectItemMessage) Collection(java.util.Collection) PlayerLeashEntityEvent(org.bukkit.event.entity.PlayerLeashEntityEvent) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Sound(org.bukkit.Sound) UUID(java.util.UUID) EntityType(org.bukkit.entity.EntityType) LivingEntity(org.bukkit.entity.LivingEntity) EntityEffectMessage(net.glowstone.net.message.play.entity.EntityEffectMessage) EntityAirChangeEvent(org.bukkit.event.entity.EntityAirChangeEvent) Collectors(java.util.stream.Collectors) Nullable(org.jetbrains.annotations.Nullable) PlayerDeathEvent(org.bukkit.event.entity.PlayerDeathEvent) List(java.util.List) NotNull(org.jetbrains.annotations.NotNull) FluidCollisionMode(org.bukkit.FluidCollisionMode) Setter(lombok.Setter) Getter(lombok.Getter) EntityEquipmentMessage(net.glowstone.net.message.play.entity.EntityEquipmentMessage) Item(org.bukkit.entity.Item) EntityAnimationMessage(net.glowstone.net.message.play.entity.EntityAnimationMessage) GlowExperienceOrb(net.glowstone.entity.objects.GlowExperienceOrb) GlowWolf(net.glowstone.entity.passive.GlowWolf) InventoryUtil(net.glowstone.util.InventoryUtil) EntityDeathEvent(org.bukkit.event.entity.EntityDeathEvent) GameMode(org.bukkit.GameMode) RayUtil(net.glowstone.util.RayUtil) GlowSession(net.glowstone.net.GlowSession) GlowPotionEffect(net.glowstone.constants.GlowPotionEffect) LinkedList(java.util.LinkedList) Color(org.bukkit.Color) EntityDamageEvent(org.bukkit.event.entity.EntityDamageEvent) HumanEntity(org.bukkit.entity.HumanEntity) Attribute(org.bukkit.attribute.Attribute) Iterator(java.util.Iterator) SoundUtil(net.glowstone.util.SoundUtil) PotionEffect(org.bukkit.potion.PotionEffect) TargetBlockInfo(com.destroystokyo.paper.block.TargetBlockInfo) RayTraceResult(org.bukkit.util.RayTraceResult) Fireball(org.bukkit.entity.Fireball) EntityEquipment(org.bukkit.inventory.EntityEquipment) Collections(java.util.Collections) EntityAnimationMessage(net.glowstone.net.message.play.entity.EntityAnimationMessage)

Example 2 with EntityAnimationMessage

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

the class GlowPlayer method playAnimationToSelf.

public void playAnimationToSelf(EntityAnimation animation) {
    EntityAnimationMessage message = new EntityAnimationMessage(getEntityId(), animation.ordinal());
    getSession().send(message);
}
Also used : EntityAnimationMessage(net.glowstone.net.message.play.entity.EntityAnimationMessage)

Aggregations

EntityAnimationMessage (net.glowstone.net.message.play.entity.EntityAnimationMessage)2 TargetBlockInfo (com.destroystokyo.paper.block.TargetBlockInfo)1 TargetEntityInfo (com.destroystokyo.paper.entity.TargetEntityInfo)1 Message (com.flowpowered.network.Message)1 Math.cos (java.lang.Math.cos)1 Math.sin (java.lang.Math.sin)1 ArrayList (java.util.ArrayList)1 Arrays (java.util.Arrays)1 Collection (java.util.Collection)1 Collections (java.util.Collections)1 Iterator (java.util.Iterator)1 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Map (java.util.Map)1 Set (java.util.Set)1 UUID (java.util.UUID)1 ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 ThreadLocalRandom (java.util.concurrent.ThreadLocalRandom)1 Collectors (java.util.stream.Collectors)1 Getter (lombok.Getter)1