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 enumstatic interface(package private) static class(package private) static class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ServerboundInteractPacket.Action(package private) static final ServerboundInteractPacket.Actionprivate final intstatic final StreamCodec<FriendlyByteBuf, ServerboundInteractPacket> private final boolean -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateServerboundInteractPacket(int p_179598_, boolean p_179599_, ServerboundInteractPacket.Action p_179600_) privateServerboundInteractPacket(FriendlyByteBuf p_179602_) -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerboundInteractPacketcreateAttackPacket(Entity p_179606_, boolean p_179607_) static ServerboundInteractPacketcreateInteractionPacket(Entity p_179609_, boolean p_179610_, InteractionHand p_179611_) static ServerboundInteractPacketcreateInteractionPacket(Entity p_179613_, boolean p_179614_, InteractionHand p_179615_, Vec3 p_179616_) voiddispatch(ServerboundInteractPacket.Handler p_179618_) getTarget(ServerLevel p_179604_) voidhandle(ServerGamePacketListener p_134055_) booleantype()private voidwrite(FriendlyByteBuf p_134058_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
typein interfacePacket<ServerGamePacketListener>
-
handle
- Specified by:
handlein interfacePacket<ServerGamePacketListener>
-
getTarget
-
isUsingSecondaryAction
public boolean isUsingSecondaryAction() -
dispatch
-