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
FieldsFields inherited from class net.minecraft.server.network.ServerGamePacketListenerImpl
chunkSender, playerFields inherited from class net.minecraft.server.network.ServerCommonPacketListenerImpl
connection, connectionType, LATENCY_CHECK_INTERVAL, server -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidackBlockChangesUpTo(int sequence) voidaddPendingMessage(PlayerChatMessage message) voiddisconnect(Component message) Triggers a disconnection with the given reason.voidvoidhandleAnimate(ServerboundSwingPacket packet) voidvoidvoidhandleChat(ServerboundChatPacket packet) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidhandleKeepAlive(ServerboundKeepAlivePacket p_294627_) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidonDisconnect(DisconnectionDetails details) voidvoidSends a packet to the target of this listener.voidsend(Packet<?> packet, @Nullable PacketSendListener sendListener) Sends a packet to the client of this listener.voidsendDisguisedChatMessage(Component content, ChatType.Bound boundChatType) voidsendPlayerChatMessage(PlayerChatMessage message, ChatType.Bound boundChatType) voidteleport(double x, double y, double z, float yaw, float pitch) voidteleport(double x, double y, double z, float yaw, float pitch, Set<RelativeMovement> relativeSet) voidtick()Methods inherited from class net.minecraft.server.network.ServerGamePacketListenerImpl
getPlayer, getRemoteAddress, handleChunkBatchReceived, handleConfigurationAcknowledged, handleContainerSlotStateChanged, handleDebugSampleSubscription, handlePingRequest, handleSignedChatCommand, isAcceptingMessages, playerProfile, shouldHandleMessage, switchToConfigMethods inherited from class net.minecraft.server.network.ServerCommonPacketListenerImpl
createCookie, createCookie, disconnect, getConnection, getConnectionType, getMainThreadEventLoop, getOwner, handleCookieResponse, handlePong, isSingleplayerOwner, keepConnectionAlive, latency, resumeFlushing, suspendFlushingMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.neoforged.neoforge.common.extensions.ICommonPacketListener
getConnection, getConnectionType, getMainThreadEventLoop, hasChannel, hasChannel, hasChannelMethods inherited from interface net.neoforged.neoforge.common.extensions.IServerCommonPacketListenerExtension
send, sendMethods inherited from interface net.neoforged.neoforge.common.extensions.IServerGamePacketListenerExtension
sendBundled, sendBundledMethods inherited from interface net.minecraft.network.PacketListener
createDisconnectionInfo, fillCrashReport, fillListenerSpecificCrashDetailsMethods inherited from interface net.minecraft.network.ServerboundPacketListener
flowMethods inherited from interface net.minecraft.network.protocol.common.ServerCommonPacketListener
handlePongMethods inherited from interface net.minecraft.network.protocol.cookie.ServerCookiePacketListener
handleCookieResponseMethods inherited from interface net.minecraft.network.protocol.game.ServerGamePacketListener
protocolMethods 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:
tickin interfaceTickablePacketListener- Overrides:
tickin classServerGamePacketListenerImpl
-
resetPosition
public void resetPosition()- Overrides:
resetPositionin classServerGamePacketListenerImpl
-
disconnect
Description copied from interface:ICommonPacketListenerTriggers a disconnection with the given reason.- Specified by:
disconnectin interfaceICommonPacketListener- Overrides:
disconnectin classServerCommonPacketListenerImpl- Parameters:
message- The reason for the disconnection
-
handlePlayerInput
- Specified by:
handlePlayerInputin interfaceServerGamePacketListener- Overrides:
handlePlayerInputin classServerGamePacketListenerImpl
-
handleMoveVehicle
- Specified by:
handleMoveVehiclein interfaceServerGamePacketListener- Overrides:
handleMoveVehiclein classServerGamePacketListenerImpl
-
handleAcceptTeleportPacket
- Specified by:
handleAcceptTeleportPacketin interfaceServerGamePacketListener- Overrides:
handleAcceptTeleportPacketin classServerGamePacketListenerImpl
-
handleRecipeBookSeenRecipePacket
- Specified by:
handleRecipeBookSeenRecipePacketin interfaceServerGamePacketListener- Overrides:
handleRecipeBookSeenRecipePacketin classServerGamePacketListenerImpl
-
handleRecipeBookChangeSettingsPacket
- Specified by:
handleRecipeBookChangeSettingsPacketin interfaceServerGamePacketListener- Overrides:
handleRecipeBookChangeSettingsPacketin classServerGamePacketListenerImpl
-
handleSeenAdvancements
- Specified by:
handleSeenAdvancementsin interfaceServerGamePacketListener- Overrides:
handleSeenAdvancementsin classServerGamePacketListenerImpl
-
handleCustomCommandSuggestions
- Specified by:
handleCustomCommandSuggestionsin interfaceServerGamePacketListener- Overrides:
handleCustomCommandSuggestionsin classServerGamePacketListenerImpl
-
handleSetCommandBlock
- Specified by:
handleSetCommandBlockin interfaceServerGamePacketListener- Overrides:
handleSetCommandBlockin classServerGamePacketListenerImpl
-
handleSetCommandMinecart
- Specified by:
handleSetCommandMinecartin interfaceServerGamePacketListener- Overrides:
handleSetCommandMinecartin classServerGamePacketListenerImpl
-
handlePickItem
- Specified by:
handlePickItemin interfaceServerGamePacketListener- Overrides:
handlePickItemin classServerGamePacketListenerImpl
-
handleRenameItem
- Specified by:
handleRenameItemin interfaceServerGamePacketListener- Overrides:
handleRenameItemin classServerGamePacketListenerImpl
-
handleSetBeaconPacket
- Specified by:
handleSetBeaconPacketin interfaceServerGamePacketListener- Overrides:
handleSetBeaconPacketin classServerGamePacketListenerImpl
-
handleSetStructureBlock
- Specified by:
handleSetStructureBlockin interfaceServerGamePacketListener- Overrides:
handleSetStructureBlockin classServerGamePacketListenerImpl
-
handleSetJigsawBlock
- Specified by:
handleSetJigsawBlockin interfaceServerGamePacketListener- Overrides:
handleSetJigsawBlockin classServerGamePacketListenerImpl
-
handleJigsawGenerate
- Specified by:
handleJigsawGeneratein interfaceServerGamePacketListener- Overrides:
handleJigsawGeneratein classServerGamePacketListenerImpl
-
handleSelectTrade
- Specified by:
handleSelectTradein interfaceServerGamePacketListener- Overrides:
handleSelectTradein classServerGamePacketListenerImpl
-
handleEditBook
- Specified by:
handleEditBookin interfaceServerGamePacketListener- Overrides:
handleEditBookin classServerGamePacketListenerImpl
-
handleEntityTagQuery
- Specified by:
handleEntityTagQueryin interfaceServerGamePacketListener- Overrides:
handleEntityTagQueryin classServerGamePacketListenerImpl
-
handleBlockEntityTagQuery
- Specified by:
handleBlockEntityTagQueryin interfaceServerGamePacketListener- Overrides:
handleBlockEntityTagQueryin classServerGamePacketListenerImpl
-
handleMovePlayer
- Specified by:
handleMovePlayerin interfaceServerGamePacketListener- Overrides:
handleMovePlayerin classServerGamePacketListenerImpl
-
teleport
public void teleport(double x, double y, double z, float yaw, float pitch) - Overrides:
teleportin classServerGamePacketListenerImpl
-
handlePlayerAction
- Specified by:
handlePlayerActionin interfaceServerGamePacketListener- Overrides:
handlePlayerActionin classServerGamePacketListenerImpl
-
handleUseItemOn
- Specified by:
handleUseItemOnin interfaceServerGamePacketListener- Overrides:
handleUseItemOnin classServerGamePacketListenerImpl
-
handleUseItem
- Specified by:
handleUseItemin interfaceServerGamePacketListener- Overrides:
handleUseItemin classServerGamePacketListenerImpl
-
handleTeleportToEntityPacket
- Specified by:
handleTeleportToEntityPacketin interfaceServerGamePacketListener- Overrides:
handleTeleportToEntityPacketin classServerGamePacketListenerImpl
-
handleResourcePackResponse
- Specified by:
handleResourcePackResponsein interfaceServerCommonPacketListener- Overrides:
handleResourcePackResponsein classServerCommonPacketListenerImpl
-
handlePaddleBoat
- Specified by:
handlePaddleBoatin interfaceServerGamePacketListener- Overrides:
handlePaddleBoatin classServerGamePacketListenerImpl
-
onDisconnect
- Specified by:
onDisconnectin interfacePacketListener- Overrides:
onDisconnectin classServerGamePacketListenerImpl
-
send
Description copied from interface:ICommonPacketListenerSends a packet to the target of this listener.- Specified by:
sendin interfaceICommonPacketListener- Specified by:
sendin interfaceServerPlayerConnection- Overrides:
sendin classServerCommonPacketListenerImpl
-
send
Description copied from interface:IServerCommonPacketListenerExtensionSends a packet to the client of this listener.- Specified by:
sendin interfaceIServerCommonPacketListenerExtension- Overrides:
sendin classServerCommonPacketListenerImpl- Parameters:
sendListener- An optional callback for when the payload is sent
-
handleSetCarriedItem
- Specified by:
handleSetCarriedItemin interfaceServerGamePacketListener- Overrides:
handleSetCarriedItemin classServerGamePacketListenerImpl
-
handleChat
- Specified by:
handleChatin interfaceServerGamePacketListener- Overrides:
handleChatin classServerGamePacketListenerImpl
-
handleAnimate
- Specified by:
handleAnimatein interfaceServerGamePacketListener- Overrides:
handleAnimatein classServerGamePacketListenerImpl
-
handlePlayerCommand
- Specified by:
handlePlayerCommandin interfaceServerGamePacketListener- Overrides:
handlePlayerCommandin classServerGamePacketListenerImpl
-
handleInteract
- Specified by:
handleInteractin interfaceServerGamePacketListener- Overrides:
handleInteractin classServerGamePacketListenerImpl
-
handleClientCommand
- Specified by:
handleClientCommandin interfaceServerGamePacketListener- Overrides:
handleClientCommandin classServerGamePacketListenerImpl
-
handleContainerClose
- Specified by:
handleContainerClosein interfaceServerGamePacketListener- Overrides:
handleContainerClosein classServerGamePacketListenerImpl
-
handleContainerClick
- Specified by:
handleContainerClickin interfaceServerGamePacketListener- Overrides:
handleContainerClickin classServerGamePacketListenerImpl
-
handlePlaceRecipe
- Specified by:
handlePlaceRecipein interfaceServerGamePacketListener- Overrides:
handlePlaceRecipein classServerGamePacketListenerImpl
-
handleContainerButtonClick
- Specified by:
handleContainerButtonClickin interfaceServerGamePacketListener- Overrides:
handleContainerButtonClickin classServerGamePacketListenerImpl
-
handleSetCreativeModeSlot
- Specified by:
handleSetCreativeModeSlotin interfaceServerGamePacketListener- Overrides:
handleSetCreativeModeSlotin classServerGamePacketListenerImpl
-
handleSignUpdate
- Specified by:
handleSignUpdatein interfaceServerGamePacketListener- Overrides:
handleSignUpdatein classServerGamePacketListenerImpl
-
handleKeepAlive
- Specified by:
handleKeepAlivein interfaceServerCommonPacketListener- Overrides:
handleKeepAlivein classServerCommonPacketListenerImpl
-
handleCustomPayload
- Specified by:
handleCustomPayloadin interfaceServerCommonPacketListener- Overrides:
handleCustomPayloadin classServerGamePacketListenerImpl
-
handleClientInformation
- Specified by:
handleClientInformationin interfaceServerCommonPacketListener- Overrides:
handleClientInformationin classServerGamePacketListenerImpl
-
handlePlayerAbilities
- Specified by:
handlePlayerAbilitiesin interfaceServerGamePacketListener- Overrides:
handlePlayerAbilitiesin classServerGamePacketListenerImpl
-
handleChangeDifficulty
- Specified by:
handleChangeDifficultyin interfaceServerGamePacketListener- Overrides:
handleChangeDifficultyin classServerGamePacketListenerImpl
-
handleLockDifficulty
- Specified by:
handleLockDifficultyin interfaceServerGamePacketListener- Overrides:
handleLockDifficultyin classServerGamePacketListenerImpl
-
teleport
public void teleport(double x, double y, double z, float yaw, float pitch, Set<RelativeMovement> relativeSet) - Overrides:
teleportin classServerGamePacketListenerImpl
-
ackBlockChangesUpTo
public void ackBlockChangesUpTo(int sequence) - Overrides:
ackBlockChangesUpToin classServerGamePacketListenerImpl
-
handleChatCommand
- Specified by:
handleChatCommandin interfaceServerGamePacketListener- Overrides:
handleChatCommandin classServerGamePacketListenerImpl
-
handleChatAck
- Specified by:
handleChatAckin interfaceServerGamePacketListener- Overrides:
handleChatAckin classServerGamePacketListenerImpl
-
addPendingMessage
- Overrides:
addPendingMessagein classServerGamePacketListenerImpl
-
sendPlayerChatMessage
- Overrides:
sendPlayerChatMessagein classServerGamePacketListenerImpl
-
sendDisguisedChatMessage
- Overrides:
sendDisguisedChatMessagein classServerGamePacketListenerImpl
-
handleChatSessionUpdate
- Specified by:
handleChatSessionUpdatein interfaceServerGamePacketListener- Overrides:
handleChatSessionUpdatein classServerGamePacketListenerImpl
-