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, GameProtocols.Context, ServerGamePacketListener, ServerPacketListener, ServerPingPacketListener, ServerboundPacketListener, TickablePacketListener, ServerPlayerConnection, ICommonPacketListener, IServerCommonPacketListenerExtension, IServerGamePacketListenerExtension
- Enclosing class:
FakePlayer
-
Field Summary
FieldsFields inherited from class ServerGamePacketListenerImpl
chunkSender, CLIENT_LOADED_TIMEOUT_TIME, playerFields inherited from class ServerCommonPacketListenerImpl
connection, connectionType, LATENCY_CHECK_INTERVAL, server -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidackBlockChangesUpTo(int sequence) voiddisconnect(Component message) Triggers a disconnection with the given reason.voidvoidhandleAnimate(ServerboundSwingPacket packet) voidvoidvoidhandleChat(ServerboundChatPacket packet) voidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidvoidbooleanhasChannel(Identifier payloadId) Checks if the connection has negotiated and opened a channel for the payload.voidonDisconnect(DisconnectionDetails details) voidvoidSends a packet to the target of this listener.voidSends 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(PositionMoveRotation posMoveRot, Set<Relative> relatives) voidtick()Methods inherited from class ServerGamePacketListenerImpl
getPlayer, getRemoteAddress, handleAcceptPlayerLoad, handleAttack, handleBundleItemSelectedPacket, handleChangeGameMode, handleChunkBatchReceived, handleClientTickEnd, handleConfigurationAcknowledged, handleContainerSlotStateChanged, handleDebugSubscriptionRequest, handlePickItemFromBlock, handlePickItemFromEntity, handlePingRequest, handleSetGameRule, handleSetTestBlock, handleSignedChatCommand, handleSpectateEntity, handleTestInstanceBlockAction, hasClientLoaded, hasInfiniteMaterials, isAcceptingMessages, markClientLoaded, markClientUnloadedAfterDeath, playerProfile, resetFlyingTicks, shouldHandleMessage, switchToConfig, tickClientLoadTimeoutMethods inherited from class ServerCommonPacketListenerImpl
createCookie, createCookie, disconnect, getConnection, getConnectionType, getOwner, getPacketProcessor, handleCookieResponse, handleCustomClickAction, handlePong, isSingleplayerOwner, keepConnectionAlive, latency, onPacketError, resumeFlushing, suspendFlushingMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ICommonPacketListener
getConnection, getConnectionType, getPacketProcessor, hasChannel, hasChannelMethods inherited from interface IServerCommonPacketListenerExtension
send, sendMethods inherited from interface IServerGamePacketListenerExtension
sendBundled, sendBundledMethods inherited from interface PacketListener
createDisconnectionInfo, fillCrashReport, fillListenerSpecificCrashDetailsMethods inherited from interface ServerboundPacketListener
flowMethods inherited from interface ServerCommonPacketListener
handleCustomClickAction, handlePongMethods inherited from interface ServerCookiePacketListener
handleCookieResponseMethods inherited from interface ServerGamePacketListener
protocolMethods inherited from interface 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
-
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
- 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
-
sendPlayerChatMessage
- Overrides:
sendPlayerChatMessagein classServerGamePacketListenerImpl
-
sendDisguisedChatMessage
- Overrides:
sendDisguisedChatMessagein classServerGamePacketListenerImpl
-
handleChatSessionUpdate
- Specified by:
handleChatSessionUpdatein interfaceServerGamePacketListener- Overrides:
handleChatSessionUpdatein classServerGamePacketListenerImpl
-
hasChannel
Description copied from interface:ICommonPacketListenerChecks if the connection has negotiated and opened a channel for the payload.- Parameters:
payloadId- The payload id to check
-