That was exactly it. LOL. Never been the best when it came to terminal/command prompt. Well, I'm more knowledgeable for it now. Still following your tutorials. Love it so far. Good stuff, ock.
i am having some trouble with the second tutorial, saying among other things that Reference can't be made into a variable.
what would i need to do or import to fix this?
ok i got through step one, turned out im just a scrub that doesn't read instructions carefully, because all the questions i asked were in the tut, sorry for wasting all of your time and more importantly thread space, if you want me to i can delete my dumb posts
I'm on the textures tutorial and I did everything as you said but still don't see the texture on the item so my question is; what line of codes puts the item and the item texture together? Does it read the names of both item and item textures, sees that they have the same name and puts them together?
I'm almost through with making an item but i have an error in mod items:
The method setUnlocalizedName(String) is undefined for the type TestModItem
my current form of my four cases go as follow
package com.gmail.dakingcartoon.mods.TestMod;
import com.gmail.dakingcartoon.TestMod.init.ModItems;
import com.gmail.dakingcartoon.mods.TestMod.help.Reference;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class TestMod {
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
package com.gmail.dakingcartoon.TestMod.init;
import net.minecraft.item.Item;
import com.gmail.dakingcartoon.TestMod.items.TestModItem;
import com.gmail.dakingcartoon.mods.TestMod.help.RegisterHelper;
public class ModItems
{
public static Item pearl = new TestModItem().setUnlocalizedName("pearl");
public static void init()
{
RegisterHelper.registerItem(pearl);
}
}
package com.gmail.dakingcartoon.mods.TestMod.help;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
public class RegisterHelper
{
public static void registerBlock(Block block)
{
GameRegistry.registerBlock(block, Reference.MODID + block.getUnlocalizedName().substring(5));
}
public static void registerItem(Item item)
{
GameRegistry.registerItem(item, Reference.MODID + item.getUnlocalizedName().substring(5));
}
}
package com.gmail.dakingcartoon.TestMod.items;
import net.minecraft.creativetab.CreativeTabs;
public class TestModItem {
public TestModItem()
{
super();
setCreativeTab(CreativeTabs.tabMisc);
}
private void setCreativeTab(CreativeTabs tabmisc) {
// TODO Auto-generated method stub
ok i got through step one, turned out im just a scrub that doesn't read instructions carefully, because all the questions i asked were in the tut, sorry for wasting all of your time and more importantly thread space, if you want me to i can delete my dumb posts
Your completely fine. Other people may have issues similar to yours.
I'm on the textures tutorial and I did everything as you said but still don't see the texture on the item so my question is; what line of codes puts the item and the item texture together? Does it read the names of both item and item textures, sees that they have the same name and puts them together?
The method YourItem#registerIcons will set your texture for your item.
I'm almost through with making an item but i have an error in mod items:
The method setUnlocalizedName(String) is undefined for the type TestModItem
my current form of my four cases go as follow
package com.gmail.dakingcartoon.mods.TestMod;
import com.gmail.dakingcartoon.TestMod.init.ModItems;
import com.gmail.dakingcartoon.mods.TestMod.help.Reference;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class TestMod {
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
package com.gmail.dakingcartoon.TestMod.init;
import net.minecraft.item.Item;
import com.gmail.dakingcartoon.TestMod.items.TestModItem;
import com.gmail.dakingcartoon.mods.TestMod.help.RegisterHelper;
public class ModItems
{
public static Item pearl = new TestModItem().setUnlocalizedName("pearl");
public static void init()
{
RegisterHelper.registerItem(pearl);
}
}
package com.gmail.dakingcartoon.mods.TestMod.help;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
public class RegisterHelper
{
public static void registerBlock(Block block)
{
GameRegistry.registerBlock(block, Reference.MODID + block.getUnlocalizedName().substring(5));
}
public static void registerItem(Item item)
{
GameRegistry.registerItem(item, Reference.MODID + item.getUnlocalizedName().substring(5));
}
}
package com.gmail.dakingcartoon.TestMod.items;
import net.minecraft.creativetab.CreativeTabs;
public class TestModItem {
public TestModItem()
{
super();
setCreativeTab(CreativeTabs.tabMisc);
}
private void setCreativeTab(CreativeTabs tabmisc) {
// TODO Auto-generated method stub
extend item? can you elaborate? (also thank you for being so understanding)
In your TestModItem class, add " extends Item" to the "public class TestModItem" line, like so:
public class TestModItem extends Item
Extending classes essentially allows you to inherit a classes methods, in which, setUnlocalizedName is defined in the Item class. So you use that method, you need to extend the Item class. It's simply a way of inheriting methods, rather than typing them all out.
The problem is that the package (or class) "IIconRegister" seems to be missing... here is my java class: "pastebin"
When I type "import net.minecraft.client.renderer.texture.IIconRegister" (line 3) it gives me this error "the import net.minecraft.client.renderer.texture.IIconRegister can not be resolved"
And on line 20 "public void registerIcons(IIconRegister par1IconRegister)" it gives me this error "IIconRegister cannot be resolved to a type"
Then on line 22 "itemIcon = par1IconRegister.registerIcon(Reference.MODID + ":" + getUnlocalizedName().substring(5));" This error "itemIcon can not be resolved to a variable"
I believe these last 2 to be due to the first one,,,
The problem is that the package (or class) "IIconRegister" seems to be missing... here is my java class: "pastebin"
When I type "import net.minecraft.client.renderer.texture.IIconRegister" (line 3) it gives me this error "the import net.minecraft.client.renderer.texture.IIconRegister can not be resolved"
And on line 20 "public void registerIcons(IIconRegister par1IconRegister)" it gives me this error "IIconRegister cannot be resolved to a type"
Then on line 22 "itemIcon = par1IconRegister.registerIcon(Reference.MODID + ":" + getUnlocalizedName().substring(5));" This error "itemIcon can not be resolved to a variable"
I believe these last 2 to be due to the first one,,,
I'll have to plug that into my workspace and see what is wrong because it looks fine to me. You may want to change your packaged name to xiath_hyne instead, as it is just conventional to use lowercase in packages names.
after adding extended class, importing what was needed, i ran the code and got this error:
java.lang.Error: Unresolved compilation problem:
The return type is incompatible with Item.setCreativeTab(CreativeTabs)
at com.gmail.dakingcartoon.TestMod.items.TestModItem.setCreativeTab(TestModItem.java:13) ~[bin/:?]
at com.gmail.dakingcartoon.TestMod.items.TestModItem.<init>(TestModItem.java:10) ~[bin/:?]
at com.gmail.dakingcartoon.TestMod.init.ModItems.<clinit>(ModItems.java:10) ~[bin/:?]
at com.gmail.dakingcartoon.mods.TestMod.TestMod.preInit(TestMod.java:16) ~[bin/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?]
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) [Loader.class:?]
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [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.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
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/:?]
[14:12:19] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
// Oh - I know what I did wrong!
Time: 2/8/15 2:12 PM
Description: There was a severe problem during mod loading that has caused the game to fail
cpw.mods.fml.common.LoaderException: java.lang.Error: Unresolved compilation problem:
The return type is incompatible with Item.setCreativeTab(CreativeTabs)
at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:515)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:931)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)
at GradleStart.main(GradleStart.java:45)
Caused by: java.lang.Error: Unresolved compilation problem:
The return type is incompatible with Item.setCreativeTab(CreativeTabs)
at com.gmail.dakingcartoon.TestMod.items.TestModItem.setCreativeTab(TestModItem.java:13)
at com.gmail.dakingcartoon.TestMod.items.TestModItem.<init>(TestModItem.java:10)
at com.gmail.dakingcartoon.TestMod.init.ModItems.<clinit>(ModItems.java:10)
at com.gmail.dakingcartoon.mods.TestMod.TestMod.preInit(TestMod.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)
... 12 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (x86) version 6.1
Java Version: 1.8.0_31, Oracle Corporation
Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
Memory: 980085896 bytes (934 MB) / 1067057152 bytes (1017 MB) up to 1067057152 bytes (1017 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
DaKingCartoon_TestMod{Alpha-1.0.0} [TestMod] (bin) Unloaded->Constructed->Errored
[14:12:19] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\CESAR\Desktop\MineCraft Modding\1.7\TestMod\eclipse\.\crash-reports\crash-2015-02-08_14.12.19-client.txt
did i add extend item wrong?
edit: it seems like the error is in the TestModItem file on line 13:
package com.gmail.dakingcartoon.TestMod.items;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
public class TestModItem extends Item {
public TestModItem()
{
super();
setCreativeTab(CreativeTabs.tabMisc);
}
private void setCreativeTab(CreativeTabs tabmisc) {
}
}
the error reads as follows: The return type is incompatible with Item.setCreativeTab(CreativeTabs)
after adding extended class, importing what was needed, i ran the code and got this error:
java.lang.Error: Unresolved compilation problem:
The return type is incompatible with Item.setCreativeTab(CreativeTabs)
at com.gmail.dakingcartoon.TestMod.items.TestModItem.setCreativeTab(TestModItem.java:13) ~[bin/:?]
at com.gmail.dakingcartoon.TestMod.items.TestModItem.<init>(TestModItem.java:10) ~[bin/:?]
at com.gmail.dakingcartoon.TestMod.init.ModItems.<clinit>(ModItems.java:10) ~[bin/:?]
at com.gmail.dakingcartoon.mods.TestMod.TestMod.preInit(TestMod.java:16) ~[bin/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?]
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) [Loader.class:?]
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [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.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
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/:?]
[14:12:19] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
// Oh - I know what I did wrong!
Time: 2/8/15 2:12 PM
Description: There was a severe problem during mod loading that has caused the game to fail
cpw.mods.fml.common.LoaderException: java.lang.Error: Unresolved compilation problem:
The return type is incompatible with Item.setCreativeTab(CreativeTabs)
at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:515)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:931)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)
at GradleStart.main(GradleStart.java:45)
Caused by: java.lang.Error: Unresolved compilation problem:
The return type is incompatible with Item.setCreativeTab(CreativeTabs)
at com.gmail.dakingcartoon.TestMod.items.TestModItem.setCreativeTab(TestModItem.java:13)
at com.gmail.dakingcartoon.TestMod.items.TestModItem.<init>(TestModItem.java:10)
at com.gmail.dakingcartoon.TestMod.init.ModItems.<clinit>(ModItems.java:10)
at com.gmail.dakingcartoon.mods.TestMod.TestMod.preInit(TestMod.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)
... 12 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (x86) version 6.1
Java Version: 1.8.0_31, Oracle Corporation
Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
Memory: 980085896 bytes (934 MB) / 1067057152 bytes (1017 MB) up to 1067057152 bytes (1017 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
DaKingCartoon_TestMod{Alpha-1.0.0} [TestMod] (bin) Unloaded->Constructed->Errored
[14:12:19] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\CESAR\Desktop\MineCraft Modding\1.7\TestMod\eclipse\.\crash-reports\crash-2015-02-08_14.12.19-client.txt
did i add extend item wrong?
edit: it seems like the error is in the TestModItem file on line 13:
package com.gmail.dakingcartoon.TestMod.items;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
public class TestModItem extends Item {
public TestModItem()
{
super();
setCreativeTab(CreativeTabs.tabMisc);
}
private void setCreativeTab(CreativeTabs tabmisc) {
}
}
the error reads as follows: The return type is incompatible with Item.setCreativeTab(CreativeTabs)
Once you install Forge, you can't change any names, or forge will mess up.
Glad you got it working
You need to import all of those.
once again, forgive my stupid questions, especially since it feels like im just spamming at this point, but where would i go to import these?
Just hover over the error, or do CTRL-Shift-O (Command-Shift-O for Mac's).
Create a String in your Reference class.
The method setUnlocalizedName(String) is undefined for the type TestModItem
my current form of my four cases go as follow
package com.gmail.dakingcartoon.mods.TestMod;
import com.gmail.dakingcartoon.TestMod.init.ModItems;
import com.gmail.dakingcartoon.mods.TestMod.help.Reference;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.event.FMLPostInitializationEvent;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
@Mod(modid = Reference.MODID, name = Reference.NAME, version = Reference.VERSION)
public class TestMod {
@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event)
{
ModItems.init();
}
@Mod.EventHandler
public void Init(FMLInitializationEvent event)
{
}
@Mod.EventHandler
public void postInit(FMLPostInitializationEvent event)
{
}
}
package com.gmail.dakingcartoon.TestMod.init;
import net.minecraft.item.Item;
import com.gmail.dakingcartoon.TestMod.items.TestModItem;
import com.gmail.dakingcartoon.mods.TestMod.help.RegisterHelper;
public class ModItems
{
public static Item pearl = new TestModItem().setUnlocalizedName("pearl");
public static void init()
{
RegisterHelper.registerItem(pearl);
}
}
package com.gmail.dakingcartoon.mods.TestMod.help;
import cpw.mods.fml.common.registry.GameRegistry;
import net.minecraft.block.Block;
import net.minecraft.item.Item;
public class RegisterHelper
{
public static void registerBlock(Block block)
{
GameRegistry.registerBlock(block, Reference.MODID + block.getUnlocalizedName().substring(5));
}
public static void registerItem(Item item)
{
GameRegistry.registerItem(item, Reference.MODID + item.getUnlocalizedName().substring(5));
}
}
package com.gmail.dakingcartoon.TestMod.items;
import net.minecraft.creativetab.CreativeTabs;
public class TestModItem {
public TestModItem()
{
super();
setCreativeTab(CreativeTabs.tabMisc);
}
private void setCreativeTab(CreativeTabs tabmisc) {
// TODO Auto-generated method stub
}
}
Your completely fine. Other people may have issues similar to yours.
The method YourItem#registerIcons will set your texture for your item.
The class TestModItems needs to extend Item.
extend item? can you elaborate? (also thank you for being so understanding)
In your TestModItem class, add " extends Item" to the "public class TestModItem" line, like so:
Extending classes essentially allows you to inherit a classes methods, in which, setUnlocalizedName is defined in the Item class. So you use that method, you need to extend the Item class. It's simply a way of inheriting methods, rather than typing them all out.
The problem is that the package (or class) "IIconRegister" seems to be missing... here is my java class: "pastebin"
When I type "import net.minecraft.client.renderer.texture.IIconRegister" (line 3) it gives me this error "the import net.minecraft.client.renderer.texture.IIconRegister can not be resolved"
And on line 20 "public void registerIcons(IIconRegister par1IconRegister)" it gives me this error "IIconRegister cannot be resolved to a type"
Then on line 22 "itemIcon = par1IconRegister.registerIcon(Reference.MODID + ":" + getUnlocalizedName().substring(5));" This error "itemIcon can not be resolved to a variable"
I believe these last 2 to be due to the first one,,,
I'll have to plug that into my workspace and see what is wrong because it looks fine to me. You may want to change your packaged name to xiath_hyne instead, as it is just conventional to use lowercase in packages names.
The return type is incompatible with Item.setCreativeTab(CreativeTabs)
at com.gmail.dakingcartoon.TestMod.items.TestModItem.setCreativeTab(TestModItem.java:13) ~[bin/:?]
at com.gmail.dakingcartoon.TestMod.items.TestModItem.<init>(TestModItem.java:10) ~[bin/:?]
at com.gmail.dakingcartoon.TestMod.init.ModItems.<clinit>(ModItems.java:10) ~[bin/:?]
at com.gmail.dakingcartoon.mods.TestMod.TestMod.preInit(TestMod.java:16) ~[bin/:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187) ~[forgeSrc-1.7.10-10.13.2.1291.jar:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74) ~[guava-17.0.jar:?]
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304) ~[guava-17.0.jar:?]
at com.google.common.eventbus.EventBus.post(EventBus.java:275) ~[guava-17.0.jar:?]
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118) [LoadController.class:?]
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513) [Loader.class:?]
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239) [FMLClientHandler.class:?]
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522) [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.8.0_31]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_31]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_31]
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/:?]
[14:12:19] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:388]: ---- Minecraft Crash Report ----
// Oh - I know what I did wrong!
Time: 2/8/15 2:12 PM
Description: There was a severe problem during mod loading that has caused the game to fail
cpw.mods.fml.common.LoaderException: java.lang.Error: Unresolved compilation problem:
The return type is incompatible with Item.setCreativeTab(CreativeTabs)
at cpw.mods.fml.common.LoadController.transition(LoadController.java:162)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:515)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:239)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:522)
at net.minecraft.client.Minecraft.run(Minecraft.java:931)
at net.minecraft.client.main.Main.main(Main.java:164)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:135)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)
at net.minecraftforge.gradle.GradleStartCommon.launch(GradleStartCommon.java:78)
at GradleStart.main(GradleStart.java:45)
Caused by: java.lang.Error: Unresolved compilation problem:
The return type is incompatible with Item.setCreativeTab(CreativeTabs)
at com.gmail.dakingcartoon.TestMod.items.TestModItem.setCreativeTab(TestModItem.java:13)
at com.gmail.dakingcartoon.TestMod.items.TestModItem.<init>(TestModItem.java:10)
at com.gmail.dakingcartoon.TestMod.init.ModItems.<clinit>(ModItems.java:10)
at com.gmail.dakingcartoon.mods.TestMod.TestMod.preInit(TestMod.java:16)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:208)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:187)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventSubscriber.handleEvent(EventSubscriber.java:74)
at com.google.common.eventbus.SynchronizedEventSubscriber.handleEvent(SynchronizedEventSubscriber.java:47)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:322)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:304)
at com.google.common.eventbus.EventBus.post(EventBus.java:275)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:118)
at cpw.mods.fml.common.Loader.preinitializeMods(Loader.java:513)
... 12 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.7.10
Operating System: Windows 7 (x86) version 6.1
Java Version: 1.8.0_31, Oracle Corporation
Java VM Version: Java HotSpot(TM) Client VM (mixed mode), Oracle Corporation
Memory: 980085896 bytes (934 MB) / 1067057152 bytes (1017 MB) up to 1067057152 bytes (1017 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v9.05 FML v7.10.85.1291 Minecraft Forge 10.13.2.1291 4 mods loaded, 4 mods active
mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized
FML{7.10.85.1291} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
Forge{10.13.2.1291} [Minecraft Forge] (forgeSrc-1.7.10-10.13.2.1291.jar) Unloaded->Constructed->Pre-initialized
DaKingCartoon_TestMod{Alpha-1.0.0} [TestMod] (bin) Unloaded->Constructed->Errored
[14:12:19] [Client thread/INFO] [STDOUT]: [net.minecraft.client.Minecraft:displayCrashReport:398]: #@!@# Game crashed! Crash report saved to: #@!@# C:\Users\CESAR\Desktop\MineCraft Modding\1.7\TestMod\eclipse\.\crash-reports\crash-2015-02-08_14.12.19-client.txt
edit: it seems like the error is in the TestModItem file on line 13:
package com.gmail.dakingcartoon.TestMod.items;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
public class TestModItem extends Item {
public TestModItem()
{
super();
setCreativeTab(CreativeTabs.tabMisc);
}
private void setCreativeTab(CreativeTabs tabmisc) {
}
}
You don't need this method:
thank you so much! i have successfully added a pearl item and plan to make a block for it in the next step. bless you sir, you are doing notch's work
Glad I could help
Those are only for blocks, and you have to use one of those.