use of net.minecraft.server.v1_16_R3.ParticleParamBlock in project RoseStacker by Rosewood-Development.
the class HologramImpl method update.
@Override
protected void update(Player player) {
Boolean visible = this.watchers.get(player);
if (visible == null)
return;
List<DataWatcher.Item<?>> dataItems = new ArrayList<>();
Optional<IChatBaseComponent> nameComponent = Optional.of(CraftChatMessage.fromStringOrNull(this.text));
dataItems.add(new DataWatcher.Item<>(DataWatcherRegistry.f.a(2), nameComponent));
dataItems.add(new DataWatcher.Item<>(DataWatcherRegistry.i.a(3), visible));
dataItems.add(new DataWatcher.Item<>(DataWatcherRegistry.c.a(7), 0.5F));
dataItems.add(new DataWatcher.Item<>(DataWatcherRegistry.i.a(9), true));
dataItems.add(new DataWatcher.Item<>(DataWatcherRegistry.j.a(10), new ParticleParamBlock(Particles.BLOCK, Blocks.AIR.getBlockData())));
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(this.entityId, new DataWatcherWrapper(dataItems), false);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}
use of net.minecraft.server.v1_16_R3.ParticleParamBlock in project RoseStacker by Rosewood-Development.
the class HologramImpl method update.
@Override
protected void update(Player player) {
Boolean visible = this.watchers.get(player);
if (visible == null)
return;
List<DataWatcher.Item<?>> dataItems = new ArrayList<>();
Optional<IChatBaseComponent> nameComponent = Optional.of(CraftChatMessage.fromStringOrNull(this.text));
dataItems.add(new DataWatcher.Item<>(DataWatcherRegistry.f.a(2), nameComponent));
dataItems.add(new DataWatcher.Item<>(DataWatcherRegistry.i.a(3), visible));
dataItems.add(new DataWatcher.Item<>(DataWatcherRegistry.c.a(7), 0.5F));
dataItems.add(new DataWatcher.Item<>(DataWatcherRegistry.i.a(9), true));
dataItems.add(new DataWatcher.Item<>(DataWatcherRegistry.j.a(10), new ParticleParamBlock(Particles.BLOCK, Blocks.AIR.getBlockData())));
PacketPlayOutEntityMetadata packet = new PacketPlayOutEntityMetadata(this.entityId, new DataWatcherWrapper(dataItems), false);
((CraftPlayer) player).getHandle().playerConnection.sendPacket(packet);
}
Aggregations