Roguelike Dungeons

Roguelike Dungeons

33M Downloads

Utilizing MegaLoot

Budhvin opened this issue ยท 1 comments

commented

Hi

I have been trying to use mega loot items, and have the spawn in the game. I am unsure what I am doing wrong. I keep getting Not a Json Object : Null. Here is the code I am using.

https://pastebin.com/4XgX9x8v

commented

@Budhvin You have quite a few syntax errors in your JSON. Run it through a JSON validator to see what I mean. It's mostly trailing commas and escaped quotes.

Here's a valid version of your pasted JSON:

{
	"name": "_loot4",
	"loot_rules": [{
			"type": "ARMOUR",
			"loot": [{
					"data": {
						"name": "diamond_helmet",
						"ench": 30
					}
				},
				{
					"data": {
						"name": "diamond_chestplate",
						"ench": 30
					}
				},
				{
					"data": {
						"name": "diamond_leggings",
						"ench": 30
					}
				},
				{
					"data": {
						"name": "diamond_boots",
						"ench": 30
					}
				}
			],
			"level": 4,
			"each": true,
			"quantity": 2
		},
		{
			"type": "WEAPONS",
			"loot": [{
				"data": [{
						"data": {
							"name": "diamond_sword",
							"ench": 30
						}
					},
					{
						"data": {
							"name": "dungeontactics:diamond_hammer",
							"ench": 30
						}
					},
					{
						"data": {
							"name": "dungeontactics:diamond_knife",
							"ench": 30
						}
					}
				],
				"weight": 3
			}],
			"level": 4,
			"each": true,
			"quantity": 1
		},
		{
			"type": "REWARD",
			"loot": [{
					"data": {
						"name": "nether_star"
					}
				},
				{
					"data": {
						"name": "megaloot:mlitemweaponcase",
						"meta": 1
					},
					"weight": 1
				},
				{
					"data": {
						"name": "megaloot:mlitemweaponcase",
						"meta": 2
					},
					"weight": 1
				},
				{
					"data": {
						"name": "megaloot:mlitemweaponcase",
						"meta": 3
					},
					"weight": 1
				}
			],
			"level": 4,
			"each": true,
			"quantity": 2
		},
		{
			"type": "TOOLS",
			"loot": [{
					"data": [{
						"data": {
							"name": "dungeontactics:bag_tool"
						}
					}],
					"weight": 5
				},
				{
					"data": [{
							"data": {
								"name": "diamond_pickaxe",
								"ench": 30
							}
						},
						{
							"data": {
								"name": "diamond_axe",
								"ench": 30
							}
						},
						{
							"data": {
								"name": "diamond_shovel",
								"ench": 30
							}
						},
						{
							"data": {
								"name": "minecraft:diamond_hoe",
								"ench": 30
							}
						}

					],
					"weight": 3
				}
			],
			"level": 4,
			"each": true,
			"quantity": 2
		},
		{
			"loot": [{
					"data": [{
							"data": {
								"name": "ender_pearl"
							}
						},
						{
							"data": {
								"name": "dungeontactics:bag_book"
							}
						},
						{
							"data": {
								"name": "redstone",
								"min": 2,
								"max": 16
							}
						},
						{
							"data": {
								"name": "glowstone_dust",
								"min": 2,
								"max": 16
							}
						},
						{
							"data": {
								"name": "dye",
								"meta": 4,
								"min": 4,
								"max": 32
							}
						},
						{
							"data": {
								"name": "emerald",
								"min": 1,
								"max": 3
							}
						},
						{
							"data": {
								"name": "diamond",
								"min": 1,
								"max": 3
							}
						}
					],
					"weight": 5
				},
				{
					"data": [{
						"data": {
							"name": "book",
							"ench": 30
						}
					}],
					"weight": 3
				},
				{
					"data": [{
						"data": {
							"name": "book",
							"ench": 42
						}
					}],
					"weight": 2
				}


			],
			"level": 4,
			"each": true,
			"quantity": 12
		},
		{
			"loot": [{
				"data": {
					"name": "minecraft:potion",
					"nbt": "{Potion: \"cofhcore:regeneration5\"}"
				},
				"weight": 1
			}],
			"level": 4,
			"each": false,
			"quantity": 1
		}
	]
}