Class ClientboundBossEventPacket
java.lang.Object
org.geysermc.mcprotocollib.protocol.packet.ingame.clientbound.ClientboundBossEventPacket
- All Implemented Interfaces:
Packet,MinecraftPacket
-
Constructor Summary
ConstructorsConstructorDescriptionClientboundBossEventPacket(io.netty.buffer.ByteBuf in) ClientboundBossEventPacket(UUID uuid, boolean darkenSky, boolean playEndMusic, boolean showFog) ClientboundBossEventPacket(UUID uuid, float health) ClientboundBossEventPacket(UUID uuid, net.kyori.adventure.text.Component title) ClientboundBossEventPacket(UUID uuid, net.kyori.adventure.text.Component title, float health, BossBarColor color, BossBarDivision division, boolean darkenSky, boolean playEndMusic, boolean showFog) ClientboundBossEventPacket(UUID uuid, BossBarColor color, BossBarDivision division) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanboolean@Nullable BossBarColorgetColor()@Nullable BossBarDivisionfloat@Nullable net.kyori.adventure.text.ComponentgetTitle()getUuid()inthashCode()booleanbooleanbooleanvoidserialize(io.netty.buffer.ByteBuf out) booleanGets whether the packet should run on an async game thread rather than blocking the network (Netty) thread.toString()withAction(BossBarAction action) withColor(@Nullable BossBarColor color) withDarkenSky(boolean darkenSky) withDivision(@Nullable BossBarDivision division) withHealth(float health) withPlayEndMusic(boolean playEndMusic) withShowFog(boolean showFog) withTitle(@Nullable net.kyori.adventure.text.Component title) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.geysermc.mcprotocollib.network.packet.Packet
isTerminal
-
Constructor Details
-
ClientboundBossEventPacket
-
ClientboundBossEventPacket
-
ClientboundBossEventPacket
-
ClientboundBossEventPacket
-
ClientboundBossEventPacket
public ClientboundBossEventPacket(UUID uuid, boolean darkenSky, boolean playEndMusic, boolean showFog) -
ClientboundBossEventPacket
public ClientboundBossEventPacket(UUID uuid, net.kyori.adventure.text.Component title, float health, BossBarColor color, BossBarDivision division, boolean darkenSky, boolean playEndMusic, boolean showFog) -
ClientboundBossEventPacket
public ClientboundBossEventPacket(io.netty.buffer.ByteBuf in)
-
-
Method Details
-
serialize
public void serialize(io.netty.buffer.ByteBuf out) - Specified by:
serializein interfaceMinecraftPacket
-
shouldRunOnGameThread
public boolean shouldRunOnGameThread()Description copied from interface:PacketGets whether the packet should run on an async game thread rather than blocking the network (Netty) thread. Packets that qualify for this are usually packets with an ensureRunningOnSameThread call at the top of their packet listener method in the Minecraft code. Packets which need extra attention because they aren't "fully" handled async are marked using // GAME THREAD DETAIL comments in the MCProtocolLib code.- Specified by:
shouldRunOnGameThreadin interfacePacket- Returns:
- Whether the packet be handled async from the Netty thread.
-
getUuid
-
getAction
-
getTitle
public @Nullable net.kyori.adventure.text.Component getTitle() -
getHealth
public float getHealth() -
getColor
-
getDivision
-
isDarkenSky
public boolean isDarkenSky() -
isPlayEndMusic
public boolean isPlayEndMusic() -
isShowFog
public boolean isShowFog() -
equals
-
canEqual
-
hashCode
public int hashCode() -
toString
-
withUuid
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withAction
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withTitle
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withHealth
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withColor
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withDivision
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withDarkenSky
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withPlayEndMusic
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-
withShowFog
- Returns:
- a clone of this object, except with this updated property (returns
thisif an identical value is passed).
-