Class ServerboundInteractPacket
java.lang.Object
net.minecraft.network.protocol.game.ServerboundInteractPacket
- All Implemented Interfaces:
Packet<ServerGamePacketListener>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interface
(package private) static enum
static interface
(package private) static class
(package private) static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ServerboundInteractPacket.Action
(package private) static final ServerboundInteractPacket.Action
private final int
static final StreamCodec
<FriendlyByteBuf, ServerboundInteractPacket> private final boolean
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
ServerboundInteractPacket
(int pEntityId, boolean pUsingSecondaryAction, ServerboundInteractPacket.Action pAction) private
ServerboundInteractPacket
(FriendlyByteBuf p_179602_) -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerboundInteractPacket
createAttackPacket
(Entity pEntity, boolean pUsingSecondaryAction) static ServerboundInteractPacket
createInteractionPacket
(Entity pEntity, boolean pUsingSecondaryAction, InteractionHand pHand) static ServerboundInteractPacket
createInteractionPacket
(Entity pEntity, boolean pUsingSecondaryAction, InteractionHand pHand, Vec3 pInteractionLocation) void
dispatch
(ServerboundInteractPacket.Handler pHandler) getTarget
(ServerLevel pLevel) void
handle
(ServerGamePacketListener pHandler) Passes this Packet on to the NetHandler for processing.boolean
type()
private void
write
(FriendlyByteBuf p_134058_) Writes the raw packet data to the data stream.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
-
entityId
private final int entityId -
action
-
usingSecondaryAction
private final boolean usingSecondaryAction -
ATTACK_ACTION
-
-
Constructor Details
-
ServerboundInteractPacket
private ServerboundInteractPacket(int pEntityId, boolean pUsingSecondaryAction, ServerboundInteractPacket.Action pAction) -
ServerboundInteractPacket
-
-
Method Details
-
createAttackPacket
public static ServerboundInteractPacket createAttackPacket(Entity pEntity, boolean pUsingSecondaryAction) -
createInteractionPacket
public static ServerboundInteractPacket createInteractionPacket(Entity pEntity, boolean pUsingSecondaryAction, InteractionHand pHand) -
createInteractionPacket
public static ServerboundInteractPacket createInteractionPacket(Entity pEntity, boolean pUsingSecondaryAction, InteractionHand pHand, Vec3 pInteractionLocation) -
write
Writes the raw packet data to the data stream. -
type
- Specified by:
type
in interfacePacket<ServerGamePacketListener>
-
handle
Passes this Packet on to the NetHandler for processing.- Specified by:
handle
in interfacePacket<ServerGamePacketListener>
-
getTarget
-
isUsingSecondaryAction
public boolean isUsingSecondaryAction() -
dispatch
-