Package net.minecraft.network.play
Class ServerPlayNetHandler
java.lang.Object
net.minecraft.network.play.ServerPlayNetHandler
- All Implemented Interfaces:
INetHandler
,IServerPlayNetHandler
- Direct Known Subclasses:
FakePlayer.FakePlayerNetHandler
-
Field Summary
Modifier and TypeFieldDescriptionprivate int
private int
private Vector3d
private int
private int
private int
private boolean
private boolean
final NetworkManager
private int
private final it.unimi.dsi.fastutil.ints.Int2ShortMap
private double
private double
private double
private long
private boolean
private long
private int
private double
private double
private double
private Entity
private static final org.apache.logging.log4j.Logger
private int
private final MinecraftServer
private int
private double
private double
private double
private double
private double
private double
-
Constructor Summary
ConstructorDescriptionServerPlayNetHandler
(MinecraftServer p_i1530_1_, NetworkManager p_i1530_2_, ServerPlayerEntity p_i1530_3_) -
Method Summary
Modifier and TypeMethodDescriptionprivate static boolean
containsInvalidValues
(CMoveVehiclePacket p_184341_0_) private static boolean
containsInvalidValues
(CPlayerPacket p_183006_0_) void
disconnect
(ITextComponent p_194028_1_) private void
filterTextPacket
(String p_244535_1_, Consumer<String> p_244535_2_) private void
private <T> void
filterTextPacket
(T p_244533_1_, Consumer<T> p_244533_2_, BiFunction<IChatFilter, T, CompletableFuture<Optional<T>>> p_244533_3_) void
handleAcceptTeleportPacket
(CConfirmTeleportPacket p_184339_1_) void
handleAnimate
(CAnimateHandPacket p_175087_1_) void
handleBlockEntityTagQuery
(CQueryTileEntityNBTPacket p_211525_1_) void
handleChangeDifficulty
(CSetDifficultyPacket p_217263_1_) private void
handleChat
(String p_244548_1_) void
handleChat
(CChatMessagePacket p_147354_1_) void
handleClientCommand
(CClientStatusPacket p_147342_1_) void
handleClientInformation
(CClientSettingsPacket p_147352_1_) private void
handleCommand
(String p_147361_1_) void
handleContainerAck
(CConfirmTransactionPacket p_147339_1_) void
handleContainerButtonClick
(CEnchantItemPacket p_147338_1_) void
handleContainerClick
(CClickWindowPacket p_147351_1_) void
handleContainerClose
(CCloseWindowPacket p_147356_1_) void
handleCustomCommandSuggestions
(CTabCompletePacket p_195518_1_) void
handleCustomPayload
(CCustomPayloadPacket p_147349_1_) void
handleEditBook
(CEditBookPacket p_210156_1_) void
handleEntityTagQuery
(CQueryEntityNBTPacket p_211526_1_) void
handleInteract
(CUseEntityPacket p_147340_1_) void
handleJigsawGenerate
(CJigsawBlockGeneratePacket p_230549_1_) void
handleKeepAlive
(CKeepAlivePacket p_147353_1_) void
handleLockDifficulty
(CLockDifficultyPacket p_217261_1_) void
handleMovePlayer
(CPlayerPacket p_147347_1_) void
handleMoveVehicle
(CMoveVehiclePacket p_184338_1_) void
handlePaddleBoat
(CSteerBoatPacket p_184340_1_) void
handlePickItem
(CPickItemPacket p_210152_1_) void
handlePlaceRecipe
(CPlaceRecipePacket p_194308_1_) void
handlePlayerAbilities
(CPlayerAbilitiesPacket p_147348_1_) void
handlePlayerAction
(CPlayerDiggingPacket p_147345_1_) void
handlePlayerCommand
(CEntityActionPacket p_147357_1_) void
handlePlayerInput
(CInputPacket p_147358_1_) void
void
handleRecipeBookSeenRecipePacket
(CMarkRecipeSeenPacket p_191984_1_) void
handleRenameItem
(CRenameItemPacket p_210155_1_) void
handleResourcePackResponse
(CResourcePackStatusPacket p_175086_1_) void
handleSeenAdvancements
(CSeenAdvancementsPacket p_194027_1_) void
handleSelectTrade
(CSelectTradePacket p_210159_1_) void
handleSetBeaconPacket
(CUpdateBeaconPacket p_210154_1_) void
handleSetCarriedItem
(CHeldItemChangePacket p_147355_1_) void
handleSetCommandBlock
(CUpdateCommandBlockPacket p_210153_1_) void
void
handleSetCreativeModeSlot
(CCreativeInventoryActionPacket p_147344_1_) void
handleSetJigsawBlock
(CUpdateJigsawBlockPacket p_217262_1_) void
handleSetStructureBlock
(CUpdateStructureBlockPacket p_210157_1_) void
handleSignUpdate
(CUpdateSignPacket p_147343_1_) void
handleTeleportToEntityPacket
(CSpectatePacket p_175088_1_) void
handleUseItem
(CPlayerTryUseItemPacket p_147346_1_) void
handleUseItemOn
(CPlayerTryUseItemOnBlockPacket p_184337_1_) private boolean
isPlayerCollidingWithAnythingNew
(IWorldReader p_241163_1_, AxisAlignedBB p_241163_2_) private boolean
private boolean
noBlocksAround
(Entity p_241162_1_) void
onDisconnect
(ITextComponent p_147231_1_) void
void
void
send
(IPacket<?> p_211148_1_, io.netty.util.concurrent.GenericFutureListener<? extends io.netty.util.concurrent.Future<? super Void>> p_211148_2_) private void
void
teleport
(double p_147364_1_, double p_147364_3_, double p_147364_5_, float p_147364_7_, float p_147364_8_) void
teleport
(double p_175089_1_, double p_175089_3_, double p_175089_5_, float p_175089_7_, float p_175089_8_, Set<SPlayerPositionLookPacket.Flags> p_175089_9_) void
tick()
private void
updateBookContents
(List<String> p_244536_1_, int p_244536_2_) private void
updateSignText
(CUpdateSignPacket p_244542_1_, List<String> p_244542_2_) private static boolean
wasBlockPlacementAttempt
(ServerPlayerEntity p_241166_0_, ItemStack p_241166_1_)
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
connection
-
server
-
player
-
tickCount
private int tickCount -
keepAliveTime
private long keepAliveTime -
keepAlivePending
private boolean keepAlivePending -
keepAliveChallenge
private long keepAliveChallenge -
chatSpamTickCount
private int chatSpamTickCount -
dropSpamTickCount
private int dropSpamTickCount -
expectedAcks
private final it.unimi.dsi.fastutil.ints.Int2ShortMap expectedAcks -
firstGoodX
private double firstGoodX -
firstGoodY
private double firstGoodY -
firstGoodZ
private double firstGoodZ -
lastGoodX
private double lastGoodX -
lastGoodY
private double lastGoodY -
lastGoodZ
private double lastGoodZ -
lastVehicle
-
vehicleFirstGoodX
private double vehicleFirstGoodX -
vehicleFirstGoodY
private double vehicleFirstGoodY -
vehicleFirstGoodZ
private double vehicleFirstGoodZ -
vehicleLastGoodX
private double vehicleLastGoodX -
vehicleLastGoodY
private double vehicleLastGoodY -
vehicleLastGoodZ
private double vehicleLastGoodZ -
awaitingPositionFromClient
-
awaitingTeleport
private int awaitingTeleport -
awaitingTeleportTime
private int awaitingTeleportTime -
clientIsFloating
private boolean clientIsFloating -
aboveGroundTickCount
private int aboveGroundTickCount -
clientVehicleIsFloating
private boolean clientVehicleIsFloating -
aboveGroundVehicleTickCount
private int aboveGroundVehicleTickCount -
receivedMovePacketCount
private int receivedMovePacketCount -
knownMovePacketCount
private int knownMovePacketCount
-
-
Constructor Details
-
ServerPlayNetHandler
public ServerPlayNetHandler(MinecraftServer p_i1530_1_, NetworkManager p_i1530_2_, ServerPlayerEntity p_i1530_3_)
-
-
Method Details
-
tick
public void tick() -
resetPosition
public void resetPosition() -
getConnection
- Specified by:
getConnection
in interfaceINetHandler
-
isSingleplayerOwner
private boolean isSingleplayerOwner() -
disconnect
-
filterTextPacket
private <T> void filterTextPacket(T p_244533_1_, Consumer<T> p_244533_2_, BiFunction<IChatFilter, T, CompletableFuture<Optional<T>>> p_244533_3_) -
filterTextPacket
-
filterTextPacket
-
handlePlayerInput
- Specified by:
handlePlayerInput
in interfaceIServerPlayNetHandler
-
containsInvalidValues
-
containsInvalidValues
-
handleMoveVehicle
- Specified by:
handleMoveVehicle
in interfaceIServerPlayNetHandler
-
noBlocksAround
-
handleAcceptTeleportPacket
- Specified by:
handleAcceptTeleportPacket
in interfaceIServerPlayNetHandler
-
handleRecipeBookSeenRecipePacket
- Specified by:
handleRecipeBookSeenRecipePacket
in interfaceIServerPlayNetHandler
-
handleRecipeBookChangeSettingsPacket
- Specified by:
handleRecipeBookChangeSettingsPacket
in interfaceIServerPlayNetHandler
-
handleSeenAdvancements
- Specified by:
handleSeenAdvancements
in interfaceIServerPlayNetHandler
-
handleCustomCommandSuggestions
- Specified by:
handleCustomCommandSuggestions
in interfaceIServerPlayNetHandler
-
handleSetCommandBlock
- Specified by:
handleSetCommandBlock
in interfaceIServerPlayNetHandler
-
handleSetCommandMinecart
- Specified by:
handleSetCommandMinecart
in interfaceIServerPlayNetHandler
-
handlePickItem
- Specified by:
handlePickItem
in interfaceIServerPlayNetHandler
-
handleRenameItem
- Specified by:
handleRenameItem
in interfaceIServerPlayNetHandler
-
handleSetBeaconPacket
- Specified by:
handleSetBeaconPacket
in interfaceIServerPlayNetHandler
-
handleSetStructureBlock
- Specified by:
handleSetStructureBlock
in interfaceIServerPlayNetHandler
-
handleSetJigsawBlock
- Specified by:
handleSetJigsawBlock
in interfaceIServerPlayNetHandler
-
handleJigsawGenerate
- Specified by:
handleJigsawGenerate
in interfaceIServerPlayNetHandler
-
handleSelectTrade
- Specified by:
handleSelectTrade
in interfaceIServerPlayNetHandler
-
handleEditBook
- Specified by:
handleEditBook
in interfaceIServerPlayNetHandler
-
updateBookContents
-
signBook
-
handleEntityTagQuery
- Specified by:
handleEntityTagQuery
in interfaceIServerPlayNetHandler
-
handleBlockEntityTagQuery
- Specified by:
handleBlockEntityTagQuery
in interfaceIServerPlayNetHandler
-
handleMovePlayer
- Specified by:
handleMovePlayer
in interfaceIServerPlayNetHandler
-
isPlayerCollidingWithAnythingNew
private boolean isPlayerCollidingWithAnythingNew(IWorldReader p_241163_1_, AxisAlignedBB p_241163_2_) -
teleport
public void teleport(double p_147364_1_, double p_147364_3_, double p_147364_5_, float p_147364_7_, float p_147364_8_) -
teleport
public void teleport(double p_175089_1_, double p_175089_3_, double p_175089_5_, float p_175089_7_, float p_175089_8_, Set<SPlayerPositionLookPacket.Flags> p_175089_9_) -
handlePlayerAction
- Specified by:
handlePlayerAction
in interfaceIServerPlayNetHandler
-
wasBlockPlacementAttempt
private static boolean wasBlockPlacementAttempt(ServerPlayerEntity p_241166_0_, ItemStack p_241166_1_) -
handleUseItemOn
- Specified by:
handleUseItemOn
in interfaceIServerPlayNetHandler
-
handleUseItem
- Specified by:
handleUseItem
in interfaceIServerPlayNetHandler
-
handleTeleportToEntityPacket
- Specified by:
handleTeleportToEntityPacket
in interfaceIServerPlayNetHandler
-
handleResourcePackResponse
- Specified by:
handleResourcePackResponse
in interfaceIServerPlayNetHandler
-
handlePaddleBoat
- Specified by:
handlePaddleBoat
in interfaceIServerPlayNetHandler
-
onDisconnect
- Specified by:
onDisconnect
in interfaceINetHandler
-
send
-
send
-
handleSetCarriedItem
- Specified by:
handleSetCarriedItem
in interfaceIServerPlayNetHandler
-
handleChat
- Specified by:
handleChat
in interfaceIServerPlayNetHandler
-
handleChat
-
handleCommand
-
handleAnimate
- Specified by:
handleAnimate
in interfaceIServerPlayNetHandler
-
handlePlayerCommand
- Specified by:
handlePlayerCommand
in interfaceIServerPlayNetHandler
-
handleInteract
- Specified by:
handleInteract
in interfaceIServerPlayNetHandler
-
handleClientCommand
- Specified by:
handleClientCommand
in interfaceIServerPlayNetHandler
-
handleContainerClose
- Specified by:
handleContainerClose
in interfaceIServerPlayNetHandler
-
handleContainerClick
- Specified by:
handleContainerClick
in interfaceIServerPlayNetHandler
-
handlePlaceRecipe
- Specified by:
handlePlaceRecipe
in interfaceIServerPlayNetHandler
-
handleContainerButtonClick
- Specified by:
handleContainerButtonClick
in interfaceIServerPlayNetHandler
-
handleSetCreativeModeSlot
- Specified by:
handleSetCreativeModeSlot
in interfaceIServerPlayNetHandler
-
handleContainerAck
- Specified by:
handleContainerAck
in interfaceIServerPlayNetHandler
-
handleSignUpdate
- Specified by:
handleSignUpdate
in interfaceIServerPlayNetHandler
-
updateSignText
-
handleKeepAlive
- Specified by:
handleKeepAlive
in interfaceIServerPlayNetHandler
-
handlePlayerAbilities
- Specified by:
handlePlayerAbilities
in interfaceIServerPlayNetHandler
-
handleClientInformation
- Specified by:
handleClientInformation
in interfaceIServerPlayNetHandler
-
handleCustomPayload
- Specified by:
handleCustomPayload
in interfaceIServerPlayNetHandler
-
handleChangeDifficulty
- Specified by:
handleChangeDifficulty
in interfaceIServerPlayNetHandler
-
handleLockDifficulty
- Specified by:
handleLockDifficulty
in interfaceIServerPlayNetHandler
-