Package net.minecraft.src
Class NetServerHandler
java.lang.Object
net.minecraft.src.NetHandler
net.minecraft.src.NetServerHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionbooleanThis is set to true whenever a player disconnects from the server.intfinal MinecraftServerReference to the MinecraftServer object.final INetworkManagerThe underlying network manager for this server handler.short[]shortReference to the EntityPlayerMP object. -
Constructor Summary
ConstructorsConstructorDescriptionNetServerHandler(MinecraftServer par1MinecraftServer, INetworkManager par2INetworkManager, EntityPlayerMP par3EntityPlayerMP) -
Method Summary
Modifier and TypeMethodDescriptionbooleanIf this returns false, all packets will be queued for the main thread to handle, even if they would otherwise be processed asynchronously.voidfunc_110774_a(Packet27PlayerInput par1Packet27PlayerInput) getCollidingBoundingBoxesIgnoreSpecifiedEntities(World world, Entity par1Entity, AxisAlignedBB par2AxisAlignedBB) voidhandleAnimation(Packet18Animation par1Packet18Animation) voidhandleAutoComplete(Packet203AutoComplete par1Packet203AutoComplete) voidhandleBlockDig(Packet14BlockDig par1Packet14BlockDig) voidhandleBlockItemSwitch(Packet16BlockItemSwitch par1Packet16BlockItemSwitch) voidhandleChat(Packet3Chat par1Packet3Chat) voidhandleClientCommand(Packet205ClientCommand par1Packet205ClientCommand) voidhandleClientInfo(Packet204ClientInfo par1Packet204ClientInfo) voidhandleCloseWindow(Packet101CloseWindow par1Packet101CloseWindow) voidhandleCreativeSetSlot(Packet107CreativeSetSlot par1Packet107CreativeSetSlot) Handle a creative slot packet.voidhandleCustomPayload(Packet250CustomPayload par1Packet250CustomPayload) voidhandleDebugInfo(DebugInfoPacket debugInfoPacket) Updates debug infosvoidhandleEnchantItem(Packet108EnchantItem par1Packet108EnchantItem) voidhandleEntityAction(Packet19EntityAction par1Packet19EntityAction) runs registerPacket on the given Packet19EntityActionvoidhandleErrorMessage(String par1Str, Object[] par2ArrayOfObj) voidhandleFlying(Packet10Flying par1Packet10Flying) voidhandleKeepAlive(Packet0KeepAlive par1Packet0KeepAlive) Handle a keep alive packet.voidhandleKickDisconnect(Packet255KickDisconnect par1Packet255KickDisconnect) voidhandlePlace(Packet15Place par1Packet15Place) voidhandlePlayerAbilities(Packet202PlayerAbilities par1Packet202PlayerAbilities) Handle a player abilities packet.voidhandlePlayerSync(PlayerSyncPacket packet) voidhandleRespawn(Packet9Respawn par1Packet9Respawn) respawns the playervoidvoidhandleTimerSpeed(TimerSpeedPacket timerSpeedPacket) voidhandleTransaction(Packet106Transaction par1Packet106Transaction) voidhandleUpdateSign(Packet130UpdateSign par1Packet130UpdateSign) Updates Client side signsvoidhandleUseEntity(Packet7UseEntity par1Packet7UseEntity) voidhandleWindowClick(Packet102WindowClick par1Packet102WindowClick) booleanbooleandetermine if it is a server handlervoidkickPlayerFromServer(String par1Str) voidrun once each game tickintreturns 0 for memoryMapped connectionsvoidsendPacket(Packet packet) voidsendPacketToPlayer(Packet par1Packet) addToSendQueue. if it is a chat packet, check before sending itvoidsetPlayerLocation(double par1, double par3, double par5, float par7, float par8) Moves the player to the specified destination and rotationvoidunexpectedPacket(Packet par1Packet) Default handler called for packets that don't have their own handlers in NetClientHandler; currentlly does nothing.Methods inherited from class net.minecraft.src.NetHandler
func_110773_a, func_142031_a, handleAttachEntity, handleBlockChange, handleBlockDestroy, handleBlockEvent, handleClientProtocol, handleCollect, handleDestroyEntity, handleDoorChange, handleEntity, handleEntityEffect, handleEntityExpOrb, handleEntityHeadRotation, handleEntityMetadata, handleEntityPainting, handleEntityStatus, handleEntityTeleport, handleEntityVelocity, handleExperience, handleExplosion, handleGameEvent, handleGameruleSync, handleHardcoreSpawnSync, handleLevelSound, handleLogin, handleMapChunk, handleMapChunks, handleMapData, handleMobSpawn, handleMultiBlockChange, handleNamedEntitySpawn, handleOpenWindow, handlePlayerInfo, handlePlayerInventory, handleRemoveEntityEffect, handleServerAuthData, handleServerPing, handleSetDisplayObjective, handleSetObjective, handleSetPlayerTeam, handleSetScore, handleSetSlot, handleSharedKey, handleSleep, handleSpawnPosition, handleStatistic, handleTileEntityData, handleUpdateHealth, handleUpdateProgressbar, handleUpdateTime, handleVehicleSpawn, handleWeather, handleWindowItems, handleWorldParticles
-
Field Details
-
netManager
The underlying network manager for this server handler. -
mcServer
Reference to the MinecraftServer object. -
connectionClosed
public boolean connectionClosedThis is set to true whenever a player disconnects from the server. -
playerEntity
Reference to the EntityPlayerMP object. -
packetReceivedBuffer
public short[] packetReceivedBuffer -
packetSentToClient
public short packetSentToClient -
debugUpdateTimePlayer
public int debugUpdateTimePlayer
-
-
Constructor Details
-
NetServerHandler
public NetServerHandler(MinecraftServer par1MinecraftServer, INetworkManager par2INetworkManager, EntityPlayerMP par3EntityPlayerMP)
-
-
Method Details
-
networkTick
public void networkTick()run once each game tick -
kickPlayerFromServer
-
func_110774_a
- Overrides:
func_110774_ain classNetHandler
-
handleFlying
- Overrides:
handleFlyingin classNetHandler
-
setPlayerLocation
public void setPlayerLocation(double par1, double par3, double par5, float par7, float par8) Moves the player to the specified destination and rotation -
handleBlockDig
- Overrides:
handleBlockDigin classNetHandler
-
handlePlace
- Overrides:
handlePlacein classNetHandler
-
handleErrorMessage
- Overrides:
handleErrorMessagein classNetHandler
-
unexpectedPacket
Default handler called for packets that don't have their own handlers in NetClientHandler; currentlly does nothing.- Overrides:
unexpectedPacketin classNetHandler
-
sendPacket
-
sendPacketToPlayer
addToSendQueue. if it is a chat packet, check before sending it -
handleBlockItemSwitch
- Overrides:
handleBlockItemSwitchin classNetHandler
-
handleChat
- Overrides:
handleChatin classNetHandler
-
handleAnimation
- Overrides:
handleAnimationin classNetHandler
-
handleEntityAction
runs registerPacket on the given Packet19EntityAction- Overrides:
handleEntityActionin classNetHandler
-
handleKickDisconnect
- Overrides:
handleKickDisconnectin classNetHandler
-
packetSize
public int packetSize()returns 0 for memoryMapped connections -
handleUseEntity
- Overrides:
handleUseEntityin classNetHandler
-
handleClientCommand
- Overrides:
handleClientCommandin classNetHandler
-
canProcessPacketsAsync
public boolean canProcessPacketsAsync()If this returns false, all packets will be queued for the main thread to handle, even if they would otherwise be processed asynchronously. Used to avoid processing packets on the client before the world has been downloaded (which happens on the main thread)- Overrides:
canProcessPacketsAsyncin classNetHandler
-
handleRespawn
respawns the player- Overrides:
handleRespawnin classNetHandler
-
handleCloseWindow
- Overrides:
handleCloseWindowin classNetHandler
-
handleWindowClick
- Overrides:
handleWindowClickin classNetHandler
-
handleEnchantItem
- Overrides:
handleEnchantItemin classNetHandler
-
handleCreativeSetSlot
Handle a creative slot packet.- Overrides:
handleCreativeSetSlotin classNetHandler
-
handleTransaction
- Overrides:
handleTransactionin classNetHandler
-
handleUpdateSign
Updates Client side signs- Overrides:
handleUpdateSignin classNetHandler
-
handleDebugInfo
Updates debug infos- Overrides:
handleDebugInfoin classNetHandler
-
handleKeepAlive
Handle a keep alive packet.- Overrides:
handleKeepAlivein classNetHandler
-
isServerHandler
public boolean isServerHandler()determine if it is a server handler- Specified by:
isServerHandlerin classNetHandler
-
handlePlayerAbilities
Handle a player abilities packet.- Overrides:
handlePlayerAbilitiesin classNetHandler
-
handleAutoComplete
- Overrides:
handleAutoCompletein classNetHandler
-
handleClientInfo
- Overrides:
handleClientInfoin classNetHandler
-
handleCustomPayload
- Overrides:
handleCustomPayloadin classNetHandler
-
getCollidingBoundingBoxesIgnoreSpecifiedEntities
public List getCollidingBoundingBoxesIgnoreSpecifiedEntities(World world, Entity par1Entity, AxisAlignedBB par2AxisAlignedBB) -
handleStartBlockHarvest
- Overrides:
handleStartBlockHarvestin classNetHandler
-
isConnectionClosed
public boolean isConnectionClosed()- Overrides:
isConnectionClosedin classNetHandler
-
handlePlayerSync
- Overrides:
handlePlayerSyncin classNetHandler
-
handleTimerSpeed
- Overrides:
handleTimerSpeedin classNetHandler
-