INetHandlerPlayClient .java

net.minecraft.network.play.INetHandlerPlayClient (interface, 386 lines): members: handlePlayerListHeaderFooter, handleScoreboardObjective, handleChat.

net.minecraft.network.playinterface386 linescommonextends INetHandler16.0 KB

API Surface (0)

No public/protected methods detected (fields or constants only).

Same Package (1)

Code Graph: Dependencies (72)

Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.

Full Source

INetHandlerPlayClient.java386 lines · MCP 1.8.9 · verbatimOriginal ↗
1
package net.minecraft.network.play;
2
3
import net.minecraft.network.INetHandler;
4
import net.minecraft.network.play.server.S00PacketKeepAlive;
5
import net.minecraft.network.play.server.S01PacketJoinGame;
6
import net.minecraft.network.play.server.S02PacketChat;
7
import net.minecraft.network.play.server.S03PacketTimeUpdate;
8
import net.minecraft.network.play.server.S04PacketEntityEquipment;
9
import net.minecraft.network.play.server.S05PacketSpawnPosition;
10
import net.minecraft.network.play.server.S06PacketUpdateHealth;
11
import net.minecraft.network.play.server.S07PacketRespawn;
12
import net.minecraft.network.play.server.S08PacketPlayerPosLook;
13
import net.minecraft.network.play.server.S09PacketHeldItemChange;
14
import net.minecraft.network.play.server.S0APacketUseBed;
15
import net.minecraft.network.play.server.S0BPacketAnimation;
16
import net.minecraft.network.play.server.S0CPacketSpawnPlayer;
17
import net.minecraft.network.play.server.S0DPacketCollectItem;
18
import net.minecraft.network.play.server.S0EPacketSpawnObject;
19
import net.minecraft.network.play.server.S0FPacketSpawnMob;
20
import net.minecraft.network.play.server.S10PacketSpawnPainting;
21
import net.minecraft.network.play.server.S11PacketSpawnExperienceOrb;
22
import net.minecraft.network.play.server.S12PacketEntityVelocity;
23
import net.minecraft.network.play.server.S13PacketDestroyEntities;
24
import net.minecraft.network.play.server.S14PacketEntity;
25
import net.minecraft.network.play.server.S18PacketEntityTeleport;
26
import net.minecraft.network.play.server.S19PacketEntityHeadLook;
27
import net.minecraft.network.play.server.S19PacketEntityStatus;
28
import net.minecraft.network.play.server.S1BPacketEntityAttach;
29
import net.minecraft.network.play.server.S1CPacketEntityMetadata;
30
import net.minecraft.network.play.server.S1DPacketEntityEffect;
31
import net.minecraft.network.play.server.S1EPacketRemoveEntityEffect;
32
import net.minecraft.network.play.server.S1FPacketSetExperience;
33
import net.minecraft.network.play.server.S20PacketEntityProperties;
34
import net.minecraft.network.play.server.S21PacketChunkData;
35
import net.minecraft.network.play.server.S22PacketMultiBlockChange;
36
import net.minecraft.network.play.server.S23PacketBlockChange;
37
import net.minecraft.network.play.server.S24PacketBlockAction;
38
import net.minecraft.network.play.server.S25PacketBlockBreakAnim;
39
import net.minecraft.network.play.server.S26PacketMapChunkBulk;
40
import net.minecraft.network.play.server.S27PacketExplosion;
41
import net.minecraft.network.play.server.S28PacketEffect;
42
import net.minecraft.network.play.server.S29PacketSoundEffect;
43
import net.minecraft.network.play.server.S2APacketParticles;
44
import net.minecraft.network.play.server.S2BPacketChangeGameState;
45
import net.minecraft.network.play.server.S2CPacketSpawnGlobalEntity;
46
import net.minecraft.network.play.server.S2DPacketOpenWindow;
47
import net.minecraft.network.play.server.S2EPacketCloseWindow;
48
import net.minecraft.network.play.server.S2FPacketSetSlot;
49
import net.minecraft.network.play.server.S30PacketWindowItems;
50
import net.minecraft.network.play.server.S31PacketWindowProperty;
51
import net.minecraft.network.play.server.S32PacketConfirmTransaction;
52
import net.minecraft.network.play.server.S33PacketUpdateSign;
53
import net.minecraft.network.play.server.S34PacketMaps;
54
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
55
import net.minecraft.network.play.server.S36PacketSignEditorOpen;
56
import net.minecraft.network.play.server.S37PacketStatistics;
57
import net.minecraft.network.play.server.S38PacketPlayerListItem;
58
import net.minecraft.network.play.server.S39PacketPlayerAbilities;
59
import net.minecraft.network.play.server.S3APacketTabComplete;
60
import net.minecraft.network.play.server.S3BPacketScoreboardObjective;
61
import net.minecraft.network.play.server.S3CPacketUpdateScore;
62
import net.minecraft.network.play.server.S3DPacketDisplayScoreboard;
63
import net.minecraft.network.play.server.S3EPacketTeams;
64
import net.minecraft.network.play.server.S3FPacketCustomPayload;
65
import net.minecraft.network.play.server.S40PacketDisconnect;
66
import net.minecraft.network.play.server.S41PacketServerDifficulty;
67
import net.minecraft.network.play.server.S42PacketCombatEvent;
68
import net.minecraft.network.play.server.S43PacketCamera;
69
import net.minecraft.network.play.server.S44PacketWorldBorder;
70
import net.minecraft.network.play.server.S45PacketTitle;
71
import net.minecraft.network.play.server.S46PacketSetCompressionLevel;
72
import net.minecraft.network.play.server.S47PacketPlayerListHeaderFooter;
73
import net.minecraft.network.play.server.S48PacketResourcePackSend;
74
import net.minecraft.network.play.server.S49PacketUpdateEntityNBT;
75
76
public interface INetHandlerPlayClient extends INetHandler
77
{
78
    /**
79
     * Spawns an instance of the objecttype indicated by the packet and sets its position and momentum
80
     */
81
    void handleSpawnObject(S0EPacketSpawnObject packetIn);
82
83
    /**
84
     * Spawns an experience orb and sets its value (amount of XP)
85
     */
86
    void handleSpawnExperienceOrb(S11PacketSpawnExperienceOrb packetIn);
87
88
    /**
89
     * Handles globally visible entities. Used in vanilla for lightning bolts
90
     */
91
    void handleSpawnGlobalEntity(S2CPacketSpawnGlobalEntity packetIn);
92
93
    /**
94
     * Spawns the mob entity at the specified location, with the specified rotation, momentum and type. Updates the
95
     * entities Datawatchers with the entity metadata specified in the packet
96
     */
97
    void handleSpawnMob(S0FPacketSpawnMob packetIn);
98
99
    /**
100
     * May create a scoreboard objective, remove an objective from the scoreboard or update an objectives' displayname
101
     */
102
    void handleScoreboardObjective(S3BPacketScoreboardObjective packetIn);
103
104
    /**
105
     * Handles the spawning of a painting object
106
     */
107
    void handleSpawnPainting(S10PacketSpawnPainting packetIn);
108
109
    /**
110
     * Handles the creation of a nearby player entity, sets the position and held item
111
     */
112
    void handleSpawnPlayer(S0CPacketSpawnPlayer packetIn);
113
114
    /**
115
     * Renders a specified animation: Waking up a player, a living entity swinging its currently held item, being hurt
116
     * or receiving a critical hit by normal or magical means
117
     */
118
    void handleAnimation(S0BPacketAnimation packetIn);
119
120
    /**
121
     * Updates the players statistics or achievements
122
     */
123
    void handleStatistics(S37PacketStatistics packetIn);
124
125
    /**
126
     * Updates all registered IWorldAccess instances with destroyBlockInWorldPartially
127
     */
128
    void handleBlockBreakAnim(S25PacketBlockBreakAnim packetIn);
129
130
    /**
131
     * Creates a sign in the specified location if it didn't exist and opens the GUI to edit its text
132
     */
133
    void handleSignEditorOpen(S36PacketSignEditorOpen packetIn);
134
135
    /**
136
     * Updates the NBTTagCompound metadata of instances of the following entitytypes: Mob spawners, command blocks,
137
     * beacons, skulls, flowerpot
138
     */
139
    void handleUpdateTileEntity(S35PacketUpdateTileEntity packetIn);
140
141
    /**
142
     * Triggers Block.onBlockEventReceived, which is implemented in BlockPistonBase for extension/retraction, BlockNote
143
     * for setting the instrument (including audiovisual feedback) and in BlockContainer to set the number of players
144
     * accessing a (Ender)Chest
145
     */
146
    void handleBlockAction(S24PacketBlockAction packetIn);
147
148
    /**
149
     * Updates the block and metadata and generates a blockupdate (and notify the clients)
150
     */
151
    void handleBlockChange(S23PacketBlockChange packetIn);
152
153
    /**
154
     * Prints a chatmessage in the chat GUI
155
     */
156
    void handleChat(S02PacketChat packetIn);
157
158
    /**
159
     * Displays the available command-completion options the server knows of
160
     */
161
    void handleTabComplete(S3APacketTabComplete packetIn);
162
163
    /**
164
     * Received from the servers PlayerManager if between 1 and 64 blocks in a chunk are changed. If only one block
165
     * requires an update, the server sends S23PacketBlockChange and if 64 or more blocks are changed, the server sends
166
     * S21PacketChunkData
167
     */
168
    void handleMultiBlockChange(S22PacketMultiBlockChange packetIn);
169
170
    /**
171
     * Updates the worlds MapStorage with the specified MapData for the specified map-identifier and invokes a
172
     * MapItemRenderer for it
173
     */
174
    void handleMaps(S34PacketMaps packetIn);
175
176
    /**
177
     * Verifies that the server and client are synchronized with respect to the inventory/container opened by the player
178
     * and confirms if it is the case.
179
     */
180
    void handleConfirmTransaction(S32PacketConfirmTransaction packetIn);
181
182
    /**
183
     * Resets the ItemStack held in hand and closes the window that is opened
184
     */
185
    void handleCloseWindow(S2EPacketCloseWindow packetIn);
186
187
    /**
188
     * Handles the placement of a specified ItemStack in a specified container/inventory slot
189
     */
190
    void handleWindowItems(S30PacketWindowItems packetIn);
191
192
    /**
193
     * Displays a GUI by ID. In order starting from id 0: Chest, Workbench, Furnace, Dispenser, Enchanting table,
194
     * Brewing stand, Villager merchant, Beacon, Anvil, Hopper, Dropper, Horse
195
     */
196
    void handleOpenWindow(S2DPacketOpenWindow packetIn);
197
198
    /**
199
     * Sets the progressbar of the opened window to the specified value
200
     */
201
    void handleWindowProperty(S31PacketWindowProperty packetIn);
202
203
    /**
204
     * Handles pickin up an ItemStack or dropping one in your inventory or an open (non-creative) container
205
     */
206
    void handleSetSlot(S2FPacketSetSlot packetIn);
207
208
    /**
209
     * Handles packets that have room for a channel specification. Vanilla implemented channels are "MC|TrList" to
210
     * acquire a MerchantRecipeList trades for a villager merchant, "MC|Brand" which sets the server brand? on the
211
     * player instance and finally "MC|RPack" which the server uses to communicate the identifier of the default server
212
     * resourcepack for the client to load.
213
     */
214
    void handleCustomPayload(S3FPacketCustomPayload packetIn);
215
216
    /**
217
     * Closes the network channel
218
     */
219
    void handleDisconnect(S40PacketDisconnect packetIn);
220
221
    /**
222
     * Retrieves the player identified by the packet, puts him to sleep if possible (and flags whether all players are
223
     * asleep)
224
     */
225
    void handleUseBed(S0APacketUseBed packetIn);
226
227
    /**
228
     * Invokes the entities' handleUpdateHealth method which is implemented in LivingBase (hurt/death),
229
     * MinecartMobSpawner (spawn delay), FireworkRocket & MinecartTNT (explosion), IronGolem (throwing,...), Witch
230
     * (spawn particles), Zombie (villager transformation), Animal (breeding mode particles), Horse (breeding/smoke
231
     * particles), Sheep (...), Tameable (...), Villager (particles for breeding mode, angry and happy), Wolf (...)
232
     */
233
    void handleEntityStatus(S19PacketEntityStatus packetIn);
234
235
    void handleEntityAttach(S1BPacketEntityAttach packetIn);
236
237
    /**
238
     * Initiates a new explosion (sound, particles, drop spawn) for the affected blocks indicated by the packet.
239
     */
240
    void handleExplosion(S27PacketExplosion packetIn);
241
242
    void handleChangeGameState(S2BPacketChangeGameState packetIn);
243
244
    void handleKeepAlive(S00PacketKeepAlive packetIn);
245
246
    /**
247
     * Updates the specified chunk with the supplied data, marks it for re-rendering and lighting recalculation
248
     */
249
    void handleChunkData(S21PacketChunkData packetIn);
250
251
    void handleMapChunkBulk(S26PacketMapChunkBulk packetIn);
252
253
    void handleEffect(S28PacketEffect packetIn);
254
255
    /**
256
     * Registers some server properties (gametype,hardcore-mode,terraintype,difficulty,player limit), creates a new
257
     * WorldClient and sets the player initial dimension
258
     */
259
    void handleJoinGame(S01PacketJoinGame packetIn);
260
261
    /**
262
     * Updates the specified entity's position by the specified relative moment and absolute rotation. Note that
263
     * subclassing of the packet allows for the specification of a subset of this data (e.g. only rel. position, abs.
264
     * rotation or both).
265
     */
266
    void handleEntityMovement(S14PacketEntity packetIn);
267
268
    /**
269
     * Handles changes in player positioning and rotation such as when travelling to a new dimension, (re)spawning,
270
     * mounting horses etc. Seems to immediately reply to the server with the clients post-processing perspective on the
271
     * player positioning
272
     */
273
    void handlePlayerPosLook(S08PacketPlayerPosLook packetIn);
274
275
    /**
276
     * Spawns a specified number of particles at the specified location with a randomized displacement according to
277
     * specified bounds
278
     */
279
    void handleParticles(S2APacketParticles packetIn);
280
281
    void handlePlayerAbilities(S39PacketPlayerAbilities packetIn);
282
283
    void handlePlayerListItem(S38PacketPlayerListItem packetIn);
284
285
    /**
286
     * Locally eliminates the entities. Invoked by the server when the items are in fact destroyed, or the player is no
287
     * longer registered as required to monitor them. The latter  happens when distance between the player and item
288
     * increases beyond a certain treshold (typically the viewing distance)
289
     */
290
    void handleDestroyEntities(S13PacketDestroyEntities packetIn);
291
292
    void handleRemoveEntityEffect(S1EPacketRemoveEntityEffect packetIn);
293
294
    void handleRespawn(S07PacketRespawn packetIn);
295
296
    /**
297
     * Updates the direction in which the specified entity is looking, normally this head rotation is independent of the
298
     * rotation of the entity itself
299
     */
300
    void handleEntityHeadLook(S19PacketEntityHeadLook packetIn);
301
302
    /**
303
     * Updates which hotbar slot of the player is currently selected
304
     */
305
    void handleHeldItemChange(S09PacketHeldItemChange packetIn);
306
307
    /**
308
     * Removes or sets the ScoreObjective to be displayed at a particular scoreboard position (list, sidebar, below
309
     * name)
310
     */
311
    void handleDisplayScoreboard(S3DPacketDisplayScoreboard packetIn);
312
313
    /**
314
     * Invoked when the server registers new proximate objects in your watchlist or when objects in your watchlist have
315
     * changed -> Registers any changes locally
316
     */
317
    void handleEntityMetadata(S1CPacketEntityMetadata packetIn);
318
319
    /**
320
     * Sets the velocity of the specified entity to the specified value
321
     */
322
    void handleEntityVelocity(S12PacketEntityVelocity packetIn);
323
324
    void handleEntityEquipment(S04PacketEntityEquipment packetIn);
325
326
    void handleSetExperience(S1FPacketSetExperience packetIn);
327
328
    void handleUpdateHealth(S06PacketUpdateHealth packetIn);
329
330
    /**
331
     * Updates a team managed by the scoreboard: Create/Remove the team registration, Register/Remove the player-team-
332
     * memberships, Set team displayname/prefix/suffix and/or whether friendly fire is enabled
333
     */
334
    void handleTeams(S3EPacketTeams packetIn);
335
336
    /**
337
     * Either updates the score with a specified value or removes the score for an objective
338
     */
339
    void handleUpdateScore(S3CPacketUpdateScore packetIn);
340
341
    void handleSpawnPosition(S05PacketSpawnPosition packetIn);
342
343
    void handleTimeUpdate(S03PacketTimeUpdate packetIn);
344
345
    /**
346
     * Updates a specified sign with the specified text lines
347
     */
348
    void handleUpdateSign(S33PacketUpdateSign packetIn);
349
350
    void handleSoundEffect(S29PacketSoundEffect packetIn);
351
352
    void handleCollectItem(S0DPacketCollectItem packetIn);
353
354
    /**
355
     * Updates an entity's position and rotation as specified by the packet
356
     */
357
    void handleEntityTeleport(S18PacketEntityTeleport packetIn);
358
359
    /**
360
     * Updates en entity's attributes and their respective modifiers, which are used for speed bonusses (player
361
     * sprinting, animals fleeing, baby speed), weapon/tool attackDamage, hostiles followRange randomization, zombie
362
     * maxHealth and knockback resistance as well as reinforcement spawning chance.
363
     */
364
    void handleEntityProperties(S20PacketEntityProperties packetIn);
365
366
    void handleEntityEffect(S1DPacketEntityEffect packetIn);
367
368
    void handleCombatEvent(S42PacketCombatEvent packetIn);
369
370
    void handleServerDifficulty(S41PacketServerDifficulty packetIn);
371
372
    void handleCamera(S43PacketCamera packetIn);
373
374
    void handleWorldBorder(S44PacketWorldBorder packetIn);
375
376
    void handleTitle(S45PacketTitle packetIn);
377
378
    void handleSetCompressionLevel(S46PacketSetCompressionLevel packetIn);
379
380
    void handlePlayerListHeaderFooter(S47PacketPlayerListHeaderFooter packetIn);
381
382
    void handleResourcePack(S48PacketResourcePackSend packetIn);
383
384
    void handleEntityNBT(S49PacketUpdateEntityNBT packetIn);
385
}
386

Deobfuscated MCP 1.8.9 source of INetHandlerPlayClient from Marcelektro/MavenMCP-1.8.9 (net/minecraft/network/play/INetHandlerPlayClient.java), stored verbatim.