Jump to content

(SOLVED)Mob Names / Language Registry


MorpheusZero

Recommended Posts

So i searched and couldn't find anything. I have about 5 or 6 small mods and almost all of them spawn in a custom version of a vanilla mob. Each mob in-game shows the regular names when you are killed by them or spawn eggs. (Killed by Creeper. Killed by Zombie, etc)

 

Well this one mod, I cannot figure out why the name of my mob shows as for example, "Killed by entity.rebelsnowman.name" I use basically identical code for all of them and this one out of 6 doesn't work and it's making my brain explode that I can't figure it out.

 

LanguageRegistry.instance().addStringLocalization("entity."+COREUtil.modName5 +".EntityMorphSnowman.name", COREUtil.entityNameSnowman0);

 

Help please?

Link to comment
Share on other sites

I tried that. I'm not sure what the problem is. All of my mods use this exact same code with the COREUtil.modName<NUMBER> in them. I tried it without using my COREUtil like you mentioned above but it always looks the same in-game.

 

I've tried writing about 5 different ways and to no avail. I just can't comprehend why ALL 5 of my other mods this code works fine but this one doesn't.

 

@Mod(modid = COREUtil.modID5, 
name = COREUtil.modName5, 
version = COREUtil.versionNumber5, 
dependencies = COREUtil.modDependancies5)

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class RebelSnowmenBase
{
public static boolean configFireArrows;
public static int configHealth;


@SidedProxy(
		clientSide = COREUtil.proxyClient,
		serverSide = COREUtil.proxyServer)
public static CommonProxy proxy;




@EventHandler
    public void preModInit(FMLPreInitializationEvent event) 
{

        /**
         * Handles configuration file
         */
        Configuration config = new Configuration(event.getSuggestedConfigurationFile());

        // loading the configuration from its file
        config.load();
        

        configFireArrows = config.get(Configuration.CATEGORY_GENERAL, "FIERY_ARROWS_AT_NIGHT", false).getBoolean(true);
        configHealth = config.get(Configuration.CATEGORY_GENERAL, "SNOWMAN_MAX_HEALTH", 15).getInt();

        // saving the configuration to its file
        config.save();
    }

@EventHandler
    public void modInit(FMLInitializationEvent event) 
{
	/**
	 * Register MorphSnowman & Create Spawn Egg
	 */
    	
        EntityRegistry.registerGlobalEntityID(EntityMorphSnowman.class, "RebelSnowman", EntityRegistry.findGlobalUniqueEntityId(), 0xFFFFFF, 0x000000);
        EntityRegistry.registerModEntity(EntityMorphSnowman.class, "RebelSnowman", 3, this, 64, 3, true);
        
	EntityRegistry.addSpawn(EntityMorphSnowman.class, 5, 1, 1, EnumCreatureType.monster, BiomeGenBase.taiga, BiomeGenBase.taigaHills);


	LanguageRegistry.instance().addStringLocalization("entity."+COREUtil.modName5 +".EntityMorphSnowman.name", COREUtil.entityNameSnowman0);
    }
    
@EventHandler
    public void modsLoaded(FMLPostInitializationEvent event) 
{
    	
    }

    
}

Link to comment
Share on other sites

Thanks for your willingness to help but nothing is working.

 

LanguageRegistry.instance().addStringLocalization("entity.rebelsnowmen.RebelSnowman.name", "RebelSnowman");

 

I've switched things around a few dozen times to make it work and to no avail. I'm just going to scrap the project. I'm too frustrated with why my other mods work perfectly like this and this one doesn't.

 

Thanks.

Link to comment
Share on other sites

I have 6 mods that all do different things to different mobs. But the language registry code is basically the same. But I figured it out now. I spent two days trying to find a complex issue to my coding and it turns out it was something simple that I was overlooking.

Link to comment
Share on other sites

  • 3 months later...

Let's say you want to register:

EntityRegistry.registerModEntity(CustomEntity.class, "RegistrationName", 1, this, 80, 3, true);

Then, assuming your mod id is "modid":

In a .lang file, located in assets/modid/lang/
entity.modid.RegistrationName.name=Human language-dependent readable name

You need to name the .lang file with language code, like "en_US".

I prefer using UTF-8 encoding for the .lang file, and leave a blank line at the beginning.

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

    • [13abr.2024 23:04:08.876] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--username, thehappiestdeus, --version, 1.20.1-forge-47.2.23, --gameDir, C:\Users\********\AppData\Roaming\.minecraft, --assetsDir, C:\Users\********\AppData\Roaming\.minecraft\assets, --assetIndex, 5, --uuid, 6947100bd693327a9d73af48e609bc8e, --accessToken, ????????, --clientId, 0, --xuid, 0, --userType, msa, --versionType, release, --width, 854, --height, 480, --launchTarget, forgeclient, --fml.forgeVersion, 47.2.23, --fml.mcVersion, 1.20.1, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20230612.114412] [13abr.2024 23:04:08.900] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.9 10.0.9 main.dcd20f30 starting: java version 17.0.8 by Microsoft; OS Windows 11 arch amd64 version 10.0 [13abr.2024 23:04:12.324] [main/INFO] [net.minecraftforge.fml.loading.ImmediateWindowHandler/]: Loading ImmediateWindowProvider fmlearlywindow [13abr.2024 23:04:12.626] [main/INFO] [EARLYDISPLAY/]: Trying GL version 4.6 [13abr.2024 23:04:15.807] [main/INFO] [EARLYDISPLAY/]: Requested GL version 4.6 got version 4.6 [13abr.2024 23:04:16.706] [pool-4-thread-1/INFO] [EARLYDISPLAY/]: GL info: NVIDIA GeForce GTX 1050/PCIe/SSE2 GL version 4.6.0 NVIDIA 551.61, NVIDIA Corporation [13abr.2024 23:04:18.403] [main/WARN] [gg.essential.loader.stage1.EssentialLoaderBase/]: Found newer Essential Loader (stage2) version 1.6.0 [stable], skipping at user request [13abr.2024 23:04:18.405] [main/INFO] [gg.essential.loader.stage1.EssentialLoaderBase/]: Starting Essential Loader (stage2) version 1.4.1 (4b3b87be87d34916028dffa85460d085) [stable] [13abr.2024 23:04:18.631] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/C:/Users/********/AppData/Roaming/.minecraft/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar#100!/ Service=ModLauncher Env=CLIENT [13abr.2024 23:04:18.982] [main/WARN] [gg.essential.loader.stage2.EssentialLoaderBase/]: Found newer Essential version 1.3.1.3 [stable], skipping at user request [13abr.2024 23:04:20.965] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\********\AppData\Roaming\.minecraft\libraries\net\minecraftforge\fmlcore\1.20.1-47.2.23\fmlcore-1.20.1-47.2.23.jar is missing mods.toml file [13abr.2024 23:04:20.974] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\********\AppData\Roaming\.minecraft\libraries\net\minecraftforge\javafmllanguage\1.20.1-47.2.23\javafmllanguage-1.20.1-47.2.23.jar is missing mods.toml file [13abr.2024 23:04:20.981] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\********\AppData\Roaming\.minecraft\libraries\net\minecraftforge\lowcodelanguage\1.20.1-47.2.23\lowcodelanguage-1.20.1-47.2.23.jar is missing mods.toml file [13abr.2024 23:04:20.991] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file C:\Users\********\AppData\Roaming\.minecraft\libraries\net\minecraftforge\mclanguage\1.20.1-47.2.23\mclanguage-1.20.1-47.2.23.jar is missing mods.toml file [13abr.2024 23:04:22.047] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [13abr.2024 23:04:22.056] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: curios. Using Mod File: C:\Users\********\AppData\Roaming\.minecraft\mods\curios-forge-5.7.2 1.20.1.jar [13abr.2024 23:04:22.056] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: C:\Users\********\AppData\Roaming\.minecraft\mods\resourcefullib-forge-1.20.1-2.1.24.jar [13abr.2024 23:04:22.058] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: Found 22 dependencies adding them to mods collection [13abr.2024 23:04:31.937] [main/INFO] [mixin/]: Compatibility level set to JAVA_17 [13abr.2024 23:04:31.989] [main/ERROR] [mixin/]: Mixin config firstperson.mixins.json does not specify "minVersion" property [13abr.2024 23:04:32.169] [main/ERROR] [mixin/]: Mixin config entity_model_features.mixins.json does not specify "minVersion" property [13abr.2024 23:04:33.081] [main/INFO] [mixin/]: Successfully loaded Mixin Connector [com.sonicether.soundphysics.MixinConnector] [13abr.2024 23:04:33.089] [main/INFO] [cpw.mods.modlauncher.LaunchServiceHandler/MODLAUNCHER]: Launching target 'forgeclient' with arguments [--version, 1.20.1-forge-47.2.23, --gameDir, C:\Users\********\AppData\Roaming\.minecraft, --assetsDir, C:\Users\********\AppData\Roaming\.minecraft\assets, --uuid, 6947100bd693327a9d73af48e609bc8e, --username, thehappiestdeus, --assetIndex, 5, --accessToken, ????????, --clientId, 0, --xuid, 0, --userType, msa, --versionType, release, --width, 854, --height, 480] [13abr.2024 23:04:33.497] [main/INFO] [ModernFix/]: Loaded configuration file for ModernFix 5.15.0 mc1.20.1: 77 options available, 0 override(s) found [13abr.2024 23:04:33.500] [main/INFO] [ModernFix/]: Applying Nashorn fix [13abr.2024 23:04:33.544] [main/INFO] [ModernFix/]: Applied Forge config corruption patch [13abr.2024 23:04:33.869] [main/INFO] [Embeddium/]: Loaded configuration file for Embeddium: 172 options available, 3 override(s) found [13abr.2024 23:04:33.873] [main/INFO] [Embeddium-GraphicsAdapterProbe/]: Searching for graphics cards... [13abr.2024 23:04:34.631] [main/INFO] [Embeddium-GraphicsAdapterProbe/]: Found graphics card: GraphicsAdapterInfo[vendor=NVIDIA, name=NVIDIA GeForce GTX 1050, version=DriverVersion=31.0.15.5161] [13abr.2024 23:04:34.632] [main/INFO] [Embeddium-GraphicsAdapterProbe/]: Found graphics card: GraphicsAdapterInfo[vendor=INTEL, name=Intel(R) UHD Graphics 630, version=DriverVersion=31.0.101.2111] [13abr.2024 23:04:34.644] [main/WARN] [Embeddium-Workarounds/]: Sodium has applied one or more workarounds to prevent crashes or other issues on your system: [NVIDIA_THREADED_OPTIMIZATIONS] [13abr.2024 23:04:34.645] [main/WARN] [Embeddium-Workarounds/]: This is not necessarily an issue, but it may result in certain features or optimizations being disabled. You can sometimes fix these issues by upgrading your graphics driver. [13abr.2024 23:04:34.668] [main/WARN] [mixin/]: Reference map 'entity_model_features_forge_1.20.1-forge-refmap.json' for entity_model_features.mixins.json could not be read. If this is a development environment you can ignore this message [13abr.2024 23:04:34.868] [main/WARN] [mixin/]: Reference map 'yungsextras.refmap.json' for yungsextras.mixins.json could not be read. If this is a development environment you can ignore this message [13abr.2024 23:04:34.879] [main/WARN] [mixin/]: Reference map 'yungsextras.refmap.json' for yungsextras_forge.mixins.json could not be read. If this is a development environment you can ignore this message [13abr.2024 23:04:35.002] [main/WARN] [mixin/]: Reference map 'nitrogen_internals.refmap.json' for nitrogen_internals.mixins.json could not be read. If this is a development environment you can ignore this message [13abr.2024 23:04:35.135] [main/INFO] [Radium Config/]: Loaded configuration file for Radium: 125 options available, 1 override(s) found [13abr.2024 23:04:35.152] [main/WARN] [mixin/]: Reference map 'trashslot.refmap.json' for trashslot.mixins.json could not be read. If this is a development environment you can ignore this message [13abr.2024 23:04:35.360] [main/WARN] [mixin/]: Reference map '${refmap_target}refmap.json' for corgilib.forge.mixins.json could not be read. If this is a development environment you can ignore this message [13abr.2024 23:04:35.404] [main/WARN] [mixin/]: Reference map 'coroutil.refmap.json' for coroutil.mixins.json could not be read. If this is a development environment you can ignore this message [13abr.2024 23:04:35.599] [main/WARN] [mixin/]: Reference map 'chiselsandbits.refmap.json' for chisels-and-bits.mixins.json could not be read. If this is a development environment you can ignore this message [13abr.2024 23:04:35.634] [main/WARN] [mixin/]: Reference map 'cristellib-forge-refmap.json' for cristellib.mixins.json could not be read. If this is a development environment you can ignore this message [13abr.2024 23:04:35.822] [main/INFO] [Essential Logger - Plugin/]: Starting Essential v1.3.1.1 (#3a090c5c88) [stable] [13abr.2024 23:04:40.482] [main/WARN] [mixin/]: Error loading class: dev/tr7zw/skinlayers/render/CustomizableModelPart (java.lang.ClassNotFoundException: dev.tr7zw.skinlayers.render.CustomizableModelPart) [13abr.2024 23:04:42.465] [main/WARN] [Radium Config/]: Force-disabling mixin 'alloc.blockstate.StateMixin' as option 'mixin.alloc.blockstate' (added by mods [ferritecore]) disables it and children [13abr.2024 23:04:43.118] [main/WARN] [mixin/]: Error loading class: vectorwing/farmersdelight/client/renderer/HangingCanvasSignRenderer (java.lang.ClassNotFoundException: vectorwing.farmersdelight.client.renderer.HangingCanvasSignRenderer) [13abr.2024 23:04:43.129] [main/WARN] [mixin/]: Error loading class: vectorwing/farmersdelight/client/renderer/CanvasSignRenderer (java.lang.ClassNotFoundException: vectorwing.farmersdelight.client.renderer.CanvasSignRenderer) [13abr.2024 23:04:45.276] [main/WARN] [Embeddium/]: Force-disabling mixin 'features.render.world.sky.WorldRendererMixin' as rule 'mixin.features.render.world.sky' (added by mods [oculus]) disables it and children [13abr.2024 23:04:45.277] [main/WARN] [Embeddium/]: Force-disabling mixin 'features.render.world.sky.ClientWorldMixin' as rule 'mixin.features.render.world.sky' (added by mods [oculus]) disables it and children [13abr.2024 23:04:45.278] [main/WARN] [Embeddium/]: Force-disabling mixin 'features.render.world.sky.BackgroundRendererMixin' as rule 'mixin.features.render.world.sky' (added by mods [oculus]) disables it and children [13abr.2024 23:04:45.285] [main/WARN] [Embeddium/]: Force-disabling mixin 'features.render.gui.font.GlyphRendererMixin' as rule 'mixin.features.render.gui.font' (added by mods [oculus]) disables it and children [13abr.2024 23:04:45.285] [main/WARN] [Embeddium/]: Force-disabling mixin 'features.render.gui.font.FontSetMixin' as rule 'mixin.features.render.gui.font' (added by mods [oculus]) disables it and children [13abr.2024 23:04:45.286] [main/WARN] [Embeddium/]: Force-disabling mixin 'features.render.entity.shadows.EntityRenderDispatcherMixin' as rule 'mixin.features.render.entity' (added by mods [oculus]) disables it and children [13abr.2024 23:04:45.286] [main/WARN] [Embeddium/]: Force-disabling mixin 'features.render.entity.fast_render.ModelPartMixin' as rule 'mixin.features.render.entity' (added by mods [oculus]) disables it and children [13abr.2024 23:04:45.288] [main/WARN] [Embeddium/]: Force-disabling mixin 'features.render.entity.fast_render.CuboidMixin' as rule 'mixin.features.render.entity' (added by mods [oculus]) disables it and children [13abr.2024 23:04:45.291] [main/WARN] [Embeddium/]: Force-disabling mixin 'features.render.entity.cull.EntityRendererMixin' as rule 'mixin.features.render.entity' (added by mods [oculus]) disables it and children [13abr.2024 23:04:46.387] [main/INFO] [MixinExtras|Service/]: Initializing MixinExtras via com.llamalad7.mixinextras.service.MixinExtrasServiceImpl(version=0.3.5). [13abr.2024 23:04:51.658] [pool-6-thread-1/INFO] [net.minecraft.server.Bootstrap/]: ModernFix reached bootstrap stage (53.35 s after launch) [13abr.2024 23:04:52.021] [pool-6-thread-1/WARN] [mixin/]: @Final field delegatesByName:Ljava/util/Map; in modernfix-forge.mixins.json:perf.forge_registry_alloc.ForgeRegistryMixin should be final [13abr.2024 23:04:52.023] [pool-6-thread-1/WARN] [mixin/]: @Final field delegatesByValue:Ljava/util/Map; in modernfix-forge.mixins.json:perf.forge_registry_alloc.ForgeRegistryMixin should be final [13abr.2024 23:04:52.518] [pool-6-thread-1/INFO] [ModernFix/]: Injecting BlockStateBase cache population hook into getNeighborPathNodeType from me.jellysquid.mods.lithium.mixin.ai.pathing.AbstractBlockStateMixin [13abr.2024 23:04:52.519] [pool-6-thread-1/INFO] [ModernFix/]: Injecting BlockStateBase cache population hook into getPathNodeType from me.jellysquid.mods.lithium.mixin.ai.pathing.AbstractBlockStateMixin [13abr.2024 23:04:52.520] [pool-6-thread-1/INFO] [ModernFix/]: Injecting BlockStateBase cache population hook into getAllFlags from me.jellysquid.mods.lithium.mixin.util.block_tracking.AbstractBlockStateMixin [13abr.2024 23:04:57.799] [pool-6-thread-1/INFO] [net.minecraft.server.Bootstrap/]: Vanilla bootstrap took 6125 milliseconds  
    • k i opened rit and luanched. no matter what launcher i use, it always says 2 mods loaded, but it has 0 mdos loaded. i tried several times with multiMC
    • i downloaded it. what do i do next? how do i open the luancher
    • It happened suddenly to me and a friend and we don't know how to fix it Blocks like the lava, the "UGH" sound, the door sound, etc.
  • Topics

×
×
  • Create New...

Important Information

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