Jump to content

Recommended Posts

Posted

I am naming a current mod project i (as in the imaginary unit), and figured the modid

i

would be fitting.

 

Supplying a 1-character modid, and subsequently providing a vanilla name for a block (in my case,

furnace

) crashes the game when loading with the following error:

 

[Client thread/ERROR]: Caught an exception during block registration
java.lang.IllegalArgumentException: The name i:furnace has been registered twice, for net.minecraft.block.BlockFurnace@d08edc5 and net.elyon.i.block.Furnace@257708e.

 

Now, I understand we can't all have 1-character modids, and I have no issues giving the mod a more elaborate id (

imaginary

, say).

 

Furthermore, it would be simple to supply a different, non-clashing name for the block in question.

 

However, I am curious as to the decision of disallowing 1-character modids combined with vanilla names - that is, if it is in fact a conscious decision in the first place.

 

Mind; I do not request a solution to the crash, merely some insight into the possibly intenional dissallowance of the 1-character modid with vanilla names in the first place.

 

If indeed this behaviour is not intentional, consider this a bug report instead :)

Posted

The code snippet in ResourceLocation below shows how this problem occurs.

An 1-character modid would be ignored and replaced with default "minecraft" domain.

But still no idea about the intention.

 

    // Split "modid:name" into ["modid","name"]
    protected static String[] func_177516_a(String p_177516_0_)
    {
        String[] astring = new String[] {null, p_177516_0_};
        int i = p_177516_0_.indexOf(58);

        if (i >= 0)
        {
            astring[1] = p_177516_0_.substring(i + 1, p_177516_0_.length());

            if (i > 1)  // If length of modid is 1, it's ignored
            {
                astring[0] = p_177516_0_.substring(0, i);
            }
        }

        return astring;
    }

Author of Tao Land Mod.

width=200 height=69http://taoland.herbix.me/images/1/14/TaoLandLogo.png[/img]

Also, author of RenderTo

----

I'm not an English native speaker. I just try my best.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.