Class ClientboundSetPlayerTeamPacket
java.lang.Object
net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket
- All Implemented Interfaces:
Packet<ClientGamePacketListener>
public class ClientboundSetPlayerTeamPacket
extends Object
implements Packet<ClientGamePacketListener>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private static final int
private final int
private static final int
private static final int
private static final int
private static final int
private static final int
private final String
private final Optional
<ClientboundSetPlayerTeamPacket.Parameters> private final Collection
<String> static final StreamCodec
<RegistryFriendlyByteBuf, ClientboundSetPlayerTeamPacket> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ClientboundSetPlayerTeamPacket
(String pName, int pMethod, Optional<ClientboundSetPlayerTeamPacket.Parameters> pParameters, Collection<String> pPlayers) private
-
Method Summary
Modifier and TypeMethodDescriptioncreateAddOrModifyPacket
(PlayerTeam pTeam, boolean pUseAdd) createPlayerPacket
(PlayerTeam pTeam, String pPlayerName, ClientboundSetPlayerTeamPacket.Action pAction) createRemovePacket
(PlayerTeam pTeam) getName()
void
handle
(ClientGamePacketListener pHandler) Passes this Packet on to the NetHandler for processing.private static boolean
shouldHaveParameters
(int pMethod) private static boolean
shouldHavePlayerList
(int pMethod) type()
private void
write
(RegistryFriendlyByteBuf p_323648_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.network.protocol.Packet
isSkippable, isTerminal
-
Field Details
-
STREAM_CODEC
public static final StreamCodec<RegistryFriendlyByteBuf,ClientboundSetPlayerTeamPacket> STREAM_CODEC -
METHOD_ADD
private static final int METHOD_ADD- See Also:
-
METHOD_REMOVE
private static final int METHOD_REMOVE- See Also:
-
METHOD_CHANGE
private static final int METHOD_CHANGE- See Also:
-
METHOD_JOIN
private static final int METHOD_JOIN- See Also:
-
METHOD_LEAVE
private static final int METHOD_LEAVE- See Also:
-
MAX_VISIBILITY_LENGTH
private static final int MAX_VISIBILITY_LENGTH- See Also:
-
MAX_COLLISION_LENGTH
private static final int MAX_COLLISION_LENGTH- See Also:
-
method
private final int method -
name
-
players
-
parameters
-
-
Constructor Details
-
ClientboundSetPlayerTeamPacket
private ClientboundSetPlayerTeamPacket(String pName, int pMethod, Optional<ClientboundSetPlayerTeamPacket.Parameters> pParameters, Collection<String> pPlayers) -
ClientboundSetPlayerTeamPacket
-
-
Method Details
-
createAddOrModifyPacket
public static ClientboundSetPlayerTeamPacket createAddOrModifyPacket(PlayerTeam pTeam, boolean pUseAdd) -
createRemovePacket
-
createPlayerPacket
public static ClientboundSetPlayerTeamPacket createPlayerPacket(PlayerTeam pTeam, String pPlayerName, ClientboundSetPlayerTeamPacket.Action pAction) -
write
-
shouldHavePlayerList
private static boolean shouldHavePlayerList(int pMethod) -
shouldHaveParameters
private static boolean shouldHaveParameters(int pMethod) -
getPlayerAction
-
getTeamAction
-
type
- Specified by:
type
in interfacePacket<ClientGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handle
in interfacePacket<ClientGamePacketListener>
-
getName
-
getPlayers
-
getParameters
-