You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/reference/file-index.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,15 +3,15 @@ title: Complete File Index
3
3
description: Index of all source files in both LCEMP modules.
4
4
---
5
5
6
-
LCEMP consists of two modules: **Minecraft.World** (game logic, networking, world simulation) and **Minecraft.Client** (rendering, UI, platform integration, server hosting). This page indexes every `.cpp` and `.h` source file in both.
6
+
LCEMP has two modules: **Minecraft.World** (game logic, networking, world simulation) and **Minecraft.Client** (rendering, UI, platform integration, server hosting). This page lists every `.cpp` and `.h` source file in both.
7
7
8
-
**Totals: 1,567 files in Minecraft.World -- 1,392 files in Minecraft.Client -- 2,959 files overall.**
8
+
**Totals: 1,567 files in Minecraft.World, 1,392 files in Minecraft.Client, 2,959 files overall.**
9
9
10
10
---
11
11
12
12
## Minecraft.World (1,567 files)
13
13
14
-
All files reside in a flat directory (`Minecraft.World/`) except for 7 headers in `x64headers/`.
14
+
All files live in a flat directory (`Minecraft.World/`) except for 7 headers in `x64headers/`.
15
15
16
16
### Tiles / Blocks (200 files)
17
17
@@ -207,7 +207,7 @@ Platform-specific headers for Xbox 360 / x64: `extraX64.h`, `qnet.h`, `xmcore.h`
207
207
208
208
The Client module has a deeper directory structure with platform-specific subdirectories.
209
209
210
-
### Root Directory -- Rendering (174 files)
210
+
### Root Directory: Rendering (174 files)
211
211
212
212
Core rendering, models, entity renderers, and particle effects at the top level.
**Total registered packets: 88** (IDs 0--255, with gaps)
111
+
**Total registered packets: 88** (IDs 0 to 255, with gaps)
112
112
113
113
## Unused / Commented-Out IDs
114
114
115
-
The following IDs appear in comments but are not registered:
115
+
These IDs show up in comments but aren't registered:
116
116
117
117
| ID | Class Name | Notes |
118
118
|----|-----------|-------|
@@ -125,9 +125,9 @@ The following IDs appear in comments but are not registered:
125
125
126
126
## Notes
127
127
128
-
- The **Broadcast** column corresponds to the `sendToAnyClient` parameter. When `yes`, the packet is sent to all connected clients. When `no`, it is sent per-dimension per-machine (a 4J splitscreen optimization).
129
-
- Packets marked **(4J added)** are custom additions by 4J Studios for the Legacy Console Edition and do not exist in vanilla Java Edition.
130
-
- `MoveEntityPacketSmall` (162--165) is an optimized variant of `MoveEntityPacket` (30--33) for smaller position deltas.
128
+
- The **Broadcast** column matches the `sendToAnyClient` parameter. When `yes`, the packet goes to all connected clients. When `no`, it's sent per-dimension per-machine (a 4J splitscreen optimization).
129
+
- Packets marked **(4J added)** are custom additions by 4J Studios for the Legacy Console Edition and don't exist in vanilla Java Edition.
130
+
- `MoveEntityPacketSmall` (162 to 165) is an optimized version of `MoveEntityPacket` (30 to 33) for smaller position changes.
131
131
- `ContainerSetSlotPacket` (103) has conditional direction: in non-content-package builds it can also be sent C->S for debug purposes.
Copy file name to clipboardExpand all lines: src/content/docs/reference/tile-classes.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: Tile Class Index
3
3
description: Index of all Tile (block) subclasses in LCEMP.
4
4
---
5
5
6
-
In LCEMP, blocks are called "Tiles." Every block type is a subclass of `Tile` (defined in `Minecraft.World/Tile.h`). Some tiles inherit from intermediate base classes that provide shared behavior.
6
+
In LCEMP, blocks are called "Tiles." Every block type is a subclass of `Tile` (defined in `Minecraft.World/Tile.h`). Some tiles inherit from intermediate base classes that share common behavior.
7
7
8
8
## Inheritance Hierarchy
9
9
@@ -164,10 +164,10 @@ Tile
164
164
165
165
## Notes
166
166
167
-
-`Bush` is declared in `Bush.h` / `Bush.cpp` and is a Tile subclass for plant-type blocks. It does not follow the `*Tile.h` naming convention.
168
-
-`LiquidTile` has two concrete subclasses -- `LiquidTileDynamic` and `LiquidTileStatic` -- defined in their own files, but they are not separate `*Tile.h` headers.
169
-
-`FallingTile` (in `FallingTile.h`) extends `Entity`, not `Tile`. It is the falling-block entity (sand, gravel in motion), not a block type.
167
+
-`Bush` is declared in `Bush.h` / `Bush.cpp` and is a Tile subclass for plant-type blocks. It doesn't follow the `*Tile.h` naming convention.
168
+
-`LiquidTile` has two concrete subclasses (`LiquidTileDynamic` and `LiquidTileStatic`) defined in their own files, but they don't have separate `*Tile.h` headers.
169
+
-`FallingTile` (in `FallingTile.h`) extends `Entity`, not `Tile`. It's the falling-block entity (sand, gravel in motion), not a block type.
170
170
- The `Tile` base class itself is defined in `Tile.h` / `Tile.cpp` and holds the static tile registry (all block IDs are registered there).
171
-
- Related tile items (e.g.,`ClothTileItem`, `StoneSlabTileItem`, `TreeTileItem`) handle aux-data variants and are in separate files.
171
+
- Related tile items (like`ClothTileItem`, `StoneSlabTileItem`, `TreeTileItem`) handle aux-data variants and live in separate files.
Copy file name to clipboardExpand all lines: src/content/docs/world/containers.md
+26-26Lines changed: 26 additions & 26 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@ title: Container Menus
3
3
description: Inventory management and container menu system in LCEMP.
4
4
---
5
5
6
-
LCEMP uses a two-layer container system: **Container** objects hold raw item data, and **AbstractContainerMenu** subclasses manage the GUI logic, slot layout, click handling, and synchronization between server and client.
6
+
LCEMP uses a two-layer container system: **Container** objects hold the raw item data, and **AbstractContainerMenu** subclasses manage the GUI logic, slot layout, click handling, and sync between server and client.
7
7
8
8
## Container (data layer)
9
9
10
-
`Container` is the pure-virtual interface every item-holding object implements. It defines the fundamental storage contract.
10
+
`Container` is the pure-virtual interface that every item-holding object implements. It defines the basic storage contract.
11
11
12
12
**Key constants and methods:**
13
13
@@ -34,7 +34,7 @@ LCEMP uses a two-layer container system: **Container** objects hold raw item dat
34
34
|`MerchantContainer`| Villager trade slots | 3 slots: two payment, one result. Calls `updateSellItem()` on changes. Tracks `activeRecipe` and `selectionHint`. |
35
35
|`EnchantmentContainer`| Enchanting table input | Extends `SimpleContainer` with a max stack size of 1 and menu callbacks. |
|`PlayerEnderChestContainer`| Per-player ender chest | Extends `SimpleContainer`. Persists via NBT through`setItemsByTag()` / `createTag()`. Tracks the currently active `EnderChestTileEntity`. |
37
+
|`PlayerEnderChestContainer`| Per-player ender chest | Extends `SimpleContainer`. Persists through NBT with`setItemsByTag()` / `createTag()`. Tracks the currently active `EnderChestTileEntity`. |
38
38
39
39
## AbstractContainerMenu (GUI layer)
40
40
@@ -60,18 +60,18 @@ LCEMP uses a two-layer container system: **Container** objects hold raw item dat
60
60
61
61
### Core methods
62
62
63
-
-**`addSlot(Slot*)`** -- Registers a slot, assigning it a sequential index.
64
-
-**`broadcastChanges()`** -- Compares each slot against `lastSlots` and fires `ContainerListener::slotChanged()`on differences.
65
-
-**`clicked(slotIndex, buttonNum, clickType, player)`** -- The central click dispatcher. Handles pickup, quick-move, swap, and clone logic. Manages carried items via the player's `Inventory`.
66
-
-**`quickMoveStack(player, slotIndex)`** -- Virtual. Subclasses override to define shift-click transfer rules between slot regions.
67
-
-**`moveItemStackTo(itemStack, start, end, backwards)`** -- Helper that moves items into a slot range, first trying to stack with existing items, then filling empty slots.
68
-
-**`removed(player)`** -- Drops any carried item when the menu closes.
69
-
-**`stillValid(player)`** -- Pure virtual. Each subclass defines the distance/validity check.
70
-
-**`mayCombine(slot, item)`** -- Hook for dyeable armor and damaged item combination (4J addition).
63
+
-**`addSlot(Slot*)`**: Registers a slot, giving it a sequential index.
64
+
-**`broadcastChanges()`**: Compares each slot against `lastSlots` and fires `ContainerListener::slotChanged()`when things differ.
65
+
-**`clicked(slotIndex, buttonNum, clickType, player)`**: The main click dispatcher. Handles pickup, quick-move, swap, and clone logic. Manages carried items through the player's `Inventory`.
66
+
-**`quickMoveStack(player, slotIndex)`**: Virtual. Subclasses override this to define shift-click transfer rules between slot regions.
67
+
-**`moveItemStackTo(itemStack, start, end, backwards)`**: Helper that moves items into a slot range, first trying to stack with existing items, then filling empty slots.
68
+
-**`removed(player)`**: Drops any carried item when the menu closes.
69
+
-**`stillValid(player)`**: Pure virtual. Each subclass defines the distance/validity check.
70
+
-**`mayCombine(slot, item)`**: Hook for dyeable armor and damaged item combination (4J addition).
71
71
72
72
### Synchronization
73
73
74
-
The menu tracks `unSynchedPlayers` -- a set of players whose client state is out of date. `isSynched()` and `setSynched()` control this flag. Change detection uses `ItemInstance::matches()` to compare current slot contents against `lastSlots` snapshots.
74
+
The menu tracks `unSynchedPlayers`, a set of players whose client state is out of date. `isSynched()` and `setSynched()` control this flag. Change detection uses `ItemInstance::matches()` to compare current slot contents against `lastSlots` snapshots.
75
75
76
76
`MenuBackup` provides transactional rollback support, storing snapshots keyed by `changeUid`. It supports `save()`, `rollback()`, and `deleteBackup()`.
77
77
@@ -83,38 +83,38 @@ The menu tracks `unSynchedPlayers` -- a set of players whose client state is out
83
83
84
84
| Method | Purpose |
85
85
|---|---|
86
-
|`mayPlace(item)`| Whether the item can be placed here (overridden for type-restricted slots) |
86
+
|`mayPlace(item)`| Whether the item can go here (overridden for type-restricted slots) |
87
87
|`mayPickup(player)`| Whether the player can take the item out |
88
88
|`getMaxStackSize()`| Stack limit for this slot (delegates to container by default) |
89
89
|`set(item)` / `getItem()`| Read/write the slot contents |
90
90
|`remove(count)`| Split items off the slot |
91
91
|`onTake(player, item)`| Callback after a player takes items (used for achievements, XP) |
92
92
|`swap(other)`| Swap contents with another slot |
93
93
|`mayCombine(item)`| 4J addition for item combination support |
94
-
|`combine(item)`| 4J addition that performs the combination |
94
+
|`combine(item)`| 4J addition that does the combination |
95
95
|`isAt(container, index)`| Identity check for finding a slot by its backing container and index |
96
96
97
-
Specialized slot subclasses exist within menus. For example, `BrewingStandMenu::PotionSlot`restricts placement to bottles and caps stack size at 1, while `BrewingStandMenu::IngredientsSlot` only accepts valid brewing ingredients.
97
+
Specialized slot subclasses exist within menus. For example, `BrewingStandMenu::PotionSlot`only allows bottles and caps stack size at 1, while `BrewingStandMenu::IngredientsSlot` only accepts valid brewing ingredients.
98
98
99
99
## Menu subclasses
100
100
101
101
### InventoryMenu
102
102
103
-
The player's own inventory screen. Contains a 2x2 crafting grid, 4 armor slots, 27 main inventory slots, and 9 hotbar slots.
103
+
The player's own inventory screen. Has a 2x2 crafting grid, 4 armor slots, 27 main inventory slots, and 9 hotbar slots.
Overrides `slotsChanged()` to re-check crafting recipes. Supports `mayCombine` for dyeable armor.
114
114
115
115
### CraftingMenu
116
116
117
-
The 3x3 crafting table screen. Tied to a world position for the `stillValid()` distance check. Drops crafting grid contents on close via`removed()`.
117
+
The 3x3 crafting table screen. Tied to a world position for the `stillValid()` distance check. Drops crafting grid contents on close through`removed()`.
118
118
119
119
### FurnaceMenu
120
120
@@ -132,27 +132,27 @@ Shift-click logic routes fuel items to the fuel slot, smeltable items to the ing
132
132
133
133
Wraps a `BrewingStandTileEntity`. Uses custom slot classes:
134
134
135
-
-**`PotionSlot`** -- Restricts to potion bottles, max stack 1. Fires an achievement on take.
136
-
-**`IngredientsSlot`** -- Restricts to valid brewing ingredients, max stack 1.
135
+
-**`PotionSlot`**: Only takes potion bottles, max stack 1. Fires an achievement on take.
136
+
-**`IngredientsSlot`**: Only takes valid brewing ingredients, max stack 1.
137
137
138
138
Broadcasts `brewTime` as data ID 0.
139
139
140
140
### EnchantmentMenu
141
141
142
-
Single input slot (max stack 1). Generates three random enchantment `costs[]` based on nearby bookshelves. `clickMenuButton()` applies the chosen enchantment, consuming player XP. Uses a `Random` seeded by `nameSeed`.
142
+
Single input slot (max stack 1). Generates three random enchantment `costs[]` based on nearby bookshelves. `clickMenuButton()` applies the chosen enchantment, spending player XP. Uses a `Random` seeded by `nameSeed`.
143
143
144
144
### MerchantMenu
145
145
146
146
Three slots: two payment inputs and one result output. Wraps a `Merchant` (villager) and a `MerchantContainer`. The `setSelectionHint()` method syncs the selected trade recipe from the trade list GUI.
147
147
148
148
### RepairMenu (Anvil)
149
149
150
-
Two input slots and one result slot. Computes `cost` (XP levels) via`createResult()`. Supports item renaming through`setItemName()`. The `DATA_TOTAL_COST` (0) data ID broadcasts the repair cost to listeners.
150
+
Two input slots and one result slot. Computes `cost` (XP levels) through`createResult()`. Supports item renaming with`setItemName()`. The `DATA_TOTAL_COST` (0) data ID broadcasts the repair cost to listeners.
151
151
152
152
### TrapMenu (Dispenser/Dropper)
153
153
154
154
Simple 9-slot grid wrapping a `DispenserTileEntity`. No special slot logic beyond standard quick-move between dispenser and inventory.
155
155
156
156
### ContainerMenu (Generic chest)
157
157
158
-
Used for single and double chests. Calculates `containerRows` from the container size and creates the appropriate slot grid. Calls `startOpen()` / `stopOpen()` for chest animations.
158
+
Used for single and double chests. Calculates `containerRows` from the container size and creates the right slot grid. Calls `startOpen()` / `stopOpen()` for chest animations.
0 commit comments