I have made a food mod and am trying to publish it to beta, but when it recompiles and rebofscates, it didnt seem to work, I fixed that but it wasnt going into the reobf folder but it seems as though it went into the bin folder under mcp. I copied my stuff and my assets into a folder as a video told me too. I then launched Minecraft and it crashed saying an error that hadnt come up in eclipse. The error is with items and .setUnlocalizedName and setCreativeTab. Please note that I do have Harvestcraft installed as some of my mod uses those items.
Any help would be appreciated,
Murdy007
One of my crash reports:
---- Minecraft Crash Report ----
// Would you like a cupcake?
Time: 12/11/14 7:10 PM
Description: Initializing game
java.lang.NoSuchMethodError: petco.mod.items.basic.Packet.setCreativeTab(Lnet/minecraft/creativetab/CreativeTabs;)Lnet/minecraft/item/Item;
at petco.mod.items.basic.Packet.<init>(Packet.java:11)
at petco.mod.core.petco.<clinit>(petco.java:85)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:511)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:473)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
at net.minecraft.client.main.Main.main(SourceFile:101)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at petco.mod.items.basic.Packet.<init>(Packet.java:11)
at petco.mod.core.petco.<clinit>(petco.java:85)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:511)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:473)
-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
at net.minecraft.client.main.Main.main(SourceFile:101)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
-- System Details --
Details:
Minecraft Version: 1.6.4
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.7.0_71, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 621831408 bytes (593 MB) / 739770368 bytes (705 MB) up to 2386034688 bytes (2275 MB)
JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2560M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 5 mods loaded, 5 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{6.4.49.965} [Forge Mod Loader] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed
Forge{9.11.1.965} [Minecraft Forge] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed
pamharvestcraft{1.0} [Pam's HarvestCraft Base] (Pam's HarvestCraft 1.6.4a.zip) Unloaded->Constructed
petco_foodmod_murdy007{1.265} [PetCo Foods] (PetCoAlpha1.zip) Unloaded
Launched Version: 1.6.4-Forge9.11.1.965
LWJGL: 2.9.0
OpenGL: GeForce GTX 780/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Pack: Default
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
@Mod(modid = petco.modid, name = "PetCo Foods", version = "1.265")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class petco {
@SidedProxy(clientSide = "petco.mod.core.ClientProxy", serverSide = "petco.mod.core.CommonProxy")
public static CommonProxy proxy;
public static final String modid = "petco_foodmod_murdy007";
//CreativeTabs
public static Item WhiskasPlaceHolder = new WhiskasPlaceHolder(16750);//.setUnlocalizedName("WhiskasPlaceHolder");
public static CreativeTabs TabWhiskas = new TabWhiskas(CreativeTabs.getNextID(),"Whiskas Pet Food (PetCo.)");
public static Item PetCoPlaceHolder = new PetCoPlaceHolder(16751);//.setUnlocalizedName("PetCoPlaceHolder");
public static CreativeTabs TabPetCo = new TabPetCo(CreativeTabs.getNextID(),"Pet Co.");
public static Item EmptyPacket = new ItemEmptyPacket(16755);//.setUnlocalizedName("EmptyPacket");
public static Item Packet = new Packet(16812).setUnlocalizedName("Packet");
public static Item SmlPacket = new SmlPacket(16813).setUnlocalizedName("SmlPacket");
public static Item MeatGloop = new MeatGloop(16799).setUnlocalizedName("MeatGloop");
public static Item AnimalFat = new AnimalFat(16800).setUnlocalizedName("AnimalFat");
public static Item DirtyPacket = new DirtyPacket(16798).setUnlocalizedName("DirtyPacket");
public static Item ChickenProduct = new ChickenProduct(16803).setUnlocalizedName("ChickenProduct");
public static Item FishProduct = new FishProduct(16806).setUnlocalizedName("FishProduct");
private String itemPlastic;
@EventHandler
public void load(FMLInitializationEvent e){
//Block CatNipPlant = new CatNipPlant(16812).setUnlocalizedName("CatNipPlant");
//GameRegistry.registerBlock(CatNipPlant, modid + CatNipPlant.getUnlocalizedName());
//LanguageRegistry.addName(CatNipPlant, "lol");
//REFERENCE//Item MeatGloop = new MeatGloop(16799).setUnlocalizedName("MeatGloop");
LanguageRegistry.addName(MeatGloop, "Meat Gloop");
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.beefRaw));
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.porkRaw));
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.chickenRaw));
GameRegistry.addSmelting(petco.MeatGloop.itemID, new ItemStack(petco.AnimalFat, 32), 0.1F);
//REFERENCE//Item AnimalFat = new AnimalFat(16800).setUnlocalizedName("AnimalFat");
LanguageRegistry.addName(AnimalFat, "Animal Fat");
//REFERENCE//Item ChickenProduct = new ChickenProduct(16803).setUnlocalizedName("ChickenProduct");
LanguageRegistry.addName(ChickenProduct, "Chicken Product");
GameRegistry.addShapelessRecipe(new ItemStack(ChickenProduct, 16), new ItemStack(Item.chickenCooked), new ItemStack(15261, 1, 0));
//REFERENCE//Item FishProduct = new FishProduct(16806).setUnlocalizedName("FishProduct");
LanguageRegistry.addName(FishProduct, "Fish Product");
GameRegistry.addShapelessRecipe(new ItemStack(FishProduct, 8), new ItemStack(Item.fishCooked), new ItemStack(15261, 1, 0));
Item MeatProduct = new MeatProduct(16807).setUnlocalizedName("MeatProduct");
LanguageRegistry.addName(MeatProduct, "Meat Product");
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.beefCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.porkCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.chickenCooked), new ItemStack(15261, 1, 0));
Item DriedMeatProduct = new DriedMeatProduct(16808).setUnlocalizedName("DriedMeatProduct");
LanguageRegistry.addName(DriedMeatProduct, "Dried Meat Product");
GameRegistry.addSmelting(MeatProduct.itemID, new ItemStack(DriedMeatProduct), 0.1F);
Item ChickenFlavour = new ChickenFlavour(16809).setUnlocalizedName("ChickenFlavour");
LanguageRegistry.addName(ChickenFlavour, "Natural Chicken Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(ChickenFlavour, 16), new ItemStack(Item.chickenRaw), new ItemStack(16204, 1, 0));
Item TurkeyFlavour = new TurkeyFlavour(16810).setUnlocalizedName("TurkeyFlavour");
LanguageRegistry.addName(TurkeyFlavour, "Natural Turkey Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(TurkeyFlavour), new ItemStack(ChickenFlavour));
Item BeefFlavour = new BeefFlavour(16811).setUnlocalizedName("BeefFlavour");
LanguageRegistry.addName(BeefFlavour, "Natural Beef Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(BeefFlavour, 16), new ItemStack(Item.beefRaw), new ItemStack(16204, 1, 0));
Item Minerals = new Minerals(16814).setUnlocalizedName("Minerals");
LanguageRegistry.addName(Minerals, "Vitamins & Minerals");
GameRegistry.addRecipe(new ItemStack(Minerals,32), new Object[]{
" x ","xxx"," x ",'x',Block.cobblestone,
});
Item FishFlavour = new FishFlavour(16815).setUnlocalizedName("FishFlavour");
LanguageRegistry.addName(FishFlavour, "Natural Fish Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(FishFlavour, 8), new ItemStack(Item.fishRaw), new ItemStack(16204, 1, 0));
Item TunaFlavour = new TunaFlavour(16816).setUnlocalizedName("TunaFlavour");
LanguageRegistry.addName(TunaFlavour, "Natural Tuna Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(TunaFlavour), new ItemStack(FishFlavour), new ItemStack(16204, 1, 0));
Item DriedCheese = new DriedCheese(16817).setUnlocalizedName("DriedCheese");
LanguageRegistry.addName(DriedCheese, "Dried Cheese");
GameRegistry.addShapelessRecipe(new ItemStack(DriedCheese), new ItemStack(15269, 1, 0), new ItemStack(15256, 1, 0));
//REFERENCE//Item Packet = new Packet(16812).setUnlocalizedName("Packet");
LanguageRegistry.addName(Packet, "Packet");
//REFERENCE//Item SmlPacket = new SmlPacket(16813).setUnlocalizedName("SmlPacket");
LanguageRegistry.addName(SmlPacket, "Small Packet");
//REFERENCE//Item DirtyPacket = new DirtyPacket(16814).setUnlocalizedName("DirtyPacket");
LanguageRegistry.addName(DirtyPacket, "Dirty Packet");
//Other
LanguageRegistry.addName(EmptyPacket, "Empty Temptations Packet");
GameRegistry.addShapelessRecipe(new ItemStack(EmptyPacket), new ItemStack(DirtyPacket));
//ID NOTICE: Any more foods added, check the other items
}
private Item ItemStack(int i, int j, int k) {
// TODO Auto-generated method stub
return null;
}
}
Sorry about the messy code, I am a beginner watching youtube tutorials and hope to clean it up very soon. I have lots of references and notes as most of my items are under public and some need to be under public statics.
Just wondering... Could I separate different sets of items into separate event handlers?
Also do you want me to put all the item public statics in or all of the ones without 'public static'???
I moved all the public static ones to fmlinitialization event and took away the public static from all of them. I published the mod but it crashes with this:
---- Minecraft Crash Report ----
// I blame Dinnerbone.
Time: 12/12/14 8:18 AM
Description: Initializing game
java.lang.NoSuchMethodError: petco.mod.items.basic.SmlPacket.setCreativeTab(Lnet/minecraft/creativetab/CreativeTabs;)Lnet/minecraft/item/Item;
at petco.mod.items.basic.SmlPacket.<init>(SmlPacket.java:11)
at petco.mod.core.petco.<clinit>(petco.java:87)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:511)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:473)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
at net.minecraft.client.main.Main.main(SourceFile:101)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at petco.mod.items.basic.SmlPacket.<init>(SmlPacket.java:11)
at petco.mod.core.petco.<clinit>(petco.java:87)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:511)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:473)
-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
at net.minecraft.client.main.Main.main(SourceFile:101)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
SmlPacket is under one of the events but it is saying it is a problem with setCreativeTab. I hope it doesnt have these errors for everything. I was wondering is setCreative Tab needed to be on the main class instead?
Ok, I did that and it still crashed. I then put the setcreative tab onto the main class and published. it now went to the next item in the event handler saying that it's creative tab is broken. This seems to have fixed unlocalizedname but not creativetab. should i put them into the main class?
I spent a LONG time cleaning my code up and changed the way creativetabs were written. I put all the items into an event and made string for them. I launched minecraft in eclipse. It crashed...
Crash Report:
---- Minecraft Crash Report ----
// Ooh. Shiny.
Time: 12/12/14 3:12 PM
Description: Initializing game
java.lang.NullPointerException
at net.minecraft.item.ItemStack.<init>(ItemStack.java:82)
at petco.mod.core.petco.load(petco.java:166)
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:545)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:699)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:509)
at net.minecraft.client.Minecraft.run(Minecraft.java:808)
at net.minecraft.client.main.Main.main(Main.java:93)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at net.minecraft.item.ItemStack.<init>(ItemStack.java:82)
at petco.mod.core.petco.load(petco.java:166)
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:545)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:699)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:509)
-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:808)
at net.minecraft.client.main.Main.main(Main.java:93)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
-- System Details --
Details:
Minecraft Version: 1.6.4
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.7.0_71, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 726575000 bytes (692 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 7 mods loaded, 7 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{6.4.49.965} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized
Forge{9.11.1.965} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized
CodeChickenCore{0.9.0.9} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
NotEnoughItems{1.6.1.9} [Not Enough Items] (NotEnoughItems-1.6.4-1.6.1.9-dev (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
petco_foodmod_murdy007{1.265} [PetCo Foods] (bin) Unloaded->Constructed->Pre-initialized->Errored
pamharvestcraft{1.0} [Pam's HarvestCraft Base] (Pam's HarvestCraft 1.6.4a.zip) Unloaded->Constructed->Pre-initialized->Initialized
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: GeForce GTX 780/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Pack: Default
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
@Mod(modid = petco.modid, name = "PetCo Foods", version = "1.265")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class petco {
@SidedProxy(clientSide = "petco.mod.core.ClientProxy", serverSide = "petco.mod.core.CommonProxy")
public static CommonProxy proxy;
public static final String modid = "petco_foodmod_murdy007";
public static CreativeTabs TabPetCo;
public static CreativeTabs TabWhiskas;
//public static Item PetCoPlaceHolder;
//public static Item WhiskasPlaceHolder;
public static Item FishProduct;
public static Item MeatProduct;
public static Item DriedMeatProduct;
public static Item MeatGloop;
public static Item ChickenProduct;
public static Item DirtyPacket;
public static Item AnimalFat;
public static Item EmptyPacket;
public static Item Packet;
public static Item SmlPacket;
public static Item ChickenFlavour;
public static Item BeefFlavour;
public static Item TurkeyFlavour;
public static Item TunaFlavour;
public static Item FishFlavour;
public static Item DriedCheese;
public static Item Minerals;
public static Item TastyChickenTurkeyTemptationsRollers;
public static Item SavourySalmonTunaTemptationsRollers;
public static Item ChickenTemptations;
public static Item BeefTemptations;
public static Item CreamyDairy;
public static Item SeafoodTemptations;
public static Item TunaTemptations;
public static Item SalmonTemptations;
public static Item TurkeyTemptations;
public static Item BeefCheeseTemptations;
public static Item ChickenCheeseTemptations;
public static Item TunaCheeseTemptations;
public static Item CatnipFeverTemptations;
public static Item CatnipTemptations;
public static Item DentabitesChicken;
public static Item HairballChicken;
public static Item IndoorSalmon;
public static Item SkinCoatSalmon;
public static Item CookoutTemptations;
public static Item CaptainsTemptations;
public static Item FarmersTemptations;
public static Item CrabTunaTemptations;
public static Item SalmonTunaTemptations;
public static Item ShrimpTunaTemptations;
@EventHandler
public void load(FMLInitializationEvent e){
TabPetCo = new CreativeTabs("petcocreativetab"){
@SideOnly(Side.CLIENT)
public int getTabItemIconIndex(){
return petco.MeatGloop.itemID;
}
};
LanguageRegistry.instance().addStringLocalization(TabPetCo.getTranslatedTabLabel(), "Pet Co. Foods");
TabWhiskas = new CreativeTabs("whiskascreativetab"){
@SideOnly(Side.CLIENT)
public int getTabItemIconIndex(){
return petco.BeefTemptations.itemID;
}
};
LanguageRegistry.instance().addStringLocalization(TabWhiskas.getTranslatedTabLabel(), "Whiskas Pet Food (PetCo)");
//Item PetCoPlaceHolder = new PetCoPlaceHolder(16751).setUnlocalizedName("PetCoPlaceHolder");
//CreativeTabs TabPetCo = new TabPetCo(CreativeTabs.getNextID(),"Pet Co.");
//Item WhiskasPlaceHolder = new WhiskasPlaceHolder(16750).setUnlocalizedName("WhiskasPlaceHolder");
//CreativeTabs TabWhiskas = new TabWhiskas(CreativeTabs.getNextID(),"Whiskas Pet Food (PetCo.)");
Item EmptyPacket = new ItemEmptyPacket(16755).setUnlocalizedName("EmptyPacket");
LanguageRegistry.addName(EmptyPacket, "Empty Temptations Packet");
GameRegistry.addRecipe(new ItemStack(petco.EmptyPacket,1), new Object[]{
"x "," "," ",'x',Packet,
});
Item Packet = new Packet(16812).setUnlocalizedName("Packet");
LanguageRegistry.addName(Packet, "Packet");
GameRegistry.addRecipe(new ItemStack(petco.Packet,16), new Object[]{
"x x","x x"," x ",'x',plasticsheets,
});
Item SmlPacket = new SmlPacket(16813).setUnlocalizedName("SmlPacket");
LanguageRegistry.addName(SmlPacket, "Small Packet");
GameRegistry.addRecipe(new ItemStack(petco.SmlPacket,16), new Object[]{
" x ","x x"," x ",'x',plasticsheets,
});
Item MeatGloop = new MeatGloop(16799).setUnlocalizedName("MeatGloop");
LanguageRegistry.addName(MeatGloop, "Meat Gloop");
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.beefRaw));
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.porkRaw));
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.chickenRaw));
GameRegistry.addSmelting(petco.MeatGloop.itemID, new ItemStack(petco.AnimalFat, 32), 0.1F);
Item AnimalFat = new AnimalFat(16800).setUnlocalizedName("AnimalFat");
LanguageRegistry.addName(AnimalFat, "Animal Fat");
Item DirtyPacket = new DirtyPacket(16798).setUnlocalizedName("DirtyPacket");
LanguageRegistry.addName(DirtyPacket, "Dirty Packet");
GameRegistry.addShapelessRecipe(new ItemStack(EmptyPacket), new ItemStack(DirtyPacket));
Item ChickenProduct = new ChickenProduct(16803).setUnlocalizedName("ChickenProduct");
LanguageRegistry.addName(ChickenProduct, "Chicken Product");
GameRegistry.addShapelessRecipe(new ItemStack(ChickenProduct, 16), new ItemStack(Item.chickenCooked), new ItemStack(15261, 1, 0));
Item FishProduct = new FishProduct(16806).setUnlocalizedName("FishProduct");
LanguageRegistry.addName(FishProduct, "Fish Product");
GameRegistry.addShapelessRecipe(new ItemStack(FishProduct, 8), new ItemStack(Item.fishCooked), new ItemStack(15261, 1, 0));
Item MeatProduct = new MeatProduct(16807).setUnlocalizedName("MeatProduct");
LanguageRegistry.addName(MeatProduct, "Meat Product");
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.beefCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.porkCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.chickenCooked), new ItemStack(15261, 1, 0));
Item DriedMeatProduct = new DriedMeatProduct(16808).setUnlocalizedName("DriedMeatProduct");
LanguageRegistry.addName(DriedMeatProduct, "Dried Meat Product");
GameRegistry.addSmelting(MeatProduct.itemID, new ItemStack(DriedMeatProduct), 0.1F);
Item ChickenFlavour = new ChickenFlavour(16809).setUnlocalizedName("ChickenFlavour");
LanguageRegistry.addName(ChickenFlavour, "Natural Chicken Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(ChickenFlavour, 16), new ItemStack(Item.chickenRaw), new ItemStack(16204, 1, 0));
Item TurkeyFlavour = new TurkeyFlavour(16810).setUnlocalizedName("TurkeyFlavour");
LanguageRegistry.addName(TurkeyFlavour, "Natural Turkey Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(TurkeyFlavour), new ItemStack(ChickenFlavour));
Item BeefFlavour = new BeefFlavour(16811).setUnlocalizedName("BeefFlavour");
LanguageRegistry.addName(BeefFlavour, "Natural Beef Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(BeefFlavour, 16), new ItemStack(Item.beefRaw), new ItemStack(16204, 1, 0));
Item Minerals = new Minerals(16814).setUnlocalizedName("Minerals");
LanguageRegistry.addName(Minerals, "Vitamins & Minerals");
GameRegistry.addRecipe(new ItemStack(Minerals,32), new Object[]{
" x ","xxx"," x ",'x',Block.cobblestone,
});
Item FishFlavour = new FishFlavour(16815).setUnlocalizedName("FishFlavour");
LanguageRegistry.addName(FishFlavour, "Natural Fish Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(FishFlavour, 8), new ItemStack(Item.fishRaw), new ItemStack(16204, 1, 0));
Item TunaFlavour = new TunaFlavour(16816).setUnlocalizedName("TunaFlavour");
LanguageRegistry.addName(TunaFlavour, "Natural Tuna Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(TunaFlavour), new ItemStack(FishFlavour), new ItemStack(16204, 1, 0));
Item DriedCheese = new DriedCheese(16817).setUnlocalizedName("DriedCheese");
LanguageRegistry.addName(DriedCheese, "Dried Cheese");
GameRegistry.addShapelessRecipe(new ItemStack(DriedCheese), new ItemStack(15269, 1, 0), new ItemStack(15256, 1, 0));
I have done some testing through a process of elimination to find out that the problem is my crafting recipes (You can find one above in the petco.class). I changed to a different way to write them but now I cannot use any of my items only the minecraft ones. If I try to use my ones it crashes with a NullPointerException:null. The pet co class above in another recent post is the current one. I have not yet changed those recipes to the new ones I am using.
Thanks again for the help.
Note: the new recipe worked with my 'packet' but I can't use it or an empty packet to craft another item.
Note: when publishing forge said there was an error with Object[] which was only used in the recipes.
And yes, it is preferred to add the recipes after all the items are initialized, like in FMLInitializationEvent.
But your main issue is you don't seem to understand the base principle of programming. Global and local variables are different.
I know, I actually dont know much, but whats the harm in trying when the only problem is your knowledge.
As for the recipes, Do they have to be in the FMLInitialization event?
It depends, if you don't know anything about programming then you'll be making many mistakes over and over again, and may not / probably won't understand a lot of the terminology thrown around the community. You should maybe focus a bit more on learning Java before getting into modding, you don't need to be a know-it-all about it, but you also should know some of the core concepts of the language and programming in general (local versus global variables, objects, hierarchy, sequence, condition, iteration, syntax, thinking programmatically about a problem, etc). It shouldn't take you too long, just try your best and don't give up.
As for your actual question, you should, but you don't have to. Because recipes are using items, it is generally a good idea to register your recipes after item and block initialisation (which is done during the PreInit phase, so recipes should be constructed and registered during your Init phase).
Rollback Post to RevisionRollBack
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
Ok, so. I followed all of you guys' instructions and cleaned up my code. I then ran recompile and reobfscate and put my mod into Minecraft with forge and the mods that I used in eclipse. but in the non-dev versions. I then ran it but crashed with an error about creative tabs. Yes, I checked everything and that seemed fine. I then blanked out anything to do with creative tabs in eclipse, ran Minecraft inside of eclipse, it worked. I then republished it and put it into minecraft. It crashed with a NoSuchMethodError about setUnlocalizedName. I really want my mod published soon but I feel like i am back to square one. I know I dont know much about java, but anyone who starts learning something doesnt know everything at the start, right???. I really appreciate the help guys so thanks.
public static Item FishProduct;
public static Item MeatProduct;
public static Item DriedMeatProduct;
public static Item MeatGloop;
public static Item ChickenProduct;
public static Item DirtyPacket;
public static Item AnimalFat;
public static Item EmptyPacket;
public static Item Packet;
public static Item SmlPacket;
public static Item ChickenFlavour;
public static Item BeefFlavour;
public static Item TurkeyFlavour;
public static Item TunaFlavour;
public static Item FishFlavour;
public static Item DriedCheese;
public static Item Minerals;
public static Item TastyChickenTurkeyTemptationsRollers;
public static Item SavourySalmonTunaTemptationsRollers;
public static Item ChickenTemptations;
public static Item BeefTemptations;
public static Item CreamyDairy;
public static Item SeafoodTemptations;
public static Item TunaTemptations;
public static Item SalmonTemptations;
public static Item TurkeyTemptations;
public static Item BeefCheeseTemptations;
public static Item ChickenCheeseTemptations;
public static Item TunaCheeseTemptations;
public static Item CatnipFeverTemptations;
public static Item CatnipTemptations;
public static Item DentabitesChicken;
public static Item HairballChicken;
public static Item IndoorSalmon;
public static Item SkinCoatSalmon;
public static Item CookoutTemptations;
public static Item CaptainsTemptations;
public static Item FarmersTemptations;
public static Item CrabTunaTemptations;
public static Item SalmonTunaTemptations;
public static Item ShrimpTunaTemptations;
//TabPetCo = new CreativeTabs("petcocreativetab"){
// @SideOnly(Side.CLIENT)
// public int getTabItemIconIndex(){
// return petco.MeatGloop.itemID;
// }
//};
//LanguageRegistry.instance().addStringLocalization(TabPetCo.getTranslatedTabLabel(), "Pet Co. Foods");
//
//TabWhiskas = new CreativeTabs("whiskascreativetab"){
// @SideOnly(Side.CLIENT)
// public int getTabItemIconIndex(){
// return petco.BeefTemptations.itemID;
// }
//};
//LanguageRegistry.instance().addStringLocalization(TabWhiskas.getTranslatedTabLabel(), "Whiskas Pet Food (PetCo)");
//Item PetCoPlaceHolder = new PetCoPlaceHolder(16751).setUnlocalizedName("PetCoPlaceHolder");
//CreativeTabs TabPetCo = new TabPetCo(CreativeTabs.getNextID(),"Pet Co.");
//Item WhiskasPlaceHolder = new WhiskasPlaceHolder(16750).setUnlocalizedName("WhiskasPlaceHolder");
//CreativeTabs TabWhiskas = new TabWhiskas(CreativeTabs.getNextID(),"Whiskas Pet Food (PetCo.)");
//FOR ITEMS
GameRegistry.addShapelessRecipe(new ItemStack(ChickenProduct, 16), new ItemStack(Item.chickenCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(FishProduct, 8), new ItemStack(Item.fishCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.beefCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.porkCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.chickenCooked), new ItemStack(15261, 1, 0));
GameRegistry.addSmelting(MeatProduct.itemID, new ItemStack(DriedMeatProduct), 0.1F);
GameRegistry.addShapelessRecipe(new ItemStack(ChickenFlavour, 16), new ItemStack(Item.chickenRaw), new ItemStack(16204, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(TurkeyFlavour), new ItemStack(ChickenFlavour));
GameRegistry.addShapelessRecipe(new ItemStack(BeefFlavour, 16), new ItemStack(Item.beefRaw), new ItemStack(16204, 1, 0));
GameRegistry.addRecipe(new ItemStack(Packet, 16), "x x", "x x", " x ",
'x', plastics);
GameRegistry.addShapelessRecipe(new ItemStack(EmptyPacket), new ItemStack(Packet));
GameRegistry.addRecipe(new ItemStack(SmlPacket,16),
" x ","x x"," x ",'x',plastics);
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.beefRaw));
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.porkRaw));
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.chickenRaw));
GameRegistry.addSmelting(MeatGloop.itemID, new ItemStack(AnimalFat, 32), 0.1F);
GameRegistry.addShapelessRecipe(new ItemStack(Packet), new ItemStack(DirtyPacket));
GameRegistry.addRecipe(new ItemStack(Minerals,32),
" x ","xxx"," x ",'x',Block.cobblestone);
GameRegistry.addShapelessRecipe(new ItemStack(FishFlavour, 8), new ItemStack(Item.fishRaw), new ItemStack(16204, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(TunaFlavour), new ItemStack(FishFlavour), new ItemStack(16204, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(DriedCheese), new ItemStack(15269, 1, 0), new ItemStack(15256, 1, 0));
//ID NOTICE: Any more foods added, check the other items
}
Minecraft (not on eclipse) crash report:
---- Minecraft Crash Report ----
// Who set us up the TNT?
Time: 12/13/14 1:39 PM
Description: There was a severe problem during mod loading that has caused the game to fail
cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: petco.mod.items.basic.Packet.setUnlocalizedName(Ljava/lang/String;)Lnet/minecraft/item/Item;
at cpw.mods.fml.common.LoadController.transition(LoadController.java:156)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:700)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:509)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
at net.minecraft.client.main.Main.main(SourceFile:101)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
Caused by: java.lang.NoSuchMethodError: petco.mod.items.basic.Packet.setUnlocalizedName(Ljava/lang/String;)Lnet/minecraft/item/Item;
at petco.mod.core.petco.load(petco.java:170)
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:545)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:699)
... 10 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
Even though you do start something off knowing nothing, when it comes to programming (especially in languages that have no safety-net like C, you're dealing with direct memory addresses so if you mess something up, you mess it up big time) you really need to know at least some basics of the language you're using.
For example, conventions (which is a fancy name for guidelines, they're the basic guidelines of a programming language that the community builds up). In Java, there are a set of conventions you should follow. One of them is to have your packages completely in lowercase, as far as I can see, your packages are. However, classes should be in UpperCamelCase, which your main mod class is not, so instead of 'petco', conventionally speaking it should be 'PetCo'. Methods should be in lowerCamelCase. Variables should also be in lowerCamelCase, and constants should be in UPPERCASE_WITH_UNDERSCORES.
Java is also an object-oriented language, so what this means is you can have multiple classes and combine them using method calls to string the code together from multiple locations, into one big sequence that the JVM (Java Virtual Machine) executes. You're doing this with your items, however you should be doing this with all your other stuff. Instead of cramming all your code in your main mod class, you should separate your code to make it cleaner. So you should move all the item variables and code to another class, say called ModItems or something, and move the code into another method, then call that method from your main mod class. This makes your code cleaner and easier to manage. You can go one step further and move your recipes and such to their own method.
That was mainly a Minecraft modding convention, and there's another one you should be following. Have your items registered during the PreInit phase, and the recipes and all that during the Init phase, so instead of just changing the FMLPreInitializationEvent to FMLInitializationEvent, create another method and have the parameter be FMLInitializationEvent, and annotate it with @EventHandler, something like:
@EventHandler
public static void preLoad(FMLPreInitializationEvent event) {
// Item initialisation here
}
@EventHandler
public static void load(FMLInitializationEvent event) {
// Recipe initialisation here
}
Rollback Post to RevisionRollBack
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
The usual process learning to code doesn't involve having dozens of lines of code and dozens of classes in the first place.
You start by having one class, one method, one line of code. Have it work flawlessly. And understood 100%.
Use forge example mod, if you are a complete noob at this. Then read tutorials on forge wiki.
Then you can try to add more stuff. This is the "experimental" approach.
The "theoretical" approach would be to learn java by reading.
Usually people in modding just charge head-on with "experimental", writing stuff they don't know anything about. You just experienced the likeliest outcome.
I believe the most efficient way is to find a balance between the two.
You need to read stuff, there is no shame in that. But Minecraft forums isn't the best of place to learn.
Your first milestone as a beginner is to understand what i told you about "variables". Look for that key word in any learning resource you have. You should be able to fix your code after that.
The second milestone, is to understand the concept of object-oriented programming (or roughly, what "class", "extends" and "static" mean).
There is a giant leap between, be warned. But after that, you'll be able to write good Java code.
Making your code "look cleaner" as jcm2606 said, is totally not what you should concentrate on at your level. That is for advance coder who have time to spare. You don't wan't to code pretty, you want a code that works. Only the first step can help you achieve this.
[quote=jcm2606;/members/jcm2606;/forums/mapping-and-modding/minecraft-mods/modification-development/2298929-problem-and-crashing-when-publishing-mod?comment=18]
Please post the code for Packet.
The Packet code:
public Packet(int par1) {
super(par1);
this.setCreativeTab(petco.TabPetCo);
}
public void registerIcons(IconRegister iconRegister) {
itemIcon = iconRegister.registerIcon("petco:normalpacket");
}
}
I will try what you said jcm2606, and report back but I fell like it is a problem with how I export the mod. I run recompile, then reobfscate but there is nothing in the reobf folder except an empty minecraft folder. I copied most of the stuff out of the bin folder instead. Again, thanks for the help
My main aim right now is to just make it work on Minecraft out of eclipse.
EDIT: adding a preload event with the items in caused it to crash
I have made a food mod and am trying to publish it to beta, but when it recompiles and rebofscates, it didnt seem to work, I fixed that but it wasnt going into the reobf folder but it seems as though it went into the bin folder under mcp. I copied my stuff and my assets into a folder as a video told me too. I then launched Minecraft and it crashed saying an error that hadnt come up in eclipse. The error is with items and .setUnlocalizedName and setCreativeTab. Please note that I do have Harvestcraft installed as some of my mod uses those items.
Any help would be appreciated,
Murdy007
One of my crash reports:
---- Minecraft Crash Report ----
// Would you like a cupcake?
Time: 12/11/14 7:10 PM
Description: Initializing game
java.lang.NoSuchMethodError: petco.mod.items.basic.Packet.setCreativeTab(Lnet/minecraft/creativetab/CreativeTabs;)Lnet/minecraft/item/Item;
at petco.mod.items.basic.Packet.<init>(Packet.java:11)
at petco.mod.core.petco.<clinit>(petco.java:85)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:511)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:473)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
at net.minecraft.client.main.Main.main(SourceFile:101)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at petco.mod.items.basic.Packet.<init>(Packet.java:11)
at petco.mod.core.petco.<clinit>(petco.java:85)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:511)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:473)
-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
at net.minecraft.client.main.Main.main(SourceFile:101)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
-- System Details --
Details:
Minecraft Version: 1.6.4
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.7.0_71, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 621831408 bytes (593 MB) / 739770368 bytes (705 MB) up to 2386034688 bytes (2275 MB)
JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2560M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 5 mods loaded, 5 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{6.4.49.965} [Forge Mod Loader] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed
Forge{9.11.1.965} [Minecraft Forge] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed
pamharvestcraft{1.0} [Pam's HarvestCraft Base] (Pam's HarvestCraft 1.6.4a.zip) Unloaded->Constructed
petco_foodmod_murdy007{1.265} [PetCo Foods] (PetCoAlpha1.zip) Unloaded
Launched Version: 1.6.4-Forge9.11.1.965
LWJGL: 2.9.0
OpenGL: GeForce GTX 780/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Pack: Default
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
package petco.mod.items.basic;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.Item;
import petco.mod.core.petco;
public class Packet extends Item{
public Packet(int par1) {
super(par1);
this.setCreativeTab(petco.TabPetCo);
// TODO Auto-generated constructor stub
}
public void registerIcons(IconRegister iconRegister) {
itemIcon = iconRegister.registerIcon("petco:normalpacket");
}
}
package petco.mod.core;
import java.util.ArrayList;
import petco.mod.items.basic.Minerals;
import petco.mod.creativetabs.TabPetCo;
import petco.mod.creativetabs.TabWhiskas;
import petco.mod.food.robesh.Robbesh;
import petco.mod.food.whiskas.temptations.BeefCheeseTemptations;
import petco.mod.food.whiskas.temptations.BeefTemptations;
import petco.mod.food.whiskas.temptations.CaptainsTemptations;
import petco.mod.food.whiskas.temptations.CatnipFeverTemptations;
import petco.mod.food.whiskas.temptations.CatnipTemptations;
import petco.mod.food.whiskas.temptations.ChickenCheeseTemptations;
import petco.mod.food.whiskas.temptations.ChickenTemptations;
import petco.mod.food.whiskas.temptations.CookoutTemptations;
import petco.mod.food.whiskas.temptations.CrabTunaTemptations;
import petco.mod.food.whiskas.temptations.CreamyDairy;
import petco.mod.food.whiskas.temptations.DentabitesChicken;
import petco.mod.food.whiskas.temptations.FarmersTemptations;
import petco.mod.food.whiskas.temptations.HairballChicken;
import petco.mod.food.whiskas.temptations.IndoorSalmon;
import petco.mod.food.whiskas.temptations.SalmonTemptations;
import petco.mod.food.whiskas.temptations.SalmonTunaTemptations;
import petco.mod.food.whiskas.temptations.SavourySalmonTunaTemptationsRollers;
import petco.mod.food.whiskas.temptations.SeafoodTemptations;
import petco.mod.food.whiskas.temptations.ShrimpTunaTemptations;
import petco.mod.food.whiskas.temptations.SkinCoatSalmon;
import petco.mod.food.whiskas.temptations.TastyChickenTurkeyTemptationsRollers;
import petco.mod.food.whiskas.temptations.TunaCheeseTemptations;
import petco.mod.food.whiskas.temptations.TunaTemptations;
import petco.mod.food.whiskas.temptations.TurkeyTemptations;
import petco.mod.items.basic.AnimalFat;
import petco.mod.items.basic.BeefFlavour;
import petco.mod.items.basic.ChickenFlavour;
import petco.mod.items.basic.ChickenProduct;
import petco.mod.items.basic.DirtyPacket;
import petco.mod.items.basic.DriedCheese;
import petco.mod.items.basic.DriedMeatProduct;
import petco.mod.items.basic.FishFlavour;
import petco.mod.items.basic.FishProduct;
import petco.mod.items.basic.MeatProduct;
import petco.mod.items.basic.Packet;
import petco.mod.items.basic.SmlPacket;
import petco.mod.items.basic.Smasher;
import petco.mod.items.basic.TunaFlavour;
import petco.mod.items.basic.TurkeyFlavour;
import petco.mod.items.basic.MeatGloop;
import petco.mod.items.other.ItemEmptyPacket;
import petco.mod.placeholder.PetCoPlaceHolder;
import petco.mod.placeholder.WhiskasPlaceHolder;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSeedFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraftforge.oredict.*;
@Mod(modid = petco.modid, name = "PetCo Foods", version = "1.265")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class petco {
@SidedProxy(clientSide = "petco.mod.core.ClientProxy", serverSide = "petco.mod.core.CommonProxy")
public static CommonProxy proxy;
public static final String modid = "petco_foodmod_murdy007";
//CreativeTabs
public static Item WhiskasPlaceHolder = new WhiskasPlaceHolder(16750);//.setUnlocalizedName("WhiskasPlaceHolder");
public static CreativeTabs TabWhiskas = new TabWhiskas(CreativeTabs.getNextID(),"Whiskas Pet Food (PetCo.)");
public static Item PetCoPlaceHolder = new PetCoPlaceHolder(16751);//.setUnlocalizedName("PetCoPlaceHolder");
public static CreativeTabs TabPetCo = new TabPetCo(CreativeTabs.getNextID(),"Pet Co.");
public static Item EmptyPacket = new ItemEmptyPacket(16755);//.setUnlocalizedName("EmptyPacket");
public static Item Packet = new Packet(16812).setUnlocalizedName("Packet");
public static Item SmlPacket = new SmlPacket(16813).setUnlocalizedName("SmlPacket");
public static Item MeatGloop = new MeatGloop(16799).setUnlocalizedName("MeatGloop");
public static Item AnimalFat = new AnimalFat(16800).setUnlocalizedName("AnimalFat");
public static Item DirtyPacket = new DirtyPacket(16798).setUnlocalizedName("DirtyPacket");
public static Item ChickenProduct = new ChickenProduct(16803).setUnlocalizedName("ChickenProduct");
public static Item FishProduct = new FishProduct(16806).setUnlocalizedName("FishProduct");
private String itemPlastic;
@EventHandler
public void load(FMLInitializationEvent e){
//Block CatNipPlant = new CatNipPlant(16812).setUnlocalizedName("CatNipPlant");
//GameRegistry.registerBlock(CatNipPlant, modid + CatNipPlant.getUnlocalizedName());
//LanguageRegistry.addName(CatNipPlant, "lol");
//Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack (petco.EmptyPacket)), null, Items.getItem("rubber"));
//proxy.registerRenderInformation();
}
//public static final Object rubber = OreDictionary.getOres("itemRubber");
//public static Item.itemRegistry.getObject("minefactoryreloaded.rubberSheets");
//public static ArrayList<ItemStack> getOres(String itemRubber)
//{
// return getOres(getOreID(itemRubber));
//}
//public static final Object rubber = OreDictionary.getOres("itemRubber");
//public static Item CatNip;
//public static Block CatNipPlant;
public static Item Presser;
public static Item Smasher;
ItemStack plasticsheets = new ItemStack(12249, 1, 0);
ItemStack Flour = new ItemStack(15263, 1, 0);
ItemStack Cornmeal = new ItemStack(15538, 1, 0);
ItemStack milk = new ItemStack(16219, 1, 0);
//ItemStack mortar = new ItemStack(15261, 1, 0);
//ItemStack juicer = new ItemStack(16204, 1, 0);
public petco () {
//LanguageRegistry.addName(CatNip.itemID, "Cat Nip");
//Item CatNip = new ItemSeedFood(16813, 1, 10F, CatNipPlant.blockID, Block.tilledField.blockID).setUnlocalizedName("CatNip");
//GameRegistry.addShapedRecipe(new ItemStack(petco.EmptyPacket), new ItemStack(12249, 1, 0));
GameRegistry.addRecipe(new ItemStack(petco.Packet,16), new Object[]{
"x x","x x"," x ",'x',plasticsheets,
});
GameRegistry.addRecipe(new ItemStack(petco.SmlPacket,16), new Object[]{
" x ","x x"," x ",'x',plasticsheets,
});
GameRegistry.addRecipe(new ItemStack(petco.EmptyPacket,1), new Object[]{
"x "," "," ",'x',Packet,
});
//CreativeTabs
LanguageRegistry.addName(WhiskasPlaceHolder, "Whiskas Pet Food (PetCo.)");
LanguageRegistry.addName(PetCoPlaceHolder, "Pet Co.");
//Items
//Basic Items
//REFERENCE//Item MeatGloop = new MeatGloop(16799).setUnlocalizedName("MeatGloop");
LanguageRegistry.addName(MeatGloop, "Meat Gloop");
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.beefRaw));
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.porkRaw));
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.chickenRaw));
GameRegistry.addSmelting(petco.MeatGloop.itemID, new ItemStack(petco.AnimalFat, 32), 0.1F);
//REFERENCE//Item AnimalFat = new AnimalFat(16800).setUnlocalizedName("AnimalFat");
LanguageRegistry.addName(AnimalFat, "Animal Fat");
//REFERENCE//Item ChickenProduct = new ChickenProduct(16803).setUnlocalizedName("ChickenProduct");
LanguageRegistry.addName(ChickenProduct, "Chicken Product");
GameRegistry.addShapelessRecipe(new ItemStack(ChickenProduct, 16), new ItemStack(Item.chickenCooked), new ItemStack(15261, 1, 0));
//REFERENCE//Item FishProduct = new FishProduct(16806).setUnlocalizedName("FishProduct");
LanguageRegistry.addName(FishProduct, "Fish Product");
GameRegistry.addShapelessRecipe(new ItemStack(FishProduct, 8), new ItemStack(Item.fishCooked), new ItemStack(15261, 1, 0));
Item MeatProduct = new MeatProduct(16807).setUnlocalizedName("MeatProduct");
LanguageRegistry.addName(MeatProduct, "Meat Product");
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.beefCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.porkCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.chickenCooked), new ItemStack(15261, 1, 0));
Item DriedMeatProduct = new DriedMeatProduct(16808).setUnlocalizedName("DriedMeatProduct");
LanguageRegistry.addName(DriedMeatProduct, "Dried Meat Product");
GameRegistry.addSmelting(MeatProduct.itemID, new ItemStack(DriedMeatProduct), 0.1F);
Item ChickenFlavour = new ChickenFlavour(16809).setUnlocalizedName("ChickenFlavour");
LanguageRegistry.addName(ChickenFlavour, "Natural Chicken Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(ChickenFlavour, 16), new ItemStack(Item.chickenRaw), new ItemStack(16204, 1, 0));
Item TurkeyFlavour = new TurkeyFlavour(16810).setUnlocalizedName("TurkeyFlavour");
LanguageRegistry.addName(TurkeyFlavour, "Natural Turkey Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(TurkeyFlavour), new ItemStack(ChickenFlavour));
Item BeefFlavour = new BeefFlavour(16811).setUnlocalizedName("BeefFlavour");
LanguageRegistry.addName(BeefFlavour, "Natural Beef Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(BeefFlavour, 16), new ItemStack(Item.beefRaw), new ItemStack(16204, 1, 0));
Item Minerals = new Minerals(16814).setUnlocalizedName("Minerals");
LanguageRegistry.addName(Minerals, "Vitamins & Minerals");
GameRegistry.addRecipe(new ItemStack(Minerals,32), new Object[]{
" x ","xxx"," x ",'x',Block.cobblestone,
});
Item FishFlavour = new FishFlavour(16815).setUnlocalizedName("FishFlavour");
LanguageRegistry.addName(FishFlavour, "Natural Fish Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(FishFlavour, 8), new ItemStack(Item.fishRaw), new ItemStack(16204, 1, 0));
Item TunaFlavour = new TunaFlavour(16816).setUnlocalizedName("TunaFlavour");
LanguageRegistry.addName(TunaFlavour, "Natural Tuna Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(TunaFlavour), new ItemStack(FishFlavour), new ItemStack(16204, 1, 0));
Item DriedCheese = new DriedCheese(16817).setUnlocalizedName("DriedCheese");
LanguageRegistry.addName(DriedCheese, "Dried Cheese");
GameRegistry.addShapelessRecipe(new ItemStack(DriedCheese), new ItemStack(15269, 1, 0), new ItemStack(15256, 1, 0));
//REFERENCE//Item Packet = new Packet(16812).setUnlocalizedName("Packet");
LanguageRegistry.addName(Packet, "Packet");
//REFERENCE//Item SmlPacket = new SmlPacket(16813).setUnlocalizedName("SmlPacket");
LanguageRegistry.addName(SmlPacket, "Small Packet");
//REFERENCE//Item DirtyPacket = new DirtyPacket(16814).setUnlocalizedName("DirtyPacket");
LanguageRegistry.addName(DirtyPacket, "Dirty Packet");
//Other
LanguageRegistry.addName(EmptyPacket, "Empty Temptations Packet");
GameRegistry.addShapelessRecipe(new ItemStack(EmptyPacket), new ItemStack(DirtyPacket));
//Food - Whiskas
//TEMPTATIONS
Item TastyChickenTurkeyTemptationsRollers = new TastyChickenTurkeyTemptationsRollers(16756, 3, false).setUnlocalizedName("TastyChickenTurkeyTemptationsRollers");
LanguageRegistry.addName(TastyChickenTurkeyTemptationsRollers, " Tasty Chicken & Turkey Temptations Tumblers");
GameRegistry.addRecipe(new ItemStack(TastyChickenTurkeyTemptationsRollers,1), new Object[]{
"fcd","axs","tpv",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',FishProduct,'t',Minerals,'p',ChickenFlavour,'v',TurkeyFlavour
});
Item SavourySalmonTunaTemptationsRollers = new SavourySalmonTunaTemptationsRollers(16757, 3, false).setUnlocalizedName("SavourySalmonTunaTemptationsRollers");
LanguageRegistry.addName(SavourySalmonTunaTemptationsRollers, "Savoury Salmon & Tuna Temptations Tumblers");
GameRegistry.addRecipe(new ItemStack(SavourySalmonTunaTemptationsRollers,1), new Object[]{
"fcd","axs","ito",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',FishProduct,'t',Minerals,'p',ChickenFlavour,'i',TunaFlavour,'o',FishFlavour
});
Item ChickenTemptations = new ChickenTemptations(16758, 3, false).setUnlocalizedName("ChickenTemptations");
LanguageRegistry.addName(ChickenTemptations, "Classic Tasty Chicken Temptations");
GameRegistry.addRecipe(new ItemStack(ChickenTemptations,1), new Object[]{
"fcd","vxs","tp ",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',ChickenFlavour,'t',Minerals,'p',DriedCheese,'v',Flour
});
Item BeefTemptations = new BeefTemptations(16759, 3, false).setUnlocalizedName("BeefTemptations");
LanguageRegistry.addName(BeefTemptations, "Classic Hearty Beef Temptations");
GameRegistry.addRecipe(new ItemStack(BeefTemptations,1), new Object[]{
"fca","dxv","st ",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',BeefFlavour,'t',Minerals,'p',DriedCheese,'v',Flour
});
Item CreamyDairy = new CreamyDairy(16760, 3, false).setUnlocalizedName("CreamyDairy");
LanguageRegistry.addName(CreamyDairy, "Classic Creamy Dairy Temptations");
GameRegistry.addRecipe(new ItemStack(CreamyDairy,1), new Object[]{
"fca","dxv","tpo",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',ChickenFlavour,'t',Minerals,'p',DriedCheese,'v',Flour,'o',milk
});
Item SeafoodTemptations = new SeafoodTemptations(16761, 3, false).setUnlocalizedName("SeafoodTemptations");
LanguageRegistry.addName(SeafoodTemptations, "Classic Seafood Medley Temptations");
GameRegistry.addRecipe(new ItemStack(SeafoodTemptations,1), new Object[]{
"fca","dxv","tsp",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',TunaFlavour,'t',Minerals,'p',FishProduct,'v',Flour
});
Item TunaTemptations = new TunaTemptations(16762, 3, false).setUnlocalizedName("TunaTemptations");
LanguageRegistry.addName(TunaTemptations, "Classic Tempting Tuna Temptations");
GameRegistry.addRecipe(new ItemStack(TunaTemptations,1), new Object[]{
"fca","dxv","tps",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',TunaFlavour,'t',Minerals,'p',FishFlavour,'v',Flour
});
Item TurkeyTemptations = new TurkeyTemptations(16763, 3, false).setUnlocalizedName("TurkeyTemptations");
LanguageRegistry.addName(TurkeyTemptations, "Classic Tantalizing Turkey Temptations");
GameRegistry.addRecipe(new ItemStack(TurkeyTemptations,1), new Object[]{
"fcd","vxs","tp ",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',ChickenFlavour,'t',Minerals,'p',DriedCheese,'v',Flour
});
Item SalmonTemptations = new SalmonTemptations(16764, 3, false).setUnlocalizedName("SalmonTemptations");
LanguageRegistry.addName(SalmonTemptations, "Classic Savoury Salmon Temptations");
Item BeefCheeseTemptations = new BeefCheeseTemptations(16765, 3, false).setUnlocalizedName("BeefCheeseTemptations");
LanguageRegistry.addName(BeefCheeseTemptations, "Beef & Cheese - Cheezy Middles Temptations");
Item ChickenCheeseTemptations = new ChickenCheeseTemptations(16766, 3, false).setUnlocalizedName("ChickenCheeseTemptations");
LanguageRegistry.addName(ChickenCheeseTemptations, "Chicken & Cheese - Cheezy Middles Temptations");
Item TunaCheeseTemptations = new TunaCheeseTemptations(16767, 3, false).setUnlocalizedName("TunaCheeseTemptations");
LanguageRegistry.addName(TunaCheeseTemptations, "Tuna & Cheese - Cheezy Middles Temptations");
Item CatnipFeverTemptations = new CatnipFeverTemptations(16768, 3, false).setUnlocalizedName("CatnipFeverTemptations");
LanguageRegistry.addName(CatnipFeverTemptations, "Catnip Fever Mixups Temptations");
Item CatnipTemptations = new CatnipTemptations(16768, 3, false).setUnlocalizedName("CatnipTemptations");
LanguageRegistry.addName(CatnipTemptations, "Blissful Catnip Temptations");
Item DentabitesChicken = new DentabitesChicken(16769, 3, false).setUnlocalizedName("DentabitesChicken");
LanguageRegistry.addName(DentabitesChicken, "DentaBites Chicken Temptations");
Item HairballChicken = new HairballChicken(16770, 3, false).setUnlocalizedName("HairballChicken");
LanguageRegistry.addName(HairballChicken, "Hairball Control Chicken Temptations");
Item IndoorSalmon = new IndoorSalmon(16771, 3, false).setUnlocalizedName("IndoorSalmon");
LanguageRegistry.addName(IndoorSalmon, "Essentials Indoor Salmon Temptations");
Item SkinCoatSalmon = new SkinCoatSalmon(16772, 3, false).setUnlocalizedName("SkinCoatSalmon");
LanguageRegistry.addName(SkinCoatSalmon, "Skin & Coat Salmon Temptations");
Item CookoutTemptations = new CookoutTemptations(16773, 3, false).setUnlocalizedName("CookoutTemptations");
LanguageRegistry.addName(CookoutTemptations, "Backyard Cookout Temptations");
Item CaptainsTemptations = new CaptainsTemptations(16774, 3, false).setUnlocalizedName("CaptainsTemptations");
LanguageRegistry.addName(CaptainsTemptations, "Captain's Catch Temptations");
Item FarmersTemptations = new FarmersTemptations(16775, 3, false).setUnlocalizedName("FarmersTemptations");
LanguageRegistry.addName(FarmersTemptations, "Farmers Feast Temptations");
Item CrabTunaTemptations = new CrabTunaTemptations(16776, 3, false).setUnlocalizedName("CrabTunaTemptations");
LanguageRegistry.addName(CrabTunaTemptations, "Ocean Middles Crab & Tuna Temptations");
Item SalmonTunaTemptations = new SalmonTunaTemptations(16777, 3, false).setUnlocalizedName("SalmonTunaTemptations");
LanguageRegistry.addName(SalmonTunaTemptations, "Ocean Middles Salmon & Tuna Temptations");
Item ShrimpTunaTemptations = new ShrimpTunaTemptations(16778, 3, false).setUnlocalizedName("ShrimpTunaTemptations");
LanguageRegistry.addName(ShrimpTunaTemptations, "Ocean Middles Shrimp & Tuna Temptations");
//DRYFOOD
//Item WhiskasChickenDry = new WhiskasChickenDry(16785, 4, false).setUnlocalizedName("WhiskasChickenDry");
//LanguageRegistry.addName(WhiskasChickenDry, "Whiskas Chicken Dry Food");
//Item WhiskasChickenTurkeyDry = new WhiskasChickenTurkeyDry(16786, 4, false).setUnlocalizedName("WhiskasChickenTurkeyDry");
//LanguageRegistry.addName(WhiskasChickenTurkeyDry, "Whiskas Chicken & Turkey Dry Food");
//Item WhiskasSalmonShrimpDry = new WhiskasSalmonShrimpDry(16787, 4, false).setUnlocalizedName("WhiskasSalmonShrimpDry");
//LanguageRegistry.addName(WhiskasSalmonShrimpDry, "Whiskas Salmon & Shrimp Dry Food");
//Item WhiskasKittenDry = new WhiskasKittenDry(16788, 4, false).setUnlocalizedName("WhiskasKittenDry")
//Food - Robbesh
//Item Robbesh = new Robbesh(????????, 3, false).setUnlocalizedName("Robbesh");
//LanguageRegistry.addName(Robbesh, "Robbesh- 'Beef' Flavour");
//ID NOTICE: Any more foods added, check the other items
}
private Item ItemStack(int i, int j, int k) {
// TODO Auto-generated method stub
return null;
}
}
Also do you want me to put all the item public statics in or all of the ones without 'public static'???
---- Minecraft Crash Report ----
// I blame Dinnerbone.
Time: 12/12/14 8:18 AM
Description: Initializing game
java.lang.NoSuchMethodError: petco.mod.items.basic.SmlPacket.setCreativeTab(Lnet/minecraft/creativetab/CreativeTabs;)Lnet/minecraft/item/Item;
at petco.mod.items.basic.SmlPacket.<init>(SmlPacket.java:11)
at petco.mod.core.petco.<clinit>(petco.java:87)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:511)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:473)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
at net.minecraft.client.main.Main.main(SourceFile:101)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at petco.mod.items.basic.SmlPacket.<init>(SmlPacket.java:11)
at petco.mod.core.petco.<clinit>(petco.java:87)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.constructMod(FMLModContainer.java:462)
at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.loadMods(Loader.java:511)
at cpw.mods.fml.client.FMLClientHandler.beginMinecraftLoading(FMLClientHandler.java:183)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:473)
-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
at net.minecraft.client.main.Main.main(SourceFile:101)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
-- System Details --
Details:
Minecraft Version: 1.6.4
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.7.0_71, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 398375872 bytes (379 MB) / 725614592 bytes (692 MB) up to 2386034688 bytes (2275 MB)
JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx2560M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 30 mods loaded, 30 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed
FML{6.4.49.965} [Forge Mod Loader] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed
Forge{9.11.1.965} [Minecraft Forge] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed
PowerCrystalsCore{1.1.8} [PowerCrystals Core] (PowerCrystalsCore-1.1.8-9 (1).jar) Unloaded->Constructed
MFR Compat Forestry Trees{1.0} [MFR Compat Forestry Trees] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MFR Compat Extra Trees{1.0} [MFR Compat Extra Trees] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded{1.6.4R2.7.9} [MineFactory Reloaded] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatAppliedEnergistics{1.6.4R2.7.9} [MFR Compat: Applied Energistics] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatAtum{1.6.4R2.7.9} [MFR Compat: Atum] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatBackTools{1.6.4R2.7.9} [MFR Compat: BackTools] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatBuildCraft{1.6.4R2.7.9} [MFR Compat: BuildCraft] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatChococraft{1.6.4R2.7.9} [MFR Compat: Chococraft] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatExtraBiomes{1.6.4R2.7.9} [MFR Compat: ExtraBiomes] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatForestry{1.6.4R2.7.9} [MFR Compat: Forestry] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatForestryPre{1.6.4R2.7.9} [MFR Compat: Forestry (part 2)] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatForgeMicroblock{1.6.4R2.7.9} [MFR Compat: ForgeMicroblock] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatIC2{1.6.4R2.7.9} [MFR Compat: IC2] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatMystcraft{1.6.4R2.7.9} [MFR Compat: Mystcraft] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
pamharvestcraft{1.0} [Pam's HarvestCraft Base] (Pam's HarvestCraft 1.6.4a.zip) Unloaded->Constructed
MineFactoryReloaded|CompatPams{1.6.4R2.7.9} [MFR Compat: Pam's Mods] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatProjRed{1.6.4R2.7.9} [MFR Compat ProjectRed] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatRailcraft{1.6.4R2.7.9} [MFR Compat: Railcraft] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatRP2{1.6.4R2.7.9} [MFR Compat: RP2] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatSufficientBiomes{1.6.4R2.7.9} [MFR Compat: Sufficient Biomes] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatThaumcraft{1.6.4R2.7.9} [MFR Compat: Thaumcraft] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatThermalExpansion{1.6.4R2.7.9} [MFR Compat: Thermal Expansion] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatTwilightForest{1.6.4R2.7.9} [MFR Compat: TwilightForest] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatVanilla{1.6.4R2.7.9} [MFR Compat: Vanilla] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
MineFactoryReloaded|CompatXyCraft{1.6.4R2.7.9} [MFR Compat: XyCraft] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed
petco_foodmod_murdy007{1.265} [PetCo Foods] (PetCoAlpha1.zip) Unloaded
Launched Version: 1.6.4-Forge9.11.1.965
LWJGL: 2.9.0
OpenGL: GeForce GTX 780/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Pack: Default
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
SmlPacket.class
package petco.mod.items.basic;
import petco.mod.core.petco;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.Item;
public class SmlPacket extends Item{
public SmlPacket(int par1) {
super(par1);
this.setCreativeTab(petco.TabPetCo);
// TODO Auto-generated constructor stub
}
public void registerIcons(IconRegister iconRegister) {
itemIcon = iconRegister.registerIcon("petco:smallpacket");
}
}
Put all your stuff in FMLPreInitializationEvent handler, and that 'TabPetco' one in first place.
Crash Report:
---- Minecraft Crash Report ----
// Ooh. Shiny.
Time: 12/12/14 3:12 PM
Description: Initializing game
java.lang.NullPointerException
at net.minecraft.item.ItemStack.<init>(ItemStack.java:82)
at petco.mod.core.petco.load(petco.java:166)
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:545)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:699)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:509)
at net.minecraft.client.Minecraft.run(Minecraft.java:808)
at net.minecraft.client.main.Main.main(Main.java:93)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- Head --
Stacktrace:
at net.minecraft.item.ItemStack.<init>(ItemStack.java:82)
at petco.mod.core.petco.load(petco.java:166)
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:545)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:699)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:509)
-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.run(Minecraft.java:808)
at net.minecraft.client.main.Main.main(Main.java:93)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
-- System Details --
Details:
Minecraft Version: 1.6.4
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.7.0_71, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 726575000 bytes (692 MB) / 1037959168 bytes (989 MB) up to 1037959168 bytes (989 MB)
JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 7 mods loaded, 7 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{6.4.49.965} [Forge Mod Loader] (bin) Unloaded->Constructed->Pre-initialized->Initialized
Forge{9.11.1.965} [Minecraft Forge] (bin) Unloaded->Constructed->Pre-initialized->Initialized
CodeChickenCore{0.9.0.9} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
NotEnoughItems{1.6.1.9} [Not Enough Items] (NotEnoughItems-1.6.4-1.6.1.9-dev (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
petco_foodmod_murdy007{1.265} [PetCo Foods] (bin) Unloaded->Constructed->Pre-initialized->Errored
pamharvestcraft{1.0} [Pam's HarvestCraft Base] (Pam's HarvestCraft 1.6.4a.zip) Unloaded->Constructed->Pre-initialized->Initialized
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: GeForce GTX 780/PCIe/SSE2 GL version 4.4.0, NVIDIA Corporation
Is Modded: Definitely; Client brand changed to 'fml,forge'
Type: Client (map_client.txt)
Resource Pack: Default
Current Language: English (US)
Profiler Position: N/A (disabled)
Vec3 Pool Size: ~~ERROR~~ NullPointerException: null
PetCo.class
import java.util.ArrayList;
import petco.mod.items.basic.Minerals;
import petco.mod.food.robesh.Robbesh;
import petco.mod.food.whiskas.temptations.BeefCheeseTemptations;
import petco.mod.food.whiskas.temptations.BeefTemptations;
import petco.mod.food.whiskas.temptations.CaptainsTemptations;
import petco.mod.food.whiskas.temptations.CatnipFeverTemptations;
import petco.mod.food.whiskas.temptations.CatnipTemptations;
import petco.mod.food.whiskas.temptations.ChickenCheeseTemptations;
import petco.mod.food.whiskas.temptations.ChickenTemptations;
import petco.mod.food.whiskas.temptations.CookoutTemptations;
import petco.mod.food.whiskas.temptations.CrabTunaTemptations;
import petco.mod.food.whiskas.temptations.CreamyDairy;
import petco.mod.food.whiskas.temptations.DentabitesChicken;
import petco.mod.food.whiskas.temptations.FarmersTemptations;
import petco.mod.food.whiskas.temptations.HairballChicken;
import petco.mod.food.whiskas.temptations.IndoorSalmon;
import petco.mod.food.whiskas.temptations.SalmonTemptations;
import petco.mod.food.whiskas.temptations.SalmonTunaTemptations;
import petco.mod.food.whiskas.temptations.SavourySalmonTunaTemptationsRollers;
import petco.mod.food.whiskas.temptations.SeafoodTemptations;
import petco.mod.food.whiskas.temptations.ShrimpTunaTemptations;
import petco.mod.food.whiskas.temptations.SkinCoatSalmon;
import petco.mod.food.whiskas.temptations.TastyChickenTurkeyTemptationsRollers;
import petco.mod.food.whiskas.temptations.TunaCheeseTemptations;
import petco.mod.food.whiskas.temptations.TunaTemptations;
import petco.mod.food.whiskas.temptations.TurkeyTemptations;
import petco.mod.items.basic.AnimalFat;
import petco.mod.items.basic.BeefFlavour;
import petco.mod.items.basic.ChickenFlavour;
import petco.mod.items.basic.ChickenProduct;
import petco.mod.items.basic.DirtyPacket;
import petco.mod.items.basic.DriedCheese;
import petco.mod.items.basic.DriedMeatProduct;
import petco.mod.items.basic.FishFlavour;
import petco.mod.items.basic.FishProduct;
import petco.mod.items.basic.MeatProduct;
import petco.mod.items.basic.Packet;
import petco.mod.items.basic.SmlPacket;
import petco.mod.items.basic.Smasher;
import petco.mod.items.basic.TunaFlavour;
import petco.mod.items.basic.TurkeyFlavour;
import petco.mod.items.basic.MeatGloop;
import petco.mod.items.other.ItemEmptyPacket;
import petco.mod.placeholder.PetCoPlaceHolder;
import petco.mod.placeholder.WhiskasPlaceHolder;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSeedFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.oredict.*;
@Mod(modid = petco.modid, name = "PetCo Foods", version = "1.265")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class petco {
@SidedProxy(clientSide = "petco.mod.core.ClientProxy", serverSide = "petco.mod.core.CommonProxy")
public static CommonProxy proxy;
public static final String modid = "petco_foodmod_murdy007";
public static CreativeTabs TabPetCo;
public static CreativeTabs TabWhiskas;
//public static Item PetCoPlaceHolder;
//public static Item WhiskasPlaceHolder;
public static Item FishProduct;
public static Item MeatProduct;
public static Item DriedMeatProduct;
public static Item MeatGloop;
public static Item ChickenProduct;
public static Item DirtyPacket;
public static Item AnimalFat;
public static Item EmptyPacket;
public static Item Packet;
public static Item SmlPacket;
public static Item ChickenFlavour;
public static Item BeefFlavour;
public static Item TurkeyFlavour;
public static Item TunaFlavour;
public static Item FishFlavour;
public static Item DriedCheese;
public static Item Minerals;
public static Item TastyChickenTurkeyTemptationsRollers;
public static Item SavourySalmonTunaTemptationsRollers;
public static Item ChickenTemptations;
public static Item BeefTemptations;
public static Item CreamyDairy;
public static Item SeafoodTemptations;
public static Item TunaTemptations;
public static Item SalmonTemptations;
public static Item TurkeyTemptations;
public static Item BeefCheeseTemptations;
public static Item ChickenCheeseTemptations;
public static Item TunaCheeseTemptations;
public static Item CatnipFeverTemptations;
public static Item CatnipTemptations;
public static Item DentabitesChicken;
public static Item HairballChicken;
public static Item IndoorSalmon;
public static Item SkinCoatSalmon;
public static Item CookoutTemptations;
public static Item CaptainsTemptations;
public static Item FarmersTemptations;
public static Item CrabTunaTemptations;
public static Item SalmonTunaTemptations;
public static Item ShrimpTunaTemptations;
@EventHandler
public void load(FMLInitializationEvent e){
// _____ _______ _
// / ____| |__ __| | |
// | | ______ | | __ _| |__ ___
// | | |______| | |/ _` | '_ \/ __|
// | |____ | | (_| | |_) \__ \
// \_____| |_|\__,_|_.__/|___/
TabPetCo = new CreativeTabs("petcocreativetab"){
@SideOnly(Side.CLIENT)
public int getTabItemIconIndex(){
return petco.MeatGloop.itemID;
}
};
LanguageRegistry.instance().addStringLocalization(TabPetCo.getTranslatedTabLabel(), "Pet Co. Foods");
TabWhiskas = new CreativeTabs("whiskascreativetab"){
@SideOnly(Side.CLIENT)
public int getTabItemIconIndex(){
return petco.BeefTemptations.itemID;
}
};
LanguageRegistry.instance().addStringLocalization(TabWhiskas.getTranslatedTabLabel(), "Whiskas Pet Food (PetCo)");
//Item PetCoPlaceHolder = new PetCoPlaceHolder(16751).setUnlocalizedName("PetCoPlaceHolder");
//CreativeTabs TabPetCo = new TabPetCo(CreativeTabs.getNextID(),"Pet Co.");
//Item WhiskasPlaceHolder = new WhiskasPlaceHolder(16750).setUnlocalizedName("WhiskasPlaceHolder");
//CreativeTabs TabWhiskas = new TabWhiskas(CreativeTabs.getNextID(),"Whiskas Pet Food (PetCo.)");
// _____ _
// |_ _| |
// | | | |_ ___ _ __ ___ ___
// | | | __/ _ \ '_ ` _ \/ __|
// _| |_| || __/ | | | | \__ \
// |_____|\__\___|_| |_| |_|___/
Item EmptyPacket = new ItemEmptyPacket(16755).setUnlocalizedName("EmptyPacket");
LanguageRegistry.addName(EmptyPacket, "Empty Temptations Packet");
GameRegistry.addRecipe(new ItemStack(petco.EmptyPacket,1), new Object[]{
"x "," "," ",'x',Packet,
});
Item Packet = new Packet(16812).setUnlocalizedName("Packet");
LanguageRegistry.addName(Packet, "Packet");
GameRegistry.addRecipe(new ItemStack(petco.Packet,16), new Object[]{
"x x","x x"," x ",'x',plasticsheets,
});
Item SmlPacket = new SmlPacket(16813).setUnlocalizedName("SmlPacket");
LanguageRegistry.addName(SmlPacket, "Small Packet");
GameRegistry.addRecipe(new ItemStack(petco.SmlPacket,16), new Object[]{
" x ","x x"," x ",'x',plasticsheets,
});
Item MeatGloop = new MeatGloop(16799).setUnlocalizedName("MeatGloop");
LanguageRegistry.addName(MeatGloop, "Meat Gloop");
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.beefRaw));
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.porkRaw));
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.chickenRaw));
GameRegistry.addSmelting(petco.MeatGloop.itemID, new ItemStack(petco.AnimalFat, 32), 0.1F);
Item AnimalFat = new AnimalFat(16800).setUnlocalizedName("AnimalFat");
LanguageRegistry.addName(AnimalFat, "Animal Fat");
Item DirtyPacket = new DirtyPacket(16798).setUnlocalizedName("DirtyPacket");
LanguageRegistry.addName(DirtyPacket, "Dirty Packet");
GameRegistry.addShapelessRecipe(new ItemStack(EmptyPacket), new ItemStack(DirtyPacket));
Item ChickenProduct = new ChickenProduct(16803).setUnlocalizedName("ChickenProduct");
LanguageRegistry.addName(ChickenProduct, "Chicken Product");
GameRegistry.addShapelessRecipe(new ItemStack(ChickenProduct, 16), new ItemStack(Item.chickenCooked), new ItemStack(15261, 1, 0));
Item FishProduct = new FishProduct(16806).setUnlocalizedName("FishProduct");
LanguageRegistry.addName(FishProduct, "Fish Product");
GameRegistry.addShapelessRecipe(new ItemStack(FishProduct, 8), new ItemStack(Item.fishCooked), new ItemStack(15261, 1, 0));
Item MeatProduct = new MeatProduct(16807).setUnlocalizedName("MeatProduct");
LanguageRegistry.addName(MeatProduct, "Meat Product");
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.beefCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.porkCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.chickenCooked), new ItemStack(15261, 1, 0));
Item DriedMeatProduct = new DriedMeatProduct(16808).setUnlocalizedName("DriedMeatProduct");
LanguageRegistry.addName(DriedMeatProduct, "Dried Meat Product");
GameRegistry.addSmelting(MeatProduct.itemID, new ItemStack(DriedMeatProduct), 0.1F);
Item ChickenFlavour = new ChickenFlavour(16809).setUnlocalizedName("ChickenFlavour");
LanguageRegistry.addName(ChickenFlavour, "Natural Chicken Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(ChickenFlavour, 16), new ItemStack(Item.chickenRaw), new ItemStack(16204, 1, 0));
Item TurkeyFlavour = new TurkeyFlavour(16810).setUnlocalizedName("TurkeyFlavour");
LanguageRegistry.addName(TurkeyFlavour, "Natural Turkey Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(TurkeyFlavour), new ItemStack(ChickenFlavour));
Item BeefFlavour = new BeefFlavour(16811).setUnlocalizedName("BeefFlavour");
LanguageRegistry.addName(BeefFlavour, "Natural Beef Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(BeefFlavour, 16), new ItemStack(Item.beefRaw), new ItemStack(16204, 1, 0));
Item Minerals = new Minerals(16814).setUnlocalizedName("Minerals");
LanguageRegistry.addName(Minerals, "Vitamins & Minerals");
GameRegistry.addRecipe(new ItemStack(Minerals,32), new Object[]{
" x ","xxx"," x ",'x',Block.cobblestone,
});
Item FishFlavour = new FishFlavour(16815).setUnlocalizedName("FishFlavour");
LanguageRegistry.addName(FishFlavour, "Natural Fish Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(FishFlavour, 8), new ItemStack(Item.fishRaw), new ItemStack(16204, 1, 0));
Item TunaFlavour = new TunaFlavour(16816).setUnlocalizedName("TunaFlavour");
LanguageRegistry.addName(TunaFlavour, "Natural Tuna Flavour");
GameRegistry.addShapelessRecipe(new ItemStack(TunaFlavour), new ItemStack(FishFlavour), new ItemStack(16204, 1, 0));
Item DriedCheese = new DriedCheese(16817).setUnlocalizedName("DriedCheese");
LanguageRegistry.addName(DriedCheese, "Dried Cheese");
GameRegistry.addShapelessRecipe(new ItemStack(DriedCheese), new ItemStack(15269, 1, 0), new ItemStack(15256, 1, 0));
// _______ _ _ _
// |__ __| | | | | (_)
// | | ___ _ __ ___ _ __ | |_ __ _| |_ _ ___ _ __ ___
// | |/ _ \ '_ ` _ \| '_ \| __/ _` | __| |/ _ \| '_ \/ __|
// | | __/ | | | | | |_) | || (_| | |_| | (_) | | | \__ \
// |_|\___|_| |_| |_| .__/ \__\__,_|\__|_|\___/|_| |_|___/
// | |
// |_|
Item TastyChickenTurkeyTemptationsRollers = new TastyChickenTurkeyTemptationsRollers(16756, 3, false).setUnlocalizedName("TastyChickenTurkeyTemptationsRollers");
LanguageRegistry.addName(TastyChickenTurkeyTemptationsRollers, " Tasty Chicken & Turkey Temptations Tumblers");
GameRegistry.addRecipe(new ItemStack(TastyChickenTurkeyTemptationsRollers,1), new Object[]{
"fcd","axs","tpv",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',FishProduct,'t',Minerals,'p',ChickenFlavour,'v',TurkeyFlavour
});
Item SavourySalmonTunaTemptationsRollers = new SavourySalmonTunaTemptationsRollers(16757, 3, false).setUnlocalizedName("SavourySalmonTunaTemptationsRollers");
LanguageRegistry.addName(SavourySalmonTunaTemptationsRollers, "Savoury Salmon & Tuna Temptations Tumblers");
GameRegistry.addRecipe(new ItemStack(SavourySalmonTunaTemptationsRollers,1), new Object[]{
"fcd","axs","ito",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',FishProduct,'t',Minerals,'p',ChickenFlavour,'i',TunaFlavour,'o',FishFlavour
});
Item ChickenTemptations = new ChickenTemptations(16758, 3, false).setUnlocalizedName("ChickenTemptations");
LanguageRegistry.addName(ChickenTemptations, "Classic Tasty Chicken Temptations");
GameRegistry.addRecipe(new ItemStack(ChickenTemptations,1), new Object[]{
"fcd","vxs","tp ",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',ChickenFlavour,'t',Minerals,'p',DriedCheese,'v',Flour
});
Item BeefTemptations = new BeefTemptations(16759, 3, false).setUnlocalizedName("BeefTemptations");
LanguageRegistry.addName(BeefTemptations, "Classic Hearty Beef Temptations");
GameRegistry.addRecipe(new ItemStack(BeefTemptations,1), new Object[]{
"fca","dxv","st ",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',BeefFlavour,'t',Minerals,'p',DriedCheese,'v',Flour
});
Item CreamyDairy = new CreamyDairy(16760, 3, false).setUnlocalizedName("CreamyDairy");
LanguageRegistry.addName(CreamyDairy, "Classic Creamy Dairy Temptations");
GameRegistry.addRecipe(new ItemStack(CreamyDairy,1), new Object[]{
"fca","dxv","tpo",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',ChickenFlavour,'t',Minerals,'p',DriedCheese,'v',Flour,'o',milk
});
Item SeafoodTemptations = new SeafoodTemptations(16761, 3, false).setUnlocalizedName("SeafoodTemptations");
LanguageRegistry.addName(SeafoodTemptations, "Classic Seafood Medley Temptations");
GameRegistry.addRecipe(new ItemStack(SeafoodTemptations,1), new Object[]{
"fca","dxv","tsp",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',TunaFlavour,'t',Minerals,'p',FishProduct,'v',Flour
});
Item TunaTemptations = new TunaTemptations(16762, 3, false).setUnlocalizedName("TunaTemptations");
LanguageRegistry.addName(TunaTemptations, "Classic Tempting Tuna Temptations");
GameRegistry.addRecipe(new ItemStack(TunaTemptations,1), new Object[]{
"fca","dxv","tps",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',TunaFlavour,'t',Minerals,'p',FishFlavour,'v',Flour
});
Item TurkeyTemptations = new TurkeyTemptations(16763, 3, false).setUnlocalizedName("TurkeyTemptations");
LanguageRegistry.addName(TurkeyTemptations, "Classic Tantalizing Turkey Temptations");
GameRegistry.addRecipe(new ItemStack(TurkeyTemptations,1), new Object[]{
"fcd","vxs","tp ",'x',petco.EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',ChickenFlavour,'t',Minerals,'p',DriedCheese,'v',Flour
});
Item SalmonTemptations = new SalmonTemptations(16764, 3, false).setUnlocalizedName("SalmonTemptations");
LanguageRegistry.addName(SalmonTemptations, "Classic Savoury Salmon Temptations");
Item BeefCheeseTemptations = new BeefCheeseTemptations(16765, 3, false).setUnlocalizedName("BeefCheeseTemptations");
LanguageRegistry.addName(BeefCheeseTemptations, "Beef & Cheese - Cheezy Middles Temptations");
Item ChickenCheeseTemptations = new ChickenCheeseTemptations(16766, 3, false).setUnlocalizedName("ChickenCheeseTemptations");
LanguageRegistry.addName(ChickenCheeseTemptations, "Chicken & Cheese - Cheezy Middles Temptations");
Item TunaCheeseTemptations = new TunaCheeseTemptations(16767, 3, false).setUnlocalizedName("TunaCheeseTemptations");
LanguageRegistry.addName(TunaCheeseTemptations, "Tuna & Cheese - Cheezy Middles Temptations");
Item CatnipFeverTemptations = new CatnipFeverTemptations(16768, 3, false).setUnlocalizedName("CatnipFeverTemptations");
LanguageRegistry.addName(CatnipFeverTemptations, "Catnip Fever Mixups Temptations");
Item CatnipTemptations = new CatnipTemptations(16768, 3, false).setUnlocalizedName("CatnipTemptations");
LanguageRegistry.addName(CatnipTemptations, "Blissful Catnip Temptations");
Item DentabitesChicken = new DentabitesChicken(16769, 3, false).setUnlocalizedName("DentabitesChicken");
LanguageRegistry.addName(DentabitesChicken, "DentaBites Chicken Temptations");
Item HairballChicken = new HairballChicken(16770, 3, false).setUnlocalizedName("HairballChicken");
LanguageRegistry.addName(HairballChicken, "Hairball Control Chicken Temptations");
Item IndoorSalmon = new IndoorSalmon(16771, 3, false).setUnlocalizedName("IndoorSalmon");
LanguageRegistry.addName(IndoorSalmon, "Essentials Indoor Salmon Temptations");
Item SkinCoatSalmon = new SkinCoatSalmon(16772, 3, false).setUnlocalizedName("SkinCoatSalmon");
LanguageRegistry.addName(SkinCoatSalmon, "Skin & Coat Salmon Temptations");
Item CookoutTemptations = new CookoutTemptations(16773, 3, false).setUnlocalizedName("CookoutTemptations");
LanguageRegistry.addName(CookoutTemptations, "Backyard Cookout Temptations");
Item CaptainsTemptations = new CaptainsTemptations(16774, 3, false).setUnlocalizedName("CaptainsTemptations");
LanguageRegistry.addName(CaptainsTemptations, "Captain's Catch Temptations");
Item FarmersTemptations = new FarmersTemptations(16775, 3, false).setUnlocalizedName("FarmersTemptations");
LanguageRegistry.addName(FarmersTemptations, "Farmers Feast Temptations");
Item CrabTunaTemptations = new CrabTunaTemptations(16776, 3, false).setUnlocalizedName("CrabTunaTemptations");
LanguageRegistry.addName(CrabTunaTemptations, "Ocean Middles Crab & Tuna Temptations");
Item SalmonTunaTemptations = new SalmonTunaTemptations(16777, 3, false).setUnlocalizedName("SalmonTunaTemptations");
LanguageRegistry.addName(SalmonTunaTemptations, "Ocean Middles Salmon & Tuna Temptations");
Item ShrimpTunaTemptations = new ShrimpTunaTemptations(16778, 3, false).setUnlocalizedName("ShrimpTunaTemptations");
LanguageRegistry.addName(ShrimpTunaTemptations, "Ocean Middles Shrimp & Tuna Temptations");
}
//Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack (petco.EmptyPacket)), null, Items.getItem("rubber"));
//proxy.registerRenderInformation();
ItemStack plasticsheets = new ItemStack(12249, 1, 0);
ItemStack Flour = new ItemStack(15263, 1, 0);
ItemStack Cornmeal = new ItemStack(15538, 1, 0);
ItemStack milk = new ItemStack(16219, 1, 0);
ItemStack mortar = new ItemStack(15261, 1, 0);
ItemStack juicer = new ItemStack(16204, 1, 0);
public petco () {
//DRYFOOD
//Item WhiskasChickenDry = new WhiskasChickenDry(16785, 4, false).setUnlocalizedName("WhiskasChickenDry");
//LanguageRegistry.addName(WhiskasChickenDry, "Whiskas Chicken Dry Food");
//Item WhiskasChickenTurkeyDry = new WhiskasChickenTurkeyDry(16786, 4, false).setUnlocalizedName("WhiskasChickenTurkeyDry");
//LanguageRegistry.addName(WhiskasChickenTurkeyDry, "Whiskas Chicken & Turkey Dry Food");
//Item WhiskasSalmonShrimpDry = new WhiskasSalmonShrimpDry(16787, 4, false).setUnlocalizedName("WhiskasSalmonShrimpDry");
//LanguageRegistry.addName(WhiskasSalmonShrimpDry, "Whiskas Salmon & Shrimp Dry Food");
//Item WhiskasKittenDry = new WhiskasKittenDry(16788, 4, false).setUnlocalizedName("WhiskasKittenDry")
//Food - Robbesh
//Item Robbesh = new Robbesh(????????, 3, false).setUnlocalizedName("Robbesh");
//LanguageRegistry.addName(Robbesh, "Robbesh- 'Beef' Flavour");
//ID NOTICE: Any more foods added, check the other items
}
}
Thanks again for the help.
Note: the new recipe worked with my 'packet' but I can't use it or an empty packet to craft another item.
Note: when publishing forge said there was an error with Object[] which was only used in the recipes.
But your main issue is you don't seem to understand the base principle of programming. Global and local variables are different.
I know, I actually dont know much, but whats the harm in trying when the only problem is your knowledge.
As for the recipes, Do they have to be in the FMLInitialization event?
It depends, if you don't know anything about programming then you'll be making many mistakes over and over again, and may not / probably won't understand a lot of the terminology thrown around the community. You should maybe focus a bit more on learning Java before getting into modding, you don't need to be a know-it-all about it, but you also should know some of the core concepts of the language and programming in general (local versus global variables, objects, hierarchy, sequence, condition, iteration, syntax, thinking programmatically about a problem, etc). It shouldn't take you too long, just try your best and don't give up.
As for your actual question, you should, but you don't have to. Because recipes are using items, it is generally a good idea to register your recipes after item and block initialisation (which is done during the PreInit phase, so recipes should be constructed and registered during your Init phase).
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
Murdy007
P.S: who loves the idea of ASCII art in code, eh?
PetCo.class:
package petco.mod.core;
import java.util.ArrayList;
import petco.mod.items.basic.Minerals;
import petco.mod.food.robesh.Robbesh;
import petco.mod.food.whiskas.temptations.BeefCheeseTemptations;
import petco.mod.food.whiskas.temptations.BeefTemptations;
import petco.mod.food.whiskas.temptations.CaptainsTemptations;
import petco.mod.food.whiskas.temptations.CatnipFeverTemptations;
import petco.mod.food.whiskas.temptations.CatnipTemptations;
import petco.mod.food.whiskas.temptations.ChickenCheeseTemptations;
import petco.mod.food.whiskas.temptations.ChickenTemptations;
import petco.mod.food.whiskas.temptations.CookoutTemptations;
import petco.mod.food.whiskas.temptations.CrabTunaTemptations;
import petco.mod.food.whiskas.temptations.CreamyDairy;
import petco.mod.food.whiskas.temptations.DentabitesChicken;
import petco.mod.food.whiskas.temptations.FarmersTemptations;
import petco.mod.food.whiskas.temptations.HairballChicken;
import petco.mod.food.whiskas.temptations.IndoorSalmon;
import petco.mod.food.whiskas.temptations.SalmonTemptations;
import petco.mod.food.whiskas.temptations.SalmonTunaTemptations;
import petco.mod.food.whiskas.temptations.SavourySalmonTunaTemptationsRollers;
import petco.mod.food.whiskas.temptations.SeafoodTemptations;
import petco.mod.food.whiskas.temptations.ShrimpTunaTemptations;
import petco.mod.food.whiskas.temptations.SkinCoatSalmon;
import petco.mod.food.whiskas.temptations.TastyChickenTurkeyTemptationsRollers;
import petco.mod.food.whiskas.temptations.TunaCheeseTemptations;
import petco.mod.food.whiskas.temptations.TunaTemptations;
import petco.mod.food.whiskas.temptations.TurkeyTemptations;
import petco.mod.items.basic.AnimalFat;
import petco.mod.items.basic.BeefFlavour;
import petco.mod.items.basic.ChickenFlavour;
import petco.mod.items.basic.ChickenProduct;
import petco.mod.items.basic.DirtyPacket;
import petco.mod.items.basic.DriedCheese;
import petco.mod.items.basic.DriedMeatProduct;
import petco.mod.items.basic.FishFlavour;
import petco.mod.items.basic.FishProduct;
import petco.mod.items.basic.MeatProduct;
import petco.mod.items.basic.Packet;
import petco.mod.items.basic.SmlPacket;
import petco.mod.items.basic.Smasher;
import petco.mod.items.basic.TunaFlavour;
import petco.mod.items.basic.TurkeyFlavour;
import petco.mod.items.basic.MeatGloop;
import petco.mod.items.other.ItemEmptyPacket;
import petco.mod.placeholder.PetCoPlaceHolder;
import petco.mod.placeholder.WhiskasPlaceHolder;
import net.minecraft.block.Block;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemSeedFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.oredict.OreDictionary;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraftforge.oredict.*;
@Mod(modid = petco.modid, name = "PetCo Foods", version = "1.265")
@NetworkMod(clientSideRequired = true, serverSideRequired = false)
public class petco {
@SidedProxy(clientSide = "petco.mod.core.ClientProxy", serverSide = "petco.mod.core.CommonProxy")
public static CommonProxy proxy;
public static final String modid = "petco_foodmod_murdy007";
//public static CreativeTabs TabPetCo;
//public static CreativeTabs TabWhiskas;
//public static Item PetCoPlaceHolder;
//public static Item WhiskasPlaceHolder;
public static Item FishProduct;
public static Item MeatProduct;
public static Item DriedMeatProduct;
public static Item MeatGloop;
public static Item ChickenProduct;
public static Item DirtyPacket;
public static Item AnimalFat;
public static Item EmptyPacket;
public static Item Packet;
public static Item SmlPacket;
public static Item ChickenFlavour;
public static Item BeefFlavour;
public static Item TurkeyFlavour;
public static Item TunaFlavour;
public static Item FishFlavour;
public static Item DriedCheese;
public static Item Minerals;
public static Item TastyChickenTurkeyTemptationsRollers;
public static Item SavourySalmonTunaTemptationsRollers;
public static Item ChickenTemptations;
public static Item BeefTemptations;
public static Item CreamyDairy;
public static Item SeafoodTemptations;
public static Item TunaTemptations;
public static Item SalmonTemptations;
public static Item TurkeyTemptations;
public static Item BeefCheeseTemptations;
public static Item ChickenCheeseTemptations;
public static Item TunaCheeseTemptations;
public static Item CatnipFeverTemptations;
public static Item CatnipTemptations;
public static Item DentabitesChicken;
public static Item HairballChicken;
public static Item IndoorSalmon;
public static Item SkinCoatSalmon;
public static Item CookoutTemptations;
public static Item CaptainsTemptations;
public static Item FarmersTemptations;
public static Item CrabTunaTemptations;
public static Item SalmonTunaTemptations;
public static Item ShrimpTunaTemptations;
@EventHandler
public void load(FMLInitializationEvent e){
// _____ _______ _
// / ____| |__ __| | |
// | | ______ | | __ _| |__ ___
// | | |______| | |/ _` | '_ \/ __|
// | |____ | | (_| | |_) \__ \
// \_____| |_|\__,_|_.__/|___/
//TabPetCo = new CreativeTabs("petcocreativetab"){
// @SideOnly(Side.CLIENT)
// public int getTabItemIconIndex(){
// return petco.MeatGloop.itemID;
// }
//};
//LanguageRegistry.instance().addStringLocalization(TabPetCo.getTranslatedTabLabel(), "Pet Co. Foods");
//
//TabWhiskas = new CreativeTabs("whiskascreativetab"){
// @SideOnly(Side.CLIENT)
// public int getTabItemIconIndex(){
// return petco.BeefTemptations.itemID;
// }
//};
//LanguageRegistry.instance().addStringLocalization(TabWhiskas.getTranslatedTabLabel(), "Whiskas Pet Food (PetCo)");
//Item PetCoPlaceHolder = new PetCoPlaceHolder(16751).setUnlocalizedName("PetCoPlaceHolder");
//CreativeTabs TabPetCo = new TabPetCo(CreativeTabs.getNextID(),"Pet Co.");
//Item WhiskasPlaceHolder = new WhiskasPlaceHolder(16750).setUnlocalizedName("WhiskasPlaceHolder");
//CreativeTabs TabWhiskas = new TabWhiskas(CreativeTabs.getNextID(),"Whiskas Pet Food (PetCo.)");
// _____ _
// |_ _| |
// | | | |_ ___ _ __ ___ ___
// | | | __/ _ \ '_ ` _ \/ __|
// _| |_| || __/ | | | | \__ \
// |_____|\__\___|_| |_| |_|___/
ItemStack plastics = new ItemStack(12249, 1, 0);
ItemStack Flour = new ItemStack(15263, 1, 0);
ItemStack Cornmeal = new ItemStack(15538, 1, 0);
ItemStack milk = new ItemStack(16219, 1, 0);
ItemStack mortar = new ItemStack(15261, 1, 0);
ItemStack juicer = new ItemStack(16204, 1, 0);
Item Packet = new Packet(16812).setUnlocalizedName("Packet");
LanguageRegistry.addName(Packet, "Packet");
Item EmptyPacket = new ItemEmptyPacket(16755).setUnlocalizedName("EmptyPacket");
LanguageRegistry.addName(EmptyPacket, "Empty Temptations Packet");
Item SmlPacket = new SmlPacket(16813).setUnlocalizedName("SmlPacket");
LanguageRegistry.addName(SmlPacket, "Small Packet");
Item AnimalFat = new AnimalFat(16800).setUnlocalizedName("AnimalFat");
LanguageRegistry.addName(AnimalFat, "Animal Fat");
Item MeatGloop = new MeatGloop(16799).setUnlocalizedName("MeatGloop");
LanguageRegistry.addName(MeatGloop, "Meat Gloop");
Item DirtyPacket = new DirtyPacket(16798).setUnlocalizedName("DirtyPacket");
LanguageRegistry.addName(DirtyPacket, "Dirty Packet");
Item ChickenProduct = new ChickenProduct(16803).setUnlocalizedName("ChickenProduct");
LanguageRegistry.addName(ChickenProduct, "Chicken Product");
Item FishProduct = new FishProduct(16806).setUnlocalizedName("FishProduct");
LanguageRegistry.addName(FishProduct, "Fish Product");
Item MeatProduct = new MeatProduct(16807).setUnlocalizedName("MeatProduct");
LanguageRegistry.addName(MeatProduct, "Meat Product");
Item DriedMeatProduct = new DriedMeatProduct(16808).setUnlocalizedName("DriedMeatProduct");
LanguageRegistry.addName(DriedMeatProduct, "Dried Meat Product");
Item ChickenFlavour = new ChickenFlavour(16809).setUnlocalizedName("ChickenFlavour");
LanguageRegistry.addName(ChickenFlavour, "Natural Chicken Flavour");
Item TurkeyFlavour = new TurkeyFlavour(16810).setUnlocalizedName("TurkeyFlavour");
LanguageRegistry.addName(TurkeyFlavour, "Natural Turkey Flavour");
Item BeefFlavour = new BeefFlavour(16811).setUnlocalizedName("BeefFlavour");
LanguageRegistry.addName(BeefFlavour, "Natural Beef Flavour");
Item DriedCheese = new DriedCheese(16817).setUnlocalizedName("DriedCheese");
LanguageRegistry.addName(DriedCheese, "Dried Cheese");
Item Minerals = new Minerals(16814).setUnlocalizedName("Minerals");
LanguageRegistry.addName(Minerals, "Vitamins & Minerals");
Item FishFlavour = new FishFlavour(16815).setUnlocalizedName("FishFlavour");
LanguageRegistry.addName(FishFlavour, "Natural Fish Flavour");
Item TunaFlavour = new TunaFlavour(16816).setUnlocalizedName("TunaFlavour");
LanguageRegistry.addName(TunaFlavour, "Natural Tuna Flavour");
// _______ _ _ _
// |__ __| | | | | (_)
// | | ___ _ __ ___ _ __ | |_ __ _| |_ _ ___ _ __ ___
// | |/ _ \ '_ ` _ \| '_ \| __/ _` | __| |/ _ \| '_ \/ __|
// | | __/ | | | | | |_) | || (_| | |_| | (_) | | | \__ \
// |_|\___|_| |_| |_| .__/ \__\__,_|\__|_|\___/|_| |_|___/
// | |
// |_|
Item TastyChickenTurkeyTemptationsRollers = new TastyChickenTurkeyTemptationsRollers(16756, 3, false).setUnlocalizedName("TastyChickenTurkeyTemptationsRollers");
LanguageRegistry.addName(TastyChickenTurkeyTemptationsRollers, " Tasty Chicken & Turkey Temptations Tumblers");
Item SavourySalmonTunaTemptationsRollers = new SavourySalmonTunaTemptationsRollers(16757, 3, false).setUnlocalizedName("SavourySalmonTunaTemptationsRollers");
LanguageRegistry.addName(SavourySalmonTunaTemptationsRollers, "Savoury Salmon & Tuna Temptations Tumblers");
Item ChickenTemptations = new ChickenTemptations(16758, 3, false).setUnlocalizedName("ChickenTemptations");
LanguageRegistry.addName(ChickenTemptations, "Classic Tasty Chicken Temptations");
Item BeefTemptations = new BeefTemptations(16759, 3, false).setUnlocalizedName("BeefTemptations");
LanguageRegistry.addName(BeefTemptations, "Classic Hearty Beef Temptations");
Item CreamyDairy = new CreamyDairy(16760, 3, false).setUnlocalizedName("CreamyDairy");
LanguageRegistry.addName(CreamyDairy, "Classic Creamy Dairy Temptations");
Item SeafoodTemptations = new SeafoodTemptations(16761, 3, false).setUnlocalizedName("SeafoodTemptations");
LanguageRegistry.addName(SeafoodTemptations, "Classic Seafood Medley Temptations");
Item TunaTemptations = new TunaTemptations(16762, 3, false).setUnlocalizedName("TunaTemptations");
LanguageRegistry.addName(TunaTemptations, "Classic Tempting Tuna Temptations");
Item TurkeyTemptations = new TurkeyTemptations(16763, 3, false).setUnlocalizedName("TurkeyTemptations");
LanguageRegistry.addName(TurkeyTemptations, "Classic Tantalizing Turkey Temptations");
Item SalmonTemptations = new SalmonTemptations(16764, 3, false).setUnlocalizedName("SalmonTemptations");
LanguageRegistry.addName(SalmonTemptations, "Classic Savoury Salmon Temptations");
Item BeefCheeseTemptations = new BeefCheeseTemptations(16765, 3, false).setUnlocalizedName("BeefCheeseTemptations");
LanguageRegistry.addName(BeefCheeseTemptations, "Beef & Cheese - Cheezy Middles Temptations");
Item ChickenCheeseTemptations = new ChickenCheeseTemptations(16766, 3, false).setUnlocalizedName("ChickenCheeseTemptations");
LanguageRegistry.addName(ChickenCheeseTemptations, "Chicken & Cheese - Cheezy Middles Temptations");
Item TunaCheeseTemptations = new TunaCheeseTemptations(16767, 3, false).setUnlocalizedName("TunaCheeseTemptations");
LanguageRegistry.addName(TunaCheeseTemptations, "Tuna & Cheese - Cheezy Middles Temptations");
Item CatnipFeverTemptations = new CatnipFeverTemptations(16768, 3, false).setUnlocalizedName("CatnipFeverTemptations");
LanguageRegistry.addName(CatnipFeverTemptations, "Catnip Fever Mixups Temptations");
Item CatnipTemptations = new CatnipTemptations(16768, 3, false).setUnlocalizedName("CatnipTemptations");
LanguageRegistry.addName(CatnipTemptations, "Blissful Catnip Temptations");
Item DentabitesChicken = new DentabitesChicken(16769, 3, false).setUnlocalizedName("DentabitesChicken");
LanguageRegistry.addName(DentabitesChicken, "DentaBites Chicken Temptations");
Item HairballChicken = new HairballChicken(16770, 3, false).setUnlocalizedName("HairballChicken");
LanguageRegistry.addName(HairballChicken, "Hairball Control Chicken Temptations");
Item IndoorSalmon = new IndoorSalmon(16771, 3, false).setUnlocalizedName("IndoorSalmon");
LanguageRegistry.addName(IndoorSalmon, "Essentials Indoor Salmon Temptations");
Item SkinCoatSalmon = new SkinCoatSalmon(16772, 3, false).setUnlocalizedName("SkinCoatSalmon");
LanguageRegistry.addName(SkinCoatSalmon, "Skin & Coat Salmon Temptations");
Item CookoutTemptations = new CookoutTemptations(16773, 3, false).setUnlocalizedName("CookoutTemptations");
LanguageRegistry.addName(CookoutTemptations, "Backyard Cookout Temptations");
Item CaptainsTemptations = new CaptainsTemptations(16774, 3, false).setUnlocalizedName("CaptainsTemptations");
LanguageRegistry.addName(CaptainsTemptations, "Captain's Catch Temptations");
Item FarmersTemptations = new FarmersTemptations(16775, 3, false).setUnlocalizedName("FarmersTemptations");
LanguageRegistry.addName(FarmersTemptations, "Farmers Feast Temptations");
Item CrabTunaTemptations = new CrabTunaTemptations(16776, 3, false).setUnlocalizedName("CrabTunaTemptations");
LanguageRegistry.addName(CrabTunaTemptations, "Ocean Middles Crab & Tuna Temptations");
Item SalmonTunaTemptations = new SalmonTunaTemptations(16777, 3, false).setUnlocalizedName("SalmonTunaTemptations");
LanguageRegistry.addName(SalmonTunaTemptations, "Ocean Middles Salmon & Tuna Temptations");
Item ShrimpTunaTemptations = new ShrimpTunaTemptations(16778, 3, false).setUnlocalizedName("ShrimpTunaTemptations");
LanguageRegistry.addName(ShrimpTunaTemptations, "Ocean Middles Shrimp & Tuna Temptations");
// _____ _
// | __ \ (_)
// | |__) |___ ___ _ _ __ ___ ___
// | _ // _ \/ __| | '_ \ / _ \/ __|
// | | \ \ __/ (__| | |_) | __/\__ \
// |_| \_\___|\___|_| .__/ \___||___/
// | |
// |_|
//FOR ITEMS
GameRegistry.addShapelessRecipe(new ItemStack(ChickenProduct, 16), new ItemStack(Item.chickenCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(FishProduct, 8), new ItemStack(Item.fishCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.beefCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.porkCooked), new ItemStack(15261, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(MeatProduct, 16), new ItemStack(Item.chickenCooked), new ItemStack(15261, 1, 0));
GameRegistry.addSmelting(MeatProduct.itemID, new ItemStack(DriedMeatProduct), 0.1F);
GameRegistry.addShapelessRecipe(new ItemStack(ChickenFlavour, 16), new ItemStack(Item.chickenRaw), new ItemStack(16204, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(TurkeyFlavour), new ItemStack(ChickenFlavour));
GameRegistry.addShapelessRecipe(new ItemStack(BeefFlavour, 16), new ItemStack(Item.beefRaw), new ItemStack(16204, 1, 0));
GameRegistry.addRecipe(new ItemStack(Packet, 16), "x x", "x x", " x ",
'x', plastics);
GameRegistry.addShapelessRecipe(new ItemStack(EmptyPacket), new ItemStack(Packet));
GameRegistry.addRecipe(new ItemStack(SmlPacket,16),
" x ","x x"," x ",'x',plastics);
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.beefRaw));
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.porkRaw));
GameRegistry.addShapelessRecipe(new ItemStack(MeatGloop), new ItemStack(Item.bucketWater), new ItemStack(Item.chickenRaw));
GameRegistry.addSmelting(MeatGloop.itemID, new ItemStack(AnimalFat, 32), 0.1F);
GameRegistry.addShapelessRecipe(new ItemStack(Packet), new ItemStack(DirtyPacket));
GameRegistry.addRecipe(new ItemStack(Minerals,32),
" x ","xxx"," x ",'x',Block.cobblestone);
GameRegistry.addShapelessRecipe(new ItemStack(FishFlavour, 8), new ItemStack(Item.fishRaw), new ItemStack(16204, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(TunaFlavour), new ItemStack(FishFlavour), new ItemStack(16204, 1, 0));
GameRegistry.addShapelessRecipe(new ItemStack(DriedCheese), new ItemStack(15269, 1, 0), new ItemStack(15256, 1, 0));
//FOR TEMPTATIONS
GameRegistry.addRecipe(new ItemStack(TastyChickenTurkeyTemptationsRollers),
"fcd","axs","tpv",'x',EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',FishProduct,'t',Minerals,'p',ChickenFlavour,'v',TurkeyFlavour);
GameRegistry.addRecipe(new ItemStack(SavourySalmonTunaTemptationsRollers),
"fcd","axs","ito",'x',EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',FishProduct,'t',Minerals,'p',ChickenFlavour,'i',TunaFlavour,'o',FishFlavour);
GameRegistry.addRecipe(new ItemStack(ChickenTemptations),
"fcd","vxs","tp ",'x',EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',ChickenFlavour,'t',Minerals,'p',DriedCheese,'v',Flour);
GameRegistry.addRecipe(new ItemStack(BeefTemptations),
"fca","dxv","st ",'x',EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',BeefFlavour,'t',Minerals,'p',DriedCheese,'v',Flour);
GameRegistry.addRecipe(new ItemStack(CreamyDairy),
"fca","dxv","tpo",'x',EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',ChickenFlavour,'t',Minerals,'p',DriedCheese,'v',Flour,'o',milk);
GameRegistry.addRecipe(new ItemStack(SeafoodTemptations),
"fca","dxv","tsp",'x',EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',TunaFlavour,'t',Minerals,'p',FishProduct,'v',Flour);
GameRegistry.addRecipe(new ItemStack(TunaTemptations),
"fca","dxv","tps",'x',EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',TunaFlavour,'t',Minerals,'p',FishFlavour,'v',Flour);
GameRegistry.addRecipe(new ItemStack(TurkeyTemptations),
"fcd","vxs","tp ",'x',EmptyPacket,'f',Cornmeal,'c',ChickenProduct,'d',DriedMeatProduct,'a',AnimalFat,'s',ChickenFlavour,'t',Minerals,'p',DriedCheese,'v',Flour);
}
//Recipes.macerator.addRecipe(new RecipeInputItemStack(new ItemStack (petco.EmptyPacket)), null, Items.getItem("rubber"));
//proxy.registerRenderInformation();
//DRYFOOD
//Item WhiskasChickenDry = new WhiskasChickenDry(16785, 4, false).setUnlocalizedName("WhiskasChickenDry");
//LanguageRegistry.addName(WhiskasChickenDry, "Whiskas Chicken Dry Food");
//Item WhiskasChickenTurkeyDry = new WhiskasChickenTurkeyDry(16786, 4, false).setUnlocalizedName("WhiskasChickenTurkeyDry");
//LanguageRegistry.addName(WhiskasChickenTurkeyDry, "Whiskas Chicken & Turkey Dry Food");
//Item WhiskasSalmonShrimpDry = new WhiskasSalmonShrimpDry(16787, 4, false).setUnlocalizedName("WhiskasSalmonShrimpDry");
//LanguageRegistry.addName(WhiskasSalmonShrimpDry, "Whiskas Salmon & Shrimp Dry Food");
//Item WhiskasKittenDry = new WhiskasKittenDry(16788, 4, false).setUnlocalizedName("WhiskasKittenDry")
//Food - Robbesh
//Item Robbesh = new Robbesh(????????, 3, false).setUnlocalizedName("Robbesh");
//LanguageRegistry.addName(Robbesh, "Robbesh- 'Beef' Flavour");
//ID NOTICE: Any more foods added, check the other items
}
Minecraft (not on eclipse) crash report:
---- Minecraft Crash Report ----
// Who set us up the TNT?
Time: 12/13/14 1:39 PM
Description: There was a severe problem during mod loading that has caused the game to fail
cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: petco.mod.items.basic.Packet.setUnlocalizedName(Ljava/lang/String;)Lnet/minecraft/item/Item;
at cpw.mods.fml.common.LoadController.transition(LoadController.java:156)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:700)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:509)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
at net.minecraft.client.main.Main.main(SourceFile:101)
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:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
Caused by: java.lang.NoSuchMethodError: petco.mod.items.basic.Packet.setUnlocalizedName(Ljava/lang/String;)Lnet/minecraft/item/Item;
at petco.mod.core.petco.load(petco.java:170)
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:545)
at sun.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
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.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:699)
... 10 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.6.4
Operating System: Windows 8.1 (amd64) version 6.3
Java Version: 1.7.0_71, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 128283232 bytes (122 MB) / 254017536 bytes (242 MB) up to 1060372480 bytes (1011 MB)
JVM Flags: 6 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G -XX:+UseConcMarkSweepGC -XX:+CMSIncrementalMode -XX:-UseAdaptiveSizePolicy -Xmn128M
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 32 mods loaded, 32 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{6.4.49.965} [Forge Mod Loader] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed->Pre-initialized->Initialized
Forge{9.11.1.965} [Minecraft Forge] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed->Pre-initialized->Initialized
CodeChickenCore{0.9.0.9} [CodeChicken Core] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
NotEnoughItems{1.6.1.9} [Not Enough Items] (NotEnoughItems-1.6.4-1.6.1.9-universal.jar) Unloaded->Constructed->Pre-initialized->Initialized
PowerCrystalsCore{1.1.8} [PowerCrystals Core] (PowerCrystalsCore-1.1.8-9 (2).jar) Unloaded->Constructed->Pre-initialized->Initialized
MFR Compat Forestry Trees{1.0} [MFR Compat Forestry Trees] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MFR Compat Extra Trees{1.0} [MFR Compat Extra Trees] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded{1.6.4R2.7.9} [MineFactory Reloaded] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatAppliedEnergistics{1.6.4R2.7.9} [MFR Compat: Applied Energistics] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatAtum{1.6.4R2.7.9} [MFR Compat: Atum] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatBackTools{1.6.4R2.7.9} [MFR Compat: BackTools] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatBuildCraft{1.6.4R2.7.9} [MFR Compat: BuildCraft] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatChococraft{1.6.4R2.7.9} [MFR Compat: Chococraft] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatExtraBiomes{1.6.4R2.7.9} [MFR Compat: ExtraBiomes] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatForestry{1.6.4R2.7.9} [MFR Compat: Forestry] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatForestryPre{1.6.4R2.7.9} [MFR Compat: Forestry (part 2)] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatForgeMicroblock{1.6.4R2.7.9} [MFR Compat: ForgeMicroblock] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatIC2{1.6.4R2.7.9} [MFR Compat: IC2] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatMystcraft{1.6.4R2.7.9} [MFR Compat: Mystcraft] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
pamharvestcraft{1.0} [Pam's HarvestCraft Base] (Pam's HarvestCraft 1.6.4a.zip) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatPams{1.6.4R2.7.9} [MFR Compat: Pam's Mods] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatProjRed{1.6.4R2.7.9} [MFR Compat ProjectRed] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatRailcraft{1.6.4R2.7.9} [MFR Compat: Railcraft] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatRP2{1.6.4R2.7.9} [MFR Compat: RP2] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatSufficientBiomes{1.6.4R2.7.9} [MFR Compat: Sufficient Biomes] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatThaumcraft{1.6.4R2.7.9} [MFR Compat: Thaumcraft] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatThermalExpansion{1.6.4R2.7.9} [MFR Compat: Thermal Expansion] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatTwilightForest{1.6.4R2.7.9} [MFR Compat: TwilightForest] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatVanilla{1.6.4R2.7.9} [MFR Compat: Vanilla] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
MineFactoryReloaded|CompatXyCraft{1.6.4R2.7.9} [MFR Compat: XyCraft] (MineFactoryReloaded-2.7.9-final (1).jar) Unloaded->Constructed->Pre-initialized->Initialized
petco_foodmod_murdy007{1.265} [PetCo Foods] (PetCoAlpha1.zip) Unloaded->Constructed->Pre-initialized->Errored
Please post the code for Packet.
Even though you do start something off knowing nothing, when it comes to programming (especially in languages that have no safety-net like C, you're dealing with direct memory addresses so if you mess something up, you mess it up big time) you really need to know at least some basics of the language you're using.
For example, conventions (which is a fancy name for guidelines, they're the basic guidelines of a programming language that the community builds up). In Java, there are a set of conventions you should follow. One of them is to have your packages completely in lowercase, as far as I can see, your packages are. However, classes should be in UpperCamelCase, which your main mod class is not, so instead of 'petco', conventionally speaking it should be 'PetCo'. Methods should be in lowerCamelCase. Variables should also be in lowerCamelCase, and constants should be in UPPERCASE_WITH_UNDERSCORES.
Java is also an object-oriented language, so what this means is you can have multiple classes and combine them using method calls to string the code together from multiple locations, into one big sequence that the JVM (Java Virtual Machine) executes. You're doing this with your items, however you should be doing this with all your other stuff. Instead of cramming all your code in your main mod class, you should separate your code to make it cleaner. So you should move all the item variables and code to another class, say called ModItems or something, and move the code into another method, then call that method from your main mod class. This makes your code cleaner and easier to manage. You can go one step further and move your recipes and such to their own method.
That was mainly a Minecraft modding convention, and there's another one you should be following. Have your items registered during the PreInit phase, and the recipes and all that during the Init phase, so instead of just changing the FMLPreInitializationEvent to FMLInitializationEvent, create another method and have the parameter be FMLInitializationEvent, and annotate it with @EventHandler, something like:
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
You start by having one class, one method, one line of code. Have it work flawlessly. And understood 100%.
Use forge example mod, if you are a complete noob at this. Then read tutorials on forge wiki.
Then you can try to add more stuff. This is the "experimental" approach.
The "theoretical" approach would be to learn java by reading.
Usually people in modding just charge head-on with "experimental", writing stuff they don't know anything about. You just experienced the likeliest outcome.
I believe the most efficient way is to find a balance between the two.
You need to read stuff, there is no shame in that. But Minecraft forums isn't the best of place to learn.
Your first milestone as a beginner is to understand what i told you about "variables". Look for that key word in any learning resource you have. You should be able to fix your code after that.
The second milestone, is to understand the concept of object-oriented programming (or roughly, what "class", "extends" and "static" mean).
There is a giant leap between, be warned. But after that, you'll be able to write good Java code.
Making your code "look cleaner" as jcm2606 said, is totally not what you should concentrate on at your level. That is for advance coder who have time to spare. You don't wan't to code pretty, you want a code that works. Only the first step can help you achieve this.
Please post the code for Packet.
The Packet code:
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.Item;
import petco.mod.core.petco;
public class Packet extends Item{
public Packet(int par1) {
super(par1);
this.setCreativeTab(petco.TabPetCo);
}
public void registerIcons(IconRegister iconRegister) {
itemIcon = iconRegister.registerIcon("petco:normalpacket");
}
}
My main aim right now is to just make it work on Minecraft out of eclipse.
EDIT: adding a preload event with the items in caused it to crash
My aim at saying that was actually to try and get them to separate their code.
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
Okay that is the issue. You cannot grab what's out of the bin folder because that has not been reobfuscated. Is your source code in the src folder?
Author of the Clarity, Serenity, Sapphire & Halcyon shader packs for Minecraft: Java Edition.
My Github page.
The entire Minecraft shader development community now has its own Discord server! Feel free to join and chat with all the developers!
ALSO: when i recompile and reobfscate it changes things in the bin folder and my lib folder is empty (that may not be important)
It is in the src folder in java files, so yes it is there