Class ServerboundInteractPacket
java.lang.Object
net.minecraft.network.protocol.game.ServerboundInteractPacket
- All Implemented Interfaces:
Packet<ServerGamePacketListener>
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static interface
(package private) static enum
static interface
(package private) static class
(package private) static class
-
Field Summary
Modifier and TypeFieldDescriptionprivate final ServerboundInteractPacket.Action
(package private) static final ServerboundInteractPacket.Action
private final int
static final StreamCodec
<FriendlyByteBuf, ServerboundInteractPacket> private final boolean
-
Constructor Summary
ModifierConstructorDescriptionprivate
ServerboundInteractPacket
(int p_179598_, boolean p_179599_, ServerboundInteractPacket.Action p_179600_) private
ServerboundInteractPacket
(FriendlyByteBuf p_179602_) -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerboundInteractPacket
createAttackPacket
(Entity p_179606_, boolean p_179607_) static ServerboundInteractPacket
createInteractionPacket
(Entity p_179609_, boolean p_179610_, InteractionHand p_179611_) static ServerboundInteractPacket
createInteractionPacket
(Entity p_179613_, boolean p_179614_, InteractionHand p_179615_, Vec3 p_179616_) void
dispatch
(ServerboundInteractPacket.Handler p_179618_) getTarget
(ServerLevel p_179604_) void
handle
(ServerGamePacketListener p_134055_) boolean
type()
private void
write
(FriendlyByteBuf p_134058_) 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 p_179598_, boolean p_179599_, ServerboundInteractPacket.Action p_179600_) -
ServerboundInteractPacket
-
-
Method Details
-
createAttackPacket
-
createInteractionPacket
public static ServerboundInteractPacket createInteractionPacket(Entity p_179609_, boolean p_179610_, InteractionHand p_179611_) -
createInteractionPacket
public static ServerboundInteractPacket createInteractionPacket(Entity p_179613_, boolean p_179614_, InteractionHand p_179615_, Vec3 p_179616_) -
write
-
type
- Specified by:
type
in interfacePacket<ServerGamePacketListener>
-
handle
- Specified by:
handle
in interfacePacket<ServerGamePacketListener>
-
getTarget
-
isUsingSecondaryAction
public boolean isUsingSecondaryAction() -
dispatch
-