Jump to content

[1.8, philosophy] 1-character modid curious crash


Elyon

Recommended Posts

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 :)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • For the moment it seems fixed. I deleted the JEI Config file, the Journeymap Server Config file, and disabled both the mods (even while disabled, it would still crash until those config files were gone). They're useful mods and I'd hate to not use it, would just deleting and redownloading the mods work?
    • For hours I have been trying to just instal Mr. Crayfish's Refurbished Furniture Mod, but each step to fix the error codes, the more problems arise. The farthest I got through the steps was getting to the Forge Installer, but once I had selected the file, an error saying "The directory is missing a launcher profile. Please run the minecraft launcher first". At this point I don;'t know what more I can do. Please help.
    • I create my mod pack,yesterday my mod pack is fine but i add one mod and error. I'm delete this mmod but minecraft is still stop on CONFIG_LOAD then I tried to delete config and restart it but again. If you can pleace help me. https://imgur.com/ngZBzuv
    • game crashes before even opening (log:https://mclo.gs/M8xvX7c)
    • I have created a custom entity that extends "TamableAnimal", but I am wanting to have it spawn in the ocean. I have it spawning right now, but it spawns way too frequently even with weight set to 1. I am guessing it is because it is rolling in the spawn pool of land animals since TameableAnimal extends Animal and is different than WaterAnimal, and since no land animals spawn in the ocean it just fills every inch up with my custom entity. I have followed basic tutorials for spawning entities with Forge, but I feel like I am missing something about how to change what spawn pool this custom entity ends up in. Is it possible to change that or do I need to refactor it to be based off of WaterAnimal to get those spawn? My biome modifier JSON file: { "type": "forge:add_spawns", "biomes": "#minecraft:is_ocean", "spawners": { "type": "darwinsmysticalmounts:water_animal", "weight": 20, "minCount": 1, "maxCount": 1 } } My client event: event.register(ModEntityTypes.WATER_ANIMAL.get(), SpawnPlacements.Type.NO_RESTRICTIONS, Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, WaterWyvernEntity::checkCustomWaterAnimalSpawnRules, SpawnPlacementRegisterEvent.Operation.REPLACE); And the actual custom spawn rule that makes it spawn in the water: public static boolean checkCustomWaterAnimalSpawnRules(EntityType<WaterAnimalEntity> pAnimal, LevelAccessor pLevel, MobSpawnType pSpawnType, BlockPos pPos, RandomSource pRandom) { return pPos.getY() > pLevel.getSeaLevel() - 16 && pLevel.getFluidState(pPos.below()).is(FluidTags.WATER); }  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

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