Where the code is
Verified against Minecraft 26.3 · Maps · The jar as a treemap of packages: area is lines of decompiled source, colour is which jar ships the package, hatching is the packages Part I’s what this book skips tours.
Java Minecraft is 7,301 classes and 741,069 lines of decompiled Java 25,
and the first surprise in it is how little of that the client owns alone.
Everything a player sees — every screen, the HUD, the whole renderer, the entity models, both
GPU back-ends, the sound engine, Realms — is the orange near-third of this
picture. The blue seven tenths ship in both jars, and the biggest inner
box, world/level, is a fifth of the game by itself: blocks, block
states, chunks, lighting and world generation, all of it code the
dedicated server runs with no window attached.
net/minecraft or com/mojang, labelled with its share of the lines where the box has room for it; the boxes inside are its sub-packages. Hover a box for its counts; click the figure to enlarge it.Two jars, one tree
The client jar is a strict superset of the server jar, and the split is
clean: the 2,264 client-only classes live in exactly five packages —
net/minecraft/client (1,891 classes), com/mojang/renderpearl (146),
com/mojang/realmsclient (137), com/mojang/blaze3d (86) and net/minecraft/realms (4). Every other
package in the table below ships in both jars, class for class; no
sub-package at this depth is mixed. The client-only side is 220,818
lines, 29.8% of the total, which is the “just under a third” the
introduction quotes.
The consequence for reading this book: when a page says a class is
client-only it is saying which package the class lives in, and every
package Parts IV and V own ships in both jars. The oracle for which side a
class is on is server-classes.txt.
What the big boxes are
world — 42%. world/level (151,146 lines, 1,418 classes) is Parts
IV, V and XII: chunks, block states, lighting and, under
world/level/levelgen, most of world generation — world/level/biome is
its sibling rather than part of it. world/entity
(110,760 lines, 727 classes) is Parts VI and VIII: the entity hierarchy,
its AI and the player. world/item and world/inventory (37,813 lines
between them) are Part VII.
client — 24%. client/gui (59,594 lines) is the screens and the HUD,
Part X; client/renderer and client/model (63,361 lines together) are
the frame, section meshing and the entity models, Part XI;
client/multiplayer (11,303) holds ClientPacketListener and
ClientLevel, the client’s copy of the world. The 41 classes directly in
net/minecraft/client — Minecraft, Options, KeyMapping,
MouseHandler — are 10,821 lines on their own. (That 41 is the itself only
count defined below; the 1,891 above is the package with every sub-package
under it.)
util — 7%, two thirds of it skipped. util/datafix, util/filefix
and util/profiling are 34,866 of the package’s 54,700 lines and are all
outside this book; the hatched boxes are those three, and much the largest of
them is the save-migration history. What is
left is the toolbox every part uses — Mth, RandomSource, Util — and
the parsing and debug packages.
server — 7%. server/commands (13,357) is Part XIII’s command
implementations; server/level is 42 classes and 12,166 lines — 290 lines a class, nearly
three times the map’s average, in a package small enough to list
(ServerLevel, ChunkMap, ServerPlayer), Parts III and IV; server/network is the serverbound
packet handlers, Part IX; server/packs is the pack system, Part II;
server/jsonrpc, the management server, is skipped.
renderpearl and blaze3d — 4%. The GPU abstraction, com/mojang/renderpearl, has
two back-ends behind GpuDevice, and the Vulkan one (renderpearl/backend/vulkan,
7,387 lines) is larger than the OpenGL one (renderpearl/backend/opengl, 5,815);
com/mojang/blaze3d keeps the window, the frame graph, the vertex formats and
RenderSystem.
network — 3%, in 416 classes. network/protocol is 298 classes in
12,872 lines: the packet catalogue is many tiny classes, one per packet.
network/chat (4,799) is Component and chat signing.
Below 3% the other boxes include Part II’s foundations — net/minecraft/core,
net/minecraft/nbt, net/minecraft/tags, net/minecraft/resources — and
Part XIII’s net/minecraft/commands (the command source, the argument types
and the execution engine) and net/minecraft/advancements, plus
com/mojang/realmsclient and the skipped net/minecraft/data. That last one
is the program that writes the vanilla data pack — and it is not build-time
only: the dedicated server ships all 174 classes, and Blocks and
MinecraftServer both read data/worldgen constants at run time (what this
book skips sorts every such
reader into three kinds).
Where each part lives
The parts follow the tree, but not one box each. This table is the map
from the book’s order to the jar’s, and it is the one table on this page
that is a decision rather than a measurement: the packages are assigned by
hand, in the tool that draws the atlas, and the counts follow. A package
under net/minecraft is written without that prefix; itself only means
the files directly in the package and not its sub-packages; a package two
parts share is counted in both and a file in no part’s packages in none, so
the total row is not the jar’s. A landing page that states its part’s size
quotes its own row of this table, and the hatched packages and player reporting are left out of every row.
| part | packages | classes | client-only | lines |
|---|---|---|---|---|
| I · Anatomy | client/main, Minecraft, Main, MinecraftServer | 7 | 5 | 6,817 |
| II · Foundations | core, resources, tags, nbt, server/packs, util, world/flag | 468 | 0 | 48,809 |
| III · The server | server (itself only), server/level, server/players, server/dedicated | 95 | 0 | 21,900 |
| IV · The world | world/level/chunk, world/level/lighting, world/ticks, world/level/gameevent, world/level/entity, world/level/material, world/attribute, world/timeline, world/clock, world/level/border, server/level, world/level/blockscan | 229 | 0 | 31,913 |
| V · Blocks | world/level/block, world/level/redstone | 484 | 0 | 58,507 |
| VI · Entities | world/entity, network/syncher, world/level/pathfinder, world/damagesource, world/effect, minus world/entity/player | 766 | 0 | 112,091 |
| VII · Items and inventories | world/item, world/inventory, world/level/storage/loot | 581 | 0 | 49,245 |
| VIII · The player | world/entity/player, world/food, ServerPlayer, client/player | 32 | 11 | 8,460 |
| IX · Networking | network, server/network, client/multiplayer, minus network/syncher | 490 | 51 | 38,711 |
| X · The client | client (itself only), client/gui, client/multiplayer, client/sounds, client/resources, client/player, client/input, client/server | 689 | 689 | 94,527 |
| XI · Rendering | client/renderer, client/model, client/particle, com/mojang/blaze3d, com/mojang/renderpearl | 1,291 | 1,291 | 98,283 |
| XII · World generation | world/level/levelgen, world/level/biome | 477 | 0 | 49,303 |
| XIII · Commands and data packs | commands, server/commands, server/dialog, server/permissions, server/bossevents, advancements, gametest, world/scores, client/gui/screens/dialog | 481 | 17 | 44,083 |
| the thirteen parts, with the shared packages counted twice | 6,090 | 2,064 | 662,649 |
The table
Depth three is the outer boxes of the treemap; depth four is the inner
ones. client-only counts the classes not in server-classes.txt.
| package (depth 3) | classes | client-only | lines |
|---|---|---|---|
net/minecraft/world | 2715 | 0 | 313,098 |
net/minecraft/client | 1891 | 1891 | 176,818 |
net/minecraft/util | 735 | 0 | 54,700 |
net/minecraft/server | 432 | 0 | 53,789 |
net/minecraft/network | 416 | 0 | 23,319 |
com/mojang/renderpearl | 146 | 146 | 18,659 |
net/minecraft/data | 174 | 0 | 16,849 |
com/mojang/realmsclient | 137 | 137 | 14,701 |
net/minecraft/commands | 124 | 0 | 13,229 |
net/minecraft/core | 123 | 0 | 12,359 |
com/mojang/blaze3d | 86 | 86 | 10,437 |
net/minecraft/nbt | 43 | 0 | 7,791 |
net/minecraft/advancements | 115 | 0 | 7,647 |
net/minecraft/gametest | 48 | 0 | 5,756 |
net/minecraft/sounds | 6 | 0 | 2,124 |
net/minecraft/tags | 29 | 0 | 1,874 |
net/minecraft | 19 | 0 | 1,665 |
net/minecraft/references | 5 | 0 | 1,483 |
net/minecraft/resources | 12 | 0 | 1,473 |
com/mojang/math | 10 | 0 | 1,054 |
net/minecraft/stats | 10 | 0 | 874 |
net/minecraft/gizmos | 15 | 0 | 569 |
net/minecraft/recipebook | 3 | 0 | 351 |
net/minecraft/locale | 3 | 0 | 247 |
net/minecraft/realms | 4 | 4 | 203 |
| total | 7301 | 2264 | 741,069 |
| package (depth 4) | classes | client-only | lines |
|---|---|---|---|
net/minecraft/world/level | 1418 | 0 | 151,146 |
net/minecraft/world/entity | 727 | 0 | 110,760 |
net/minecraft/client/gui | 445 | 445 | 59,594 |
net/minecraft/client/renderer | 715 | 715 | 50,649 |
net/minecraft/world/item | 323 | 0 | 30,661 |
net/minecraft/util/datafix | 411 | 0 | 27,048 |
com/mojang/renderpearl/backend | 76 | 76 | 13,866 |
net/minecraft/server/commands | 111 | 0 | 13,357 |
net/minecraft/network/protocol | 298 | 0 | 12,872 |
net/minecraft/util | 93 | 0 | 12,767 |
net/minecraft/client/model | 268 | 268 | 12,712 |
net/minecraft/server/level | 42 | 0 | 12,166 |
net/minecraft/client/multiplayer | 63 | 63 | 11,303 |
net/minecraft/client | 41 | 41 | 10,821 |
net/minecraft/commands/arguments | 73 | 0 | 9,017 |
net/minecraft/client/resources | 110 | 110 | 8,326 |
net/minecraft/nbt | 36 | 0 | 7,279 |
net/minecraft/world/inventory | 64 | 0 | 7,152 |
com/mojang/realmsclient/gui | 46 | 46 | 7,091 |
net/minecraft/client/particle | 88 | 88 | 6,839 |
net/minecraft/client/data | 28 | 28 | 6,189 |
net/minecraft/data/worldgen | 64 | 0 | 6,016 |
net/minecraft/gametest/framework | 46 | 0 | 5,737 |
net/minecraft/server/network | 29 | 0 | 5,566 |
net/minecraft/core | 39 | 0 | 5,499 |
net/minecraft/server | 27 | 0 | 5,153 |
net/minecraft/server/packs | 57 | 0 | 5,122 |
net/minecraft/network/chat | 63 | 0 | 4,799 |
com/mojang/blaze3d/platform | 26 | 26 | 4,382 |
net/minecraft/util/profiling | 70 | 0 | 4,265 |
net/minecraft/server/jsonrpc | 65 | 0 | 4,118 |
net/minecraft/network | 42 | 0 | 3,590 |
net/minecraft/util/filefix | 57 | 0 | 3,553 |
net/minecraft/advancements/predicates | 53 | 0 | 3,450 |
net/minecraft/core/component | 32 | 0 | 3,067 |
net/minecraft/world/phys | 28 | 0 | 3,036 |
net/minecraft/data/loot | 21 | 0 | 3,023 |
com/mojang/renderpearl/frontend | 12 | 12 | 2,876 |
net/minecraft/advancements/triggers | 49 | 0 | 2,816 |
net/minecraft/server/players | 19 | 0 | 2,770 |
com/mojang/realmsclient/client | 19 | 19 | 2,643 |
net/minecraft/data/recipes | 20 | 0 | 2,507 |
com/mojang/blaze3d/vertex | 14 | 14 | 2,322 |
net/minecraft/client/sounds | 17 | 17 | 2,174 |
net/minecraft/sounds | 6 | 0 | 2,124 |
net/minecraft/client/player | 11 | 11 | 2,072 |
com/mojang/realmsclient/dto | 43 | 43 | 1,986 |
net/minecraft/world/attribute | 30 | 0 | 1,936 |
net/minecraft/commands | 14 | 0 | 1,921 |
com/mojang/renderpearl/api | 53 | 53 | 1,879 |
net/minecraft/util/parsing | 29 | 0 | 1,879 |
net/minecraft/tags | 29 | 0 | 1,874 |
net/minecraft/server/dedicated | 7 | 0 | 1,811 |
net/minecraft/data/tags | 29 | 0 | 1,756 |
net/minecraft/world | 25 | 0 | 1,686 |
net/minecraft | 19 | 0 | 1,665 |
net/minecraft/network/codec | 7 | 0 | 1,533 |
net/minecraft/core/registries | 14 | 0 | 1,525 |
com/mojang/realmsclient | 4 | 4 | 1,492 |
net/minecraft/references | 5 | 0 | 1,483 |
net/minecraft/resources | 12 | 0 | 1,473 |
net/minecraft/world/scores | 16 | 0 | 1,442 |
com/mojang/realmsclient/util | 20 | 20 | 1,425 |
net/minecraft/advancements | 13 | 0 | 1,381 |
net/minecraft/util/debug | 19 | 0 | 1,348 |
net/minecraft/world/effect | 20 | 0 | 1,306 |
net/minecraft/data | 10 | 0 | 1,272 |
net/minecraft/client/telemetry | 18 | 18 | 1,221 |
net/minecraft/core/dispenser | 14 | 0 | 1,098 |
com/mojang/math | 10 | 0 | 1,054 |
com/mojang/blaze3d/audio | 12 | 12 | 1,013 |
net/minecraft/util/worldupdate | 6 | 0 | 958 |
net/minecraft/world/damagesource | 12 | 0 | 936 |
net/minecraft/commands/synchronization | 12 | 0 | 905 |
net/minecraft/data/advancements | 10 | 0 | 896 |
net/minecraft/client/server | 6 | 6 | 885 |
net/minecraft/server/dialog | 35 | 0 | 885 |
net/minecraft/client/color | 17 | 17 | 879 |
net/minecraft/stats | 10 | 0 | 874 |
net/minecraft/world/ticks | 14 | 0 | 869 |
net/minecraft/core/particles | 21 | 0 | 863 |
net/minecraft/util/thread | 9 | 0 | 842 |
net/minecraft/server/rcon | 9 | 0 | 837 |
com/mojang/blaze3d/systems | 5 | 5 | 773 |
net/minecraft/commands/execution | 18 | 0 | 756 |
net/minecraft/util/valueproviders | 19 | 0 | 707 |
net/minecraft/world/waypoints | 9 | 0 | 677 |
net/minecraft/client/tutorial | 10 | 10 | 671 |
net/minecraft/commands/functions | 7 | 0 | 630 |
net/minecraft/gizmos | 15 | 0 | 569 |
net/minecraft/network/syncher | 6 | 0 | 525 |
net/minecraft/client/main | 4 | 4 | 523 |
net/minecraft/data/info | 8 | 0 | 518 |
net/minecraft/nbt/visitors | 7 | 0 | 512 |
net/minecraft/client/animation | 23 | 23 | 509 |
net/minecraft/client/searchtree | 8 | 8 | 505 |
net/minecraft/data/structures | 5 | 0 | 473 |
net/minecraft/util/eventlog | 4 | 0 | 459 |
net/minecraft/world/timeline | 5 | 0 | 446 |
com/mojang/blaze3d/framegraph | 3 | 3 | 437 |
com/mojang/blaze3d/font | 7 | 7 | 432 |
net/minecraft/server/permissions | 12 | 0 | 402 |
net/minecraft/world/clock | 11 | 0 | 390 |
net/minecraft/util/random | 4 | 0 | 374 |
com/mojang/blaze3d/pipeline | 5 | 5 | 366 |
net/minecraft/world/flag | 7 | 0 | 356 |
net/minecraft/server/chase | 3 | 0 | 354 |
net/minecraft/recipebook | 3 | 0 | 351 |
net/minecraft/server/notifications | 5 | 0 | 343 |
net/minecraft/server/bossevents | 3 | 0 | 328 |
net/minecraft/data/registries | 5 | 0 | 325 |
net/minecraft/server/gui | 4 | 0 | 310 |
net/minecraft/core/cauldron | 3 | 0 | 307 |
net/minecraft/client/input | 8 | 8 | 304 |
net/minecraft/world/food | 6 | 0 | 299 |
com/mojang/blaze3d | 5 | 5 | 289 |
net/minecraft/client/quickplay | 3 | 3 | 284 |
net/minecraft/locale | 3 | 0 | 247 |
com/mojang/blaze3d/buffers | 3 | 3 | 228 |
net/minecraft/client/entity | 4 | 4 | 228 |
net/minecraft/realms | 4 | 4 | 203 |
net/minecraft/util/debugchart | 8 | 0 | 199 |
com/mojang/blaze3d/resource | 6 | 6 | 195 |
net/minecraft/util/context | 4 | 0 | 181 |
net/minecraft/server/waypoints | 2 | 0 | 180 |
net/minecraft/util/monitoring | 2 | 0 | 120 |
net/minecraft/server/advancements | 2 | 0 | 87 |
net/minecraft/client/profiling | 2 | 2 | 81 |
com/mojang/realmsclient/exception | 5 | 5 | 64 |
net/minecraft/data/metadata | 2 | 0 | 63 |
net/minecraft/client/waypoints | 2 | 2 | 49 |
com/mojang/renderpearl/util | 4 | 4 | 34 |
net/minecraft/gametest | 2 | 0 | 19 |
com/mojang/renderpearl | 1 | 1 | 4 |
| total | 7301 | 2264 | 741,069 |
Rules: names, never code · how the system works, not how the code reads ·
newest version only · every backticked name passes tools/verify_names.py.