Bassebombecraft

Bassebombecraft

18.5k Downloads

1.14.3 mod initialization fails with error: Non [a-z0-9/._-] character in path of location: minecraft:instantSpell

Closed this issue ยท 3 comments

commented

Stacktrace:

Caused by: net.minecraft.util.ResourceLocationException: Non [a-z0-9/._-] character in path of location: minecraft:instantSpell
	at net.minecraft.util.ResourceLocation.<init>(ResourceLocation.java:30) ~[forge-1.14.3-27.0.50_mapped_snapshot_20190621-1.14.2-recomp.jar:?]
	at net.minecraft.util.ResourceLocation.<init>(ResourceLocation.java:35) ~[forge-1.14.3-27.0.50_mapped_snapshot_20190621-1.14.2-recomp.jar:?]
	at bassebombecraft.config.ConfigUtils.createFromConfig(ConfigUtils.java:50) ~[main/:?]
	at bassebombecraft.item.action.build.CopyPasteBlocks.<init>(CopyPasteBlocks.java:145) ~[main/:?]
	at bassebombecraft.item.book.CopyPasteBlocksBook.<init>(CopyPasteBlocksBook.java:13) ~[main/:?]
	at bassebombecraft.event.item.ItemRegistryEventHandler.<clinit>(ItemRegistryEventHandler.java:120) ~[main/:?]
	at java.lang.Class.forName0(Native Method) ~[?:1.8.0_211]
	at java.lang.Class.forName(Class.java:348) ~[?:1.8.0_211]
	at net.minecraftforge.fml.AutomaticEventSubscriber.lambda$inject$3(AutomaticEventSubscriber.java:70) ~[forge-1.14.3-27.0.50_mapped_snapshot_20190621-1.14.2-recomp.jar:?]
	at java.util.ArrayList.forEach(ArrayList.java:1257) ~[?:1.8.0_211]
	at net.minecraftforge.fml.AutomaticEventSubscriber.inject(AutomaticEventSubscriber.java:57) ~[forge-1.14.3-27.0.50_mapped_snapshot_20190621-1.14.2-recomp.jar:?]
	at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:140) ~[forge-1.14.3-27.0.50_mapped_snapshot_20190621-1.14.2-recomp.jar:27.0]

commented

Observation: It is the conversation of the particle type from the configuration file which fails:

	public static ParticleRenderingInfo[] createFromConfig(String key) {
		Config configuration = getBassebombeCraft().getConfiguration();
		String particleTypeName = configuration.getString(key + ".Particles.Type");
		ResourceLocation key2 = new ResourceLocation(particleTypeName);
		Optional<ParticleType<? extends IParticleData>> particleType = Registry.PARTICLE_TYPE.getValue(key2);
		BasicParticleType castParticleType = (BasicParticleType) particleType.get(); // type cast
commented

Solution: Configuration file values for particle to reference particle type names defined in
class net.minecraft.particles.ParticleTypes instead of net.minecraft.util.EnumParticleTypes.
Related to issues #378 and #380 just for configuration files.

commented

Closed with commit 1178d8b.