Jump to content

Recommended Posts

Posted

i can't seem to figure out what to name the image sprite to get it to cooperate with the code. i've re watched the tutorial and redid the code several times and I still haven't figured it out.

package com.FirstArchon.RedStoneium.item;

import com.FirstArchon.RedStoneium.reference.Reference;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

public class ItemRS extends Item
{
public itemRS()
{
 super();

}
@Override
public String getUnlocalizedName()
{
return String.format("item.%s%s", Reference.MOD_ID.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
}
@Override
  public String getUnlocalizedName(ItemStack itemStack)
  {
  return String.format("item.%s%s", Reference.MOD_ID.toLowerCase() + ":", getUnwrappedUnlocalizedName(super.getUnlocalizedName()));
  }
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IIconRegister iconRegister) {
 itemIcon = iconRegister.registerIcon(this.getUnlocalizedName().substring(this.getUnlocalizedName().indexOf(".") + 1));



}


protected String getUnwrappedUnlocalizedName(String unlocalizedName)
  {
  return unlocalizedName.substring(unlocalizedName.indexOf(".") + 1);
   }


}

package com.FirstArchon.RedStoneium.item;

public class ItemRedDiamondPick extends ItemRS
{
public ItemRedDiamondPick()
{
	super();
	this.setUnlocalizedName("RedDiamondPickaxe");
}
}

the item stays as a untextured item and i can't figure out how to get my item sprite I've made for it to stick.

any advice or pointers would be appreciated.

 

 

 

 

Posted

I don't want to change the code structure too much from the Pahimar solution because i'm using his example and the more things I change the more difficult it will be to follow.(the more i'll have to figure out how to apply what he's doing  to my code.)

 

 

the log says


[19:36:43] [Client thread/INFO] [Redstoneium]: TextureAtlasSprite{name='redstoneium:RedDiamondPickaxe', frameCount=0, rotated=false, x=0, y=0, height=0, width=0, u0=0.0, u1=0.0, v0=0.0, v1=0.0}
[19:36:43] [Client thread/ERROR]: Using missing texture, unable to load redstoneium:textures/items/RedDiamondPickaxe.png
java.io.FileNotFoundException: redstoneium:textures/items/RedDiamondPickaxe.png

RedDiamondPickaxe.png is the name and it's in the log i'm just not sure why it isn't loading...

Posted

I'm following his example because I'm unfamiliar with forge not because I don't know java. I'm not sure why he used this particular solution but  assuming that he's just a derp and he's doing it for no reason might come back to bite me latter.

Posted

I agree that this is the code version of

width=470 height=244http://msl.cs.uiuc.edu/~lavalle/cs397/goldberg.jpg[/img]

however changing the code structure risks changing something which has significance to code from latter on.

its a bit like trying to make a movie adaption of a book when the series isn't complete I don't know whats significant because I haven't seen the whole thing yet.

 

*edit* I guess I'll cross that bridge when I come to it.

would the image sprite look for the image under MyMod.MOD_ID + ":" + baseName (in my case I belive that would be Redstoneium.RedStoneium:RedDiamondPickaxe.png)

or will it look for it under baseName.png? (RedDiamondPickaxe.png)

Posted

i'm a little confused.

this is what I have now

package com.FirstArchon.RedStoneium.item;

import com.FirstArchon.RedStoneium.utility.LogHelper;

public class ItemRedDiamondPick extends ItemRS
{

	public ItemRedDiamondPick() {
	    super("redDiamondPick");
	    LogHelper.info("ItemRedDiamondPick executed");

}
}

and

package com.FirstArchon.RedStoneium.item;
import com.FirstArchon.RedStoneium.reference.Reference;
import com.FirstArchon.RedStoneium.utility.LogHelper;
import com.ibm.icu.impl.Utility;

import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

public class ItemRS extends Item
{
public ItemRS(String baseName) {
	LogHelper.info("basename is" + baseName);
    setUnlocalizedName(Reference.MOD_ID + "." + baseName);
    setTextureName(Reference.MOD_ID + ":" + baseName);
    LogHelper.info("ItemRS executed");
}


}

and its still not working. I'm probably missing something obvious...

 

Posted

U09l8wQ.png

[20:29:25] [main/INFO] [GradleStart]: Extra: []
[20:29:25] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --accessToken, {REDACTED}, --assetIndex, 1.7.10, --assetsDir, C:/Users/Home/.gradle/caches/minecraft/assets, --version, 1.7.10, --tweakClass, cpw.mods.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker]
[20:29:25] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[20:29:25] [main/INFO] [LaunchWrapper]: Using primary tweak class name cpw.mods.fml.common.launcher.FMLTweaker
[20:29:25] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker
[20:29:25] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLTweaker
[20:29:25] [main/INFO] [FML]: Forge Mod Loader version 7.10.85.1230 for Minecraft 1.7.10 loading
[20:29:25] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.7.0_71, running on Windows 7:amd64:6.1, installed at C:\Program Files\Java\jre7
[20:29:25] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[20:29:25] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.GradleStartCommon$GradleStartTweaker
[20:29:25] [main/INFO] [GradleStart]: Injecting location in coremod cpw.mods.fml.relauncher.FMLCorePlugin
[20:29:25] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[20:29:25] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[20:29:25] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.FMLDeobfTweaker
[20:29:25] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[20:29:25] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLInjectionAndSortingTweaker
[20:29:25] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[20:29:26] [main/ERROR] [FML]: The binary patch set is missing. Either you are in a development environment, or things are not going to work!
[20:29:31] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[20:29:31] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.relauncher.CoreModManager$FMLPluginWrapper
[20:29:31] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.FMLDeobfTweaker
[20:29:32] [main/INFO] [LaunchWrapper]: Loading tweak class name cpw.mods.fml.common.launcher.TerminalTweaker
[20:29:32] [main/INFO] [LaunchWrapper]: Calling tweak class cpw.mods.fml.common.launcher.TerminalTweaker
[20:29:32] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[20:29:35] [main/INFO]: Setting user: Player633
[20:29:38] [Client thread/INFO]: LWJGL Version: 2.9.1
[20:29:40] [Client thread/INFO] [MinecraftForge]: Attempting early MinecraftForge initialization
[20:29:40] [Client thread/INFO] [FML]: MinecraftForge v10.13.2.1230 Initialized
[20:29:40] [Client thread/INFO] [FML]: Replaced 182 ore recipies
[20:29:40] [Client thread/INFO] [MinecraftForge]: Completed early MinecraftForge initialization
[20:29:40] [Client thread/INFO] [FML]: Searching C:\Users\Home\Desktop\cj's stuff\AAAmoding\RedStoneium\eclipse\mods for mods
[20:29:45] [Client thread/INFO] [FML]: Forge Mod Loader has identified 4 mods to load
[20:29:46] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, RedStoneium] at CLIENT
[20:29:46] [Client thread/INFO] [FML]: Attempting connection with missing mods [mcp, FML, Forge, RedStoneium] at SERVER
[20:29:46] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Redstoneium
[20:29:47] [Client thread/INFO] [FML]: Processing ObjectHolder annotations
[20:29:47] [Client thread/INFO] [FML]: Found 341 ObjectHolder annotations
[20:29:47] [Client thread/INFO] [FML]: Configured a dormant chunk cache size of 0
[20:29:47] [Client thread/INFO] [Redstoneium]: basename isredDiamondPick
[20:29:47] [Client thread/INFO] [Redstoneium]: ItemRS executed
[20:29:47] [Client thread/INFO] [Redstoneium]: ItemRedDiamondPick executed
[20:29:47] [Client thread/INFO] [FML]: Applying holder lookups
[20:29:47] [Client thread/INFO] [FML]: Holder lookups applied
[20:29:47] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
[20:29:47] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
[20:29:47] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[20:29:47] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[20:29:47] [Thread-6/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[20:29:48] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
[20:29:48] [sound Library Loader/INFO]: Sound engine started
[20:29:52] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[20:29:53] [Client thread/ERROR]: Using missing texture, unable to load redstoneium:textures/items/redDiamondPick.png
java.io.FileNotFoundException: redstoneium:textures/items/redDiamondPick.png
at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTickableTexture(TextureManager.java:71) [TextureManager.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTextureMap(TextureManager.java:58) [TextureManager.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:583) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_71]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?]
at GradleStart.main(GradleStart.java:45) [start/:?]
[20:29:53] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[20:29:54] [Client thread/INFO] [FML]: Forge Mod Loader has successfully loaded 4 mods
[20:29:54] [Client thread/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:Redstoneium
[20:29:54] [Client thread/ERROR]: Using missing texture, unable to load redstoneium:textures/items/redDiamondPick.png
java.io.FileNotFoundException: redstoneium:textures/items/redDiamondPick.png
at net.minecraft.client.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:65) ~[FallbackResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.getResource(SimpleReloadableResourceManager.java:67) ~[simpleReloadableResourceManager.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTextureAtlas(TextureMap.java:126) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureMap.loadTexture(TextureMap.java:91) [TextureMap.class:?]
at net.minecraft.client.renderer.texture.TextureManager.loadTexture(TextureManager.java:89) [TextureManager.class:?]
at net.minecraft.client.renderer.texture.TextureManager.onResourceManagerReload(TextureManager.java:170) [TextureManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.notifyReloadListeners(SimpleReloadableResourceManager.java:134) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.resources.SimpleReloadableResourceManager.reloadResources(SimpleReloadableResourceManager.java:118) [simpleReloadableResourceManager.class:?]
at net.minecraft.client.Minecraft.refreshResources(Minecraft.java:643) [Minecraft.class:?]
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:303) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:586) [Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:931) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:164) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_71]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_71]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_71]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.11.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.11.jar:?]
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78) [start/:?]
at GradleStart.main(GradleStart.java:45) [start/:?]
[20:29:54] [Client thread/INFO]: Created: 256x256 textures/items-atlas
[20:29:54] [Client thread/INFO]: Created: 512x256 textures/blocks-atlas
[20:29:54] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
[20:29:54] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: SoundSystem shutting down...
[20:29:54] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:importantMessage:90]:     Author: Paul Lamb, www.paulscode.com
[20:29:54] [Client thread/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
[20:29:54] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
[20:29:54] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Starting up SoundSystem...
[20:29:55] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: Initializing LWJGL OpenAL
[20:29:55] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]:     (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[20:29:55] [Thread-8/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: OpenAL initialized.
[20:29:55] [sound Library Loader/INFO] [sTDOUT]: [paulscode.sound.SoundSystemLogger:message:69]: 
[20:29:55] [sound Library Loader/INFO]: Sound engine started
[20:29:59] [Client thread/ERROR]: ########## GL ERROR ##########
[20:29:59] [Client thread/ERROR]: @ Post startup
[20:29:59] [Client thread/ERROR]: 1281: Invalid value

 

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.