hanleybrand
-
Posts
2 -
Joined
-
Last visited
Posts posted by hanleybrand
-
-
I'm guessing this could be something I set up incorrectly, but I'm following https://wiki.mcjty.eu/modding/index.php?title=Basic_Block-1.12 and getting:
Error:(14, 9) java: cannot find symbol
symbol: method setUnlocalizedName(java.lang.String)
location: class com.hanleybrand.millwiz.blocks.FirstBlockMy class is pretty much identical to the one in the tutorial (obviously I used my own MODID, etc.), here's the src:
package com.hanleybrand.millwiz.blocks; import com.hanleybrand.millwiz.MillenaireWizards; import net.minecraft.block.Block; import net.minecraft.block.material.Material; import net.minecraft.item.ItemBlock; import net.minecraftforge.fml.common.registry.GameRegistry; public class FirstBlock extends Block { public FirstBlock() { super(Material.ROCK); setUnlocalizedName(MillenaireWizards.MODID + ".firstblock"); setRegistryName("firstblock"); } }
When I inspect the Block.class with Intellij (.~/[gradlepathtomc]/1.12.2-14.23.5.2768/stable/39/forgeSrc-1.12.2-14.23.5.2768.jar!/net/minecraft/block/Block.class) there isn't a method defined, and the IForgeRegistryEntry has a note about get/setRegistryName() being "valid replacement for the atrocious 'getUnlocalizedName().substring(6)' stuff that everyone does."When I setup the example mod (mcjty.modtut) for testing, it works and finds the class, but that's using forgeSrc-1.12-14.21.0.2385-PROJECT(ModTutorials1.12)-sources.jar, and in hat jar /net/minecraft/block/Block.java contains a setUnlocalizedName method.
The case is the same between the two source jars for net/minecraft/item/Item.java.
So, were get/setUnlocalizedName removed from Forge 1.12 at some point? I searched the GitHub repo and the ChangeLog and didn't see any notes about it - I'm also using mappings = "stable_39" but I don't know if that would matter at all.I guess my ultimate question is whether or not I made an error setting up my dev environment or if I can just delete the setUnlocalizedName(MillenaireWizards.MODID + ".firstblock"); line.
[1.12.2] Error:(14, 9) java: cannot find symbol: method setUnlocalizedName(java.lang.String)
in Modder Support
Posted · Edited by hanleybrand
Thanks a lot - this was a surprisingly hard piece of info to find. Is there a place where the MCP changes are published (I've googled things like 'mcforge mcp changelog' to no avail, except finding the mcp GitHub repo and mcpbot but there doesn't seem to be a place that lists what the changes are between the snapshots)?