Jump to content

Recommended Posts

Posted

This has been solved.

A moderator may delete this post.

 

 

 

 

 

Ok. Simple.

For my mod I made a seed that would plant my crop.

When I run minecraft, the game would crash.

I know its not the crop because I comment out the seed, plant the crop (/give is how I got the crop) and all goes well.

I uncomment the seed and boom crash.

The crash reoport says something about when I do the "blahBlah = new BlahBlah" part.

 

 

Main File:

 

StrawberrySeeds = (new StrawberrySeeds(14533, MoFoodMod_Main.StrawberryCropBlock.blockID, Block.tilledField.blockID))

 

 

Seed File:

 

package TiffitMod.MoFoodsMod;

import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.item.ItemSeeds;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class StrawberrySeeds extends ItemSeeds{

public StrawberrySeeds(int par1, int par2, int par3) {
	super(par1, par2, par3);
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister) {
	this.itemIcon = par1IconRegister.registerIcon("tiffit#2:StrawberrySeeds");
}

}

 

 

 

Crash Report:

 

---- Minecraft Crash Report ----
// Everything's going to plan. No, really, that was supposed to happen.

Time: 8/2/13 4:40 PM
Description: Initializing game

java.lang.NullPointerException
at TiffitMod.MoFoodsMod.MoFoodMod_Main.load(MoFoodMod_Main.java:86) 
//Line 86 is the line Blah = new Blah part
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:193)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:104)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:697)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:222)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:506)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796)
at net.minecraft.client.main.Main.main(Main.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)


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

-- Head --
Stacktrace:
at TiffitMod.MoFoodsMod.MoFoodMod_Main.load(MoFoodMod_Main.java:86)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:540)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:193)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:173)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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:104)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:697)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:222)
at net.minecraft.client.Minecraft.startGame(Minecraft.java:506)

-- Initialization --
Details:
Stacktrace:
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:796)
at net.minecraft.client.main.Main.main(Main.java:93)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:57)
at net.minecraft.launchwrapper.Launch.main(Launch.java:18)

-- System Details --
Details:
Minecraft Version: 1.6.2
Operating System: Mac OS X (x86_64) version 10.6.8
Java Version: 1.6.0_43, Apple Inc.
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Apple Inc.
Memory: 1009457544 bytes (962 MB) / 1069416448 bytes (1019 MB) up to 1069416448 bytes (1019 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.04 FML v6.2.19.789 Minecraft Forge 9.10.0.789 4 mods loaded, 4 mods active
mcp{8.04} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{6.2.19.789} [Forge Mod Loader] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
Forge{9.10.0.789} [Minecraft Forge] (coremods) Unloaded->Constructed->Pre-initialized->Initialized
tiffit#2{(NOT REALEASED) v1.1.0} [Mo' Food's Mod] (bin) Unloaded->Constructed->Pre-initialized->Errored
Launched Version: 1.6
LWJGL: 2.9.0
OpenGL: NVIDIA GeForce 320M OpenGL Engine GL version 2.1 NVIDIA-1.6.36, 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

 

Posted

Without seeing your whole main mod file I can only guess.

It seems to me that you don't initialize the StrawberryCropBlock field before you use it.

Please explain more.

 

And here is my whole main class:

 

package TiffitMod.MoFoodsMod;

import TiffitMod.MoFoodsMod.OreGeneration.CandyRockOreWorldGeneration;
import net.minecraft.block.Block;
import net.minecraft.block.BlockFurnace;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemSeeds;
import net.minecraft.item.ItemStack;
import net.minecraft.item.crafting.FurnaceRecipes;
import net.minecraft.potion.Potion;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
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;

@Mod(modid= "tiffit#2",name="Mo' Food's Mod",version="(NOT REALEASED) v1.1.0")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)

public class MoFoodMod_Main { 

//itemz
public static Item Chocolate;
public static Item ChocolateBar;
public static Item RefinedSugar;
public static Item ChocolatePie;
public static Item CookedChocolatePie;
public static Item BrownStuff;
public static Item FakeChocolate;
public static Item WolfChocolate;
public static Item Blueberry;
public static Item BlueberryPie; 
public static Item CookedBlueberryPie;
public static Item Blender;
public static Item BlueberryJuice;
public static Item SugarBlueberryJuice;
public static Item Strawberry;
public static Item StrawberryPie;
public static Item CookedStrawberryPie;
public static Item StrawberryJuice;
public static Item SugarStrawberryJuice;
public static Item ChocolateStrawberry;
public static Item LargeStackRefinedSugar; 
public static Item Candy;
public static Item Sprinkles;
public static Item Flour;
public static Item RawDoughnut;
public static Item CookedDoughnut;
public static Item DoughnutSprinkles;
public static Item ChocolateDoughnut;
public static Item ChickenPotPie;
public static Item UnfilledPie;
public static Item CowPotPie;
public static Item RawCowPotPie;
public static Item RawChickenPotPie;
public static Item Picture;
public static Item HardCandy;


//cropz
public static Item StrawberrySeeds;
public static Block StrawberryCropBlock;


//blockz
public static Block CandyRockOre;





public static CandyRockOreWorldGeneration CRO_genWorld = new CandyRockOreWorldGeneration();



@Init
public void load(FMLInitializationEvent event){

	CreativeTabs MoFoodModTab = new TabMoFoodMod(CreativeTabs.getNextID(), "Mo' Foods Mod");

	StrawberrySeeds = new TiffitMod.MoFoodsMod.StrawberrySeeds(10000, MoFoodMod_Main.StrawberryCropBlock.blockID, Block.tilledField.blockID).setUnlocalizedName("tiffit#2:StrawberrySeeds");
	LanguageRegistry.addName(StrawberrySeeds, "Strawberry Seeds");
	GameRegistry.registerItem(StrawberrySeeds, "StrawberrySeeds");

	Picture = new Picture(20000).setMaxStackSize(1).setCreativeTab(MoFoodModTab).setUnlocalizedName("PictureFoodMod");
	LanguageRegistry.addName(Picture, "Tab picture (no use)");
	GameRegistry.registerItem(Picture, "Picture");



	UnfilledPie = new NonEdible(14000).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("UnfilledPieFoodMod");
	LanguageRegistry.addName(UnfilledPie, "Empty Pie Crust");
	GameRegistry.registerItem(UnfilledPie, "UnfilledPie");

	RefinedSugar = new NonEdible(14001).setCreativeTab(MoFoodModTab).setUnlocalizedName("RefinedSugarFoodMod");
	LanguageRegistry.addName(RefinedSugar, "Refined Sugar");
	GameRegistry.registerItem(RefinedSugar, "RefinedSugar");

	LargeStackRefinedSugar = new NonEdible(14002).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("SRefinedSugarFoodMod");
	LanguageRegistry.addName(LargeStackRefinedSugar, "Pile of Refined Sugar");
	GameRegistry.registerItem(LargeStackRefinedSugar, "LargeStackRefinedSugar");

	Flour = new NonEdible(14003).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("FlourFoodMod");
	LanguageRegistry.addName(Flour, "Flour");
	GameRegistry.registerItem(Flour, "Flour");

	Candy = new Edible(14004, 2, 3F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("CandyFoodMod");
	LanguageRegistry.addName(Candy, "Candy");
	GameRegistry.registerItem(Candy, "Candy");

	Sprinkles = new Edible(14005, 1, 0.5F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("SprinklesFoodMod");
	LanguageRegistry.addName(Sprinkles, "Sprinkles");
	GameRegistry.registerItem(Sprinkles, "Sprinkles");

	Chocolate = new NonEdible(14006).setCreativeTab(MoFoodModTab).setCreativeTab(MoFoodModTab).setUnlocalizedName("ChocolateFoodMod");
	LanguageRegistry.addName(Chocolate, "Raw Chocolate");
	GameRegistry.registerItem(Chocolate, "Chocolate");

	ChocolateBar = new Edible(14007, 3, 0.8F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("ChocolateBarFoodMod");
	LanguageRegistry.addName(ChocolateBar, "Bar Of Chocolate");
	GameRegistry.registerItem(ChocolateBar, "ChocolateBar");

	ChocolatePie = new Edible(14008, 4, 2F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("ChocolatePieFoodMod");
	LanguageRegistry.addName(ChocolatePie, "Chocolate Pie (Raw)");
	GameRegistry.registerItem(ChocolatePie, "ChocolatePie");

	CookedChocolatePie = new Edible(14009, 7, 2F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("ChocolatePieCookedFoodMod");
	LanguageRegistry.addName(CookedChocolatePie, "Chocolate Pie (Cooked)");
	GameRegistry.registerItem(CookedChocolatePie, "CookedChocolatePie");

	Blueberry = new Edible(14010, 1, 0.2F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("BlueberryFoodMod");
	LanguageRegistry.addName(Blueberry, "Blueberry");
	GameRegistry.registerItem(Blueberry, "Blueberry");
	MinecraftForge.addGrassSeed(new ItemStack(Blueberry), 10);

	BlueberryPie = new Edible(14011, 4, 0.8F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("BlueberryPieFoodMod");
	LanguageRegistry.addName(BlueberryPie, "Blueberry Pie (Raw)");
	GameRegistry.registerItem(BlueberryPie, "BlueberryPie");

	CookedBlueberryPie = new Edible(14012, 9, 0.8F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("CookedBlueberryPieFoodMod");
	LanguageRegistry.addName(CookedBlueberryPie, "Blueberry Pie (Cooked)");
	GameRegistry.registerItem(CookedBlueberryPie, "CookedBlueberryPie");

	BlueberryJuice = new Juice(14013, 4, 1F, false).setCreativeTab(MoFoodModTab).setUnlocalizedName("BlueberryJuiceFoodMod");
	LanguageRegistry.addName(BlueberryJuice, "Fresh Blueberry Juice");
	GameRegistry.registerItem(BlueberryJuice, "BlueberryJuice");

	SugarBlueberryJuice = new Juice(14014, 4, 9F, false).setCreativeTab(MoFoodModTab).setUnlocalizedName("SugarBlueberryJuiceFoodMod");
	LanguageRegistry.addName(SugarBlueberryJuice, "Sugar Added Blueberry Juice");
	GameRegistry.registerItem(SugarBlueberryJuice, "SugarBlueberryJuice");

	Strawberry = new Edible(14015, 1, 0.2F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("StrawberryFoodMod");
	LanguageRegistry.addName(Strawberry, "Strawberry");
	GameRegistry.registerItem(Strawberry, "Strawberry");
	MinecraftForge.addGrassSeed(new ItemStack(Strawberry), 10);

	StrawberryPie = new Edible(14516, 4, 0.8F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("StrawberryPieFoodMod");
	LanguageRegistry.addName(StrawberryPie, "Strawberry Pie (Raw)");
	GameRegistry.registerItem(StrawberryPie, "StrawberryPie");

	CookedStrawberryPie = new Edible(14517, 9, 0.8F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("CookedStrawberryPieFoodMod");
	LanguageRegistry.addName(CookedStrawberryPie, "Strawberry Pie (Cooked)");
	GameRegistry.registerItem(CookedStrawberryPie, "CookedStrawberryPie");

	StrawberryJuice = new Juice(14518, 4, 1F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("StrawberryJuiceFoodMod");
	LanguageRegistry.addName(StrawberryJuice, "Fresh Strawberry Juice");
	GameRegistry.registerItem(StrawberryJuice, "StrawberryJuice");

	SugarStrawberryJuice = new Juice(14519, 4, 9F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("SugarStrawberryJuiceFoodMod");
	LanguageRegistry.addName(SugarStrawberryJuice, "Sugar Added Strawberry Juice");
	GameRegistry.registerItem(SugarStrawberryJuice, "SugarStrawberryJuice");

	ChocolateStrawberry = new Edible(14520, 4, 2F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("ChocolateStrawberryFoodMod");
	LanguageRegistry.addName(ChocolateStrawberry, "Chocolate Covered Strawberry");
	GameRegistry.registerItem(ChocolateStrawberry, "ChocolateStrawberry");

	ChickenPotPie = new Edible(14521, 7, 2F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("ChickenPotPieFoodMod");
	LanguageRegistry.addName(ChickenPotPie, "Chicken Pot Pie (Cooked)");
	GameRegistry.registerItem(ChickenPotPie, "ChickenPotPie");

	BrownStuff = new NonEdible(14522).setCreativeTab(MoFoodModTab).setUnlocalizedName("BrownStuffFoodMod");
	LanguageRegistry.addName(BrownStuff, "Stuff (brown look)");
	GameRegistry.registerItem(BrownStuff, "BrownStuff");

	FakeChocolate = new NonEdible(14523).setCreativeTab(MoFoodModTab).setUnlocalizedName("FakeChocolateFoodMod");
	LanguageRegistry.addName(FakeChocolate, "Fake Chocolate");
	GameRegistry.registerItem(FakeChocolate, "FakeChocolate");

	WolfChocolate = new wolfFood(14524, 0, 0F, true).setCreativeTab(MoFoodModTab).setUnlocalizedName("WolfChocolateFoodMod");
	LanguageRegistry.addName(WolfChocolate, "Wolf Chocolate");
	GameRegistry.registerItem(WolfChocolate, "WolfChocolate");

	Blender = new Blender(14525).setCreativeTab(MoFoodModTab).setUnlocalizedName("BlenderFoodMod");
	LanguageRegistry.addName(Blender, "Blender");
	GameRegistry.registerItem(Blender, "Blender");

	RawDoughnut = new Edible(14526, 2, 1F, false).setCreativeTab(MoFoodModTab).setMaxStackSize(64).setUnlocalizedName("RawDoughnutFoodMod");
	LanguageRegistry.addName(RawDoughnut, "Raw Doughnut");
	GameRegistry.registerItem(RawDoughnut, "RawDoughnut");

	CookedDoughnut = new Edible(14527, 3, 10F, false).setCreativeTab(MoFoodModTab).setMaxStackSize(64).setUnlocalizedName("CookedDoughnutFoodMod");
	LanguageRegistry.addName(CookedDoughnut, "Cooked Doughnut");
	GameRegistry.registerItem(CookedDoughnut, "CookedDoughnut");

	DoughnutSprinkles = new Edible(14528, 4, 10.5F, false).setCreativeTab(MoFoodModTab).setMaxStackSize(64).setUnlocalizedName("SprinklesCookedDoughnutFoodMod");
	LanguageRegistry.addName(DoughnutSprinkles, "Doughnut with Sprinkles");
	GameRegistry.registerItem(DoughnutSprinkles, "DoughnutSprinkles");

	ChocolateDoughnut = new Edible(14529, 4, 10.5F, false).setCreativeTab(MoFoodModTab).setMaxStackSize(64).setUnlocalizedName("ChocolateDoughnutFoodMod");
	LanguageRegistry.addName(ChocolateDoughnut, "Chocolate Doughnut");
	GameRegistry.registerItem(ChocolateDoughnut, "ChocolateDoughnut");

	CowPotPie = new Edible(14530, 7, 2F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("CowgPotPieFoodMod");
	LanguageRegistry.addName(CowPotPie, "Cow Pot Pie (Cooked)");
	GameRegistry.registerItem(CowPotPie, "CowPotPie");

	RawChickenPotPie = new Edible(14531, 3, 1F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("RawChickenPotPieFoodMod");
	LanguageRegistry.addName(RawChickenPotPie, "Chicken Pot Pie (Raw)");
	GameRegistry.registerItem(RawChickenPotPie, "RawChickenPotPie");

	RawCowPotPie = new Edible(14532, 3, 1F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("RawCowPotPieFoodMod");
	LanguageRegistry.addName(RawCowPotPie, "Cow Pot Pie (Raw)");
	GameRegistry.registerItem(RawCowPotPie, "RawCowPotPie");

	HardCandy = new Edible(14533, 3, 20F, false).setMaxStackSize(64).setCreativeTab(MoFoodModTab).setUnlocalizedName("HardCandyFoodMod");
	LanguageRegistry.addName(HardCandy, "Hard Candy");
	GameRegistry.registerItem(HardCandy, "HardCandy");


	//
	//		
	//		
	//		
	//		
	//		
	//		
	//		

	CandyRockOre = new CandyRockOre(2750, "CandyRockOre").setCreativeTab(MoFoodModTab).setUnlocalizedName("CandyRockOre").setHardness(1.5F).setStepSound(Block.soundMetalFootstep).setResistance(1.0F);
	LanguageRegistry.addName(CandyRockOre, "Candy Rock");
	GameRegistry.registerBlock(CandyRockOre, "CandyRockOre");
	GameRegistry.registerWorldGenerator(CRO_genWorld);
	MinecraftForge.setBlockHarvestLevel(CandyRockOre, "pickaxe", 1);


	StrawberryCropBlock = new StrawberryCropBlock(2751).setUnlocalizedName("StrawberryCropBlockFoodMod");
	LanguageRegistry.addName(StrawberryCropBlock, "Strawberry Crop Block");
	GameRegistry.registerBlock(StrawberryCropBlock, "StrawberryCropBlock");

	//		
	//		
	//		
	//		
	//		
	//		
	//		
	//		
	//		
	//		
	//		
	//crafting
	ItemStack cocoaStack = new ItemStack(351, 1, 3);
	ItemStack rsugarStack = new ItemStack(RefinedSugar);
	ItemStack ChocolateStack = new ItemStack(Chocolate);
	ItemStack EggStack = new ItemStack(Item.egg);
	ItemStack BlueberryStack = new ItemStack(Blueberry);
	ItemStack dirtStack = new ItemStack(Block.dirt);
	ItemStack StuffBStack = new ItemStack(BrownStuff);
	ItemStack FakeChocolateStack = new ItemStack(FakeChocolate);
	ItemStack ChickenStack = new ItemStack(Item.chickenRaw);
	ItemStack IronStack = new ItemStack(Item.ingotIron);
	ItemStack RedstoneStack = new ItemStack(Item.redstone);
	ItemStack glassStack = new ItemStack(Block.glass);
	ItemStack BlenderStack = new ItemStack(Blender);
	ItemStack bJuiceStack = new ItemStack(BlueberryJuice);
	ItemStack StrawberryStack = new ItemStack(Strawberry);
	ItemStack sJuiceStack = new ItemStack(StrawberryJuice);
	ItemStack CandyStack = new ItemStack(Candy);
	ItemStack WheatStack = new ItemStack(Item.wheat);
	ItemStack FlourStack = new ItemStack(Flour);
	ItemStack SprinklesStack = new ItemStack(Sprinkles);
	ItemStack CookedDoughnutStack = new ItemStack(CookedDoughnut);
	ItemStack RawChickenStack = new ItemStack(Item.chickenRaw);
	ItemStack CookedChickenStack = new ItemStack(Item.chickenCooked);
	ItemStack UnfilledPieStack = new ItemStack(UnfilledPie);
	ItemStack RawCowStack = new ItemStack(Item.beefRaw);
	ItemStack CookedCowStack = new ItemStack(Item.beefCooked);





	GameRegistry.addShapelessRecipe(new ItemStack(Chocolate, 3), cocoaStack, rsugarStack);
	GameRegistry.addShapelessRecipe(new ItemStack(ChocolatePie, 1), ChocolateStack, ChocolateStack, UnfilledPieStack);
	GameRegistry.addShapelessRecipe(new ItemStack(BlueberryPie, 1), BlueberryStack, BlueberryStack, UnfilledPieStack);
	GameRegistry.addShapelessRecipe(new ItemStack(BrownStuff, 3), dirtStack, dirtStack, cocoaStack);
	GameRegistry.addShapelessRecipe(new ItemStack(WolfChocolate, 3), FakeChocolateStack, FakeChocolateStack, ChickenStack);
	GameRegistry.addShapelessRecipe(new ItemStack(BlueberryJuice, 1), BlueberryStack, BlueberryStack, BlueberryStack, BlenderStack);
	GameRegistry.addShapelessRecipe(new ItemStack(StrawberryPie, 1), StrawberryStack, StrawberryStack, UnfilledPieStack);
	GameRegistry.addShapelessRecipe(new ItemStack(StrawberryJuice, 1), StrawberryStack, StrawberryStack, StrawberryStack, BlenderStack);
	GameRegistry.addShapelessRecipe(new ItemStack(ChocolateStrawberry, 1), ChocolateStack, StrawberryStack);
	GameRegistry.addShapelessRecipe(new ItemStack(Sprinkles, 5), CandyStack);
	GameRegistry.addShapelessRecipe(new ItemStack(DoughnutSprinkles, 1), SprinklesStack, CookedDoughnutStack);
	GameRegistry.addShapelessRecipe(new ItemStack(ChocolateDoughnut, 1), CookedDoughnutStack, ChocolateStack);
	GameRegistry.addShapelessRecipe(new ItemStack(UnfilledPie, 1), EggStack, rsugarStack, FlourStack);



	GameRegistry.addRecipe(new ItemStack(FakeChocolate), "ucu",      'u', StuffBStack, 'c', cocoaStack);
	GameRegistry.addRecipe(new ItemStack(Blender, 10), "p p", "p p", "iri",     'i', IronStack, 'r', RedstoneStack, 'p', glassStack);		
	GameRegistry.addRecipe(new ItemStack(SugarBlueberryJuice), "rrr", "rjr", "rrr", 'j', bJuiceStack, 'r', rsugarStack);
	GameRegistry.addRecipe(new ItemStack(SugarStrawberryJuice), "rrr", "rjr", "rrr", 'j', sJuiceStack, 'r', rsugarStack);
	GameRegistry.addRecipe(new ItemStack(LargeStackRefinedSugar), "rrr", "rrr", "rrr", 'r', rsugarStack);
	GameRegistry.addRecipe(new ItemStack(LargeStackRefinedSugar), "rrr", 'r', rsugarStack);
	GameRegistry.addRecipe(new ItemStack(RawDoughnut), "rrr", "r r", "rrr", 'r', FlourStack);
	GameRegistry.addRecipe(new ItemStack(ChickenPotPie), "fue",      'f', FlourStack, 'u', UnfilledPieStack, 'e', CookedChickenStack);
	GameRegistry.addRecipe(new ItemStack(RawChickenPotPie), "fue",      'f', FlourStack, 'u', UnfilledPieStack, 'e', RawChickenStack);
	GameRegistry.addRecipe(new ItemStack(CowPotPie), "fue",      'f', FlourStack, 'u', UnfilledPieStack, 'e', CookedCowStack);
	GameRegistry.addRecipe(new ItemStack(RawCowPotPie), "fue",      'f', FlourStack, 'u', UnfilledPieStack, 'e', RawCowStack);



	//furnace
        FurnaceRecipes.smelting().addSmelting(Chocolate.itemID, 0, new ItemStack(ChocolateBar), 0.1F);
        FurnaceRecipes.smelting().addSmelting(Item.sugar.itemID, 0, new ItemStack(RefinedSugar), 0.1F);
        FurnaceRecipes.smelting().addSmelting(ChocolatePie.itemID, 0, new ItemStack(CookedChocolatePie), 0.1F);
        FurnaceRecipes.smelting().addSmelting(BlueberryPie.itemID, 0, new ItemStack(CookedBlueberryPie), 0.1F);
        FurnaceRecipes.smelting().addSmelting(StrawberryPie.itemID, 0, new ItemStack(CookedStrawberryPie), 0.1F);
        FurnaceRecipes.smelting().addSmelting(RawDoughnut.itemID, 0, new ItemStack(CookedDoughnut), 0.1F);
        FurnaceRecipes.smelting().addSmelting(RawChickenPotPie.itemID, 0, new ItemStack(ChickenPotPie), 0.1F);
        FurnaceRecipes.smelting().addSmelting(RawCowPotPie.itemID, 0, new ItemStack(CowPotPie), 0.1F);
        FurnaceRecipes.smelting().addSmelting(CandyRockOre.blockID, 0, new ItemStack(HardCandy), 0.1F);

        
}

}














 

Posted

Main File:

 

StrawberrySeeds = (new StrawberrySeeds(14533, MoFoodMod_Main.StrawberryCropBlock.blockID, Block.tilledField.blockID))

 

You need to have StrawberryCropBlock initialized before this. As of now it is initialized last.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.