-
Notifications
You must be signed in to change notification settings - Fork 1
NBT‐Placement
Package: org.dimdev.limlib.api.world
NBT placement is used by AbstractNbtChunkGenerator to load structure files and place them during world generation.
NbtGroup maps sub-group names to structure names. Given a group ID, sub-group, and piece name, it resolves this path:
structures/nbt/<group_id_path>/<sub_group>/<piece>.nbt
For example, group example:demo, sub-group rooms, and piece room_a resolve to:
example:structures/nbt/demo/rooms/room_a.nbt
Use NbtGroup#pick(...) to choose a random piece from a sub-group. NbtGroup#fill(...) resolves the group's pieces and adds them to a FunctionMap.
NbtPlacerUtil reads compressed structure NBT from a ResourceManager. It keeps the block states, optional block entity data, entities, lowest position, and structure size.
Call NbtPlacerUtil#manipulate(...) before placement to rotate or mirror the structure. Manipulation combines Minecraft's Rotation and Mirror values.
Supported codec names include:
noneclockwise_90180counterclockwise_90front_backleft_righttop_left_bottom_righttop_right_bottom_left
AbstractNbtChunkGenerator#generateNbt(...) places the loaded blocks and spawns entities in a WorldGenRegion.
By default:
- air block states are skipped
- barriers are replaced with air
- block entity NBT is loaded when the block entity exists and matches the placed block
-
RandomizableContainerBlockEntityreceives the simple dungeon loot table unlessgetContainerLootTable(...)is overridden