Reference: Map Data Blocks
Registry type: LibDatabase.MAP_DATA_BLOCK (library_of_exile_map_data_block) — SyncTime.NEVER
MapDataBlock
com.robertx22.library_of_exile.database.map_data_block.MapDataBlock
Abstract. Implements JsonExileRegistry<MapDataBlock>, GsonCustomSer<MapDataBlock>.
Serialized fields
| Field | Type | Default | Description |
|---|---|---|---|
id |
String |
"" |
GUID |
serializer |
String |
"" |
Type discriminator for Gson |
weight |
int |
1000 |
Selection weight |
aliases |
List<String> |
[] |
Alternate key strings that resolve to this block |
tags |
List<String> |
[] |
String tags (see MapBlockTags) |
process_on |
ChunkProcessType |
NORMAL |
When this block is processed |
ChunkProcessType enum
| Value | When processed |
|---|---|
NORMAL |
Standard chunk processing pass |
REWARD_ROOM |
Only in reward room chunks |
Abstract method
void processImplementationINTERNAL(
String key,
BlockPos pos,
Level world,
CompoundTag nbt,
MapBlockCtx ctx
)
Called once when the map chunk generator encounters this block's key.
MapBlockCtx
LibMapData libMapData // the current map's persistent data
MapBlockTags
String constants for built-in tags:
| Constant | Value | Meaning |
|---|---|---|
CAN_SPAWN_LEAGUE |
"can_spawn_league" |
This position can host a league spawn event |
Built-in implementations
SetBlockMB
Serializer: "set_block"
public String block_id; // ResourceLocation of the block to place
Replaces the block at pos with block_id.
Constructor: new SetBlockMB(String id, String blockId)
EmptyMBlock
No-op placeholder. Use when a position should be acknowledged but no action taken.
MapDimensionConfig
com.robertx22.library_of_exile.config.map_dimension.MapDimensionConfig
Configures a custom map dimension.
Registration
MapDimensionConfig.register(MapDimensionInfo info, MapDimensionConfigDefaults opt)
MapDimensionConfigDefaults builder methods
.defaultDataBlock(String guid) // fallback data block id
.chunkProcessRadius(int radius) // chunk radius to process data blocks
.chunkSpawnRadius(int radius) // chunk radius for mob spawning
.despawnIncorrectMobs(boolean val)
.wipeDimensionOnLoad(boolean val)
.dimensionMobsEnviroImmunity(boolean val)
Block/item tag keys
| Config key | Default tag | Purpose |
|---|---|---|
ALLOWED_BLOCK_BREAK_TAG |
library_of_exile:map_allowed_block_break |
Blocks players can break |
DISABLED_BLOCK_INTERACT_TAG |
library_of_exile:map_disable_block_interact |
Blocks players cannot interact with |
BANNED_ITEMS_TAG |
library_of_exile:banned_map_items |
Items that cannot be right-clicked |
ENVIRO_DMG_TAG |
library_of_exile:enviro_damage |
Damage types that don't affect mobs |
Runtime events
ExileEvents.PROCESS_DATA_BLOCK
Fired after processImplementationINTERNAL completes.
MapDataBlock dataBlock
String key
BlockPos pos
Level world
CompoundTag nbt
ExileEvents.DUNGEON_DATA_BLOCK_PLACED
Fired when a data block is placed into a structure during generation.
LevelAccessor levelAccessor
BlockPos pos
BlockInfo blockInfo
String structureId
JSON template
{
"id": "my_mod:example_block",
"serializer": "set_block",
"weight": 500,
"block_id": "minecraft:chest",
"aliases": ["my_mod:chest_alias"],
"tags": ["can_spawn_league"],
"process_on": "NORMAL"
}
Datapack folder: data/<namespace>/library_of_exile_map_data_block/