类 ServerGamePacketListenerImpl
java.lang.Object
net.minecraft.server.network.ServerCommonPacketListenerImpl
net.minecraft.server.network.ServerGamePacketListenerImpl
- 所有已实现的接口:
PacketListener
,ServerCommonPacketListener
,ServerCookiePacketListener
,ServerGamePacketListener
,ServerPacketListener
,ServerPingPacketListener
,ServerboundPacketListener
,TickablePacketListener
,ServerPlayerConnection
public class ServerGamePacketListenerImpl
extends ServerCommonPacketListenerImpl
implements ServerGamePacketListener, ServerPlayerConnection, TickablePacketListener
-
嵌套类概要
嵌套类 -
字段概要
字段修饰符和类型字段说明private int
private int
private int
private Vec3
private int
private int
private static final Component
private final FutureChain
private RemoteChatSession
private final TickThrottler
final PlayerChunkSender
private boolean
private boolean
private final TickThrottler
private double
private double
private double
private static final Component
private int
private double
private double
private double
private final LastSeenMessagesValidator
private Entity
(专用程序包) static final org.slf4j.Logger
private static final int
private static final int
private final MessageSignatureCache
private static final int
private boolean
private int
private SignedMessageChain.Decoder
private int
private static final int
private double
private double
private double
private double
private double
private double
private boolean
从类继承的字段 net.minecraft.server.network.ServerCommonPacketListenerImpl
connection, DISCONNECT_UNEXPECTED_QUERY, LATENCY_CHECK_INTERVAL, server
-
构造器概要
构造器构造器说明ServerGamePacketListenerImpl
(MinecraftServer p_9770_, Connection p_9771_, ServerPlayer p_9772_, CommonListenerCookie p_300908_) -
方法概要
修饰符和类型方法说明void
ackBlockChangesUpTo
(int p_215202_) private static void
addBlockDataToItem
(BlockState p_377004_, ServerLevel p_375777_, BlockPos p_376636_, ItemStack p_377811_) void
addPendingMessage
(PlayerChatMessage p_242439_) private void
broadcastChatMessage
(PlayerChatMessage p_243277_) private static double
clampHorizontal
(double p_143610_) private static double
clampVertical
(double p_143654_) private <S> Map
<String, PlayerChatMessage> collectSignedArguments
(ServerboundChatCommandSignedPacket p_333226_, SignableCommand<S> p_250039_, LastSeenMessages p_249207_) private <S> Map
<String, PlayerChatMessage> collectUnsignedArguments
(List<SignableCommand.Argument<S>> p_328249_) private static boolean
containsInvalidValues
(double p_143664_, double p_143665_, double p_143666_, float p_143667_, float p_143668_) private static <S> SignedMessageChain.DecodeException
createSignedArgumentMismatchException
(String p_328555_, List<ArgumentSignatures.Entry> p_331214_, List<SignableCommand.Argument<S>> p_329273_) private void
private Filterable
<String> filterableFromOutgoing
(FilteredText p_328315_) private CompletableFuture
<FilteredText> filterTextPacket
(String p_243213_) private CompletableFuture
<List<FilteredText>> filterTextPacket
(List<String> p_243258_) private <T,
R> CompletableFuture <R> filterTextPacket
(T p_243240_, BiFunction<TextFilter, T, CompletableFuture<R>> p_243271_) private int
getMaximumFlyingTicks
(Entity p_331182_) private PlayerChatMessage
getSignedMessage
(ServerboundChatPacket p_251061_, LastSeenMessages p_250566_) void
void
void
handleAnimate
(ServerboundSwingPacket p_9926_) void
void
void
void
handleChat
(ServerboundChatPacket p_9841_) void
handleChatAck
(ServerboundChatAckPacket p_242387_) void
handleChatCommand
(ServerboundChatCommandPacket p_215225_) void
void
void
void
void
void
void
void
void
void
void
void
void
void
handleEditBook
(ServerboundEditBookPacket p_9862_) void
void
handleInteract
(ServerboundInteractPacket p_9866_) void
void
private void
void
void
void
void
void
void
handlePingRequest
(ServerboundPingRequestPacket p_332170_) void
void
void
void
void
private void
handlePlayerKnownMovement
(Vec3 p_367333_) void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
handleUseItem
(ServerboundUseItemPacket p_9932_) void
boolean
private static boolean
isChatMessageIllegal
(String p_215215_) private boolean
isPlayerCollidingWithAnythingNew
(LevelReader p_289008_, AABB p_288986_, double p_288990_, double p_288991_, double p_288967_) private boolean
noBlocksAround
(Entity p_9794_) void
onDisconnect
(DisconnectionDetails p_342442_) private com.mojang.brigadier.ParseResults
<CommandSourceStack> parseCommand
(String p_242938_) private void
performSignedChatCommand
(ServerboundChatCommandSignedPacket p_335197_, LastSeenMessages p_250484_) private void
performUnsignedChatCommand
(String p_334078_) protected com.mojang.authlib.GameProfile
private void
private void
resetPlayerChatState
(RemoteChatSession p_253823_) void
void
sendDisguisedChatMessage
(Component p_251804_, ChatType.Bound p_250040_) void
sendPlayerChatMessage
(PlayerChatMessage p_250321_, ChatType.Bound p_250910_) private boolean
shouldCheckPlayerMovement
(boolean p_366249_) boolean
shouldHandleMessage
(Packet<?> p_298646_) private void
signBook
(FilteredText p_215209_, List<FilteredText> p_215210_, int p_215211_) void
void
teleport
(double p_9775_, double p_9776_, double p_9777_, float p_9778_, float p_9779_) void
teleport
(PositionMoveRotation p_369546_, Set<Relative> p_9786_) void
tick()
private void
tryHandleChat
(String p_334915_, Runnable p_336106_) private void
tryPickItem
(ItemStack p_377802_) private Optional
<LastSeenMessages> unpackAndApplyLastSeen
(LastSeenMessages.Update p_249673_) private boolean
private void
updateBookContents
(List<FilteredText> p_9813_, int p_9814_) private void
updateSignText
(ServerboundSignUpdatePacket p_9923_, List<FilteredText> p_9924_) private static boolean
wasBlockPlacementAttempt
(ServerPlayer p_9791_, ItemStack p_9792_) 从类继承的方法 net.minecraft.server.network.ServerCommonPacketListenerImpl
createCookie, disconnect, disconnect, getConnection, getOwner, handleCookieResponse, handleKeepAlive, handlePong, handleResourcePackResponse, isSingleplayerOwner, keepConnectionAlive, latency, onPacketError, resumeFlushing, send, send, suspendFlushing
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
从接口继承的方法 net.minecraft.network.PacketListener
createDisconnectionInfo, fillCrashReport, fillListenerSpecificCrashDetails
从接口继承的方法 net.minecraft.network.ServerboundPacketListener
flow
从接口继承的方法 net.minecraft.network.protocol.common.ServerCommonPacketListener
handleKeepAlive, handlePong, handleResourcePackResponse
从接口继承的方法 net.minecraft.network.protocol.cookie.ServerCookiePacketListener
handleCookieResponse
从接口继承的方法 net.minecraft.network.protocol.game.ServerGamePacketListener
protocol
从接口继承的方法 net.minecraft.network.protocol.game.ServerPacketListener
onPacketError
从接口继承的方法 net.minecraft.server.network.ServerPlayerConnection
send
-
字段详细资料
-
LOGGER
static final org.slf4j.Logger LOGGER -
NO_BLOCK_UPDATES_TO_ACK
private static final int NO_BLOCK_UPDATES_TO_ACK- 另请参阅:
-
TRACKED_MESSAGE_DISCONNECT_THRESHOLD
private static final int TRACKED_MESSAGE_DISCONNECT_THRESHOLD- 另请参阅:
-
MAXIMUM_FLYING_TICKS
private static final int MAXIMUM_FLYING_TICKS- 另请参阅:
-
CHAT_VALIDATION_FAILED
-
INVALID_COMMAND_SIGNATURE
-
MAX_COMMAND_SUGGESTIONS
private static final int MAX_COMMAND_SUGGESTIONS- 另请参阅:
-
player
-
chunkSender
-
tickCount
private int tickCount -
ackBlockChangesUpTo
private int ackBlockChangesUpTo -
chatSpamThrottler
-
dropSpamThrottler
-
firstGoodX
private double firstGoodX -
firstGoodY
private double firstGoodY -
firstGoodZ
private double firstGoodZ -
lastGoodX
private double lastGoodX -
lastGoodY
private double lastGoodY -
lastGoodZ
private double lastGoodZ -
lastVehicle
-
vehicleFirstGoodX
private double vehicleFirstGoodX -
vehicleFirstGoodY
private double vehicleFirstGoodY -
vehicleFirstGoodZ
private double vehicleFirstGoodZ -
vehicleLastGoodX
private double vehicleLastGoodX -
vehicleLastGoodY
private double vehicleLastGoodY -
vehicleLastGoodZ
private double vehicleLastGoodZ -
awaitingPositionFromClient
-
awaitingTeleport
private int awaitingTeleport -
awaitingTeleportTime
private int awaitingTeleportTime -
clientIsFloating
private boolean clientIsFloating -
aboveGroundTickCount
private int aboveGroundTickCount -
clientVehicleIsFloating
private boolean clientVehicleIsFloating -
aboveGroundVehicleTickCount
private int aboveGroundVehicleTickCount -
receivedMovePacketCount
private int receivedMovePacketCount -
knownMovePacketCount
private int knownMovePacketCount -
receivedMovementThisTick
private boolean receivedMovementThisTick -
chatSession
-
signedMessageDecoder
-
lastSeenMessages
-
messageSignatureCache
-
chatMessageChain
-
waitingForSwitchToConfig
private boolean waitingForSwitchToConfig
-
-
构造器详细资料
-
ServerGamePacketListenerImpl
public ServerGamePacketListenerImpl(MinecraftServer p_9770_, Connection p_9771_, ServerPlayer p_9772_, CommonListenerCookie p_300908_)
-
-
方法详细资料
-
tick
public void tick()- 指定者:
tick
在接口中TickablePacketListener
-
getMaximumFlyingTicks
-
resetPosition
public void resetPosition() -
isAcceptingMessages
public boolean isAcceptingMessages()- 指定者:
isAcceptingMessages
在接口中PacketListener
-
shouldHandleMessage
- 指定者:
shouldHandleMessage
在接口中PacketListener
-
playerProfile
protected com.mojang.authlib.GameProfile playerProfile() -
filterTextPacket
private <T,R> CompletableFuture<R> filterTextPacket(T p_243240_, BiFunction<TextFilter, T, CompletableFuture<R>> p_243271_) -
filterTextPacket
-
filterTextPacket
-
handlePlayerInput
- 指定者:
handlePlayerInput
在接口中ServerGamePacketListener
-
containsInvalidValues
private static boolean containsInvalidValues(double p_143664_, double p_143665_, double p_143666_, float p_143667_, float p_143668_) -
clampHorizontal
private static double clampHorizontal(double p_143610_) -
clampVertical
private static double clampVertical(double p_143654_) -
handleMoveVehicle
- 指定者:
handleMoveVehicle
在接口中ServerGamePacketListener
-
noBlocksAround
-
handleAcceptTeleportPacket
-
handleAcceptPlayerLoad
-
handleRecipeBookSeenRecipePacket
-
handleBundleItemSelectedPacket
-
handleRecipeBookChangeSettingsPacket
-
handleSeenAdvancements
-
handleCustomCommandSuggestions
-
handleSetCommandBlock
-
handleSetCommandMinecart
-
handlePickItemFromBlock
-
addBlockDataToItem
private static void addBlockDataToItem(BlockState p_377004_, ServerLevel p_375777_, BlockPos p_376636_, ItemStack p_377811_) -
handlePickItemFromEntity
-
tryPickItem
-
handleRenameItem
- 指定者:
handleRenameItem
在接口中ServerGamePacketListener
-
handleSetBeaconPacket
-
handleSetStructureBlock
-
handleSetJigsawBlock
- 指定者:
handleSetJigsawBlock
在接口中ServerGamePacketListener
-
handleJigsawGenerate
- 指定者:
handleJigsawGenerate
在接口中ServerGamePacketListener
-
handleSelectTrade
- 指定者:
handleSelectTrade
在接口中ServerGamePacketListener
-
handleEditBook
- 指定者:
handleEditBook
在接口中ServerGamePacketListener
-
updateBookContents
-
signBook
-
filterableFromOutgoing
-
handleEntityTagQuery
- 指定者:
handleEntityTagQuery
在接口中ServerGamePacketListener
-
handleContainerSlotStateChanged
-
handleBlockEntityTagQuery
-
handleMovePlayer
- 指定者:
handleMovePlayer
在接口中ServerGamePacketListener
-
shouldCheckPlayerMovement
private boolean shouldCheckPlayerMovement(boolean p_366249_) -
updateAwaitingTeleport
private boolean updateAwaitingTeleport() -
isPlayerCollidingWithAnythingNew
private boolean isPlayerCollidingWithAnythingNew(LevelReader p_289008_, AABB p_288986_, double p_288990_, double p_288991_, double p_288967_) -
teleport
public void teleport(double p_9775_, double p_9776_, double p_9777_, float p_9778_, float p_9779_) -
teleport
-
handlePlayerAction
- 指定者:
handlePlayerAction
在接口中ServerGamePacketListener
-
wasBlockPlacementAttempt
-
handleUseItemOn
- 指定者:
handleUseItemOn
在接口中ServerGamePacketListener
-
handleUseItem
- 指定者:
handleUseItem
在接口中ServerGamePacketListener
-
handleTeleportToEntityPacket
-
handlePaddleBoat
- 指定者:
handlePaddleBoat
在接口中ServerGamePacketListener
-
onDisconnect
- 指定者:
onDisconnect
在接口中PacketListener
- 覆盖:
onDisconnect
在类中ServerCommonPacketListenerImpl
-
removePlayerFromWorld
private void removePlayerFromWorld() -
ackBlockChangesUpTo
public void ackBlockChangesUpTo(int p_215202_) -
handleSetCarriedItem
- 指定者:
handleSetCarriedItem
在接口中ServerGamePacketListener
-
handleChat
- 指定者:
handleChat
在接口中ServerGamePacketListener
-
handleChatCommand
- 指定者:
handleChatCommand
在接口中ServerGamePacketListener
-
performUnsignedChatCommand
-
handleSignedChatCommand
-
performSignedChatCommand
private void performSignedChatCommand(ServerboundChatCommandSignedPacket p_335197_, LastSeenMessages p_250484_) -
handleMessageDecodeFailure
-
collectSignedArguments
private <S> Map<String,PlayerChatMessage> collectSignedArguments(ServerboundChatCommandSignedPacket p_333226_, SignableCommand<S> p_250039_, LastSeenMessages p_249207_) throws SignedMessageChain.DecodeException -
collectUnsignedArguments
private <S> Map<String,PlayerChatMessage> collectUnsignedArguments(List<SignableCommand.Argument<S>> p_328249_) throws SignedMessageChain.DecodeException -
createSignedArgumentMismatchException
private static <S> SignedMessageChain.DecodeException createSignedArgumentMismatchException(String p_328555_, List<ArgumentSignatures.Entry> p_331214_, List<SignableCommand.Argument<S>> p_329273_) -
parseCommand
-
tryHandleChat
-
unpackAndApplyLastSeen
-
isChatMessageIllegal
-
getSignedMessage
private PlayerChatMessage getSignedMessage(ServerboundChatPacket p_251061_, LastSeenMessages p_250566_) throws SignedMessageChain.DecodeException -
broadcastChatMessage
-
detectRateSpam
private void detectRateSpam() -
handleChatAck
- 指定者:
handleChatAck
在接口中ServerGamePacketListener
-
handleAnimate
- 指定者:
handleAnimate
在接口中ServerGamePacketListener
-
handlePlayerCommand
- 指定者:
handlePlayerCommand
在接口中ServerGamePacketListener
-
addPendingMessage
-
sendPlayerChatMessage
-
sendDisguisedChatMessage
-
getRemoteAddress
-
switchToConfig
public void switchToConfig() -
handlePingRequest
- 指定者:
handlePingRequest
在接口中ServerPingPacketListener
-
handleInteract
- 指定者:
handleInteract
在接口中ServerGamePacketListener
-
handleClientCommand
- 指定者:
handleClientCommand
在接口中ServerGamePacketListener
-
handleContainerClose
- 指定者:
handleContainerClose
在接口中ServerGamePacketListener
-
handleContainerClick
- 指定者:
handleContainerClick
在接口中ServerGamePacketListener
-
handlePlaceRecipe
- 指定者:
handlePlaceRecipe
在接口中ServerGamePacketListener
-
handleContainerButtonClick
-
handleSetCreativeModeSlot
-
handleSignUpdate
- 指定者:
handleSignUpdate
在接口中ServerGamePacketListener
-
updateSignText
-
handlePlayerAbilities
-
handleClientInformation
-
handleChangeDifficulty
-
handleLockDifficulty
- 指定者:
handleLockDifficulty
在接口中ServerGamePacketListener
-
handleChatSessionUpdate
-
handleConfigurationAcknowledged
-
handleChunkBatchReceived
-
handleDebugSampleSubscription
-
resetPlayerChatState
-
handleCustomPayload
-
handleClientTickEnd
- 指定者:
handleClientTickEnd
在接口中ServerGamePacketListener
-
handlePlayerKnownMovement
-
getPlayer
- 指定者:
getPlayer
在接口中ServerPlayerConnection
-