Roguelike Dungeons

Roguelike Dungeons

33M Downloads

Can't specify the "meta" of the item.

Opened this issue ยท 1 comments

commented

Hello. I'm trying to add custom loot and I want to add various dyes and some items from other mods to the dungeon. For example, I'm trying to add a red dye:

{
	"name" : "demo:loot_all",
	"loot_rules" : [
		{
			"level" : [0, 1, 2, 3, 4],
			"loot" : [
				{"data" : {"name" : "minecraft:dye"}, "meta" : 1, "weight" : 1}
			],
			"each" : true,
			"quantity" : 4
		}
	]
}

But that does not work. In the dungeons, I still find an ink sac.

The same problem with mods. For example, I want to add a "copper ingot" from the Thermal Foundation, which has a meta "128":

{
	"name" : "demo:loot_all",
	"loot_rules" : [
		{
			"level" : [0, 1, 2, 3, 4],
			"loot" : [
				{"data" : {"name" : "minecraft:dye"}, "meta" : 1, "weight" : 1},
				{"data" : {"name" : "thermalfoundation:material"}, "meta" : 128, "min" : 8, "max" : 28, "weight" : 1}
			],
			"each" : true,
			"quantity" : 4
		}
	]
}

But in the dungeons, anyway, I find not a copper ingot, but "Pulverized Ingot", which has meta "0": https://prnt.sc/sy4qlv

What am I doing wrong?

commented

I'm dumb. The problem is resolved. I set brackets in the wrong place.

I set it correctly and now everything works fine:
{"data" : {"name" : "thermalfoundation:material", "meta" : 128}, "min" : 8, "max" : 28, "weight" : 1}