Jump to content

[1.5.1] Recipe creating crash {SOLVED}


coolboy4531

Recommended Posts

{SOLVED} Stupid me, I forgot to register the block. xD

 

I am a fairly well, experienced modder. Well sorta. LOL, I don't usually go on MinecraftForge.net's forums.

 

But this time I am.

 

I am currently using Forge. Forge v7.7.0_600 to be exact.

 

I started up doing my coding as such, then when I finished I get this strange error. I'm not sure how to fix it. D:

 

CRASH REPORT

 

2013-03-24 14:33:05 [iNFO] [sTDERR] java.lang.NullPointerException

2013-03-24 14:33:05 [iNFO] [sTDERR] at net.minecraft.item.crafting.CraftingManager.addRecipe(CraftingManager.java:213)

2013-03-24 14:33:05 [iNFO] [sTDERR] at cpw.mods.fml.common.registry.GameRegistry.addShapedRecipe(GameRegistry.java:244)

2013-03-24 14:33:05 [iNFO] [sTDERR] at cpw.mods.fml.common.registry.GameRegistry.addRecipe(GameRegistry.java:239)

2013-03-24 14:33:05 [iNFO] [sTDERR] at com.twinklez.SecretForest.load(SecretForest.java:272)

2013-03-24 14:33:05 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-03-24 14:33:05 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-03-24 14:33:05 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-03-24 14:33:05 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source)

2013-03-24 14:33:05 [iNFO] [sTDERR] at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:515)

2013-03-24 14:33:05 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-03-24 14:33:05 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-03-24 14:33:05 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-03-24 14:33:05 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source)

2013-03-24 14:33:05 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

2013-03-24 14:33:05 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

2013-03-24 14:33:05 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

2013-03-24 14:33:05 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

2013-03-24 14:33:05 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:267)

2013-03-24 14:33:05 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:165)

2013-03-24 14:33:05 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

2013-03-24 14:33:05 [iNFO] [sTDERR] at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

2013-03-24 14:33:05 [iNFO] [sTDERR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

2013-03-24 14:33:05 [iNFO] [sTDERR] at java.lang.reflect.Method.invoke(Unknown Source)

2013-03-24 14:33:05 [iNFO] [sTDERR] at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)

2013-03-24 14:33:05 [iNFO] [sTDERR] at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)

2013-03-24 14:33:05 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314)

2013-03-24 14:33:05 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)

2013-03-24 14:33:05 [iNFO] [sTDERR] at com.google.common.eventbus.EventBus.post(EventBus.java:267)

2013-03-24 14:33:05 [iNFO] [sTDERR] at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:98)

2013-03-24 14:33:05 [iNFO] [sTDERR] at cpw.mods.fml.common.Loader.initializeMods(Loader.java:681)

2013-03-24 14:33:05 [iNFO] [sTDERR] at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:206)

2013-03-24 14:33:05 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.startGame(Minecraft.java:444)

2013-03-24 14:33:05 [iNFO] [sTDERR] at net.minecraft.client.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:44)

2013-03-24 14:33:05 [iNFO] [sTDERR] at net.minecraft.client.Minecraft.run(Minecraft.java:729)

2013-03-24 14:33:05 [iNFO] [sTDERR] at java.lang.Thread.run(Unknown Source)

 

 

My SecretForest class:

 

package com.twinklez;

 

import java.awt.Color;

import java.io.File;

import java.util.Map;

import java.util.Random;

 

import net.minecraft.block.Block;

import net.minecraft.block.BlockPortal;

import net.minecraft.client.Minecraft;

import net.minecraft.client.audio.SoundManager;

import net.minecraft.client.audio.SoundPoolEntry;

import net.minecraft.client.entity.EntityPlayerSP;

import net.minecraft.client.model.ModelBiped;

import net.minecraft.client.renderer.entity.RenderBiped;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.entity.EntityEggInfo;

import net.minecraft.entity.EntityList;

import net.minecraft.entity.EnumCreatureType;

import net.minecraft.entity.player.EntityPlayerMP;

import net.minecraft.item.EnumToolMaterial;

import net.minecraft.item.Item;

import net.minecraft.item.ItemStack;

import net.minecraft.src.MLProp;

import net.minecraft.world.World;

import net.minecraft.world.biome.BiomeGenBase;

import net.minecraft.world.biome.BiomeGenSForest;

import net.minecraftforge.client.ModCompatibilityClient;

import net.minecraftforge.common.Configuration;

import net.minecraftforge.common.DimensionManager;

import net.minecraftforge.common.EnumHelper;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.common.Property;

import cpw.mods.fml.common.Mod;

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

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

import cpw.mods.fml.common.SidedProxy;

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

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

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

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

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

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

 

@Mod(modid = "SecretForest", name = "Secret Forest", version = "0.1")

@NetworkMod(clientSideRequired = true, serverSideRequired = false)

public class SecretForest

{

//Block and Item Define.

public static BlockPortal srPortal; //id 0

public static Block specialStone; //id 1

public static Block srDirt; //id 2

public static Block srGrass; //id 3

public static Block srLog; //id 8

public static Block srLeaves; //id 6

public static Block srPlanks; //id 7

public static Block srStone; //id 10

public static final Item skywardSword = new ItemRecord_SkywardSword(11111, "secretone").setUnlocalizedName("secretone");

//Location: /resources/mod/streaming/["nameofdisc for example secretone"].ogg

public static Item woodPick;

public static Item woodShovel;

public static Item woodSword;

public static Item woodAxe;

    public static Item stonePick;

public static Item stoneShovel;

public static Item stoneSword;

public static Item stoneAxe;

public static Item secretPick;

public static Item secretShovel;

public static Item secretSword;

public static Item secretAxe;

public static Item powerPick;

public static Item powerShovel;

public static Item powerSword;

public static Item powerAxe;

public static Item infPick;

public static Item infShovel;

public static Item infSword;

public static Item infAxe;

public static Item secretIngot;

    public static Item powerIngot;

public static Item infIngot;

public static Item srSticks;

 

 

//static EnumToolMaterial WOOD = EnumHelper.addToolMaterial(name, harvestLevel, maxUses, efficiency, damage, enchantability)

static EnumToolMaterial WOOD = EnumHelper.addToolMaterial("WOOD", 3, 750, 1.0F, 2, 9);

static EnumToolMaterial STONE = EnumHelper.addToolMaterial("STONE", 3, 500, 1.0F, 3, 9);

static EnumToolMaterial SECRET = EnumHelper.addToolMaterial("SECRET", 3, 750, 1.0F, 2, 9);

static EnumToolMaterial POWER = EnumHelper.addToolMaterial("POWER", 3, 500, 1.0F, 6, 9);

static EnumToolMaterial INF = EnumHelper.addToolMaterial("INF", 3, 1000, 1.0F, 100, 9);

 

//CreativeTabs.

public static CreativeTabs secretForestTab = new CreativeTabSecretForest("secretForestTab");

 

//Ints for like special kinds of textures, metadata, etc.

    public static int grassTop; //id 4

    public static int grassBottom; //id 5

    public static int logTop; //id 9

   

    //Configuration File.

    @MLProp public static int idSrPortal = 218;

    @MLProp public static int idSpecialStone = 219;

    @MLProp public static int idSrDirt = 220;

    @MLProp public static int idSrGrass = 221;

    @MLProp public static int idSrLog = 222;

    @MLProp public static int idSrLeaves = 223;

    @MLProp public static int idSrPlanks = 224;

    @MLProp public static int idSrStone = 225;

   

    @MLProp public static int idSkywardSword = 11111;

   

    @MLProp public static int idWoodPick = 11500;

    @MLProp public static int idWoodShovel = 11501;

    @MLProp public static int idWoodSword = 11502;

    @MLProp public static int idWoodAxe = 11503;

   

    @MLProp public static int idStonePick = 11504;

    @MLProp public static int idStoneShovel = 11505;

    @MLProp public static int idStoneSword = 11506;

    @MLProp public static int idStoneAxe = 11507;

   

    @MLProp public static int idSecretPick = 11508;

    @MLProp public static int idSecretShovel = 11509;

    @MLProp public static int idSecretSword = 11510;

    @MLProp public static int idSecretAxe = 11511;

   

    @MLProp public static int idPowerPick = 11512;

    @MLProp public static int idPowerShovel = 11513;

    @MLProp public static int idPowerSword = 11514;

    @MLProp public static int idPowerAxe = 11515;

   

    @MLProp public static int idInfPick = 11516;

    @MLProp public static int idInfShovel = 11517;

    @MLProp public static int idInfSword = 11518;

    @MLProp public static int idInfAxe = 11519;

   

   

    //Dimension ID

public static int dimension = 20;

 

//Mod Info

public String sfVersion = "0.1";

public String modName = "Secret Forest {Alpha Release} v0.1";

public String modCreator = "Twinklez, coolboy4531";

public String dimensionName = "Secret Forest";

public String modContainer = "SecretForest, SwordsofIsraphel";

 

//Extra Stuff

private static World world;

public static File sfMusic = new File("13");

public EntityPlayerMP mp;

public EntityPlayerSP sp;

public File lozLullaby = new File("secret");

public Minecraft mc;

 

@PreInit

public void preInit(FMLPreInitializationEvent event)

{

MinecraftForge.EVENT_BUS.register(new SFSoundManager());

Configuration config = new Configuration(event.getSuggestedConfigurationFile());

//Configurable ID Code. :D

config.load();

Property property = config.get(Configuration.CATEGORY_GENERAL, "com", "com");

property.comment = "You can edit the ID codes for SecretForest's Items or Blocks!";

idSrPortal = config.getBlock("srPortal", 218).getInt();

idSpecialStone = config.getBlock("specialStone", 219).getInt();

idSrDirt = config.getBlock("srDirt", 220).getInt();

idSrGrass = config.getBlock("srGrass", 221).getInt();

idSrLeaves = config.getBlock("srLog", 222).getInt();

idSrLog = config.getBlock("srLeaves", 223).getInt();

//idSrPlanks = config.getBlock("srPlanks", 224).getInt();

idSrStone = config.getBlock("srStone", 225).getInt();

//id = config.getBlock("", ).getInt();

//id = config.getBlock("", ).getInt();

//id = config.getBlock("", ).getInt();

//id = config.getBlock("", ).getInt();

//id = config.getBlock("", ).getInt();

//id = config.getBlock("", ).getInt();

//id = config.getBlock("", ).getInt();

//id = config.getBlock("", ).getInt();

//id = config.getBlock("", ).getInt();

 

idSkywardSword = config.getItem("skywardSword", 11111).getInt();

 

idWoodPick = config.getItem("woodPick", 11500).getInt();

    idWoodShovel = config.getItem("woodShovel", 11501).getInt();

    idWoodSword = config.getItem("woodSword", 11502).getInt();

    idWoodAxe = config.getItem("woodAxe", 11503).getInt();

   

    idStonePick = config.getItem("stonePick", 11504).getInt();

    idStoneShovel = config.getItem("stoneShovel", 11505).getInt();

    idStoneSword = config.getItem("stoneSword", 11506).getInt();

    idStoneAxe = config.getItem("stoneAxe", 11507).getInt();

   

    idSecretPick = config.getItem("secretPick", 11508).getInt();

    idSecretShovel = config.getItem("secretShovel", 11509).getInt();

    idSecretSword = config.getItem("secretSword", 11510).getInt();

    idSecretAxe = config.getItem("secretAxe", 11511).getInt();

   

    idPowerPick = config.getItem("powerPick", 11512).getInt();

    idPowerShovel = config.getItem("powerShovel", 11513).getInt();

    idPowerSword = config.getItem("powerSword", 11514).getInt();

    idPowerAxe = config.getItem("powerAxe", 11515).getInt();

   

    idInfPick = config.getItem("infPick", 11516).getInt();

    idInfShovel = config.getItem("infShovel", 11517).getInt();

    idInfSword = config.getItem("infSword", 11518).getInt();

    idInfAxe = config.getItem("infAxe", 11519).getInt();

config.save();

}

 

@SidedProxy(clientSide = "com.twinklez.ClientProxySecretForest", serverSide = "com.twinklez.ClientProxySecretForest")

public static CommonProxySecretForest proxy;

 

//Does when SecretForest loads.

@Init

public void load(FMLInitializationEvent event)

{

proxy.registerRenderThings();

srPortal = (SrPortal)(new SrPortal(218, 0).setStepSound(Block.soundWoodFootstep).setHardness(100000000F).setResistance(1.0F).setUnlocalizedName("srForestPortal"));

specialStone = (new SrSpecialStone(219, 1).setHardness(11.1F).setStepSound(Block.soundStoneFootstep).setResistance(1234.5F).setUnlocalizedName("specialStone"));

srDirt = (new SrDirt(220, 2).setStepSound(Block.soundGrassFootstep).setHardness(0.5F).setResistance(0.5F).setUnlocalizedName("srDirt"));

srGrass = (new SrGrass(221, 3).setStepSound(Block.soundGrassFootstep).setHardness(0.5F).setResistance(1.0F).setUnlocalizedName("secretGrass"));

srLeaves = (new SrLeaves(222).setHardness(1.0F).setTickRandomly(true).setStepSound(Block.soundGrassFootstep).setResistance(1.0F).setUnlocalizedName("secretLeaves"));

srLog = (new SrLog(223)).setStepSound(Block.soundWoodFootstep).setHardness(1.1F).setResistance(2F).setUnlocalizedName("secretLog");

srPlanks = (new SrPlanks(226, 7).setHardness(1.0985F).setResistance(1.0F).setUnlocalizedName("srPlanks"));

woodPick = (new SrItemPickaxe(11500, WOOD)).setUnlocalizedName("woodPick");

    woodShovel = (new SrItemShovel(11501, WOOD)).setUnlocalizedName("woodShovel");

    woodSword = (new SrItemSword(11502, WOOD)).setUnlocalizedName("woodSword");

    woodAxe = (new SrItemAxe(11503, WOOD)).setUnlocalizedName("woodAxe");

    stonePick = (new SrItemPickaxe(11504, STONE)).setUnlocalizedName("stonePick");

    stoneShovel = (new SrItemShovel(11505, STONE)).setUnlocalizedName("stoneShovel");

    stoneSword = (new SrItemSword(11506, STONE)).setUnlocalizedName("stoneSword");

    stoneAxe = (new SrItemAxe(11507, STONE)).setUnlocalizedName("stoneAxe");

        secretPick = (new SrItemPickaxe(11508, SECRET)).setUnlocalizedName("secretPick");

        secretShovel = (new SrItemShovel(11509, SECRET)).setUnlocalizedName("secretShovel");

        secretSword = (new SrItemSword(11510, SECRET)).setUnlocalizedName("secretSword");

        secretAxe = (new SrItemAxe(11511, SECRET)).setUnlocalizedName("secretAxe");

        powerPick = (new SrItemPickaxe(11512, SECRET)).setUnlocalizedName("powerPick");

        powerShovel = (new SrItemShovel(11513, SECRET)).setUnlocalizedName("powerShovel");

        powerSword = (new SrItemSword(11514, SECRET)).setUnlocalizedName("powerSword");

        powerAxe = (new SrItemAxe(11515, SECRET)).setUnlocalizedName("powerAxe");

        infPick = (new SrItemPickaxe(11516, SECRET)).setUnlocalizedName("infPick");

        infShovel = (new SrItemShovel(11517, SECRET)).setUnlocalizedName("infShovel");

        infSword = (new SrItemSword(11518, SECRET)).setUnlocalizedName("infSword");

        infAxe = (new SrItemAxe(11519, SECRET)).setUnlocalizedName("infAxe");

        secretIngot = (new SrIngots(11520)).setUnlocalizedName("secretIngot");

        powerIngot = (new SrIngots(11521)).setUnlocalizedName("powerIngot");

        infIngot = (new SrIngots(11522)).setUnlocalizedName("infIngot");

        srSticks = (new SrStick(1082)).setUnlocalizedName("srSticks");

       

    GameRegistry.addRecipe(new ItemStack(SecretForest.srPlanks, 4, 0), new Object[] {"#", '#', new ItemStack(srLog, 1, 0)});

    GameRegistry.addRecipe(new ItemStack(SecretForest.srPlanks, 4, 1), new Object[] {"#", '#', new ItemStack(srLog, 1, 1)});

    GameRegistry.addRecipe(new ItemStack(SecretForest.srPlanks, 4, 2), new Object[] {"#", '#', new ItemStack(srLog, 1, 2)});

    GameRegistry.addRecipe(new ItemStack(SecretForest.srPlanks, 4, 3), new Object[] {"#", '#', new ItemStack(srLog, 1, 3)});

    //GameRegistry.addRecipe(new ItemStack(SecretForest.srSticks, 4), new Object[] {"#", "#", '#', srPlanks});

    GameRegistry.addRecipe(new ItemStack(Block.workbench), new Object[] {"##", "##", '#', srPlanks});

   

    /** TOOLS PLATFORM * Make the lower case x = X

    * PICK {"XXx", " C ", " C ", 'X', srPlanks, 'C', srSticks });

    * AXE {"XX ", "XC ", " C ", 'X', srPlanks, 'C', srSticks });

    * SHOVEL {" X ", " C ", " C ", 'X', srPlanks, 'C', srSticks });

    * SWORD {" X ", " X ", " C ", 'X', srPlanks, 'C', srSticks});

    */

   

    //Item recipes

    GameRegistry.addRecipe(new ItemStack(woodPick, 1), new Object[] {"XXX", " C ", " C ", 'X', srPlanks, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(woodAxe, 1), new Object[] {"XX ", "XC ", " C ", 'X', srPlanks, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(woodShovel, 1), new Object[] {" X ", " C ", " C ", 'X', srPlanks, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(woodSword, 1), new Object[] {" X ", " X ", " C ", 'X', srPlanks, 'C', srSticks});

    /**THIS IS LINE 272! */ GameRegistry.addRecipe(new ItemStack(stonePick, 1), new Object[] {"XXX", " C ", " C ", 'X', srStone, 'C', srSticks}); 

    GameRegistry.addRecipe(new ItemStack(stoneAxe, 1), new Object[] {"XX ", "XC ", " C ", 'X', srStone, 'C', srSticks });

    GameRegistry.addRecipe(new ItemStack(stoneShovel, 1), new Object[] {" X ", " C ", " C ", 'X', srStone, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(stoneSword, 1), new Object[] {" X ", " X ", " C ", 'X', srStone, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(secretPick, 1), new Object[] {"XXX", " C ", " C ", 'X', secretIngot, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(secretAxe, 1), new Object[] {"XX ", "XC ", " C ", 'X', secretIngot, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(secretShovel, 1), new Object[] {" X ", " C ", " C ", 'X', secretIngot, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(secretSword, 1), new Object[] {" X ", " X ", " C ", 'X', secretIngot, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(powerPick, 1), new Object[] {"XXX", " C ", " C ", 'X', powerIngot, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(powerAxe, 1), new Object[] {"XX ", "XC ", " C ", 'X', powerIngot, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(powerShovel, 1), new Object[] {" X ", " C ", " C ", 'X', powerIngot, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(powerSword, 1), new Object[] {" X ", " X ", " C ", 'X', powerIngot, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(infPick, 1), new Object[] {"XXX", " C ", " C ", 'X', infIngot, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(infAxe, 1), new Object[] {"XX ", "XC ", " C ", 'X', infIngot, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(infShovel, 1), new Object[] {" X ", " C ", " C ", 'X', infIngot, 'C', srSticks});

    GameRegistry.addRecipe(new ItemStack(infSword, 1), new Object[] {" X ", " X ", " C ", 'X', infIngot, 'C', srSticks});

   

    //Block recipe

        GameRegistry.addRecipe(new ItemStack(specialStone, 1), new Object[] {"XXX", "XZX", "XXX", 'X', Item.clay, 'Z', Block.stone});

        GameRegistry.addRecipe(new ItemStack(Block.furnaceIdle, 1), new Object[] {"XXX", "X X", "XXX", 'X', srStone});

       

        //Ore Crafting / Smelting Items

        GameRegistry.addRecipe(new ItemStack(powerIngot, 1), new Object[] {"XXX", "CBC", "XXX", 'X', secretIngot, 'C', Item.diamond, 'B', Item.ingotGold });

        GameRegistry.addRecipe(new ItemStack(infIngot, 1), new Object[] {"XVX", "VBV", "XVX", 'X', powerIngot, 'B', Block.blockDiamond, 'V', secretIngot});

        //GameRegistry.addSmelting(srOre.blockID, new ItemStack(secretIngot), 0.5F);

           

//Block Registry

GameRegistry.registerBlock(srPortal, "Twinklez_Portal");

GameRegistry.registerBlock(specialStone, "Twinklez_SpecialStone");

GameRegistry.registerBlock(srDirt, "Twinklez_Dirt");

GameRegistry.registerBlock(srGrass, "Twinklez_Grass");

GameRegistry.registerBlock(srLeaves, "Twinklez_Leaves");

GameRegistry.registerBlock(srLog, "Twinklez_Log");

GameRegistry.registerBlock(srStone, "Twinklez_Stone");

//GameRegistry.registerBlock(, "Twinklez_");

//GameRegistry.registerBlock(, "Twinklez_");

//GameRegistry.registerBlock(, "Twinklez_");

 

//Name Registry

LanguageRegistry.addName(srPortal, "Secret Forest Portal");

LanguageRegistry.addName(specialStone, "Special Stone");

LanguageRegistry.addName(srDirt, "Secret Dirt");

LanguageRegistry.addName(srGrass, "Secret Grass");

LanguageRegistry.addName(srLeaves, "Secret Leaves");

LanguageRegistry.addName(srLog, "Secret Wood");

LanguageRegistry.addName(srStone, "Secret Stone");

        //LanguageRegistry.addName(srSticks, "Secret Sticks");

        LanguageRegistry.addName(srGrass, "Secret Grass");

        LanguageRegistry.addName(srDirt, "Secret Dirt");

        LanguageRegistry.addName(srLeaves, "Secret Leaves");

        //LanguageRegistry.addName(srOre, "Secretful Ore");

        LanguageRegistry.addName(srPlanks, "Secret Planks");

        LanguageRegistry.addName(srLog, "Secret Log");

        LanguageRegistry.addName(srStone, "Secret Stone");

   

        LanguageRegistry.addName(woodPick, "Secret Wooden Pickaxe");

        LanguageRegistry.addName(woodAxe, "Secret Wooden Axe");

        LanguageRegistry.addName(woodShovel, "Secret Wooden Shovel");

        LanguageRegistry.addName(woodSword, "Secret Wooden Sword");

        LanguageRegistry.addName(stonePick, "Secret Stone Pickaxe");

        LanguageRegistry.addName(stoneAxe, "Secret Stone Axe");

        LanguageRegistry.addName(stoneShovel, "Secret Stone Shovel");

        LanguageRegistry.addName(stoneSword, "Secret Stone Sword");

        LanguageRegistry.addName(secretPick, "Secret Pickaxe");

        LanguageRegistry.addName(secretAxe, "Secret Axe");

        LanguageRegistry.addName(secretShovel, "Secret Shovel");

        LanguageRegistry.addName(secretSword, "Secret Sword");

        LanguageRegistry.addName(powerPick, "Secret Power Pickaxe ");

        LanguageRegistry.addName(powerAxe, "Secret Power Axe");

        LanguageRegistry.addName(powerShovel, "Secret Power Shovel");

        LanguageRegistry.addName(powerSword, "Secret Power Sword");

        LanguageRegistry.addName(infPick, "Secret Infinity Pickaxe");

        LanguageRegistry.addName(infAxe, "Secret Infinity Axe");

        LanguageRegistry.addName(infShovel, "Secret Infinity Shovel");

        LanguageRegistry.addName(infSword, "Secret Infinity Sword");

        LanguageRegistry.addName(secretIngot, "Secret Ingot");

        LanguageRegistry.addName(powerIngot, "Secret Power Ingot");

        LanguageRegistry.addName(infIngot, "Secret Infinity Ingot");

//LanguageRegistry.addName(,"");

//LanguageRegistry.addName(,"");

 

LanguageRegistry.addName(skywardSword, "Legend of Zelda - Skyward Sword");

 

LanguageRegistry.instance().addStringLocalization("itemGroup.secretForestTab", "en_US", "Secret Forest");

 

//Dimension Registry

DimensionManager.registerProviderType(dimension, WorldProviderSecretForest.class, false);

DimensionManager.registerDimension(dimension, dimension);

 

//Entity Registry

    EntityRegistry.registerModEntity(EntityRobot.class, "Robot", EntityRegistry.findGlobalUniqueEntityId(), this, 80, 3, true);

    EntityRegistry.addSpawn(EntityRobot.class, 15, 1, 3, EnumCreatureType.creature, BiomeGenBase.secretForest);    

     

    EntityList.IDtoClassMapping.put(EntityRegistry.findGlobalUniqueEntityId(), EntityRobot.class);

    EntityList.entityEggs.put(EntityRegistry.findGlobalUniqueEntityId(), new EntityEggInfo(EntityRegistry.findGlobalUniqueEntityId(), (new Color(220, 220, 220)).getRGB(), (new Color(139, 137, 137)).getRGB()));

    LanguageRegistry.instance().addStringLocalization("entity.SecretForest.Robot.name", "Robot");

   

    //mc.installResource("resources/mod/music/secret.ogg", new File(mc.mcDataDir, "resources/mod/music/secret.ogg"));

   

    //Tools Config

        MinecraftForge.setToolClass(woodPick, "pickaxe", 0);

        MinecraftForge.setToolClass(woodShovel, "shovel", 0);

        MinecraftForge.setToolClass(woodAxe, "axe", 0);

        MinecraftForge.setToolClass(stonePick, "pickaxe", 1);

        MinecraftForge.setToolClass(stoneShovel, "shovel", 1);

        MinecraftForge.setToolClass(stoneAxe, "axe", 1);

        MinecraftForge.setToolClass(secretPick, "pickaxe", 2);

        MinecraftForge.setToolClass(secretShovel, "shovel", 2);

        MinecraftForge.setToolClass(secretAxe, "axe", 2);

        MinecraftForge.setToolClass(powerPick, "pickaxe", 3);

        MinecraftForge.setToolClass(powerShovel, "shovel", 3);

        MinecraftForge.setToolClass(powerAxe, "axe", 3);

        MinecraftForge.setToolClass(infPick, "pickaxe", 3);

        MinecraftForge.setToolClass(infShovel, "shovel", 3);

        MinecraftForge.setToolClass(infAxe, "axe", 3);

       

        MinecraftForge.setBlockHarvestLevel(srDirt, "shovel", 0);

        MinecraftForge.setBlockHarvestLevel(specialStone, "pickaxe", 3);

        MinecraftForge.setBlockHarvestLevel(srGrass, "shovel", 0);

        MinecraftForge.setBlockHarvestLevel(srLog, "axe", 0);

        MinecraftForge.setBlockHarvestLevel(srStone, "pickaxe", 0);

}

 

private EntityPlayerSP changePlayerEntity(int type, Minecraft minecraft)

{

if (type == dimension)

{

return new EntityPlayerSForest(minecraft, minecraft.theWorld, minecraft.session, type);

}

return new EntityPlayerSP(minecraft, minecraft.theWorld, minecraft.session, type);

}

 

public void addRenderer(Map map)

{

map.put(EntityRobot.class, new RenderBiped(new ModelBiped(), 0.5F));

}

 

public void generateSurface(World world, Random random, int BlockX, int BlockZ)

{

BiomeGenBase biome = world.getBiomeGenForCoords(BlockX, BlockZ);

WorldGenSForestTrees tree = new WorldGenSForestTrees(false, 5, 0, 0);

 

if (biome instanceof BiomeGenSForest)

{

for (int i = 0; i < 5; i++)

{

int Xcoord1 = BlockX + random.nextInt(16);

int Ycoord1 = random.nextInt(90);

int Zcoord1 = BlockZ + random.nextInt(16);

tree.generate(world, random, Xcoord1, Ycoord1, Zcoord1);

}

}

}

 

/** if (biome instanceof BiomeGenSForest)

{

for(int a = 0; a < 18; a++)

{

int Xcoord1 = BlockX + random.nextInt(16);

int Ycoord1 = random.nextInt(90);

int Zcoord1 = BlockZ + random.nextInt(16);

(new WorldGenSecret()).generate(world, random, Xcoord1, Ycoord1, Zcoord1);

 

}

} Un-used, for another update. */

 

public boolean onTickInGame(Minecraft minecraft, EntityPlayerSP sp)

{

EntityPlayerSP thePlayer = (EntityPlayerSP) sp;

if (thePlayer != null)

{

if (world.provider.dimensionId == dimension && thePlayer instanceof EntityPlayerSForest)

return true;

 

if (world.provider.dimensionId!= dimension && !(thePlayer instanceof EntityPlayerSForest))

return true;

}

return true;

}

}

 

 

Any ideas?

Link to comment
Share on other sites

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.