Jump to content

[1.7.2][SOLVED]Negative item id?


Nimbleguy

Recommended Posts

For some reason, my chest plate has a negative item id. I checked with F3-H, and it says #-001

It's unlocalized name is voidGear

ArmorNull:

 

 

package aj.Java.Nullvoid.Armor;

 

import java.util.List;

 

import org.lwjgl.input.Keyboard;

 

import cpw.mods.fml.relauncher.Side;

import cpw.mods.fml.relauncher.SideOnly;

import aj.Java.Nullvoid.VoidMod;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.entity.Entity;

import net.minecraft.entity.player.EntityPlayer;

import net.minecraft.item.Item;

import net.minecraft.item.ItemArmor;

import net.minecraft.item.ItemStack;

import net.minecraft.world.World;

 

public class ArmorNull extends ItemArmor {

public ArmorNull(ArmorMaterial par2EnumArmorMaterial, int par3, int par4) {

super(par2EnumArmorMaterial, par3, par4);

this.setCreativeTab(VoidMod.ctab);

}

@SuppressWarnings({ "unchecked", "rawtypes" })

@SideOnly(Side.CLIENT)

@Override

public void getSubItems(Item par1, CreativeTabs par2CreativeTabs, List par3List)

{

    par3List.add(new ItemStack(VoidMod.nullGoggles));

    par3List.add(new ItemStack(VoidMod.voidGear));

}

@Override

public String getArmorTexture(ItemStack stack, Entity entity, int slot,

String type) {

return null;

 

}

 

@Override

public void onArmorTick(World world, EntityPlayer player,

ItemStack itemstack) {

if (new ItemStack(itemstack.getItem()).isItemEqual(new ItemStack(VoidMod.voidGear))) {

if(Keyboard.isKeyDown(Keyboard.KEY_SPACE)){

if(player.motionY < 0D){

player.setVelocity(player.motionX, player.motionY + 0.2D, player.motionZ);

}

else{

player.setVelocity(player.motionX, player.motionY + 0.07D, player.motionZ);

}

}

if(player.motionY > -0.2D){

player.fallDistance = 0F;

}

}

super.onArmorTick(world, player, itemstack);

}

}

 

 

Link to comment
Share on other sites

VoidMod:

 

 

package aj.Java.Nullvoid;

 

import aj.Java.Nullvoid.Armor.ArmorNull;

import aj.Java.Nullvoid.Armor.GravityBelt;

import aj.Java.Nullvoid.Biome.BiomeGenNull;

import aj.Java.Nullvoid.Dimention.WorldProviderNullVoid;

import aj.Java.Nullvoid.Entity.BossVoidMaster;

import aj.Java.Nullvoid.Liquids.BucketHandler;

import aj.Java.Nullvoid.Liquids.FluidMoltenFlux;

import aj.Java.Nullvoid.block.BlockMoltenFlux;

import aj.Java.Nullvoid.block.BlockNullOre;

import aj.Java.Nullvoid.block.BlockVoidDoor;

import aj.Java.Nullvoid.block.BlockVoidFabric;

import aj.Java.Nullvoid.block.BlockVoidWalker;

import aj.Java.Nullvoid.client.GUIHandler;

import aj.Java.Nullvoid.gen.VoidModOreGenerator;

import aj.Java.Nullvoid.gen.VoidModStructureGenerator;

import aj.Java.Nullvoid.item.ItemBucket;

import aj.Java.Nullvoid.item.ItemCircut;

import aj.Java.Nullvoid.item.ItemIngotNull;

import aj.Java.Nullvoid.item.ItemIngotVoid;

import aj.Java.Nullvoid.tileentity.TileEntityVoidWalker;

import net.minecraft.block.Block;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.init.Blocks;

import net.minecraft.init.Items;

import net.minecraft.item.Item;

import net.minecraft.item.ItemArmor.ArmorMaterial;

import net.minecraft.item.ItemStack;

import net.minecraft.stats.Achievement;

import net.minecraft.stats.AchievementList;

import net.minecraft.world.biome.BiomeGenBase;

import net.minecraftforge.common.AchievementPage;

import net.minecraftforge.common.BiomeDictionary;

import net.minecraftforge.common.BiomeDictionary.Type;

import net.minecraftforge.common.DimensionManager;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.common.config.Configuration;

import net.minecraftforge.fluids.Fluid;

import net.minecraftforge.fluids.FluidContainerRegistry;

import net.minecraftforge.fluids.FluidRegistry;

import net.minecraftforge.fluids.FluidStack;

import net.minecraftforge.oredict.OreDictionary;

import net.minecraftforge.oredict.ShapedOreRecipe;

import cpw.mods.fml.client.registry.RenderingRegistry;

import cpw.mods.fml.common.FMLCommonHandler;

import cpw.mods.fml.common.Mod;

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

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

import cpw.mods.fml.common.SidedProxy;

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

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

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

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

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

import net.minecraftforge.common.util.EnumHelper;

@Mod(modid = VoidMod.MODID, name="The Void", version = VoidMod.VERSION)

public class VoidMod {

public static Achievement enterNull = null;

public static Achievement useTardis = null;

public static Achievement fallVoid = null;

public static AchievementPage nullChievements = null;

public static CreativeTabs ctab = new NullVoidTab(CreativeTabs.getNextID(), "The Null Void");

public static int render = RenderingRegistry.getNextAvailableRenderId();

public static int guiWalker = 0;

public static Item circuts = null;

public static Item ingotNull = null;

public static Item ingotVoid = null;

public static Item bucket = null;

public static Block NullOre = null;

public static Block VoidFabric = null;

public static Block walker = null;

public static Block voiddoor = null;

public static int NullVoidDimID;

public static final String MODID = "nullvoid";

    public static final String VERSION = "0.0.1";

    public static Fluid liquidFlux = null;

    public static Block blockLiquidFlux = null;

    public static Item nullGoggles = null;

    public static Item voidGear = null;

    public static Item gravityBelt = null;

    public static BiomeGenBase biomeNullVoid = null;

    public static ArmorMaterial NullArmor = EnumHelper.addArmorMaterial("NullArmor", 8, new int[] { 6, 12, 10, 6 }, 30);

    @Instance(value = MODID)

    public static VoidMod me;

    @SidedProxy(clientSide="aj.Java.Nullvoid.client.ClientProxy", serverSide="aj.Java.Nullvoid.CommonProxy")

    public static CommonProxy proxy;

    @EventHandler

    public void preInit(FMLPreInitializationEvent event) {

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

    config.load();

    liquidFlux = new FluidMoltenFlux("Molten Flux");

    liquidFlux.setBlock(blockLiquidFlux);

    voiddoor = new BlockVoidDoor().setBlockName("voidDoor"); //iron

    nullGoggles = new ArmorNull(NullArmor, 0, 0).setUnlocalizedName("nullGoggles");

    voidGear = new ArmorNull(NullArmor, 0, 1).setUnlocalizedName("voidGear");

    blockLiquidFlux = new BlockMoltenFlux(liquidFlux).setBlockName("moltenFlux"); //water

    circuts = new ItemCircut().setUnlocalizedName("circuits");

    ingotNull = new ItemIngotNull().setUnlocalizedName("ingotNull");

    ingotVoid = new ItemIngotVoid().setUnlocalizedName("ingotVoid");

    NullOre = new BlockNullOre().setBlockName("nullOre");

    VoidFabric = new BlockVoidFabric().setBlockName("voidFabric");

    walker = new BlockVoidWalker().setBlockName("voidWalker"); //iron

    biomeNullVoid = new BiomeGenNull(config.get(Configuration.CATEGORY_GENERAL, "Null Void Biome ID", 34).getInt());

    enterNull = new Achievement("achievement.GoToVoid", "GoToVoid", 0, 0, ingotNull, AchievementList.openInventory).registerStat().setSpecial();

    useTardis = new Achievement("achievement.UseTARDIS", "UseTARDIS", 2, 0, Blocks.lapis_block, enterNull).registerStat();

    fallVoid = new Achievement("achievement.FallVoid", "FallVoid", -3, -1, ingotVoid, enterNull).registerStat();

    NullVoidDimID = config.get(Configuration.CATEGORY_GENERAL, "Null Void Dimention ID", 42).getInt();

    nullChievements = new AchievementPage("The Null Void", enterNull, useTardis, fallVoid);

    config.save();

    }

    @EventHandler

    public void init(FMLInitializationEvent event)

    {

    //Loading Bauble stuff

gravityBelt = new GravityBelt().setUnlocalizedName("gravBelt");

//Fluids

FluidRegistry.registerFluid(liquidFlux);

 

//Blocks

GameRegistry.registerBlock(walker, "The Voidwalker");

GameRegistry.registerBlock(voiddoor, "Void Door");

GameRegistry.registerBlock(VoidFabric, "Void Fabric");

GameRegistry.registerBlock(NullOre, "Null Ore");

GameRegistry.registerBlock(blockLiquidFlux, "Molten Flux Block");

 

//Items

bucket = new ItemBucket(blockLiquidFlux);

GameRegistry.registerItem(bucket, "bucketFlux");

GameRegistry.registerItem(circuts, "circutsVoidFlux");

GameRegistry.registerItem(ingotVoid, "ingotVoid");

GameRegistry.registerItem(ingotNull, "ingotNull");

GameRegistry.registerItem(nullGoggles, "goggleNull");

GameRegistry.registerItem(gravityBelt, "gravityBelt");

 

//Tile entities

GameRegistry.registerTileEntity(TileEntityVoidWalker.class, "NullVoidWalker");

 

//Oredict

OreDictionary.registerOre("crystalNull", ingotNull);

OreDictionary.registerOre("oreNull", NullOre);

 

//Crafting

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 0), "RPR", "NEN", "QNQ",

'R', new ItemStack(Items.redstone),

'P', new ItemStack(Items.pumpkin_pie),

'N', "crystalNull",

'E', "dyeLime",

'Q', new ItemStack(Items.quartz)));

if (OreDictionary.getOres("ingotCopper").size() != 0 && OreDictionary.getOres("ingotElectrum").size() != 0) {

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 1), "OGO", "NCN", "RRR",

'R', new ItemStack(Items.redstone),

'G', "ingotElectrum",

'C', new ItemStack(circuts, 1, 0),

'O', "ingotCopper",

'N', "crystalNull"));

}

else if (OreDictionary.getOres("ingotCopper").size() != 0) {

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 1), "OGO", "NCN", "RRR",

'R', new ItemStack(Items.redstone),

'G', new ItemStack(Items.glowstone_dust),

'C', new ItemStack(circuts, 1, 0),

'O', "ingotCopper",

'N', "crystalNull"));

}

else{

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 1), "GGG", "NCN", "RRR",

'R', new ItemStack(Items.redstone),

'G', new ItemStack(Items.glowstone_dust),

'C', new ItemStack(circuts, 1, 0),

'N', "crystalNull"));

}

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 2), "NNN", "NCN", "NRN",

'R', new ItemStack(Blocks.redstone_block),

'N', "crystalNull",

'C', new ItemStack(circuts, 1, 1)));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 3), "REB", "NCN", "YQP",

'C', new ItemStack(circuts, 1, 2),

'N', "crystalNull",

'R', "dyeRed",

'B', "dyeCyan",

'Y', "dyeYellow",

'P', "dyePurple",

'Q', new ItemStack(Items.quartz),

'E', new ItemStack(Blocks.redstone_block)));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 4), "NNN", "RCR", "EDE",

'R', new ItemStack(Blocks.redstone_block),

'C', new ItemStack(circuts, 1, 3),

'N', "crystalNull",

'D', Blocks.diamond_block,

'E', Blocks.end_stone));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(walker), "NCN", "EDE", "NIN",

'D', new ItemStack(Blocks.diamond_block),

'C', new ItemStack(circuts, 1, 0),

'I', new ItemStack(circuts, 1, 3),

'N', "crystalNull",

'E', Blocks.end_stone));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(nullGoggles), "SCS", "GLG", "NGN",

'S', new ItemStack(Items.string),

'C', new ItemStack(circuts, 1, 4),

'N', "crystalNull",

'G', Blocks.glass_pane,

'L', Items.leather));

GameRegistry.addSmelting(NullOre, new ItemStack(ingotNull), 0.5f);

 

//GUI

new GUIHandler();

 

//Buckets

FluidContainerRegistry.registerFluidContainer(new FluidStack(liquidFlux, FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucket), new ItemStack(Items.bucket));

MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);

 

//Register Biomes

BiomeDictionary.registerBiomeType(biomeNullVoid, Type.END, Type.MAGICAL);

 

//Entities

EntityRegistry.registerModEntity(BossVoidMaster.class, "Void Master", 1, this, 80, 10, true);

 

//Register dims

DimensionManager.registerProviderType(VoidMod.NullVoidDimID, WorldProviderNullVoid.class, true);

DimensionManager.registerDimension(VoidMod.NullVoidDimID, VoidMod.NullVoidDimID);

 

//Generation

GameRegistry.registerWorldGenerator(new VoidModOreGenerator(), 100);

GameRegistry.registerWorldGenerator(new VoidModStructureGenerator(), 101);

 

//Renderers

proxy.registerRenderers();

 

//NullChievements

AchievementPage.registerAchievementPage(nullChievements);

 

//Add language

/**

LanguageRegistry.instance().addStringLocalization("itemGroup." + "The Null Void", "en_US", "The Null Void");

LanguageRegistry.addName(new ItemStack(circuts, 1, 0), "Inert Null Circuit");

LanguageRegistry.addName(new ItemStack(circuts, 1, 1), "Energized Null Circuit");

LanguageRegistry.addName(new ItemStack(circuts, 1, 2), "Destabilized Null Circuit");

LanguageRegistry.addName(new ItemStack(circuts, 1, 3), "Fluxuating Null Circuit");

LanguageRegistry.addName(new ItemStack(circuts, 1, 4), "Activated Null Circuit");

LanguageRegistry.addName(new ItemStack(bucket, 1), "Bucket of Null Flux");

LanguageRegistry.addName(new ItemStack(ingots, 1, 0), "Null Crystal");

LanguageRegistry.addName(new ItemStack(ingots, 1, 1), "Void Gem");

LanguageRegistry.addName(new ItemStack(nullGoggles), "Null Goggles");

LanguageRegistry.addName(new ItemStack(walker), "The Voidwalker");

LanguageRegistry.addName(new ItemStack(MultiBlock1, 1, 0), "Null Block");

LanguageRegistry.addName(new ItemStack(MultiBlock1, 1, 1), "Null Ore");

LanguageRegistry.addName(new ItemStack(MultiBlock1, 1, 2), "Void Ore");

LanguageRegistry.instance().addStringLocalization("achievement.GoToVoid", "en_US", "Traversed the Void");

LanguageRegistry.instance().addStringLocalization("achievement.GoToVoid.desc", "en_US", "The first step.");

LanguageRegistry.instance().addStringLocalization("achievement.UseTARDIS", "en_US", "Entered the TARDIS");

LanguageRegistry.instance().addStringLocalization("achievement.UseTARDIS.desc", "en_US", "Transedial Dimentions!");

LanguageRegistry.instance().addStringLocalization("achievement.FallVoid", "en_US", "Fell into the Void");

LanguageRegistry.instance().addStringLocalization("achievement.FallVoid.desc", "en_US", "Such die. Much nothing. Wow.");

*/

//Events

FMLCommonHandler.instance().bus().register(new TickListner());

System.out.println("Shall we traverse the void?");

    }

    @EventHandler

    public void postInit(FMLPostInitializationEvent event) {

    }

}

 

 

 

Link to comment
Share on other sites

? I did not move my items and blocks, except for my block for a fluid because it crashes when put before the fluid.

VoidMod:

 

 

package aj.Java.Nullvoid;

 

import aj.Java.Nullvoid.Armor.ArmorNull;

import aj.Java.Nullvoid.Armor.GravityBelt;

import aj.Java.Nullvoid.Biome.BiomeGenNull;

import aj.Java.Nullvoid.Dimention.WorldProviderNullVoid;

import aj.Java.Nullvoid.Entity.BossVoidMaster;

import aj.Java.Nullvoid.Liquids.BucketHandler;

import aj.Java.Nullvoid.Liquids.FluidMoltenFlux;

import aj.Java.Nullvoid.block.BlockMoltenFlux;

import aj.Java.Nullvoid.block.BlockNullOre;

import aj.Java.Nullvoid.block.BlockVoidDoor;

import aj.Java.Nullvoid.block.BlockVoidFabric;

import aj.Java.Nullvoid.block.BlockVoidWalker;

import aj.Java.Nullvoid.client.GUIHandler;

import aj.Java.Nullvoid.gen.VoidModOreGenerator;

import aj.Java.Nullvoid.gen.VoidModStructureGenerator;

import aj.Java.Nullvoid.item.ItemBucket;

import aj.Java.Nullvoid.item.ItemCircut;

import aj.Java.Nullvoid.item.ItemIngotNull;

import aj.Java.Nullvoid.item.ItemIngotVoid;

import aj.Java.Nullvoid.tileentity.TileEntityVoidWalker;

import net.minecraft.block.Block;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.init.Blocks;

import net.minecraft.init.Items;

import net.minecraft.item.Item;

import net.minecraft.item.ItemArmor.ArmorMaterial;

import net.minecraft.item.ItemStack;

import net.minecraft.stats.Achievement;

import net.minecraft.stats.AchievementList;

import net.minecraft.world.biome.BiomeGenBase;

import net.minecraftforge.common.AchievementPage;

import net.minecraftforge.common.BiomeDictionary;

import net.minecraftforge.common.BiomeDictionary.Type;

import net.minecraftforge.common.DimensionManager;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.common.config.Configuration;

import net.minecraftforge.fluids.Fluid;

import net.minecraftforge.fluids.FluidContainerRegistry;

import net.minecraftforge.fluids.FluidRegistry;

import net.minecraftforge.fluids.FluidStack;

import net.minecraftforge.oredict.OreDictionary;

import net.minecraftforge.oredict.ShapedOreRecipe;

import cpw.mods.fml.client.registry.RenderingRegistry;

import cpw.mods.fml.common.FMLCommonHandler;

import cpw.mods.fml.common.Mod;

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

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

import cpw.mods.fml.common.SidedProxy;

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

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

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

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

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

import net.minecraftforge.common.util.EnumHelper;

@Mod(modid = VoidMod.MODID, name="The Void", version = VoidMod.VERSION)

public class VoidMod {

public static Achievement enterNull = null;

public static Achievement useTardis = null;

public static Achievement fallVoid = null;

public static AchievementPage nullChievements = null;

public static CreativeTabs ctab = new NullVoidTab(CreativeTabs.getNextID(), "The Null Void");

public static int render = RenderingRegistry.getNextAvailableRenderId();

public static int guiWalker = 0;

public static Item circuts = null;

public static Item ingotNull = null;

public static Item ingotVoid = null;

public static Item bucket = null;

public static Block NullOre = null;

public static Block VoidFabric = null;

public static Block walker = null;

public static Block voiddoor = null;

public static int NullVoidDimID;

public static final String MODID = "nullvoid";

    public static final String VERSION = "0.0.1";

    public static Fluid liquidFlux = null;

    public static Block blockLiquidFlux = null;

    public static Item nullGoggles = null;

    public static Item voidGear = null;

    public static Item gravityBelt = null;

    public static BiomeGenBase biomeNullVoid = null;

    public static int nullvoidbioid = 34;

    public static ArmorMaterial NullArmor = EnumHelper.addArmorMaterial("NullArmor", 8, new int[] { 6, 12, 10, 6 }, 30);

    @Instance(value = MODID)

    public static VoidMod me;

    @SidedProxy(clientSide="aj.Java.Nullvoid.client.ClientProxy", serverSide="aj.Java.Nullvoid.CommonProxy")

    public static CommonProxy proxy;

    @EventHandler

    public void preInit(FMLPreInitializationEvent event) {

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

    config.load();

    voiddoor = new BlockVoidDoor().setBlockName("voidDoor"); //iron

    nullGoggles = new ArmorNull(NullArmor, 0, 0).setUnlocalizedName("nullGoggles");

    voidGear = new ArmorNull(NullArmor, 0, 1).setUnlocalizedName("voidGear");

    circuts = new ItemCircut().setUnlocalizedName("circuits");

    ingotNull = new ItemIngotNull().setUnlocalizedName("ingotNull");

    ingotVoid = new ItemIngotVoid().setUnlocalizedName("ingotVoid");

    NullOre = new BlockNullOre().setBlockName("nullOre");

    VoidFabric = new BlockVoidFabric().setBlockName("voidFabric");

    walker = new BlockVoidWalker().setBlockName("voidWalker"); //iron

    nullvoidbioid = config.get(Configuration.CATEGORY_GENERAL, "Null Void Biome ID", 34).getInt();

    NullVoidDimID = config.get(Configuration.CATEGORY_GENERAL, "Null Void Dimention ID", 42).getInt();

    config.save();

    }

    @EventHandler

    public void init(FMLInitializationEvent event)

    {

    //Other registring stuff

    liquidFlux = new FluidMoltenFlux("Molten Flux");

    liquidFlux.setBlock(blockLiquidFlux);

    blockLiquidFlux = new BlockMoltenFlux(liquidFlux).setBlockName("moltenFlux");

    biomeNullVoid = new BiomeGenNull(nullvoidbioid);

    enterNull = new Achievement("achievement.GoToVoid", "GoToVoid", 0, 0, ingotNull, AchievementList.openInventory).registerStat().setSpecial();

    useTardis = new Achievement("achievement.UseTARDIS", "UseTARDIS", 2, 0, Blocks.lapis_block, enterNull).registerStat();

    fallVoid = new Achievement("achievement.FallVoid", "FallVoid", -3, -1, ingotVoid, enterNull).registerStat();

    nullChievements = new AchievementPage("The Null Void", enterNull, useTardis, fallVoid);

    //Loading Bauble stuff

gravityBelt = new GravityBelt().setUnlocalizedName("gravBelt");

//Fluids

FluidRegistry.registerFluid(liquidFlux);

 

//Blocks

GameRegistry.registerBlock(walker, "The Voidwalker");

GameRegistry.registerBlock(voiddoor, "Void Door");

GameRegistry.registerBlock(VoidFabric, "Void Fabric");

GameRegistry.registerBlock(NullOre, "Null Ore");

GameRegistry.registerBlock(blockLiquidFlux, "Molten Flux Block");

 

//Items

bucket = new ItemBucket(blockLiquidFlux);

GameRegistry.registerItem(bucket, "bucketFlux");

GameRegistry.registerItem(circuts, "circutsVoidFlux");

GameRegistry.registerItem(ingotVoid, "ingotVoid");

GameRegistry.registerItem(ingotNull, "ingotNull");

GameRegistry.registerItem(nullGoggles, "goggleNull");

GameRegistry.registerItem(gravityBelt, "gravityBelt");

 

//Tile entities

GameRegistry.registerTileEntity(TileEntityVoidWalker.class, "NullVoidWalker");

 

//Oredict

OreDictionary.registerOre("crystalNull", ingotNull);

OreDictionary.registerOre("oreNull", NullOre);

 

//Crafting

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 0), "RPR", "NEN", "QNQ",

'R', new ItemStack(Items.redstone),

'P', new ItemStack(Items.pumpkin_pie),

'N', "crystalNull",

'E', "dyeLime",

'Q', new ItemStack(Items.quartz)));

if (OreDictionary.getOres("ingotCopper").size() != 0 && OreDictionary.getOres("ingotElectrum").size() != 0) {

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 1), "OGO", "NCN", "RRR",

'R', new ItemStack(Items.redstone),

'G', "ingotElectrum",

'C', new ItemStack(circuts, 1, 0),

'O', "ingotCopper",

'N', "crystalNull"));

}

else if (OreDictionary.getOres("ingotCopper").size() != 0) {

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 1), "OGO", "NCN", "RRR",

'R', new ItemStack(Items.redstone),

'G', new ItemStack(Items.glowstone_dust),

'C', new ItemStack(circuts, 1, 0),

'O', "ingotCopper",

'N', "crystalNull"));

}

else{

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 1), "GGG", "NCN", "RRR",

'R', new ItemStack(Items.redstone),

'G', new ItemStack(Items.glowstone_dust),

'C', new ItemStack(circuts, 1, 0),

'N', "crystalNull"));

}

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 2), "NNN", "NCN", "NRN",

'R', new ItemStack(Blocks.redstone_block),

'N', "crystalNull",

'C', new ItemStack(circuts, 1, 1)));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 3), "REB", "NCN", "YQP",

'C', new ItemStack(circuts, 1, 2),

'N', "crystalNull",

'R', "dyeRed",

'B', "dyeCyan",

'Y', "dyeYellow",

'P', "dyePurple",

'Q', new ItemStack(Items.quartz),

'E', new ItemStack(Blocks.redstone_block)));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 4), "NNN", "RCR", "EDE",

'R', new ItemStack(Blocks.redstone_block),

'C', new ItemStack(circuts, 1, 3),

'N', "crystalNull",

'D', Blocks.diamond_block,

'E', Blocks.end_stone));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(walker), "NCN", "EDE", "NIN",

'D', new ItemStack(Blocks.diamond_block),

'C', new ItemStack(circuts, 1, 0),

'I', new ItemStack(circuts, 1, 3),

'N', "crystalNull",

'E', Blocks.end_stone));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(nullGoggles), "SCS", "GLG", "NGN",

'S', new ItemStack(Items.string),

'C', new ItemStack(circuts, 1, 4),

'N', "crystalNull",

'G', Blocks.glass_pane,

'L', Items.leather));

GameRegistry.addSmelting(NullOre, new ItemStack(ingotNull), 0.5f);

 

//GUI

new GUIHandler();

 

//Buckets

FluidContainerRegistry.registerFluidContainer(new FluidStack(liquidFlux, FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucket), new ItemStack(Items.bucket));

MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);

 

//Register Biomes

BiomeDictionary.registerBiomeType(biomeNullVoid, Type.END, Type.MAGICAL);

 

//Entities

EntityRegistry.registerModEntity(BossVoidMaster.class, "Void Master", 1, this, 80, 10, true);

 

//Register dims

DimensionManager.registerProviderType(VoidMod.NullVoidDimID, WorldProviderNullVoid.class, true);

DimensionManager.registerDimension(VoidMod.NullVoidDimID, VoidMod.NullVoidDimID);

 

//Generation

GameRegistry.registerWorldGenerator(new VoidModOreGenerator(), 100);

GameRegistry.registerWorldGenerator(new VoidModStructureGenerator(), 101);

 

//Renderers

proxy.registerRenderers();

 

//NullChievements

AchievementPage.registerAchievementPage(nullChievements);

 

//Add language

/**

LanguageRegistry.instance().addStringLocalization("itemGroup." + "The Null Void", "en_US", "The Null Void");

LanguageRegistry.addName(new ItemStack(circuts, 1, 0), "Inert Null Circuit");

LanguageRegistry.addName(new ItemStack(circuts, 1, 1), "Energized Null Circuit");

LanguageRegistry.addName(new ItemStack(circuts, 1, 2), "Destabilized Null Circuit");

LanguageRegistry.addName(new ItemStack(circuts, 1, 3), "Fluxuating Null Circuit");

LanguageRegistry.addName(new ItemStack(circuts, 1, 4), "Activated Null Circuit");

LanguageRegistry.addName(new ItemStack(bucket, 1), "Bucket of Null Flux");

LanguageRegistry.addName(new ItemStack(ingots, 1, 0), "Null Crystal");

LanguageRegistry.addName(new ItemStack(ingots, 1, 1), "Void Gem");

LanguageRegistry.addName(new ItemStack(nullGoggles), "Null Goggles");

LanguageRegistry.addName(new ItemStack(walker), "The Voidwalker");

LanguageRegistry.addName(new ItemStack(MultiBlock1, 1, 0), "Null Block");

LanguageRegistry.addName(new ItemStack(MultiBlock1, 1, 1), "Null Ore");

LanguageRegistry.addName(new ItemStack(MultiBlock1, 1, 2), "Void Ore");

LanguageRegistry.instance().addStringLocalization("achievement.GoToVoid", "en_US", "Traversed the Void");

LanguageRegistry.instance().addStringLocalization("achievement.GoToVoid.desc", "en_US", "The first step.");

LanguageRegistry.instance().addStringLocalization("achievement.UseTARDIS", "en_US", "Entered the TARDIS");

LanguageRegistry.instance().addStringLocalization("achievement.UseTARDIS.desc", "en_US", "Transedial Dimentions!");

LanguageRegistry.instance().addStringLocalization("achievement.FallVoid", "en_US", "Fell into the Void");

LanguageRegistry.instance().addStringLocalization("achievement.FallVoid.desc", "en_US", "Such die. Much nothing. Wow.");

*/

//Events

FMLCommonHandler.instance().bus().register(new TickListner());

System.out.println("Shall we traverse the void?");

    }

    @EventHandler

    public void postInit(FMLPostInitializationEvent event) {

    }

}

 

 

Link to comment
Share on other sites

VoidMod:

 

 

package aj.Java.Nullvoid;

 

import aj.Java.Nullvoid.Armor.ArmorNull;

import aj.Java.Nullvoid.Armor.GravityBelt;

import aj.Java.Nullvoid.Biome.BiomeGenNull;

import aj.Java.Nullvoid.Dimention.WorldProviderNullVoid;

import aj.Java.Nullvoid.Entity.BossVoidMaster;

import aj.Java.Nullvoid.Liquids.BucketHandler;

import aj.Java.Nullvoid.Liquids.FluidMoltenFlux;

import aj.Java.Nullvoid.block.BlockMoltenFlux;

import aj.Java.Nullvoid.block.BlockNullOre;

import aj.Java.Nullvoid.block.BlockVoidDoor;

import aj.Java.Nullvoid.block.BlockVoidFabric;

import aj.Java.Nullvoid.block.BlockVoidWalker;

import aj.Java.Nullvoid.client.GUIHandler;

import aj.Java.Nullvoid.gen.VoidModOreGenerator;

import aj.Java.Nullvoid.gen.VoidModStructureGenerator;

import aj.Java.Nullvoid.item.ItemBucket;

import aj.Java.Nullvoid.item.ItemCircut;

import aj.Java.Nullvoid.item.ItemIngotNull;

import aj.Java.Nullvoid.item.ItemIngotVoid;

import aj.Java.Nullvoid.tileentity.TileEntityVoidWalker;

import net.minecraft.block.Block;

import net.minecraft.creativetab.CreativeTabs;

import net.minecraft.init.Blocks;

import net.minecraft.init.Items;

import net.minecraft.item.Item;

import net.minecraft.item.ItemArmor.ArmorMaterial;

import net.minecraft.item.ItemStack;

import net.minecraft.stats.Achievement;

import net.minecraft.stats.AchievementList;

import net.minecraft.world.biome.BiomeGenBase;

import net.minecraftforge.common.AchievementPage;

import net.minecraftforge.common.BiomeDictionary;

import net.minecraftforge.common.BiomeDictionary.Type;

import net.minecraftforge.common.DimensionManager;

import net.minecraftforge.common.MinecraftForge;

import net.minecraftforge.common.config.Configuration;

import net.minecraftforge.fluids.Fluid;

import net.minecraftforge.fluids.FluidContainerRegistry;

import net.minecraftforge.fluids.FluidRegistry;

import net.minecraftforge.fluids.FluidStack;

import net.minecraftforge.oredict.OreDictionary;

import net.minecraftforge.oredict.ShapedOreRecipe;

import cpw.mods.fml.client.registry.RenderingRegistry;

import cpw.mods.fml.common.FMLCommonHandler;

import cpw.mods.fml.common.Mod;

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

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

import cpw.mods.fml.common.SidedProxy;

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

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

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

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

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

import net.minecraftforge.common.util.EnumHelper;

@Mod(modid = VoidMod.MODID, name="The Void", version = VoidMod.VERSION)

public class VoidMod {

public static Achievement enterNull = null;

public static Achievement useTardis = null;

public static Achievement fallVoid = null;

public static AchievementPage nullChievements = null;

public static CreativeTabs ctab = new NullVoidTab(CreativeTabs.getNextID(), "The Null Void");

public static int render = RenderingRegistry.getNextAvailableRenderId();

public static int guiWalker = 0;

public static Item circuts = null;

public static Item ingotNull = null;

public static Item ingotVoid = null;

public static Item bucket = null;

public static Block NullOre = null;

public static Block VoidFabric = null;

public static Block walker = null;

public static Block voiddoor = null;

public static int NullVoidDimID;

public static final String MODID = "nullvoid";

    public static final String VERSION = "0.0.1";

    public static Fluid liquidFlux = null;

    public static Block blockLiquidFlux = null;

    public static Item nullGoggles = null;

    public static Item voidGear = null;

    public static Item gravityBelt = null;

    public static BiomeGenBase biomeNullVoid = null;

    public static ArmorMaterial NullArmor = EnumHelper.addArmorMaterial("NullArmor", 8, new int[] { 6, 12, 10, 6 }, 30);

    @Instance(value = MODID)

    public static VoidMod me;

    @SidedProxy(clientSide="aj.Java.Nullvoid.client.ClientProxy", serverSide="aj.Java.Nullvoid.CommonProxy")

    public static CommonProxy proxy;

    @EventHandler

    public void preInit(FMLPreInitializationEvent event) {

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

    config.load();

    voiddoor = new BlockVoidDoor().setBlockName("voidDoor"); //iron

    nullGoggles = new ArmorNull(NullArmor, 0, 0).setUnlocalizedName("nullGoggles");

    voidGear = new ArmorNull(NullArmor, 0, 1).setUnlocalizedName("voidGear");

    circuts = new ItemCircut().setUnlocalizedName("circuits");

    ingotNull = new ItemIngotNull().setUnlocalizedName("ingotNull");

    ingotVoid = new ItemIngotVoid().setUnlocalizedName("ingotVoid");

    NullOre = new BlockNullOre().setBlockName("nullOre");

    VoidFabric = new BlockVoidFabric().setBlockName("voidFabric");

    walker = new BlockVoidWalker().setBlockName("voidWalker"); //iron

    NullVoidDimID = config.get(Configuration.CATEGORY_GENERAL, "Null Void Dimention ID", 42).getInt();

    liquidFlux = new FluidMoltenFlux("Molten Flux");

    liquidFlux.setBlock(blockLiquidFlux);

    blockLiquidFlux = new BlockMoltenFlux(liquidFlux).setBlockName("moltenFlux");

    gravityBelt = new GravityBelt().setUnlocalizedName("gravBelt");

bucket = new ItemBucket(blockLiquidFlux);

    biomeNullVoid = new BiomeGenNull(config.get(Configuration.CATEGORY_GENERAL, "Null Void Biome ID", 34).getInt());

    enterNull = new Achievement("achievement.GoToVoid", "GoToVoid", 0, 0, ingotNull, AchievementList.openInventory).registerStat().setSpecial();

    useTardis = new Achievement("achievement.UseTARDIS", "UseTARDIS", 2, 0, Blocks.lapis_block, enterNull).registerStat();

    fallVoid = new Achievement("achievement.FallVoid", "FallVoid", -3, -1, ingotVoid, enterNull).registerStat();

    nullChievements = new AchievementPage("The Null Void", enterNull, useTardis, fallVoid);

    config.save();

    }

    @EventHandler

    public void init(FMLInitializationEvent event)

    {

//Fluids

FluidRegistry.registerFluid(liquidFlux);

 

//Blocks

GameRegistry.registerBlock(walker, "The Voidwalker");

GameRegistry.registerBlock(voiddoor, "Void Door");

GameRegistry.registerBlock(VoidFabric, "Void Fabric");

GameRegistry.registerBlock(NullOre, "Null Ore");

GameRegistry.registerBlock(blockLiquidFlux, "Molten Flux Block");

 

//Items

GameRegistry.registerItem(bucket, "bucketFlux");

GameRegistry.registerItem(circuts, "circutsVoidFlux");

GameRegistry.registerItem(ingotVoid, "ingotVoid");

GameRegistry.registerItem(ingotNull, "ingotNull");

GameRegistry.registerItem(nullGoggles, "goggleNull");

GameRegistry.registerItem(gravityBelt, "gravityBelt");

 

//Tile entities

GameRegistry.registerTileEntity(TileEntityVoidWalker.class, "NullVoidWalker");

 

//Oredict

OreDictionary.registerOre("crystalNull", ingotNull);

OreDictionary.registerOre("oreNull", NullOre);

 

//Crafting

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 0), "RPR", "NEN", "QNQ",

'R', new ItemStack(Items.redstone),

'P', new ItemStack(Items.pumpkin_pie),

'N', "crystalNull",

'E', "dyeLime",

'Q', new ItemStack(Items.quartz)));

if (OreDictionary.getOres("ingotCopper").size() != 0 && OreDictionary.getOres("ingotElectrum").size() != 0) {

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 1), "OGO", "NCN", "RRR",

'R', new ItemStack(Items.redstone),

'G', "ingotElectrum",

'C', new ItemStack(circuts, 1, 0),

'O', "ingotCopper",

'N', "crystalNull"));

}

else if (OreDictionary.getOres("ingotCopper").size() != 0) {

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 1), "OGO", "NCN", "RRR",

'R', new ItemStack(Items.redstone),

'G', new ItemStack(Items.glowstone_dust),

'C', new ItemStack(circuts, 1, 0),

'O', "ingotCopper",

'N', "crystalNull"));

}

else{

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 1), "GGG", "NCN", "RRR",

'R', new ItemStack(Items.redstone),

'G', new ItemStack(Items.glowstone_dust),

'C', new ItemStack(circuts, 1, 0),

'N', "crystalNull"));

}

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 2), "NNN", "NCN", "NRN",

'R', new ItemStack(Blocks.redstone_block),

'N', "crystalNull",

'C', new ItemStack(circuts, 1, 1)));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 3), "REB", "NCN", "YQP",

'C', new ItemStack(circuts, 1, 2),

'N', "crystalNull",

'R', "dyeRed",

'B', "dyeCyan",

'Y', "dyeYellow",

'P', "dyePurple",

'Q', new ItemStack(Items.quartz),

'E', new ItemStack(Blocks.redstone_block)));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(circuts, 1, 4), "NNN", "RCR", "EDE",

'R', new ItemStack(Blocks.redstone_block),

'C', new ItemStack(circuts, 1, 3),

'N', "crystalNull",

'D', Blocks.diamond_block,

'E', Blocks.end_stone));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(walker), "NCN", "EDE", "NIN",

'D', new ItemStack(Blocks.diamond_block),

'C', new ItemStack(circuts, 1, 0),

'I', new ItemStack(circuts, 1, 3),

'N', "crystalNull",

'E', Blocks.end_stone));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(nullGoggles), "SCS", "GLG", "NGN",

'S', new ItemStack(Items.string),

'C', new ItemStack(circuts, 1, 4),

'N', "crystalNull",

'G', Blocks.glass_pane,

'L', Items.leather));

GameRegistry.addSmelting(NullOre, new ItemStack(ingotNull), 0.5f);

 

//GUI

new GUIHandler();

 

//Buckets

FluidContainerRegistry.registerFluidContainer(new FluidStack(liquidFlux, FluidContainerRegistry.BUCKET_VOLUME), new ItemStack(bucket), new ItemStack(Items.bucket));

MinecraftForge.EVENT_BUS.register(BucketHandler.INSTANCE);

 

//Register Biomes

BiomeDictionary.registerBiomeType(biomeNullVoid, Type.END, Type.MAGICAL);

 

//Entities

EntityRegistry.registerModEntity(BossVoidMaster.class, "Void Master", 1, this, 80, 10, true);

 

//Register dims

DimensionManager.registerProviderType(VoidMod.NullVoidDimID, WorldProviderNullVoid.class, true);

DimensionManager.registerDimension(VoidMod.NullVoidDimID, VoidMod.NullVoidDimID);

 

//Generation

GameRegistry.registerWorldGenerator(new VoidModOreGenerator(), 100);

GameRegistry.registerWorldGenerator(new VoidModStructureGenerator(), 101);

 

//Renderers

proxy.registerRenderers();

 

//NullChievements

AchievementPage.registerAchievementPage(nullChievements);

 

//Add language

/**

LanguageRegistry.instance().addStringLocalization("itemGroup." + "The Null Void", "en_US", "The Null Void");

LanguageRegistry.addName(new ItemStack(circuts, 1, 0), "Inert Null Circuit");

LanguageRegistry.addName(new ItemStack(circuts, 1, 1), "Energized Null Circuit");

LanguageRegistry.addName(new ItemStack(circuts, 1, 2), "Destabilized Null Circuit");

LanguageRegistry.addName(new ItemStack(circuts, 1, 3), "Fluxuating Null Circuit");

LanguageRegistry.addName(new ItemStack(circuts, 1, 4), "Activated Null Circuit");

LanguageRegistry.addName(new ItemStack(bucket, 1), "Bucket of Null Flux");

LanguageRegistry.addName(new ItemStack(ingots, 1, 0), "Null Crystal");

LanguageRegistry.addName(new ItemStack(ingots, 1, 1), "Void Gem");

LanguageRegistry.addName(new ItemStack(nullGoggles), "Null Goggles");

LanguageRegistry.addName(new ItemStack(walker), "The Voidwalker");

LanguageRegistry.addName(new ItemStack(MultiBlock1, 1, 0), "Null Block");

LanguageRegistry.addName(new ItemStack(MultiBlock1, 1, 1), "Null Ore");

LanguageRegistry.addName(new ItemStack(MultiBlock1, 1, 2), "Void Ore");

LanguageRegistry.instance().addStringLocalization("achievement.GoToVoid", "en_US", "Traversed the Void");

LanguageRegistry.instance().addStringLocalization("achievement.GoToVoid.desc", "en_US", "The first step.");

LanguageRegistry.instance().addStringLocalization("achievement.UseTARDIS", "en_US", "Entered the TARDIS");

LanguageRegistry.instance().addStringLocalization("achievement.UseTARDIS.desc", "en_US", "Transedial Dimentions!");

LanguageRegistry.instance().addStringLocalization("achievement.FallVoid", "en_US", "Fell into the Void");

LanguageRegistry.instance().addStringLocalization("achievement.FallVoid.desc", "en_US", "Such die. Much nothing. Wow.");

*/

//Events

FMLCommonHandler.instance().bus().register(new TickListner());

System.out.println("Shall we traverse the void?");

    }

    @EventHandler

    public void postInit(FMLPostInitializationEvent event) {

    }

}

 

 

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.



×
×
  • Create New...

Important Information

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