New Loot Types Loot Fill - Tmtravlr/LootOverhaul GitHub Wiki

New Loot Types - Loot Fill

Structure:

Tag Type Description
Size Compound Tag Tag to hold the X, Y, and Z size of the area to fill.
Size -> X Integer X size
Size -> Y Integer Y size
Size -> Z Integer Z size
Keep Boolean If true, will only replace replaceable blocks like air and water (Optional)
Shape String The shape of the area to fill. Valid options are CUBE, HOLLOW, SPHERE, CYLINDER (Optional, defaults to CUBE)
Axis String If the shape is CYLINDER, this will be the the cylinder's axis. Valid options are X, Y, and Z (Optional, defaults to Y)
Blocks Tag Compound List List of tag compounds representing blocks to choose from, which have the same format as the Loot Block item but also a weight.
Blocks -> {} -> Weight Integer Weight for this block (Optional, defaults to 1)
Blocks -> {} -> Block String The block id, like minecraft:grass
Blocks -> {} -> Meta Integer The numerical block metadata (Optional)
Blocks -> {} -> State Compound Tag The state of the block, like facing:"north" (Optional)
Blocks -> {} -> BlockEntityTag Compound Tag The tag of the tile entity for this block (Optional)
Blocks -> {} -> NoUpdate Boolean Won't run a block update when the block is placed. Certain things won't be updated, but sadly sand still falls. (Optional)

Description:

This item will fill an area as soon as it enters the world, much like the fill command, but it works if part of the area is out of the world, supports spheres and cylinders as shapes, and takes a list of blocks.

Example Usage: Filling a 10x10x10 area with air

 {
 	"type": "item",
 	"name": "lootoverhaul:loot_fill",
  	"weight": 1,
 	"functions": [
 		{
 			"function": "set_nbt",
 			"tag": "{Blocks:[{Block:\"minecraft:air\"}], Size:{X:10, Y:10, Z:10}}"
 		}
 	]
 }

Example Usage: Filling a sphere with radius 10 with either cobblestone or mossy cobblestone, with twice as much cobblestone as mossy cobblestone.

 {
 	"type": "item",
 	"name": "lootoverhaul:loot_fill",
  	"weight": 1,
 	"functions": [
 		{
 			"function": "set_nbt",
 			"tag": "{Blocks:[{Block:\"minecraft:cobblestone\", Weight:2},{Block:\"minecraft:mossy_cobblestone\", Weight:1}], Size:{X:10, Y:10, Z:10}, Shape:\"SPHERE\"}"
 		}
 	]
 }
Previous - Loot Structure Back Next - Loot Command
⚠️ **GitHub.com Fallback** ⚠️