use of net.glowstone.net.message.play.entity.CollectItemMessage in project Glowstone by GlowstoneMC.
the class GlowLivingEntity method playPickupItemAnimation.
@Override
public void playPickupItemAnimation(@NotNull Item item, int quantity) {
CollectItemMessage message = new CollectItemMessage(item.getEntityId(), getEntityId(), quantity);
world.playSound(location, Sound.ENTITY_ITEM_PICKUP, 0.3f, (float) (1 + Math.random()));
world.getRawPlayers().stream().filter(other -> other.canSeeEntity(this)).forEach(other -> other.getSession().send(message));
item.remove();
}
Aggregations