Jump to content

Recommended Posts

Posted

Hello,

 

I am 13 and trying to code a mod in java with forge, using eclipse on my mac.

 

I've installed the forege api, and started coding with it.

 

However, I have been unable to Texture the Item. When I start up the Minecraft Test it gives me tells me this, and what I believe is the error is in red. Not only does it tell me this, it tells me this about four times. The code that I have written is below the error.

 

Any help or suggestions would be greatly appreciated

 

 

2013-05-12 13:17:37 [iNFO] [ForgeModLoader] Forge Mod Loader version 5.1.8.611 for Minecraft 1.5.1 loading

2013-05-12 13:17:37 [iNFO] [ForgeModLoader] Java is Java HotSpot 64-Bit Server VM, version 1.6.0_43, running on Mac OS X:x86_64:10.8.2, installed at /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home

2013-05-12 13:17:37 [iNFO] [ForgeModLoader] Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation

2013-05-12 13:17:39 [iNFO] [sTDOUT] 229 recipes

2013-05-12 13:17:39 [iNFO] [sTDOUT] 27 achievements

2013-05-12 13:17:39 [iNFO] [Minecraft-Client] Setting user: Player354

2013-05-12 13:17:39 [iNFO] [sTDOUT] (Session ID is -)

2013-05-12 13:17:39 [iNFO] [sTDERR] Client asked for parameter: server

2013-05-12 13:17:39 [iNFO] [Minecraft-Client] LWJGL Version: 2.4.2

2013-05-12 13:17:39 [iNFO] [MinecraftForge] Attempting early MinecraftForge initialization

2013-05-12 13:17:39 [iNFO] [sTDOUT] MinecraftForge v7.7.1.611 Initialized

2013-05-12 13:17:39 [iNFO] [ForgeModLoader] MinecraftForge v7.7.1.611 Initialized

2013-05-12 13:17:39 [iNFO] [sTDOUT] Replaced 85 ore recipies

2013-05-12 13:17:39 [iNFO] [MinecraftForge] Completed early MinecraftForge initialization

2013-05-12 13:17:39 [iNFO] [ForgeModLoader] Reading custom logging properties from /Users/TrentNeutgens/Desktop/NerdSpeak/mcp/jars/config/logging.properties

2013-05-12 13:17:39 [OFF] [ForgeModLoader] Logging level for ForgeModLoader logging is set to ALL

2013-05-12 13:17:40 [iNFO] [ForgeModLoader] Searching /Users/TrentNeutgens/Desktop/NerdSpeak/mcp/jars/mods for mods

2013-05-12 13:17:40 [iNFO] [ForgeModLoader] Attempting to reparse the mod container bin

2013-05-12 13:17:41 [iNFO] [ForgeModLoader] Forge Mod Loader has identified 4 mods to load

2013-05-12 13:17:41 [iNFO] [mcp] Activating mod mcp

2013-05-12 13:17:41 [iNFO] [FML] Activating mod FML

2013-05-12 13:17:41 [iNFO] [Forge] Activating mod Forge

2013-05-12 13:17:41 [iNFO] [nerdSpeak] Activating mod nerdSpeak

2013-05-12 13:17:42 [iNFO] [ForgeModLoader] Configured a dormant chunk cache size of 0

2013-05-12 13:17:42 [iNFO] [sTDOUT]

2013-05-12 13:17:42 [iNFO] [sTDOUT] Starting up SoundSystem...

2013-05-12 13:17:42 [iNFO] [sTDOUT] Initializing LWJGL OpenAL

2013-05-12 13:17:42 [iNFO] [sTDOUT]    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)

2013-05-12 13:17:42 [iNFO] [sTDOUT] OpenAL initialized.

2013-05-12 13:17:42 [iNFO] [sTDOUT]

2013-05-12 13:17:43 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/lava_flow.txt

2013-05-12 13:17:43 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/water_flow.txt

2013-05-12 13:17:43 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/fire_0.txt

2013-05-12 13:17:43 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/fire_1.txt

2013-05-12 13:17:43 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/lava.txt

2013-05-12 13:17:43 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/portal.txt

2013-05-12 13:17:43 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/water.txt

2013-05-12 13:17:43 [iNFO] [Minecraft-Client] Found animation info for: textures/items/clock.txt

2013-05-12 13:17:43 [iNFO] [Minecraft-Client] Found animation info for: textures/items/compass.txt

2013-05-12 13:17:43 [iNFO] [sTDERR] java.io.FileNotFoundException: eclipse/Minecraft/common/gfx/nerdSpeak/hydrogen.png

2013-05-12 13:17:43 [iNFO] [sTDERR] at net.minecraft.client.texturepacks.TexturePackDefault.func_98139_b(TexturePackDefault.java:42)

2013-05-12 13:17:43 [iNFO] [sTDERR] at net.minecraft.client.texturepacks.TexturePackImplementation.func_98137_a(TexturePackImplementation.java:149)

2013-05-12 13:17:43 [iNFO] [sTDERR] at net.minecraft.client.texturepacks.TexturePackImplementation.getResourceAsStream(TexturePackImplementation.java:169)

2013-05-12 13:17:43 [iNFO] [sTDERR] at net.minecraft.client.renderer.RenderEngine.getTexture(RenderEngine.java:208)

2013-05-12 13:17:43 [iNFO] [sTDERR] at net.minecraftforge.client.MinecraftForgeClient.preloadTexture(MinecraftForgeClient.java:27)

2013-05-12 13:17:43 [iNFO] [sTDERR] at net.NerdSpeak.client.NerdSpeakClientProxy.registerRenderThings(NerdSpeakClientProxy.java:10)

2013-05-12 13:17:43 [iNFO] [sTDERR] at net.NerdSpeak.mod.mod_NerdSpeak.init(mod_NerdSpeak.java:40)

2013-05-12 13:17:43 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-05-12 13:17:43 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

2013-05-12 13:17:43 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

2013-05-12 13:17:43 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Method.java:597)

2013-05-12 13:17:43 [iNFO] [sTDERR] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515)

2013-05-12 13:17:43 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-05-12 13:17:43 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

2013-05-12 13:17:43 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

2013-05-12 13:17:43 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Method.java:597)

2013-05-12 13:17:43 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

2013-05-12 13:17:43 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

2013-05-12 13:17:43 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

2013-05-12 13:17:43 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

2013-05-12 13:17:43 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:267)

2013-05-12 13:17:43 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)

2013-05-12 13:17:43 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-05-12 13:17:43 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

2013-05-12 13:17:43 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

2013-05-12 13:17:43 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Method.java:597)

2013-05-12 13:17:43 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

2013-05-12 13:17:43 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

2013-05-12 13:17:43 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

2013-05-12 13:17:43 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

2013-05-12 13:17:43 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:267)

2013-05-12 13:17:43 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)

2013-05-12 13:17:43 [iNFO] [sTDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:689)

2013-05-12 13:17:43 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)

2013-05-12 13:17:43 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:444)

2013-05-12 13:17:43 [iNFO] [sTDERR] at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

2013-05-12 13:17:43 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:729)

2013-05-12 13:17:43 [iNFO] [sTDERR] at java.lang.Thread.run(Thread.java:680)

2013-05-12 13:17:43 [iNFO] [ForgeModLoader] Forge Mod Loader has successfully loaded 4 mods

2013-05-12 13:17:44 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/lava_flow.txt

2013-05-12 13:17:44 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/water_flow.txt

2013-05-12 13:17:44 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/fire_0.txt

2013-05-12 13:17:44 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/fire_1.txt

2013-05-12 13:17:44 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/lava.txt

2013-05-12 13:17:44 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/portal.txt

2013-05-12 13:17:44 [iNFO] [Minecraft-Client] Found animation info for: textures/blocks/water.txt

2013-05-12 13:17:44 [iNFO] [sTDERR] java.lang.RuntimeException: Don't register null!

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.renderer.texture.TextureMap.registerIcon(TextureMap.java:229)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.item.Item.updateIcons(Item.java:726)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.renderer.texture.TextureMap.refreshTextures(TextureMap.java:85)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.renderer.RenderEngine.refreshTextureMaps(RenderEngine.java:521)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.renderer.RenderEngine.refreshTextures(RenderEngine.java:432)

2013-05-12 13:17:44 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.onInitializationComplete(FMLClientHandler.java:247)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:475)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:729)

2013-05-12 13:17:44 [iNFO] [sTDERR] at java.lang.Thread.run(Thread.java:680)

2013-05-12 13:17:44 [WARNING] [Minecraft-Client] TextureManager.createTexture called for file textures/items/null.png, but that file does not exist. Ignoring.

2013-05-12 13:17:44 [iNFO] [Minecraft-Client] Found animation info for: textures/items/clock.txt

2013-05-12 13:17:44 [iNFO] [Minecraft-Client] Found animation info for: textures/items/compass.txt

2013-05-12 13:17:44 [iNFO] [ForgeModLoader] An error occured reading texture file eclipse/Minecraft/common/gfx/nerdSpeak/hydrogen.png (refreshTexture)

java.io.FileNotFoundException: eclipse/Minecraft/common/gfx/nerdSpeak/hydrogen.png

at net.minecraft.client.texturepacks.TexturePackDefault.func_98139_b(TexturePackDefault.java:42)

at net.minecraft.client.texturepacks.TexturePackImplementation.func_98137_a(TexturePackImplementation.java:149)

at net.minecraft.client.texturepacks.TexturePackImplementation.getResourceAsStream(TexturePackImplementation.java:169)

at net.minecraft.client.renderer.RenderEngine.refreshTextures(RenderEngine.java:474)

at cpw.mods.fml.client.FMLClientHandler.onInitializationComplete(FMLClientHandler.java:247)

at net.minecraft.client.Minecraft.startGame(Minecraft.java:475)

at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

at net.minecraft.client.Minecraft.run(Minecraft.java:729)

at java.lang.Thread.run(Thread.java:680)

2013-05-12 13:17:44 [iNFO] [sTDERR] java.io.FileNotFoundException: eclipse/Minecraft/common/gfx/nerdSpeak/hydrogen.png

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.texturepacks.TexturePackDefault.func_98139_b(TexturePackDefault.java:42)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.texturepacks.TexturePackImplementation.func_98137_a(TexturePackImplementation.java:149)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.texturepacks.TexturePackImplementation.getResourceAsStream(TexturePackImplementation.java:169)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.renderer.RenderEngine.refreshTextures(RenderEngine.java:474)

2013-05-12 13:17:44 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.onInitializationComplete(FMLClientHandler.java:247)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:475)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

2013-05-12 13:17:44 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:729)

2013-05-12 13:17:44 [iNFO] [sTDERR] at java.lang.Thread.run(Thread.java:680)

 

 

 

Here is the Base Class:

 

 

package net.NerdSpeak.mod;

 

import cpw.mods.fml.common.Mod;

import cpw.mods.fml.common.Mod.Init;

import cpw.mods.fml.common.Mod.Instance;

import cpw.mods.fml.common.Mod.PostInit;

import cpw.mods.fml.common.Mod.PreInit;

import cpw.mods.fml.common.SidedProxy;

import cpw.mods.fml.common.event.FMLInitializationEvent;

import cpw.mods.fml.common.event.FMLPostInitializationEvent;

import cpw.mods.fml.common.event.FMLPreInitializationEvent;

import cpw.mods.fml.common.network.NetworkMod;

import cpw.mods.fml.common.registry.LanguageRegistry;

 

@Mod(modid = "nerdSpeak", name = "Nerd Speak", version = "Alpha")

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

 

public class mod_NerdSpeak {

@Instance("nerdSpeak")

public static mod_NerdSpeak instance;

 

@SidedProxy(clientSide="net.NerdSpeak.client.NerdSpeakClientProxy", serverSide="net.NerdSpeak.mod.CommonProxy")

public static NerdSpeakCommonProxy proxy;

public static ItemHydrogen hydrogen;

@PreInit

public void preInit(FMLPreInitializationEvent event) {

}

 

@Init

public void init(FMLInitializationEvent event) {

hydrogen = (new ItemHydrogen(701));

LanguageRegistry.addName(hydrogen, "Hydrogen");

//At end!

proxy.registerRenderThings();

}

 

@PostInit

public static void postInit(FMLPostInitializationEvent event) {

}

}

 

 

 

Here is the Item Class

 

 

package net.NerdSpeak.mod;

 

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.item.EnumRarity;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

 

public class ItemHydrogen extends Item {

public ItemHydrogen(int par1){

super(par1);

this.setCreativeTab(CreativeTabs.tabMaterials);

}

//font color: common is white, uncommon is yellow, rare is light blue(enchanted), epic is purple (Notch apple)

@Override

@SideOnly(Side.CLIENT)

public EnumRarity getRarity(ItemStack par1ItemStack){

return EnumRarity.common;

}

//enchanted look

@Override

public boolean hasEffect(ItemStack par1ItemStack){

return false;

}

public String getTextureFile(){

return "eclipse/Minecraft/common/gfx/nerdSpeak/hydrogen.png"; // Note the changed file name.

}

}

 

 

Here is the Common Proxy Class

 

 

package net.NerdSpeak.mod;

 

public class NerdSpeakCommonProxy {

public void registerRenderThings(){}

}

 

 

 

Here is the Client Proxy Class

 

 

package net.NerdSpeak.client;

 

import net.NerdSpeak.mod.NerdSpeakCommonProxy;

import net.minecraftforge.client.MinecraftForgeClient;

 

public class NerdSpeakClientProxy extends NerdSpeakCommonProxy{

@Override

public void registerRenderThings(){

//MinecraftForgeClient.preloadTexture("/gfx.nerdSpeak/___.png");

MinecraftForgeClient.preloadTexture("eclipse/Minecraft/common/gfx/nerdSpeak/hydrogen.png");

}

}

 

 

Thank you for your time,

 

Geneventor

 

Hello again,

 

I put in the code that Draco18s showed, and everything works. I am very greatful! Funny thing is... I am not sure what I did. If someone could please explain, that would be much appreciated.

 

Thank you for your time(again),

 

Geneventor

Posted

Are you using MC 1.5.1/1.5.2? So yes, search for some tutorials on the internet for MC 1.5.1/1.5.2. If your using a older MC version, I recommend updating because there are some big changes to the way items and blocks get there textures.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

And in either case, you shouldn't be storing your textures inside the eclipse folder.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

At @init you have this:

hydrogen = (new ItemHydrogen(701));

 

Change it to this:

hydrogen = (new ItemHydrogen(701).setUnlocalizedName("name");

 

Thats new in 1.5. The "name" should be the name of the .png file. Just 1 picture with ONLY your item. Not a spritesheet. Place that picture in your mcp>jars>bin>minecraft.jar>textures>items (if its an item)

 

 

Posted

At @init you have this:

hydrogen = (new ItemHydrogen(701));

 

Change it to this:

hydrogen = (new ItemHydrogen(701).setUnlocalizedName("name");

 

Thats new in 1.5. The "name" should be the name of the .png file. Just 1 picture with ONLY your item. Not a spritesheet. Place that picture in your mcp>jars>bin>minecraft.jar>textures>items (if its an item)

 

To expand on this:

 

You should override the registerIcons(...) function and specify a mod-name:

This will prevent multiple mods from specifying the same texture files (so modA and mobB both wanting to use "new_wood.png" won't conflict).

 

public void registerIcons(IconRegister iconRegister)
    {
        blockIcon = iconRegister.registerIcon("MYMOD:BLOCK");
    }

 

AND DO NOT JAR EDIT FOR YOUR TEXTURES

 

mcp>src>mods>MYMOD>textures>blocks>BLOCK.png

 

(or items for items, armor for armor, etc.)

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

BTW, use spoilers and the code thing. That makes it much easier to read it for ourself and for us. You can access those when writing a new comment/topic.

 

Example:

 

This is the spoiler with the code thingy

 

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

Posted

Here's my Eclipse set up with working textures without jar editing.

 

This is the ninth time I've posted this.

 

Capture.png

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.