The Pure Suffering Mod

The Pure Suffering Mod

875k Downloads

Questions about creating a data pack

lupusui opened this issue ยท 7 comments

commented

Sorry, I'm a beginner. I'm making a custom invasion type in the form of a datapack, and I'm referencing the original invasion type json file, so why do I see multiple identical spawn lists?

commented

I see, thank you!
One more question:Can I play different music for the invasion types added in the data pack?

commented

Currently music is only able to be split between default, hyper, & nightmare invasions. I plan to rework the system in Pure Suffering 2.0, so I'll keep this issue open as a reminder for me to do that.

commented

Why doesn't this work?
It was recognised as a data pack and I was able to load it, but it didn't show up as a command suggestion.
Also the json format was fine, so maybe something necessary is missing.
{
"Dimensions": [
"minecraft:overworld"
],
"InvasionTime": "DAY",
"DefaultName":"Machine Harvest",
"Rarity": 15,
"SeverityInfo": [
{
"MobCapPercentage": 0.1,
"MobSpawnList": [
{
"EntityType": "crusty_chunks:worker",
"MaxCount": 3,
"MinCount": 1,
"Weight": 10
},
{
"EntityType": "crusty_chunks:hunter",
"MaxCount": 2,
"MinCount": 1,
"Weight": 5
},
{
"EntityType": "crusty_chunks:decimator",
"MaxCount": 1,
"MinCount": 1,
"Weight": 2
}
],
"TickDelay": 40
},
{
"MobCapPercentage": 0.3,
"MobSpawnList": [
{
"EntityType": "crusty_chunks:worker",
"MaxCount": 5,
"MinCount": 3,
"Weight": 20
},
{
"EntityType": "crusty_chunks:hunter",
"MaxCount": 3,
"MinCount": 2,
"Weight": 10
},
{
"EntityType": "crusty_chunks:decimator",
"MaxCount": 3,
"MinCount": 1,
"Weight": 5
}
],
"TickDelay": 30
},
{
"MobCapPercentage": 0.5,
"MobSpawnList": [
{
"EntityType": "crusty_chunks:worker",
"MaxCount": 7,
"MinCount": 5,
"Weight": 20
},
{
"EntityType": "crusty_chunks:hunter",
"MaxCount": 5,
"MinCount": 3,
"Weight": 10
},
{
"EntityType": "crusty_chunks:decimator",
"MaxCount": 3,
"MinCount": 1,
"Weight": 5
},
{
"EntityType": "crusty_chunks:eradicator",
"MaxCount": 1,
"MinCount": 1,
"Weight": 1
},
{
"EntityType": "crusty_chunks:mortarer",
"MaxCount": 2,
"MinCount": 1,
"Weight": 5
}
],
"TickDelay": 20
}
],
"Tier": 4,
"WeatherType": "THUNDER",
"ForceDespawn":true
}

commented

You're probably seeing the spawn list for each severity included with the invasion type. Each severity is an entry in a list, so you start at severity 1 at the top and continue down for higher severity values.

commented
{
	"Dimensions": [
	  "minecraft:overworld"
	],
	"InvasionTime": "DAY",
	"DefaultName": "Machine Harvest",
	"Rarity": 15,
	"SeverityInfo": [
		{
			"MobCapPercentage": 0.1,
			"MobSpawnList": [
				{
					"EntityType": "minecraft:zombie",
					"MaxCount": 3,
					"MinCount": 1,
					"Weight": 10
				},
				{
					"EntityType": "minecraft:husk",
					"MaxCount": 2,
					"MinCount": 1,
					"Weight": 5
				},
				{
					"EntityType": "minecraft:skeleton",
					"MaxCount": 1,
					"MinCount": 1,
					"Weight": 2
				}
			],
			"TickDelay": 40
		},
		{
			"MobCapPercentage": 0.3,
			"MobSpawnList": [
				{
					"EntityType": "minecraft:zombie",
					"MaxCount": 5,
					"MinCount": 3,
					"Weight": 20
				},
				{
					"EntityType": "minecraft:husk",
					"MaxCount": 3,
					"MinCount": 2,
					"Weight": 10
				},
				{
					"EntityType": "minecraft:skeleton",
					"MaxCount": 3,
					"MinCount": 1,
					"Weight": 5
				}
			],
			"TickDelay": 30
		},
		{
			"MobCapPercentage": 0.5,
			"MobSpawnList": [
				{
					"EntityType": "minecraft:zombie",
					"MaxCount": 7,
					"MinCount": 5,
					"Weight": 20
				},
				{
					"EntityType": "minecraft:husk",
					"MaxCount": 5,
					"MinCount": 3,
					"Weight": 10
				},
				{
					"EntityType": "minecraft:skeleton",
					"MaxCount": 3,
					"MinCount": 1,
					"Weight": 5
				},
				{
					"EntityType": "minecraft:stray",
					"MaxCount": 1,
					"MinCount": 1,
					"Weight": 1
				},
				{
					"EntityType": "minecraft:bogged",
					"MaxCount": 2,
					"MinCount": 1,
					"Weight": 5
				}
			],
			"TickDelay": 20
		}
	],
	"Tier": 4,
	"WeatherType": "THUNDER",
	"ForceDespawn": true
}

When I tested the same settings with vanilla mobs, it worked fine. I did notice that you didn't put a space between "ForceDespawn" & true, so maybe that's part of the issue? The only other thing that could be an issue is the id of the mobs are incorrect. A way to check is that an error message will appear in your debug.log in your logs folder.

commented

All of the mob IDs are correct, but these mobs don't spawn naturally, do I need to specify a spawn system?

commented

That's not a requirement, it has a default spawning system if nothing is specified.