public class NetHandlerPlayServer extends java.lang.Object implements INetHandlerPlayServer, ITickable
Modifier and Type | Field and Description |
---|---|
private int |
chatSpamThresholdCount
Incremented by 20 each time a user sends a chat message, decreased by one every tick.
|
private boolean |
field_147366_g |
private IntHashMap<java.lang.Short> |
field_147372_n |
private int |
field_147378_h |
private int |
field_175090_f |
private int |
floatingTickCount
Used to keep track of how the player is floating while gamerules should prevent that.
|
private boolean |
hasMoved |
private int |
itemDropThreshold |
private long |
lastPingTime |
private double |
lastPosX |
private double |
lastPosY |
private double |
lastPosZ |
private long |
lastSentPingPacket |
private static org.apache.logging.log4j.Logger |
logger |
NetworkManager |
netManager |
private int |
networkTickCount |
EntityPlayerMP |
playerEntity |
private MinecraftServer |
serverController |
Constructor and Description |
---|
NetHandlerPlayServer(MinecraftServer server,
NetworkManager networkManagerIn,
EntityPlayerMP playerIn) |
Modifier and Type | Method and Description |
---|---|
private long |
currentTimeMillis() |
private boolean |
func_183006_b(C03PacketPlayer p_183006_1_) |
NetworkManager |
getNetworkManager() |
void |
handleAnimation(C0APacketAnimation packetIn) |
void |
handleResourcePackStatus(C19PacketResourcePackStatus packetIn) |
private void |
handleSlashCommand(java.lang.String command)
Handle commands that start with a /
|
void |
handleSpectate(C18PacketSpectate packetIn) |
void |
kickPlayerFromServer(java.lang.String reason)
Kick a player from the server with a reason
|
void |
onDisconnect(IChatComponent reason)
Invoked when disconnecting, the parameter is a ChatComponent describing the reason for termination
|
void |
processChatMessage(C01PacketChatMessage packetIn)
Process chat messages (broadcast back to clients) and commands (executes)
|
void |
processClickWindow(C0EPacketClickWindow packetIn)
Executes a container/inventory slot manipulation as indicated by the packet.
|
void |
processClientSettings(C15PacketClientSettings packetIn)
Updates serverside copy of client settings: language, render distance, chat visibility, chat colours, difficulty,
and whether to show the cape
|
void |
processClientStatus(C16PacketClientStatus packetIn)
Processes the client status updates: respawn attempt from player, opening statistics or achievements, or
acquiring 'open inventory' achievement
|
void |
processCloseWindow(C0DPacketCloseWindow packetIn)
Processes the client closing windows (container)
|
void |
processConfirmTransaction(C0FPacketConfirmTransaction packetIn)
Received in response to the server requesting to confirm that the client-side open container matches the servers'
after a mismatched container-slot manipulation.
|
void |
processCreativeInventoryAction(C10PacketCreativeInventoryAction packetIn)
Update the server with an ItemStack in a slot.
|
void |
processEnchantItem(C11PacketEnchantItem packetIn)
Enchants the item identified by the packet given some convoluted conditions (matching window, which
should/shouldn't be in use?)
|
void |
processEntityAction(C0BPacketEntityAction packetIn)
Processes a range of action-types: sneaking, sprinting, waking from sleep, opening the inventory or setting jump
height of the horse the player is riding
|
void |
processHeldItemChange(C09PacketHeldItemChange packetIn)
Updates which quickbar slot is selected
|
void |
processInput(C0CPacketInput packetIn)
Processes player movement input.
|
void |
processKeepAlive(C00PacketKeepAlive packetIn)
Updates a players' ping statistics
|
void |
processPlayer(C03PacketPlayer packetIn)
Processes clients perspective on player positioning and/or orientation
|
void |
processPlayerAbilities(C13PacketPlayerAbilities packetIn)
Processes a player starting/stopping flying
|
void |
processPlayerBlockPlacement(C08PacketPlayerBlockPlacement packetIn)
Processes block placement and block activation (anvil, furnace, etc.)
|
void |
processPlayerDigging(C07PacketPlayerDigging packetIn)
Processes the player initiating/stopping digging on a particular spot, as well as a player dropping items?.
|
void |
processTabComplete(C14PacketTabComplete packetIn)
Retrieves possible tab completions for the requested command string and sends them to the client
|
void |
processUpdateSign(C12PacketUpdateSign packetIn) |
void |
processUseEntity(C02PacketUseEntity packetIn)
Processes interactions ((un)leashing, opening command block GUI) and attacks on an entity with players currently
equipped item
|
void |
processVanilla250Packet(C17PacketCustomPayload packetIn)
Synchronizes serverside and clientside book contents and signing
|
void |
sendPacket(Packet packetIn) |
void |
setPlayerLocation(double x,
double y,
double z,
float yaw,
float pitch) |
void |
setPlayerLocation(double x,
double y,
double z,
float yaw,
float pitch,
java.util.Set<S08PacketPlayerPosLook.EnumFlags> relativeSet) |
void |
update()
Like the old updateEntity(), except more generic.
|
private static final org.apache.logging.log4j.Logger logger
public final NetworkManager netManager
private final MinecraftServer serverController
public EntityPlayerMP playerEntity
private int networkTickCount
private int field_175090_f
private int floatingTickCount
private boolean field_147366_g
private int field_147378_h
private long lastPingTime
private long lastSentPingPacket
private int chatSpamThresholdCount
private int itemDropThreshold
private IntHashMap<java.lang.Short> field_147372_n
private double lastPosX
private double lastPosY
private double lastPosZ
private boolean hasMoved
public NetHandlerPlayServer(MinecraftServer server, NetworkManager networkManagerIn, EntityPlayerMP playerIn)
public void update()
public NetworkManager getNetworkManager()
public void kickPlayerFromServer(java.lang.String reason)
public void processInput(C0CPacketInput packetIn)
processInput
in interface INetHandlerPlayServer
private boolean func_183006_b(C03PacketPlayer p_183006_1_)
public void processPlayer(C03PacketPlayer packetIn)
processPlayer
in interface INetHandlerPlayServer
public void setPlayerLocation(double x, double y, double z, float yaw, float pitch)
public void setPlayerLocation(double x, double y, double z, float yaw, float pitch, java.util.Set<S08PacketPlayerPosLook.EnumFlags> relativeSet)
public void processPlayerDigging(C07PacketPlayerDigging packetIn)
processPlayerDigging
in interface INetHandlerPlayServer
public void processPlayerBlockPlacement(C08PacketPlayerBlockPlacement packetIn)
processPlayerBlockPlacement
in interface INetHandlerPlayServer
public void handleSpectate(C18PacketSpectate packetIn)
handleSpectate
in interface INetHandlerPlayServer
public void handleResourcePackStatus(C19PacketResourcePackStatus packetIn)
handleResourcePackStatus
in interface INetHandlerPlayServer
public void onDisconnect(IChatComponent reason)
onDisconnect
in interface INetHandler
public void sendPacket(Packet packetIn)
public void processHeldItemChange(C09PacketHeldItemChange packetIn)
processHeldItemChange
in interface INetHandlerPlayServer
public void processChatMessage(C01PacketChatMessage packetIn)
processChatMessage
in interface INetHandlerPlayServer
private void handleSlashCommand(java.lang.String command)
public void handleAnimation(C0APacketAnimation packetIn)
handleAnimation
in interface INetHandlerPlayServer
public void processEntityAction(C0BPacketEntityAction packetIn)
processEntityAction
in interface INetHandlerPlayServer
public void processUseEntity(C02PacketUseEntity packetIn)
processUseEntity
in interface INetHandlerPlayServer
public void processClientStatus(C16PacketClientStatus packetIn)
processClientStatus
in interface INetHandlerPlayServer
public void processCloseWindow(C0DPacketCloseWindow packetIn)
processCloseWindow
in interface INetHandlerPlayServer
public void processClickWindow(C0EPacketClickWindow packetIn)
processClickWindow
in interface INetHandlerPlayServer
public void processEnchantItem(C11PacketEnchantItem packetIn)
processEnchantItem
in interface INetHandlerPlayServer
public void processCreativeInventoryAction(C10PacketCreativeInventoryAction packetIn)
processCreativeInventoryAction
in interface INetHandlerPlayServer
public void processConfirmTransaction(C0FPacketConfirmTransaction packetIn)
processConfirmTransaction
in interface INetHandlerPlayServer
public void processUpdateSign(C12PacketUpdateSign packetIn)
processUpdateSign
in interface INetHandlerPlayServer
public void processKeepAlive(C00PacketKeepAlive packetIn)
processKeepAlive
in interface INetHandlerPlayServer
private long currentTimeMillis()
public void processPlayerAbilities(C13PacketPlayerAbilities packetIn)
processPlayerAbilities
in interface INetHandlerPlayServer
public void processTabComplete(C14PacketTabComplete packetIn)
processTabComplete
in interface INetHandlerPlayServer
public void processClientSettings(C15PacketClientSettings packetIn)
processClientSettings
in interface INetHandlerPlayServer
public void processVanilla250Packet(C17PacketCustomPayload packetIn)
processVanilla250Packet
in interface INetHandlerPlayServer