The Twilight Forest

The Twilight Forest

143M Downloads

Fix ResourceLocation ids

jredfox opened this issue ยท 9 comments

commented

Forge version:
[06:59:33] [main/WARN] [FML]: Potentially Dangerous alternative prefix minecraft for name hydra_spawner, expected twilightforest. This could be a intended override, but in most cases indicates a broken mod.

this is saying that the domain is minecraft:yourobject rather then yourmodid:yourobject. Fix it

Example proper new ResourceLocation(MainJava.Modid + ":" + "grass") if you must generate then have it as a property of your block classes don't have the domain of minecraft. Fix this please and thanks

commented

still have minecraft: in the map data you linked are you sure it's fixed with twilightforest: ? or is this a map converter?

commented

It is a DataFixer. In 1.12, it will use the correct mod domain. Upon converting to 1.13 (though there is a chance this class will change when Forge 1.13 actually becomes available), it should convert all TileEntities safely without world corruption.

commented

Btw your example isn't proper. Use the two param RL. Example: new ResourceLocation(modid, name);

commented

@Tamaized no using the parameters modid,name is wrong I believe it throws in slashes at least last time I checked it did.

commented

...what? Go look at the source please....
public String toString() { return this.resourceDomain + ':' + this.resourcePath; }
Should also look at ResourceLocation#splitObjectName

commented

it's the constructor not the .toString() you need to worry about however it looks like they changed this at least in 1.12.2 forge

It use to be wrong because in versions like 1.7.10 new ResourceLocation(modid,name) would actually result in modid/name and it was only used for textures and it would be your fault

commented

Again, Look at splitObjectName.

commented

Issue is fixed in development builds, not yet on Curseforge. End of discussion.

The datafixer works perfectly fine.