Jump to content

Lang file and item texture not working [1.12]


Kitsune_Ultima

Recommended Posts

The lang file I made for my mod is not working even though the syntax should be correct

en_US.lang

#Tabs

#Items
item.obsidian_ingot.name=Obsidian Ingot

#Blocks

 

The related texture for the item isn't working either

Texture: obsidian_ingot.png

obsidian_ingot.png.2b4cf20da2f8934eb87896dcc6670ae5.png

Model: obsidian_ingot.json

{
    "parent": "item/generated",
    "textures": {
        "layer0": "kuexam:items/obsidian_ingot"
     },
      
    "display": {
        "thirdperson": {
            "rotation": [-90,0,0],
            "translation": [0,1,-3],
            "scale": [0.55,0.55,0.55]
        },
        "firstperson": {
            "rotation": [0,-135,25],
            "translation": [0,4,2],
            "scale": [1.7,1.7,1.7]
        }
    }
}

 

File Structure if this helps any

Screenshot_16.thumb.png.9f06f24e72408b7ff3cf6f289ac813e5.png

 

I would really like to what I did wrong and what I can do about it

Link to comment
Share on other sites

27 minutes ago, Jay Avery said:

Post the latest log, it should contain texture/model errors.

here you go

2017-07-03 12:05:22,462 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-07-03 12:05:22,466 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[12:05:22] [main/INFO] [GradleStart]: Extra: []
[12:05:22] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/ryanh/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[12:05:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[12:05:22] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[12:05:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[12:05:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[12:05:22] [main/INFO] [FML]: Forge Mod Loader version 14.21.1.2387 for Minecraft 1.12 loading
[12:05:22] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_131, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_131
[12:05:22] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[12:05:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[12:05:22] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[12:05:22] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[12:05:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[12:05:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[12:05:22] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[12:05:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[12:05:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[12:05:22] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
2017-07-03 12:05:23,216 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-07-03 12:05:23,844 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2017-07-03 12:05:23,846 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[12:05:23] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[12:05:26] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[12:05:26] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[12:05:26] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[12:05:27] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[12:05:27] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[12:05:27] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[12:05:27] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[12:05:29] [main/INFO]: Setting user: Player592
[12:05:36] [main/WARN]: Skipping bad option: lastServer:
[12:05:37] [main/INFO]: LWJGL Version: 2.9.4
[12:05:38] [main/INFO] [FML]: -- System Details --
Details:
	Minecraft Version: 1.12
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_131, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 725285224 bytes (691 MB) / 1038876672 bytes (990 MB) up to 2112618496 bytes (2014 MB)
	JVM Flags: 3 total; -Xincgc -Xmx2G -Xms1G
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: 
	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'Intel' Version: '4.4.0 - Build 21.20.16.4542' Renderer: 'Intel(R) HD Graphics 620'
[12:05:38] [main/INFO] [FML]: MinecraftForge v14.21.1.2387 Initialized
[12:05:38] [main/INFO] [FML]: Replaced 921 ore ingredients
[12:05:39] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[12:05:39] [main/INFO] [FML]: Searching C:\Users\ryanh\Mod Creation\Test mod\run\mods for mods
[12:05:40] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[12:05:40] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 69656567 nanos
[12:05:41] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, kuexam] at CLIENT
[12:05:41] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, kuexam] at SERVER
[12:05:42] [main/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Extra Armor Mod
[12:05:42] [main/INFO] [FML]: Processing ObjectHolder annotations
[12:05:42] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
[12:05:42] [main/INFO] [FML]: Identifying ItemStackHolder annotations
[12:05:42] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
[12:05:42] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
[12:05:42] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[12:05:42] [main/INFO] [FML]: Applying holder lookups
[12:05:42] [main/INFO] [FML]: Holder lookups applied
[12:05:42] [main/INFO] [FML]: Applying holder lookups
[12:05:42] [main/INFO] [FML]: Holder lookups applied
[12:05:42] [main/INFO] [FML]: Applying holder lookups
[12:05:42] [main/INFO] [FML]: Holder lookups applied
[12:05:42] [main/INFO] [FML]: Applying holder lookups
[12:05:42] [main/INFO] [FML]: Holder lookups applied
[12:05:42] [main/INFO] [FML]: Injecting itemstacks
[12:05:42] [main/INFO] [FML]: Itemstack injection complete
[12:05:43] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Found status: UP_TO_DATE Target: null
[12:05:48] [Sound Library Loader/INFO]: Starting up SoundSystem...
[12:05:48] [Thread-5/INFO]: Initializing LWJGL OpenAL
[12:05:48] [Thread-5/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[12:05:49] [Thread-5/INFO]: OpenAL initialized.
[12:05:49] [Sound Library Loader/INFO]: Sound engine started
[12:05:56] [main/INFO] [FML]: Max texture size: 16384
[12:05:57] [main/INFO]: Created: 512x512 textures-atlas
[12:06:00] [main/INFO] [FML]: Injecting itemstacks
[12:06:00] [main/INFO] [FML]: Itemstack injection complete
[12:06:00] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods
[12:06:00] [main/WARN]: Skipping bad option: lastServer:
[12:06:00] [main/INFO]: Narrator library for x64 successfully loaded

 

Link to comment
Share on other sites

37 minutes ago, Jay Avery said:

Where do you register your item models?

here

ModItems.java

package com.kitsune_ultima.extraarmor.init;

import com.kitsune_ultima.extraarmor.Reference;
import com.kitsune_ultima.extraarmor.items.Obsidian_ingot;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.block.model.ModelResourceLocation;
import net.minecraft.item.Item;
import net.minecraftforge.fml.common.registry.GameRegistry;

public class ModItems {
	
	public static Item obsidianingot;
	
	public static void init() {
		obsidianingot = new Obsidian_ingot();
	}
	
	public static void registerRenders() {
		regsterRender(obsidianingot);
	}
	
	private static void regsterRender(Item item) {
		Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(item, 0, new ModelResourceLocation(item.getRegistryName(), "inventory"));
	}
}

 

and if this helps any

Register.java

package com.kitsune_ultima.extraarmor.init;

import com.kitsune_ultima.extraarmor.init.ModItems.*;
import com.kitsune_ultima.extraarmor.items.Obsidian_ingot;

import net.minecraft.block.Block;
import net.minecraft.item.Item;
import net.minecraftforge.event.RegistryEvent;
import net.minecraftforge.fml.common.Mod.EventBusSubscriber;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;

@EventBusSubscriber
public class Register {
	
	@SubscribeEvent
	public static void registerBlocks(RegistryEvent.Register<Block> event) {
	    event.getRegistry().registerAll();
	}
	@SubscribeEvent
	public static void registerItems(RegistryEvent.Register<Item> event) {
	    Obsidian_ingot OBSIDIAN_INGOT;
		event.getRegistry().registerAll(OBSIDIAN_INGOT = new Obsidian_ingot());
	}
	
}

 

Link to comment
Share on other sites

26 minutes ago, Kitsune_Ultima said:

Minecraft.getMinecraft().getRenderItem().getItemModelMesher()

Do not use ItemModelMesher, it is buggy and outdated. Use ModelLoader and do it in the ModelRegistryEvent.

 

26 minutes ago, Kitsune_Ultima said:

Obsidian_ingot OBSIDIAN_INGOT; event.getRegistry().registerAll(OBSIDIAN_INGOT = new Obsidian_ingot());

Why do you create a local to immediately discard it? Just pass a new instance of your item to the registerAll method, you do not need a local. Also make sure that you have set the registry name of the item you are registering.

 

26 minutes ago, Kitsune_Ultima said:

public static Item obsidianingot; public static void init() { obsidianingot = new Obsidian_ingot(); }

That is not how things are registered. Create a public static final Item %NAME% = null field and annotate it with ObjectHolder with the registry name of the item. You can either include your modid in that registry name or annotate the class with that field with ObjectHolder and give it your modid.

Edited by V0idWa1k3r
Link to comment
Share on other sites

25 minutes ago, V0idWa1k3r said:

Do not use ItemModelMesher, it is buggy and outdated. Use ModelLoader and do it in the ModelRegistryEvent.

^^^ how? the forge docs can be very vague 

 

27 minutes ago, V0idWa1k3r said:

Why do you create a local to immediately discard it? Just pass a new instance of your item to the registerAll method, you do not need a local. Also make sure that you have set the registry name of the item you are registering.

Going about this?

 

Link to comment
Share on other sites

Just now, Kitsune_Ultima said:

^^^ how? the forge docs can be very vague 

Just use the ModelRegistryEvent as you would use any other event, like the registry events you are currently using. 

You use ModelLoader by calling ModelLoader::setCustomModelResourceLocation in the same way you are calling ItemModelMesher::register. The arguments are the same.

 

3 minutes ago, Kitsune_Ultima said:

Going about this?

 

I'm sorry, I haven't quite understood your question here. Could you explain it a bit better?

Link to comment
Share on other sites

8 minutes ago, V0idWa1k3r said:

Just use the ModelRegistryEvent as you would use any other event, like the registry events you are currently using. 

You use ModelLoader by calling ModelLoader::setCustomModelResourceLocation in the same way you are calling ItemModelMesher::register. The arguments are the same.

doing this causes eclipse to throw an error 

Edited by Kitsune_Ultima
Link to comment
Share on other sites

Well show your code and that error then. 

 

3 minutes ago, Kitsune_Ultima said:

how do i do this?

You... pass a new instance to the registerAll method. Like event.getRegistry().registerAll(new Obsidian_ingot()); 

That is essentially what you are doing already, you are just creating an unnecessary local to immidiately discard it.

To set a registry name call Item::setRegistryName(%yourname%) somewhere, in your item constructor or chain it after instantinating your item.

Edited by V0idWa1k3r
Link to comment
Share on other sites

That is not how you use events. This is how you use events.

The :: thing is just a way to write method references I use(and I use it because that is the 'official' way to write method references in java). When I say use ModelLoader::setCustomModelResourceLocation I do not mean that you should literally copy the line into your code. I mean to use the setCustomModelResourceLocation method from the ModelLoader class. And get rid of the Minecraft.getMinecraft().getRenderItem() entirely - you do not need it.

Edited by V0idWa1k3r
Link to comment
Share on other sites

17 minutes ago, V0idWa1k3r said:

That is not how you use events. This is how you use events.

The :: thing is just a way to write method references I use. When I say use ModelLoader::setCustomModelResourceLocation I do not mean that you should literally copy the line into your code. I mean to use the setCustomModelResourceLocation method from the ModelLoader class. And get rid of the Minecraft.getMinecraft().getRenderItem() entirely - you do not need it.

2

I don't understand

Link to comment
Share on other sites

1 minute ago, Kitsune_Ultima said:

I don't understand

What? The docs? Or the way to use ModelLoader? While I do agree that the docs can be vague at some points this page is not the case. 

You use ModelLoader in the same way you would've used ItemModelMesher, the method is named setCustomModelResourceLocation and it accepts the same parameters as the one in the ItemModelMesher. Here is an example usage of the method. And in the same class here is an example of event handling. 

Link to comment
Share on other sites

As eclipse suggests you are 

1. Calling your registerRender with wrong arguments(you do not need to call it to begin with)

2. Referencing a non-existing item field/local.

 

You register models for your items in the ModelRegistryEvent using the ModelLoader's setCustomResourceLocation method. That is all you need to do. If you are struggling with understanding methods and fields I suggest you to learn basics of java before starting minecraft modding.

  • Like 1
Link to comment
Share on other sites

You wrote "item", and I think you wanted "obsidianIngot". Sometimes when pasting from elsewhere, you need to replace identifiers from the origin context with names from your own context (i.e. Use your own variables instead of leaving the names from another program)

Edited by jeffryfisher

The debugger is a powerful and necessary tool in any IDE, so learn how to use it. You'll be able to tell us more and get better help here if you investigate your runtime problems in the debugger before posting.

Link to comment
Share on other sites

7 minutes ago, V0idWa1k3r said:

1. Calling your registerRender with wrong arguments(you do not need to call it to begin with)

did that now this happens

 

Screenshot_20.thumb.png.411b15d8bf61c7e93b037b3db9f8360f.png

7 minutes ago, V0idWa1k3r said:

I suggest you to learn basics of java before starting minecraft modding.

I took a course on Java programming in school

Edited by Kitsune_Ultima
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



×
×
  • Create New...

Important Information

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