Class FakePlayer.FakePlayerNetHandler
java.lang.Object
net.minecraft.server.network.ServerCommonPacketListenerImpl
net.minecraft.server.network.ServerGamePacketListenerImpl
net.neoforged.neoforge.common.util.FakePlayer.FakePlayerNetHandler
- All Implemented Interfaces:
PacketListener
,ServerCommonPacketListener
,ServerCookiePacketListener
,ServerGamePacketListener
,ServerPacketListener
,ServerPingPacketListener
,ServerboundPacketListener
,TickablePacketListener
,ServerPlayerConnection
,ICommonPacketListener
,IServerCommonPacketListenerExtension
,IServerGamePacketListenerExtension
- Enclosing class:
FakePlayer
@ParametersAreNonnullByDefault
private static class FakePlayer.FakePlayerNetHandler
extends ServerGamePacketListenerImpl
-
Field Summary
Fields inherited from class net.minecraft.server.network.ServerGamePacketListenerImpl
chunkSender, player
Fields inherited from class net.minecraft.server.network.ServerCommonPacketListenerImpl
connection, connectionType, LATENCY_CHECK_INTERVAL, server
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
ackBlockChangesUpTo
(int sequence) void
addPendingMessage
(PlayerChatMessage message) void
disconnect
(Component message) Triggers a disconnection with the given reason.void
void
handleAnimate
(ServerboundSwingPacket packet) void
void
void
handleChat
(ServerboundChatPacket packet) void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
handleKeepAlive
(ServerboundKeepAlivePacket p_294627_) void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
void
onDisconnect
(DisconnectionDetails details) void
void
Sends a packet to the target of this listener.void
send
(Packet<?> packet, @Nullable PacketSendListener sendListener) Sends a packet to the client of this listener.void
sendDisguisedChatMessage
(Component content, ChatType.Bound boundChatType) void
sendPlayerChatMessage
(PlayerChatMessage message, ChatType.Bound boundChatType) void
teleport
(double x, double y, double z, float yaw, float pitch) void
teleport
(double x, double y, double z, float yaw, float pitch, Set<RelativeMovement> relativeSet) void
tick()
Methods inherited from class net.minecraft.server.network.ServerGamePacketListenerImpl
getPlayer, getRemoteAddress, handleChunkBatchReceived, handleConfigurationAcknowledged, handleContainerSlotStateChanged, handleDebugSampleSubscription, handlePingRequest, handleSignedChatCommand, isAcceptingMessages, playerProfile, shouldHandleMessage, switchToConfig
Methods inherited from class net.minecraft.server.network.ServerCommonPacketListenerImpl
createCookie, createCookie, disconnect, getConnection, getConnectionType, getMainThreadEventLoop, getOwner, handleCookieResponse, handlePong, isSingleplayerOwner, keepConnectionAlive, latency, resumeFlushing, suspendFlushing
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.neoforged.neoforge.common.extensions.ICommonPacketListener
getConnection, getConnectionType, getMainThreadEventLoop, hasChannel, hasChannel, hasChannel
Methods inherited from interface net.neoforged.neoforge.common.extensions.IServerCommonPacketListenerExtension
send, send
Methods inherited from interface net.neoforged.neoforge.common.extensions.IServerGamePacketListenerExtension
sendBundled, sendBundled
Methods inherited from interface net.minecraft.network.PacketListener
createDisconnectionInfo, fillCrashReport, fillListenerSpecificCrashDetails
Methods inherited from interface net.minecraft.network.ServerboundPacketListener
flow
Methods inherited from interface net.minecraft.network.protocol.common.ServerCommonPacketListener
handlePong
Methods inherited from interface net.minecraft.network.protocol.cookie.ServerCookiePacketListener
handleCookieResponse
Methods inherited from interface net.minecraft.network.protocol.game.ServerGamePacketListener
protocol
Methods inherited from interface net.minecraft.network.protocol.game.ServerPacketListener
onPacketError
-
Field Details
-
DUMMY_CONNECTION
-
-
Constructor Details
-
FakePlayerNetHandler
-
-
Method Details
-
tick
public void tick()- Specified by:
tick
in interfaceTickablePacketListener
- Overrides:
tick
in classServerGamePacketListenerImpl
-
resetPosition
public void resetPosition()- Overrides:
resetPosition
in classServerGamePacketListenerImpl
-
disconnect
Description copied from interface:ICommonPacketListener
Triggers a disconnection with the given reason.- Specified by:
disconnect
in interfaceICommonPacketListener
- Overrides:
disconnect
in classServerCommonPacketListenerImpl
- Parameters:
message
- The reason for the disconnection
-
handlePlayerInput
- Specified by:
handlePlayerInput
in interfaceServerGamePacketListener
- Overrides:
handlePlayerInput
in classServerGamePacketListenerImpl
-
handleMoveVehicle
- Specified by:
handleMoveVehicle
in interfaceServerGamePacketListener
- Overrides:
handleMoveVehicle
in classServerGamePacketListenerImpl
-
handleAcceptTeleportPacket
- Specified by:
handleAcceptTeleportPacket
in interfaceServerGamePacketListener
- Overrides:
handleAcceptTeleportPacket
in classServerGamePacketListenerImpl
-
handleRecipeBookSeenRecipePacket
- Specified by:
handleRecipeBookSeenRecipePacket
in interfaceServerGamePacketListener
- Overrides:
handleRecipeBookSeenRecipePacket
in classServerGamePacketListenerImpl
-
handleRecipeBookChangeSettingsPacket
- Specified by:
handleRecipeBookChangeSettingsPacket
in interfaceServerGamePacketListener
- Overrides:
handleRecipeBookChangeSettingsPacket
in classServerGamePacketListenerImpl
-
handleSeenAdvancements
- Specified by:
handleSeenAdvancements
in interfaceServerGamePacketListener
- Overrides:
handleSeenAdvancements
in classServerGamePacketListenerImpl
-
handleCustomCommandSuggestions
- Specified by:
handleCustomCommandSuggestions
in interfaceServerGamePacketListener
- Overrides:
handleCustomCommandSuggestions
in classServerGamePacketListenerImpl
-
handleSetCommandBlock
- Specified by:
handleSetCommandBlock
in interfaceServerGamePacketListener
- Overrides:
handleSetCommandBlock
in classServerGamePacketListenerImpl
-
handleSetCommandMinecart
- Specified by:
handleSetCommandMinecart
in interfaceServerGamePacketListener
- Overrides:
handleSetCommandMinecart
in classServerGamePacketListenerImpl
-
handlePickItem
- Specified by:
handlePickItem
in interfaceServerGamePacketListener
- Overrides:
handlePickItem
in classServerGamePacketListenerImpl
-
handleRenameItem
- Specified by:
handleRenameItem
in interfaceServerGamePacketListener
- Overrides:
handleRenameItem
in classServerGamePacketListenerImpl
-
handleSetBeaconPacket
- Specified by:
handleSetBeaconPacket
in interfaceServerGamePacketListener
- Overrides:
handleSetBeaconPacket
in classServerGamePacketListenerImpl
-
handleSetStructureBlock
- Specified by:
handleSetStructureBlock
in interfaceServerGamePacketListener
- Overrides:
handleSetStructureBlock
in classServerGamePacketListenerImpl
-
handleSetJigsawBlock
- Specified by:
handleSetJigsawBlock
in interfaceServerGamePacketListener
- Overrides:
handleSetJigsawBlock
in classServerGamePacketListenerImpl
-
handleJigsawGenerate
- Specified by:
handleJigsawGenerate
in interfaceServerGamePacketListener
- Overrides:
handleJigsawGenerate
in classServerGamePacketListenerImpl
-
handleSelectTrade
- Specified by:
handleSelectTrade
in interfaceServerGamePacketListener
- Overrides:
handleSelectTrade
in classServerGamePacketListenerImpl
-
handleEditBook
- Specified by:
handleEditBook
in interfaceServerGamePacketListener
- Overrides:
handleEditBook
in classServerGamePacketListenerImpl
-
handleEntityTagQuery
- Specified by:
handleEntityTagQuery
in interfaceServerGamePacketListener
- Overrides:
handleEntityTagQuery
in classServerGamePacketListenerImpl
-
handleBlockEntityTagQuery
- Specified by:
handleBlockEntityTagQuery
in interfaceServerGamePacketListener
- Overrides:
handleBlockEntityTagQuery
in classServerGamePacketListenerImpl
-
handleMovePlayer
- Specified by:
handleMovePlayer
in interfaceServerGamePacketListener
- Overrides:
handleMovePlayer
in classServerGamePacketListenerImpl
-
teleport
public void teleport(double x, double y, double z, float yaw, float pitch) - Overrides:
teleport
in classServerGamePacketListenerImpl
-
handlePlayerAction
- Specified by:
handlePlayerAction
in interfaceServerGamePacketListener
- Overrides:
handlePlayerAction
in classServerGamePacketListenerImpl
-
handleUseItemOn
- Specified by:
handleUseItemOn
in interfaceServerGamePacketListener
- Overrides:
handleUseItemOn
in classServerGamePacketListenerImpl
-
handleUseItem
- Specified by:
handleUseItem
in interfaceServerGamePacketListener
- Overrides:
handleUseItem
in classServerGamePacketListenerImpl
-
handleTeleportToEntityPacket
- Specified by:
handleTeleportToEntityPacket
in interfaceServerGamePacketListener
- Overrides:
handleTeleportToEntityPacket
in classServerGamePacketListenerImpl
-
handleResourcePackResponse
- Specified by:
handleResourcePackResponse
in interfaceServerCommonPacketListener
- Overrides:
handleResourcePackResponse
in classServerCommonPacketListenerImpl
-
handlePaddleBoat
- Specified by:
handlePaddleBoat
in interfaceServerGamePacketListener
- Overrides:
handlePaddleBoat
in classServerGamePacketListenerImpl
-
onDisconnect
- Specified by:
onDisconnect
in interfacePacketListener
- Overrides:
onDisconnect
in classServerGamePacketListenerImpl
-
send
Description copied from interface:ICommonPacketListener
Sends a packet to the target of this listener.- Specified by:
send
in interfaceICommonPacketListener
- Specified by:
send
in interfaceServerPlayerConnection
- Overrides:
send
in classServerCommonPacketListenerImpl
-
send
Description copied from interface:IServerCommonPacketListenerExtension
Sends a packet to the client of this listener.- Specified by:
send
in interfaceIServerCommonPacketListenerExtension
- Overrides:
send
in classServerCommonPacketListenerImpl
- Parameters:
sendListener
- An optional callback for when the payload is sent
-
handleSetCarriedItem
- Specified by:
handleSetCarriedItem
in interfaceServerGamePacketListener
- Overrides:
handleSetCarriedItem
in classServerGamePacketListenerImpl
-
handleChat
- Specified by:
handleChat
in interfaceServerGamePacketListener
- Overrides:
handleChat
in classServerGamePacketListenerImpl
-
handleAnimate
- Specified by:
handleAnimate
in interfaceServerGamePacketListener
- Overrides:
handleAnimate
in classServerGamePacketListenerImpl
-
handlePlayerCommand
- Specified by:
handlePlayerCommand
in interfaceServerGamePacketListener
- Overrides:
handlePlayerCommand
in classServerGamePacketListenerImpl
-
handleInteract
- Specified by:
handleInteract
in interfaceServerGamePacketListener
- Overrides:
handleInteract
in classServerGamePacketListenerImpl
-
handleClientCommand
- Specified by:
handleClientCommand
in interfaceServerGamePacketListener
- Overrides:
handleClientCommand
in classServerGamePacketListenerImpl
-
handleContainerClose
- Specified by:
handleContainerClose
in interfaceServerGamePacketListener
- Overrides:
handleContainerClose
in classServerGamePacketListenerImpl
-
handleContainerClick
- Specified by:
handleContainerClick
in interfaceServerGamePacketListener
- Overrides:
handleContainerClick
in classServerGamePacketListenerImpl
-
handlePlaceRecipe
- Specified by:
handlePlaceRecipe
in interfaceServerGamePacketListener
- Overrides:
handlePlaceRecipe
in classServerGamePacketListenerImpl
-
handleContainerButtonClick
- Specified by:
handleContainerButtonClick
in interfaceServerGamePacketListener
- Overrides:
handleContainerButtonClick
in classServerGamePacketListenerImpl
-
handleSetCreativeModeSlot
- Specified by:
handleSetCreativeModeSlot
in interfaceServerGamePacketListener
- Overrides:
handleSetCreativeModeSlot
in classServerGamePacketListenerImpl
-
handleSignUpdate
- Specified by:
handleSignUpdate
in interfaceServerGamePacketListener
- Overrides:
handleSignUpdate
in classServerGamePacketListenerImpl
-
handleKeepAlive
- Specified by:
handleKeepAlive
in interfaceServerCommonPacketListener
- Overrides:
handleKeepAlive
in classServerCommonPacketListenerImpl
-
handleCustomPayload
- Specified by:
handleCustomPayload
in interfaceServerCommonPacketListener
- Overrides:
handleCustomPayload
in classServerGamePacketListenerImpl
-
handleClientInformation
- Specified by:
handleClientInformation
in interfaceServerCommonPacketListener
- Overrides:
handleClientInformation
in classServerGamePacketListenerImpl
-
handlePlayerAbilities
- Specified by:
handlePlayerAbilities
in interfaceServerGamePacketListener
- Overrides:
handlePlayerAbilities
in classServerGamePacketListenerImpl
-
handleChangeDifficulty
- Specified by:
handleChangeDifficulty
in interfaceServerGamePacketListener
- Overrides:
handleChangeDifficulty
in classServerGamePacketListenerImpl
-
handleLockDifficulty
- Specified by:
handleLockDifficulty
in interfaceServerGamePacketListener
- Overrides:
handleLockDifficulty
in classServerGamePacketListenerImpl
-
teleport
public void teleport(double x, double y, double z, float yaw, float pitch, Set<RelativeMovement> relativeSet) - Overrides:
teleport
in classServerGamePacketListenerImpl
-
ackBlockChangesUpTo
public void ackBlockChangesUpTo(int sequence) - Overrides:
ackBlockChangesUpTo
in classServerGamePacketListenerImpl
-
handleChatCommand
- Specified by:
handleChatCommand
in interfaceServerGamePacketListener
- Overrides:
handleChatCommand
in classServerGamePacketListenerImpl
-
handleChatAck
- Specified by:
handleChatAck
in interfaceServerGamePacketListener
- Overrides:
handleChatAck
in classServerGamePacketListenerImpl
-
addPendingMessage
- Overrides:
addPendingMessage
in classServerGamePacketListenerImpl
-
sendPlayerChatMessage
- Overrides:
sendPlayerChatMessage
in classServerGamePacketListenerImpl
-
sendDisguisedChatMessage
- Overrides:
sendDisguisedChatMessage
in classServerGamePacketListenerImpl
-
handleChatSessionUpdate
- Specified by:
handleChatSessionUpdate
in interfaceServerGamePacketListener
- Overrides:
handleChatSessionUpdate
in classServerGamePacketListenerImpl
-