Jump to content

Recommended Posts

Posted

Hello,

i'm new to forge and trying to create my own Mod. I only have one Problem:

Minecraft isn't loading my textures. After changing the names of my items, all items have this purple/black cube as texture, but i'm not getting any errors.

 

I double checked all file and class names, but i found no mistake.

 

I would be really happy if theres an solution for my problem!

 

P.S.: Is there any german modding forum for forge? Writing in german is much easier for me, although it's not that problem in english.

Posted

This is my class for creating items:

public final class ModItems {

public static Item betterToolsIngot = new BasicItem("better_tools_ingot");
public static Item smeltedBetterToolsIngot = new BasicItem("smelted_better_tools_ingot");
public static Item smeltedIronIngot = new BasicItem("smelted_iron_ingot");
public static Item pickaxeHeadPattern = new BasicItem("pickaxe_head_pattern");
public static Item stickPattern = new BasicItem("stick_pattern");
public static Item ironPickaxeHead = new BasicItem("iron_pickaxe_head");
public static Item ironStick = new BasicItem("iron_stick");

public static void registerItems() {

	GameRegistry.registerItem(betterToolsIngot, "better_tools_ingot");
	GameRegistry.registerItem(smeltedBetterToolsIngot, "smelted_better_tools_ingot");
	GameRegistry.registerItem(smeltedIronIngot, "smelted_iron_ingot");
	GameRegistry.registerItem(pickaxeHeadPattern, "pickaxe_head_pattern");
	GameRegistry.registerItem(stickPattern, "stick_pattern");
	GameRegistry.registerItem(ironPickaxeHead, "iron_pickaxe_head");
	GameRegistry.registerItem(ironStick, "iron_stick");

	//Debug
	System.out.println("Registered Items");
}

public static void addItemsToTab() {

	betterToolsIngot.setCreativeTab(Main.BetterToolsTab);
	smeltedBetterToolsIngot.setCreativeTab(Main.BetterToolsTab);
	smeltedIronIngot.setCreativeTab(Main.BetterToolsTab);
	pickaxeHeadPattern.setCreativeTab(Main.BetterToolsTab);
	stickPattern.setCreativeTab(Main.BetterToolsTab);
	ironPickaxeHead.setCreativeTab(Main.BetterToolsTab);
	ironStick.setCreativeTab(Main.BetterToolsTab);

	//Debug
	System.out.println("Set creative Tab for Items");
}
}

and heres the output of the launcher when starting the game:

[19:20:53] [main/INFO] [GradleStart]: username: xy
[19:20:53] [main/INFO] [GradleStart]: Extra: []
[19:20:53] [main/INFO] [GradleStart]: Password found, attempting login
[19:20:53] [main/INFO]: Logging in with username & password
[19:20:55] [main/INFO] [GradleStart]: Login Succesful!
[19:20:55] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, [], --username, liketechnik2000, --accessToken, {REDACTED}, --assetIndex, 1.8, --uuid, eff7840590b14a03ba09476ee240afb4, --userType, mojang, --assetsDir, /home/florian/.gradle/caches/minecraft/assets, --version, 1.8, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[19:20:55] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[19:20:55] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[19:20:55] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[19:20:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[19:20:55] [main/INFO] [FML]: Forge Mod Loader version 8.99.124.1450 for Minecraft 1.8 loading
[19:20:55] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_79, running on Linux:amd64:3.16.0-38-generic, installed at /opt/Oracle_Java/jre
[19:20:55] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[19:20:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[19:20:55] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[19:20:55] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[19:20:55] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[19:20:55] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[19:20:55] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[19:20:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[19:20:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[19:20:55] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[19:20:55] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[19:20:56] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[19:20:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[19:20:56] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[19:20:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[19:20:57] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[19:20:57] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[19:20:57] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[19:20:58] [Client thread/INFO]: Setting user: liketechnik2000
[19:21:01] [Client thread/INFO]: LWJGL Version: 2.9.1
[19:21:02] [Client thread/INFO] [sTDOUT]: [net.minecraftforge.fml.client.SplashProgress:start:235]: ---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 14.09.15 19:21
Description: Loading screen debug info

This is just a prompt for computer specs to be printed. THIS IS NOT A ERROR


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- System Details --
Details:
Minecraft Version: 1.8
Operating System: Linux (amd64) version 3.16.0-38-generic
Java Version: 1.7.0_79, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 750997440 bytes (716 MB) / 1038876672 bytes (990 MB) up to 1038876672 bytes (990 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: 
Loaded coremods (and transformers): 
GL info: ' Vendor: 'X.Org' Version: '3.0 Mesa 10.1.3' Renderer: 'Gallium 0.4 on AMD RS780'
[19:21:02] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[19:21:02] [Client thread/INFO] [FML]: MinecraftForge v11.14.3.1450 Initialized
[19:21:02] [Client thread/INFO] [FML]: Replaced 204 ore recipies
[19:21:02] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[19:21:02] [Client thread/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[19:21:02] [Client thread/INFO] [FML]: Searching /home/florian/Daten/Minecraft/Programierte-Mods/betterTools/eclipse/mods for mods
[19:21:04] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[19:21:04] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, bettertools] at CLIENT
[19:21:04] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, bettertools] at SERVER
[19:21:05] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.creative.tab.BetterToolsTab:<init>:16]: Created new Tab for BetterTools
[19:21:05] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:BetterTools
[19:21:05] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[19:21:05] [Client thread/INFO] [FML]: Found 384 ObjectHolder annotations
[19:21:05] [Client thread/INFO] [FML]: Identifying ItemStackHolder annotations
[19:21:05] [Client thread/INFO] [FML]: Found 0 ItemStackHolder annotations
[19:21:05] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[19:21:05] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.Main:preInit:31]: Started preInit for: bettertools
[19:21:05] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.items.ModItems:registerItems:31]: Registered Items
[19:21:05] [Client thread/INFO] [FML]: Applying holder lookups
[19:21:05] [Client thread/INFO] [FML]: Holder lookups applied
[19:21:05] [Client thread/INFO] [FML]: Injecting itemstacks
[19:21:05] [Client thread/INFO] [FML]: Itemstack injection complete
[19:21:05] [Client thread/INFO] [sTDOUT]: [tv.twitch.StandardCoreAPI:<init>:16]: If on Windows, make sure to provide all of the necessary dll's as specified in the twitchsdk README. Also, make sure to set the PATH environment variable to point to the directory containing the dll's.
[19:21:05] [Client thread/ERROR]: Couldn't initialize twitch stream
[19:21:05] [sound Library Loader/INFO]: Starting up SoundSystem...
[19:21:05] [Thread-8/INFO]: Initializing LWJGL OpenAL
[19:21:05] [Thread-8/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[19:21:05] [Thread-8/INFO]: OpenAL initialized.
[19:21:06] [sound Library Loader/INFO]: Sound engine started
[19:21:09] [Client thread/INFO]: Created: 512x512 textures-atlas
[19:21:10] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.Main:init:42]: Started init for: bettertools
[19:21:10] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.items.ModItems:addItemsToTab:45]: Set creative Tab for Items
[19:21:10] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.items.RenderRegister:reg:33]: bettertools:better_tools_ingot
[19:21:10] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.items.RenderRegister:reg:33]: bettertools:smelted_better_tools_ingot
[19:21:10] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.items.RenderRegister:reg:33]: bettertools:smelted_iron_ingot
[19:21:10] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.items.RenderRegister:reg:33]: bettertools:pickaxe_head_pattern
[19:21:10] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.items.RenderRegister:reg:33]: bettertools:stick_pattern
[19:21:10] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.items.RenderRegister:reg:33]: bettertools:iron_pickaxe_head
[19:21:10] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.items.RenderRegister:reg:33]: bettertools:iron_stick
[19:21:10] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.items.RenderRegister:registerRenderer:24]: Registered Item Renderer
[19:21:10] [Client thread/INFO] [FML]: Injecting itemstacks
[19:21:10] [Client thread/INFO] [FML]: Itemstack injection complete
[19:21:10] [Client thread/INFO] [sTDOUT]: [com.liketechnik.bettertools.Main:postInit:50]: Started postInit for: bettertools
[19:21:10] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
[19:21:10] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:BetterTools
[19:21:11] [Client thread/INFO]: SoundSystem shutting down...
[19:21:11] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com
[19:21:11] [sound Library Loader/INFO]: Starting up SoundSystem...
[19:21:11] [Thread-10/INFO]: Initializing LWJGL OpenAL
[19:21:11] [Thread-10/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[19:21:11] [Thread-10/INFO]: OpenAL initialized.
[19:21:11] [sound Library Loader/INFO]: Sound engine started
[19:21:12] [Client thread/INFO]: Created: 512x512 textures-atlas
[19:21:27] [Client thread/INFO]: Stopping!
[19:21:27] [Client thread/INFO]: SoundSystem shutting down...
[19:21:28] [Client thread/WARN]: Author: Paul Lamb, www.paulscode.com

 

and my .json filenames with path:

path:asstes/bettertools/models/item
file names:
better_tools_ingot.json
smelted_better_tools_ingot.json
... and so on

Posted

Main.class:

package com.liketechnik.bettertools;

import com.liketechnik.bettertools.proxy.CommonProxy;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

@Mod(modid=Main.MODID, name=Main.MODNAME, version=Main.VERSION)
public class Main {

public static final String MODID = "bettertools";
public static final String MODNAME = "BetterTools";
public static final String VERSION = "1.0.0-mc1.8";

@SidedProxy(modId=MODID, clientSide="com.liketechnik.bettertools.proxy.ClientProxy", 
		serverSide="com.liketechnik.bettertools.proxy.ServerProxy")
public static CommonProxy proxy;

@Instance
public static Main instance = new Main();

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
	//Debug
	System.out.println("Started preInit for: " + MODID);

	Main.proxy.preInit(event);
}

public static CreativeTabs BetterToolsTab = 
		new com.liketechnik.bettertools.creative.tab.BetterToolsTab(CreativeTabs.getNextID(), "BetterTools");

@EventHandler
public void init(FMLInitializationEvent event) {
	//Debug
	System.out.println("Started init for: " +  MODID);

	Main.proxy.init(event);
}

@EventHandler
public void postInit(FMLPostInitializationEvent event) {
	//Debug
	System.out.println("Started postInit for: " + MODID);

	Main.proxy.postInit(event);
}
}

 

CommonProxy.class:

package com.liketechnik.bettertools.proxy;

import com.liketechnik.bettertools.items.ModItems;

import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

public class CommonProxy {

public void preInit(FMLPreInitializationEvent event) {

	ModItems.registerItems();
}

public void init(FMLInitializationEvent event) {

	ModItems.addItemsToTab();
}

public void postInit(FMLPostInitializationEvent event) {

}
}

 

ClientProxy.clas:

package com.liketechnik.bettertools.proxy;

import com.liketechnik.bettertools.items.RenderRegister;

import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

public class ClientProxy extends CommonProxy {

@Override
public void preInit(FMLPreInitializationEvent event) {
	super.preInit(event);
}

@Override
public void init(FMLInitializationEvent event) {
	super.init(event);

	RenderRegister.registerRenderer();
}

@Override
public void postInit(FMLPostInitializationEvent event) {
	super.postInit(event);
}
}

Posted

So  I have to change the init part of my main class?

 

So It looks like this:

 

package com.liketechnik.bettertools;

import com.liketechnik.bettertools.proxy.CommonProxy;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.common.Mod.EventHandler;
import net.minecraftforge.fml.common.Mod.Instance;
import net.minecraftforge.fml.common.SidedProxy;
import net.minecraftforge.fml.common.event.FMLInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPostInitializationEvent;
import net.minecraftforge.fml.common.event.FMLPreInitializationEvent;

@Mod(modid=Main.MODID, name=Main.MODNAME, version=Main.VERSION)
public class Main {

public static final String MODID = "bettertools";
public static final String MODNAME = "BetterTools";
public static final String VERSION = "1.0.0-mc1.8";

@SidedProxy(modId=MODID, clientSide="com.liketechnik.bettertools.proxy.ClientProxy", 
		serverSide="com.liketechnik.bettertools.proxy.ServerProxy")
public static CommonProxy proxy;

@Instance
public static Main instance = new Main();

@EventHandler
public void preInit(FMLPreInitializationEvent event) {
	//Debug
	System.out.println("Started preInit for: " + MODID);

	Main.proxy.preInit(event);
}

public static CreativeTabs BetterToolsTab = 
		new com.liketechnik.bettertools.creative.tab.BetterToolsTab(CreativeTabs.getNextID(), "BetterTools");

@EventHandler
public void init(FMLInitializationEvent event) {
	//Debug
	System.out.println("Started init for: " +  MODID);

	Main.proxy.init(event);
               [b] RenderRegister.registerRenderer();[/b]
}

@EventHandler
public void postInit(FMLPostInitializationEvent event) {
	//Debug
	System.out.println("Started postInit for: " + MODID);

	Main.proxy.postInit(event);
}
}

 

EDIT: Added Main class edit

Posted

the FMLInit evnts are only called in ur main class. U need to call the proxy register renderer urself in the init method

 

Main

already calls the proxy method for each phase (preInit, init and postInit).

 

OP: Could you post your

RenderRegister

class? Please use [ code ] tags (without spaces) or post your code on Gist/Pastebin.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted
package com.liketechnik.bettertools.items;

import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.model.ModelResourceLocation;
import net.minecraft.item.Item;

import com.liketechnik.bettertools.Main;

public final class RenderRegister {

public static String modid = Main.MODID;

public static void registerRenderer() {

	reg(ModItems.betterToolsIngot);
	reg(ModItems.smeltedBetterToolsIngot);
	reg(ModItems.smeltedIronIngot);
	reg(ModItems.pickaxeHeadPattern);
	reg(ModItems.stickPattern);
	reg(ModItems.ironPickaxeHead);
	reg(ModItems.ironStick);

	//Debug
	System.out.println("Registered Item Renderer");
}

public static void reg(Item item) {

	Minecraft.getMinecraft().getRenderItem().getItemModelMesher()
    .register(item, 0, new ModelResourceLocation(modid + ":" + item.getUnlocalizedName().substring(5), "inventory"));

	//Debug
	System.out.println(modid + ":" + item.getUnlocalizedName().substring(5));
}
}

Posted

Your code looks correct. I'm not too sure what would cause missing textures/models without an error in the log.

 

Could you post one of your models?

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Posted

better_tools_ingot.json:

{
    "parent":"bettertools/standard_item",
    "textures": {
        "layer0":"bettertools:items/better_tools_ingot"
    }
}

 

standard_item.json:

{
    "parent":"builtin/generated",
    "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 ]
        }
    }
}

Posted

Problem solved. I wrote the mod completely new. With my standard_item.json file as parent, the game crashed during startup at loading the model file, so I removed it from my files. My model file looks like that now:

{
    "parent":"builtin/generated",
    "textures": {
        "layer0":"bettertools:items/better_tools_ingot"
    }
}

 

The textures are getting rendered now, so everything's fine.

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.