I am trying to make my hammer in my mod 3D. I made the module in Techne, but I don't know what I have to do next. Files Below:
Mod File:
package mymod;
import java.awt.Color;
import mymod.armor.MyArmor;
import mymod.biome.HudsonBiome;
import mymod.biome.MyBiome;
import mymod.blocks.MyBlock;
import mymod.blocks.MyBlockGen;
import mymod.entity.fourm.MyEntityFourm;
import mymod.entity.fourm.MyModelFourm;
import mymod.entity.fourm.MyRenderFourm;
import mymod.entity.zombie.MyEntityZombie;
import mymod.entity.zombie.MyRenderZombie;
import mymod.handlers.MyCraftingHandler;
import mymod.handlers.MyPickupHandler;
import mymod.items.MyFood;
import mymod.items.MyGun;
import mymod.items.MyHammer;
import mymod.items.MyHoe;
import mymod.items.MyItem;
import mymod.items.MyPickaxe;
import mymod.items.MyRenderHammer;
import mymod.items.MyShovel;
import mymod.items.MySword;
import mymod.projectiles.MyEntityProjectile;
import mymod.projectiles.MyProjectile;
import mymod.projectiles.MyRenderProjectile;
import mymod.proxies.CommonProxy;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityEggInfo;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.src.ModLoader;
import net.minecraft.stats.Achievement;
import net.minecraft.stats.AchievementList;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
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.network.NetworkMod;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
/* MOD INFO */
@Mod( modid = "mymod", name = "Corrupt Items Mod", version = "1.0")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class Main {
/* PROXY INFO */
@SidedProxy(clientSide = "mymod.proxies.ClientProxy", serverSide = "mymod.proxies.CommonProxy")
public static CommonProxy proxy;
/**
* DECLARATION SECTION
* *********************************************************** */
// DECLARE THE SWORD
public static Item MySword_1;
// DECLARE THE GUN
public static Item MyGun_1;
// DECLARE THE HAMMER
public static Item MyHammer_1;
// DECLARE THE PICKAXE
public static Item MyPickaxe_1;
// DECLARE THE PICKAXE
public static Item MyShovel_1;
// DECLARE THE HOE
public static Item MyHoe_1;
// DECLARE NEW TOOL MATERIAL
/** Harvest Level, Max Uses, Efficiency (f), Damage (f), Enchantability */
public static EnumToolMaterial MyToolMaterial = EnumHelper.addToolMaterial("Lightning", 3, 2100, 15.0F, 4.0F, 15);
// DECLARE NEW HAMMER MATERIAL
/** Harvest Level, Max Uses, Efficiency (f), Damage (f), Enchantability */
public static EnumToolMaterial MyHammerMaterial = EnumHelper.addToolMaterial("LightningH", 3, 5000, 5.0F, 14.0F, 18);
// DECLARE NEW PICKAXE MATERIAL
/** Harvest Level, Max Uses, Efficiency (f), Damage (f), Enchantability */
public static EnumToolMaterial MyPickaxeMaterial = EnumHelper.addToolMaterial("LightningP", 3, 2500, 15.0F, 3.0F, 15);
// DECLARE THE ARMOR MATERIAL
/** maxDamageFactor, damageReductionAmountArray, enchantability */
public static EnumArmorMaterial MyArmorMaterial_1 = EnumHelper.addArmorMaterial("LightningArmor", 35, new int[]{4, 9, 7, 4}, 10);
// DECLARE THE ITEM
public static Item MyItem_1;
// DECLARE THE CRAFTING ITEM
public static Item MyItem_2;
// DECLARE THE PROJECTILE
public static Item MyProjectile_1;
// DECLARE THE FOOD
public static Item MyFood_1;
// DECLARE THE BLOCK (ORE)
public static Block MyBlock_1;
// DECLARE THE BLOCK (BIOME 1 TOP BLOCK)
public static Block MyBlock_2;
// DECLARE THE BLOCK (LIGHTNINIUM BLOCK)
public static Block MyBlock_3;
// DECLARE THE ARMOR
public static Item MyHelmet_1;
public static Item MyChest_1;
public static Item MyLeggings_1;
public static Item MyBoots_1;
// DECLARE THE BIOME
public static BiomeGenBase MyBiome_1;
// DECLARE THE EXTREME BIOME
public static BiomeGenBase HudsonBiome;
// DECLARE THE MOD ID
static int MyEntityID = 300;
// SEARCH FOR UNIQUE ID
public static int getUniqueEntityId() {
do {
MyEntityID++;
}
while (EntityList.getStringFromID(MyEntityID) != null);
return MyEntityID++;
}
// DECLARE A NEW EGG
public static void registerEntityEgg(Class <? extends Entity> entity, int primaryColor, int secondaryColor) {
int id = getUniqueEntityId();
EntityList.IDtoClassMapping.put(id, entity);
EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
}
// DECLARE THE NEW ACHIEVEMENTS
public static Achievement MyAchievement_1;
public static Achievement MyAchievement_2;
public static Achievement MyAchievement_3;
// DECLARE A NEW CREATIVE TAB
public static CreativeTabs MyCreativeTab_1;
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
@EventHandler
public void preInit( FMLPreInitializationEvent event)
{
/**
* LOAD SECTION
* *********************************************************** */
// LOAD THE CREATIVE TAB
MyCreativeTab_1 = new CreativeTabs("MyCreativeTab_1") {
public ItemStack getIconItemStack() {
return new ItemStack(MyHammer_1, 1, 0); // Icon, Stack Size, Tab Position
}
};
// LOAD THE SWORD
MySword_1 = new MySword(2021, MyToolMaterial, "MySword_1").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MySword_1, "MySword_1");
LanguageRegistry.addName(MySword_1, EnumChatFormatting.AQUA + "Corrupt Sword");
// LOAD THE GUN
MyGun_1 = new MyGun(2026, MyToolMaterial, "MyGun_1").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyGun_1, "MyGun_1");
LanguageRegistry.addName(MyGun_1, EnumChatFormatting.RED + "Chemical Launcher");
// LOAD THE HAMMER
MyHammer_1 = new MyHammer(2022, MyHammerMaterial, "MyHammer_1").setFull3D().setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyHammer_1, "MyHammer_1");
LanguageRegistry.addName(MyHammer_1, EnumChatFormatting.AQUA + "Corrupt Hammer");
// LOAD THE PICKAXE
MyPickaxe_1 = new MyPickaxe(2023, MyPickaxeMaterial, "MyPickaxe_1").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyPickaxe_1, "MyPickaxe_1");
LanguageRegistry.addName(MyPickaxe_1, EnumChatFormatting.AQUA + "Corrupt Pickaxe");
// LOAD THE SPADE
MyShovel_1 = new MyShovel(2024, MyPickaxeMaterial, "MyShovel_1").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyShovel_1, "MyShovel_1");
LanguageRegistry.addName(MyShovel_1, EnumChatFormatting.BLUE + "Corrupt Shovel");
// LOAD THE HOE
MyHoe_1 = new MyHoe(2025, MyPickaxeMaterial, "MyHoe_1").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyHoe_1, "MyHoe_1");
LanguageRegistry.addName(MyHoe_1, EnumChatFormatting.BLUE + "Scythe");
// LOAD HELMET
MyHelmet_1 = new MyArmor(2060, MyArmorMaterial_1, 0, 0, "myarmor").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyHelmet_1, "MyHelmet_1");
LanguageRegistry.addName(MyHelmet_1, EnumChatFormatting.AQUA + "Corrupt Helmet");
// LOAD CHESTPLATE
MyChest_1 = new MyArmor(2061, MyArmorMaterial_1, 0, 1, "myarmor").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyChest_1, "MyChest_1");
LanguageRegistry.addName(MyChest_1, EnumChatFormatting.AQUA + "Corrupt Chestplate");
// LOAD LEGGINGS
MyLeggings_1 = new MyArmor(2062, MyArmorMaterial_1, 0, 2, "myarmor").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyLeggings_1, "MyLeggings_1");
LanguageRegistry.addName(MyLeggings_1, EnumChatFormatting.AQUA + "Corrupt Leggings");
// LOAD BOOTS
MyBoots_1 = new MyArmor(2063, MyArmorMaterial_1, 0, 3, "myarmor").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyBoots_1, "MyBoots_1");
LanguageRegistry.addName(MyBoots_1, EnumChatFormatting.AQUA + "Corrupt Boots");
// LOAD THE ITEM
MyItem_1 = new MyItem(2030, "MyItem_1").setCreativeTab(MyCreativeTab_1).setMaxStackSize(64);
GameRegistry.registerItem(MyItem_1, "MyItem_1");
LanguageRegistry.addName(MyItem_1, EnumChatFormatting.GOLD + "Lightninium Ingot");
// LOAD THE CRAFTING ITEM
MyItem_2 = new MyItem(2032, "MyItem_2").setCreativeTab(MyCreativeTab_1).setMaxStackSize(64);
GameRegistry.registerItem(MyItem_2, "MyItem_2");
LanguageRegistry.addName(MyItem_2, EnumChatFormatting.RED + "Grenade Pin");
// LOAD THE PROJECTILE
MyProjectile_1 = new MyProjectile(2031, "MyProjectile_1").setCreativeTab(MyCreativeTab_1).setMaxStackSize(32);
GameRegistry.registerItem(MyProjectile_1, "MyProjectile_1");
LanguageRegistry.addName(MyProjectile_1, EnumChatFormatting.RED + "Lightninium X");
// REGISTER THE PROJECTILE ENTITY
EntityRegistry.registerGlobalEntityID(MyEntityProjectile.class, "MyProjectile_1", 1);
EntityRegistry.registerModEntity(MyEntityProjectile.class, "MyProjectile_1", 1, this, 256, 1, true);
LanguageRegistry.instance().addStringLocalization("entity.modid.MyProjectile_1.name", "Lightninium X");
RenderingRegistry.registerEntityRenderingHandler(MyEntityProjectile.class, new MyRenderProjectile(MyProjectile_1));
// LOAD THE FOOD
/** itemID, healAmount, saturationModifier (f), isWolfsFavoriteMeat, Texture Name */
MyFood_1 = new MyFood(2040, 4, 15.0F, false, "MyFood_1").setAlwaysEdible().setPotionEffect(Potion.resistance.id, 900, 2, 1.0F).setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyFood_1, "MyFood_1");
LanguageRegistry.addName(MyFood_1, EnumChatFormatting.RED + "Corrupted Notch Apple");
// LOAD THE BLOCK ORE
MyBlock_1 = new MyBlock(250, Material.rock, "MyBlock_1").setLightValue(0.5F).setResistance(10.0F).setHardness(5.0F).setStepSound(Block.soundStoneFootstep).setCreativeTab(MyCreativeTab_1);
GameRegistry.registerBlock(MyBlock_1, "MyBlock_1");
LanguageRegistry.addName(MyBlock_1, EnumChatFormatting.GOLD + "Lightninium Ore");
MinecraftForge.setBlockHarvestLevel(MyBlock_1, "pickaxe", 3);
// LOAD THE BLOCK BIOME BLOCK
MyBlock_2 = new MyBlock(251, Material.rock, "MyBlock_2").setLightValue(0.1F).setResistance(10.0F).setHardness(5.0F).setStepSound(Block.soundStoneFootstep).setCreativeTab(MyCreativeTab_1);
GameRegistry.registerBlock(MyBlock_2, "MyBlock_2");
LanguageRegistry.addName(MyBlock_2, EnumChatFormatting.RED + "Corrupt Stone");
MinecraftForge.setBlockHarvestLevel(MyBlock_2, "pickaxe", 0);
// LOAD THE LIGHTNINIUM BLOCK
MyBlock_3 = new MyBlock(252, Material.rock, "MyBlock_3").setLightValue(0.8F).setResistance(20.0F).setHardness(5.0F).setStepSound(Block.soundStoneFootstep).setCreativeTab(MyCreativeTab_1);
GameRegistry.registerBlock(MyBlock_3, "MyBlock_3");
LanguageRegistry.addName(MyBlock_3, EnumChatFormatting.GOLD + "Lightninium Block");
MinecraftForge.setBlockHarvestLevel(MyBlock_3, "pickaxe", 2);
// LOAD BIOME
MyBiome_1 = new MyBiome(30);
GameRegistry.addBiome(MyBiome_1);
// LOAD EXTREME BIOME
HudsonBiome = new HudsonBiome(31);
GameRegistry.addBiome(HudsonBiome);
// REMOVE OTHER BIOMES
/**
GameRegistry.removeBiome(BiomeGenBase.beach);
GameRegistry.removeBiome(BiomeGenBase.desert);
GameRegistry.removeBiome(BiomeGenBase.desertHills);
GameRegistry.removeBiome(BiomeGenBase.desertHills);
GameRegistry.removeBiome(BiomeGenBase.extremeHills);
GameRegistry.removeBiome(BiomeGenBase.extremeHillsEdge);
GameRegistry.removeBiome(BiomeGenBase.forest);
GameRegistry.removeBiome(BiomeGenBase.forestHills);
GameRegistry.removeBiome(BiomeGenBase.frozenOcean);
GameRegistry.removeBiome(BiomeGenBase.frozenRiver);
GameRegistry.removeBiome(BiomeGenBase.iceMountains);
GameRegistry.removeBiome(BiomeGenBase.icePlains);
GameRegistry.removeBiome(BiomeGenBase.jungle);
GameRegistry.removeBiome(BiomeGenBase.jungleHills);
GameRegistry.removeBiome(BiomeGenBase.mushroomIsland);
GameRegistry.removeBiome(BiomeGenBase.ocean);
GameRegistry.removeBiome(BiomeGenBase.plains);
GameRegistry.removeBiome(BiomeGenBase.river);
GameRegistry.removeBiome(BiomeGenBase.swampland);
GameRegistry.removeBiome(BiomeGenBase.taiga);
GameRegistry.removeBiome(BiomeGenBase.taigaHills);
*/
// REGISTER YOUR ENTITY
EntityRegistry.registerGlobalEntityID(MyEntityZombie.class, "Corrupt Zombie", EntityRegistry.findGlobalUniqueEntityId());
EntityRegistry.addSpawn(MyEntityZombie.class, 30, 10, 20, EnumCreatureType.monster, MyBiome_1);
EntityRegistry.addSpawn(MyEntityZombie.class, 30, 10, 20, EnumCreatureType.monster, HudsonBiome);
registerEntityEgg(MyEntityZombie.class, (new Color(51, 39, 57)).getRGB(), (new Color(86, 29, 28)).getRGB());
RenderingRegistry.registerEntityRenderingHandler(MyEntityZombie.class, new MyRenderZombie());
ModLoader.addLocalization("entity.Corrupt Zombie.name", "Corrupt Zombie");
// REGISTER YOUR ENTITY
EntityRegistry.registerGlobalEntityID(MyEntityFourm.class, "Extremely Corrupt Zombie", EntityRegistry.findGlobalUniqueEntityId());
EntityRegistry.addSpawn(MyEntityFourm.class, 10, 1, 5, EnumCreatureType.monster, HudsonBiome);
registerEntityEgg(MyEntityFourm.class, (new Color(51, 39, 57)).getRGB(), (new Color(86, 29, 28)).getRGB());
RenderingRegistry.registerEntityRenderingHandler(MyEntityFourm.class, new MyRenderFourm(new MyModelFourm(), 0.3F));
ModLoader.addLocalization("entity.Extremely Corrupt Zombie.name", "Extremely Corrupt Zombie");
// LOAD THE ACHIEVEMENTS
MyAchievement_1 = new Achievement(2001, "MyAchievement_1", -2, 2, MyBlock_1, AchievementList.diamonds).registerAchievement();
MyAchievement_2 = new Achievement(2002, "MyAchievement_2", -3, -1, MyItem_1, MyAchievement_1).registerAchievement();
MyAchievement_3 = new Achievement(2003, "MyAchievement_3", -5, -1, MyHammer_1, MyAchievement_2).registerAchievement();
// (id, "NameOfAchievement", x, y coordinates on Achievement map, icon, Required Achievement to unlock)
// For no Pre-required achievement, use "(Achievement)null"
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
}
@EventHandler
public static void init( FMLInitializationEvent event )
{
/**
* RECIPES SECTION
* *********************************************************** */
// SWORD RECIPE
GameRegistry.addRecipe(new ItemStack(MySword_1, 1), new Object[]
{
" L",
"RL ",
"IR ",
'L', MyItem_1,
'I', Item.ingotIron,
'R', Item.redstone,
});
// HAMMER RECIPE
GameRegistry.addRecipe(new ItemStack(MyHammer_1, 1), new Object[]
{
"LLL",
"LEL",
" I ",
'L', MyItem_1,
'I', Item.ingotIron,
'E', MyBlock_3,
});
// PICKAXE RECIPE
GameRegistry.addRecipe(new ItemStack(MyPickaxe_1, 1), new Object[]
{
"LLL",
" R ",
" I ",
'I', Item.ingotIron,
'L', MyItem_1,
'R', Item.redstone,
});
// SHOVEL RECIPE
GameRegistry.addRecipe(new ItemStack(MyShovel_1, 1), new Object[]
{
"L",
"R",
"I",
'I', Item.ingotIron,
'L', MyItem_1,
'R', Item.redstone,
});
// HOE RECIPE
GameRegistry.addRecipe(new ItemStack(MyHoe_1, 1), new Object[]
{
"LL",
" S",
" S",
'S', Item.stick,
'L', MyItem_1,
});
// LAUNCHER RECIPE
GameRegistry.addRecipe(new ItemStack(MyGun_1, 1), new Object[]
{
"MII",
"I ",
'I', Item.ingotIron,
'M', MyItem_1,
});
// BLOCK RECIPE
GameRegistry.addRecipe(new ItemStack(MyBlock_3, 1), new Object[]
{
"III",
"III",
"III",
'I', MyItem_1,
});
// CRAFTING ITEM RECIPE
GameRegistry.addRecipe(new ItemStack(MyItem_2, 2), new Object[]
{
"II",
"I ",
'I', Item.ingotIron,
});
// PROJECTILE RECIPE
GameRegistry.addRecipe(new ItemStack(MyProjectile_1, 4), new Object[]
{
" IP",
"IBI",
" I ",
'I', MyItem_1,
'B', Block.tnt,
'P', MyItem_2,
});
// FOOD RECIPE
GameRegistry.addRecipe(new ItemStack(MyFood_1, 1), new Object[]
{
"BBB",
"BAB",
"BBB",
'A', Item.appleRed,
'B', MyItem_1,
});
// SMELTING RECIPE
GameRegistry.addSmelting(MyBlock_1.blockID, (new ItemStack(MyItem_1, 1)), 50);
// LIGHTNINIUM INGOT RECIPIE
GameRegistry.addRecipe(new ItemStack(MyItem_1, 9), new Object[]
{
"L",
'L', MyBlock_3,
});
// HELMET RECIPE
GameRegistry.addRecipe(new ItemStack(MyHelmet_1, 1), new Object[]
{
"XRX",
"X X",
'X', MyItem_1,
'R', Item.redstone,
});
// CHESTPLATE RECIPE
GameRegistry.addRecipe(new ItemStack(MyChest_1, 1), new Object[]
{
"X X",
"XEX",
"XXX",
'X', MyItem_1,
'E', Item.emerald,
});
// LEGGINGS RECIPE
GameRegistry.addRecipe(new ItemStack(MyLeggings_1, 1), new Object[]
{
"XRX",
"X X",
"X X",
'X', MyItem_1,
'R', Item.redstone,
});
// BOOTS RECIPE
GameRegistry.addRecipe(new ItemStack(MyBoots_1, 1), new Object[]
{
"X X",
"D D",
'X', MyItem_1,
'D', Item.diamond,
});
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
/**
* EXTRA METHODS SECTION
* *********************************************************** */
// REGISTER THE ORE GENERATION
GameRegistry.registerWorldGenerator(new MyBlockGen());
// CHANGE THE TEXT OF THE ACHIEVEMENT
LanguageRegistry.instance().addStringLocalization("achievement.MyAchievement_1", "en_US", "A " + EnumChatFormatting.ITALIC + "Shocking " + EnumChatFormatting.RESET + "Discovery");
LanguageRegistry.instance().addStringLocalization("achievement.MyAchievement_1.desc", "en_US", "Mine Lightninium Ore With A Diamond Pickaxe");
LanguageRegistry.instance().addStringLocalization("achievement.MyAchievement_2", "en_US", "Pro Smelter");
LanguageRegistry.instance().addStringLocalization("achievement.MyAchievement_2.desc", "en_US", "Smelt Lightninium Ore In A Furnace");
LanguageRegistry.instance().addStringLocalization("achievement.MyAchievement_3", "en_US", "DA POWWERRRR!!!");
LanguageRegistry.instance().addStringLocalization("achievement.MyAchievement_3.desc", "en_US", "Craft The Corrupt Hammer");
// REGISTER PICKUP HANDLER
MyPickupHandler MyPickupHandler_1 = new MyPickupHandler();
GameRegistry.registerPickupHandler(MyPickupHandler_1);
// REGISTER CRAFTING HANDLER
MyCraftingHandler MyCraftingHandler_1 = new MyCraftingHandler();
GameRegistry.registerCraftingHandler(MyCraftingHandler_1);
// CHANGE TAB NAME
LanguageRegistry.instance().addStringLocalization("itemGroup.MyCreativeTab_1", "en_US", EnumChatFormatting.RED + "Corrupt Items Mod");
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
}
@EventHandler
public static void postInit( FMLPostInitializationEvent event )
{
}
}
Hammer File:
package mymod.items;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLPreInitializationEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import mymod.proxies.ClientProxy;
import mymod.proxies.CommonProxy;
import net.minecraft.client.model.ModelRenderer;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.enchantment.Enchantment;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.entity.effect.EntityLightningBolt;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
public class MyHammer extends ItemPickaxe {
private String texturePath = "mymod:";
public MyHammer(int ItemID, EnumToolMaterial material, String textureName)
{
super(ItemID, material);
this.setUnlocalizedName(textureName);
texturePath += textureName;
}
@Override
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister iconRegister)
{
this.itemIcon = iconRegister.registerIcon(texturePath);
}
/** Creates an Explosive lightning bolt that
* sends the target flying through the air and sets it on fire */
public boolean hitEntity(ItemStack item, EntityLivingBase target, EntityLivingBase player)
{
/** Creates an Explosion */
target.worldObj.createExplosion(target, target.posX, target.posY, target.posZ, 0.01F, true); // The size of the explosion
/** Summons a Lightning Bolt */
// target.worldObj.addWeatherEffect(new EntityLightningBolt(target.worldObj, target.posX, target.posY, target.posZ));
/** Sends the target flying through the air */
target.addVelocity(0, 0.4, 0.2); // The middle number is the upwards velocity
/** Sets the target on Fire */
// target.setFire(10); // The number of ticks it will be on fire
return true;
}
/** Makes your Item Enchanted when it is crafted */
public void onCreated(ItemStack item, World world, EntityPlayer player)
{
item.addEnchantment(Enchantment.efficiency, 5);
// Replace the "." after "Enchantment" to see options
// The number is the Enchantment Level
}
public static void render(Entity entity, float f, float g, float h, float i,
float j, float k) {
// TODO Auto-generated method stub
}
}
Using [code] [/code] tags for each file or putting your code on a paste site like Gist (or linking to your actual repository if it's open source) will make it a lot easier to read.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
k. but can someone plz tell me why my 3D hammer isn't 3D? And how do I do it? The link Void Walker gave me doesn't work. plz help. mod is in 1.6.4.
what do I put in the @mod file?
package mymod;
import java.awt.Color;
import mymod.armor.MyArmor;
import mymod.biome.HudsonBiome;
import mymod.biome.MyBiome;
import mymod.blocks.MyBlock;
import mymod.blocks.MyBlockGen;
import mymod.entity.cow.MyEntityCow;
import mymod.entity.cow.MyModelCow;
import mymod.entity.cow.MyRenderCow;
import mymod.entity.fourm.MyEntityFourm;
import mymod.entity.fourm.MyModelFourm;
import mymod.entity.fourm.MyRenderFourm;
import mymod.entity.zombie.MyEntityZombie;
import mymod.entity.zombie.MyRenderZombie;
import mymod.handlers.MyCraftingHandler;
import mymod.handlers.MyPickupHandler;
import mymod.items.MyFood;
import mymod.items.MyGun;
import mymod.items.MyHammer;
import mymod.items.MyHoe;
import mymod.items.MyItem;
import mymod.items.MyPickaxe;
import mymod.items.MyRenderHammer;
import mymod.items.MyShovel;
import mymod.items.MySword;
import mymod.projectiles.MyEntityProjectile;
import mymod.projectiles.MyProjectile;
import mymod.projectiles.MyRenderProjectile;
import mymod.proxies.CommonProxy;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityEggInfo;
import net.minecraft.entity.EntityList;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.Potion;
import net.minecraft.src.ModLoader;
import net.minecraft.stats.Achievement;
import net.minecraft.stats.AchievementList;
import net.minecraft.util.EnumChatFormatting;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraftforge.client.MinecraftForgeClient;
import net.minecraftforge.common.EnumHelper;
import net.minecraftforge.common.MinecraftForge;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.EventHandler;
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.network.NetworkMod;
import cpw.mods.fml.common.registry.EntityRegistry;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
/* MOD INFO */
@Mod( modid = "mymod", name = "Corrupt Items Mod", version = "0.4")
@NetworkMod(clientSideRequired=true, serverSideRequired=false)
public class Main {
/* PROXY INFO */
@SidedProxy(clientSide = "mymod.proxies.ClientProxy", serverSide = "mymod.proxies.CommonProxy")
public static CommonProxy proxy;
/**
* DECLARATION SECTION
* *********************************************************** */
// DECLARE THE SWORD
public static Item MySword_1;
// DECLARE THE GUN
public static Item MyGun_1;
// DECLARE THE HAMMER
public static Item MyHammer_1;
// DECLARE THE PICKAXE
public static Item MyPickaxe_1;
// DECLARE THE PICKAXE
public static Item MyShovel_1;
// DECLARE THE HOE
public static Item MyHoe_1;
// DECLARE NEW TOOL MATERIAL
/** Harvest Level, Max Uses, Efficiency (f), Damage (f), Enchantability */
public static EnumToolMaterial MyToolMaterial = EnumHelper.addToolMaterial("Lightning", 3, 2100, 15.0F, 4.0F, 15);
// DECLARE NEW HAMMER MATERIAL
/** Harvest Level, Max Uses, Efficiency (f), Damage (f), Enchantability */
public static EnumToolMaterial MyHammerMaterial = EnumHelper.addToolMaterial("LightningH", 3, 5000, 5.0F, 14.0F, 18);
// DECLARE NEW PICKAXE MATERIAL
/** Harvest Level, Max Uses, Efficiency (f), Damage (f), Enchantability */
public static EnumToolMaterial MyPickaxeMaterial = EnumHelper.addToolMaterial("LightningP", 3, 2500, 15.0F, 3.0F, 15);
// DECLARE THE ARMOR MATERIAL
/** maxDamageFactor, damageReductionAmountArray, enchantability */
public static EnumArmorMaterial MyArmorMaterial_1 = EnumHelper.addArmorMaterial("LightningArmor", 35, new int[]{4, 9, 7, 4}, 10);
// DECLARE THE ITEM
public static Item MyItem_1;
// DECLARE THE CRAFTING ITEM
public static Item MyItem_2;
// DECLARE THE PROJECTILE
public static Item MyProjectile_1;
// DECLARE THE FOOD
public static Item MyFood_1;
// DECLARE THE BLOCK (ORE)
public static Block MyBlock_1;
// DECLARE THE BLOCK (BIOME 1 TOP BLOCK)
public static Block MyBlock_2;
// DECLARE THE BLOCK (LIGHTNINIUM BLOCK)
public static Block MyBlock_3;
// DECLARE THE ARMOR
public static Item MyHelmet_1;
public static Item MyChest_1;
public static Item MyLeggings_1;
public static Item MyBoots_1;
// DECLARE THE BIOME
public static BiomeGenBase MyBiome_1;
// DECLARE THE EXTREME BIOME
public static BiomeGenBase HudsonBiome;
// DECLARE THE MOD ID
static int MyEntityID = 300;
// SEARCH FOR UNIQUE ID
public static int getUniqueEntityId() {
do {
MyEntityID++;
}
while (EntityList.getStringFromID(MyEntityID) != null);
return MyEntityID++;
}
// DECLARE A NEW EGG
public static void registerEntityEgg(Class <? extends Entity> entity, int primaryColor, int secondaryColor) {
int id = getUniqueEntityId();
EntityList.IDtoClassMapping.put(id, entity);
EntityList.entityEggs.put(id, new EntityEggInfo(id, primaryColor, secondaryColor));
}
// DECLARE THE NEW ACHIEVEMENTS
public static Achievement MyAchievement_1;
public static Achievement MyAchievement_2;
public static Achievement MyAchievement_3;
// DECLARE A NEW CREATIVE TAB
public static CreativeTabs MyCreativeTab_1;
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
@EventHandler
public void preInit( FMLPreInitializationEvent event)
{
/**
* LOAD SECTION
* *********************************************************** */
// LOAD THE CREATIVE TAB
MyCreativeTab_1 = new CreativeTabs("MyCreativeTab_1") {
public ItemStack getIconItemStack() {
return new ItemStack(MyHammer_1, 1, 0); // Icon, Stack Size, Tab Position
}
};
// LOAD THE SWORD
MySword_1 = new MySword(2021, MyToolMaterial, "MySword_1").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MySword_1, "MySword_1");
LanguageRegistry.addName(MySword_1, EnumChatFormatting.AQUA + "Corrupt Sword");
// LOAD THE GUN
MyGun_1 = new MyGun(2026, MyToolMaterial, "MyGun_1").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyGun_1, "MyGun_1");
LanguageRegistry.addName(MyGun_1, EnumChatFormatting.RED + "Chemical Launcher");
// LOAD THE HAMMER
MyHammer_1 = new MyHammer(2022, MyHammerMaterial, "MyHammer_1").setFull3D().setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyHammer_1, "MyHammer_1");
LanguageRegistry.addName(MyHammer_1, EnumChatFormatting.AQUA + "Corrupt Hammer");
// LOAD THE PICKAXE
MyPickaxe_1 = new MyPickaxe(2023, MyPickaxeMaterial, "MyPickaxe_1").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyPickaxe_1, "MyPickaxe_1");
LanguageRegistry.addName(MyPickaxe_1, EnumChatFormatting.AQUA + "Corrupt Pickaxe");
// LOAD THE SPADE
MyShovel_1 = new MyShovel(2024, MyPickaxeMaterial, "MyShovel_1").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyShovel_1, "MyShovel_1");
LanguageRegistry.addName(MyShovel_1, EnumChatFormatting.BLUE + "Corrupt Shovel");
// LOAD THE HOE
MyHoe_1 = new MyHoe(2025, MyPickaxeMaterial, "MyHoe_1").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyHoe_1, "MyHoe_1");
LanguageRegistry.addName(MyHoe_1, EnumChatFormatting.BLUE + "Scythe");
// LOAD HELMET
MyHelmet_1 = new MyArmor(2060, MyArmorMaterial_1, 0, 0, "myarmor").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyHelmet_1, "MyHelmet_1");
LanguageRegistry.addName(MyHelmet_1, EnumChatFormatting.AQUA + "Corrupt Helmet");
// LOAD CHESTPLATE
MyChest_1 = new MyArmor(2061, MyArmorMaterial_1, 0, 1, "myarmor").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyChest_1, "MyChest_1");
LanguageRegistry.addName(MyChest_1, EnumChatFormatting.AQUA + "Corrupt Chestplate");
// LOAD LEGGINGS
MyLeggings_1 = new MyArmor(2062, MyArmorMaterial_1, 0, 2, "myarmor").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyLeggings_1, "MyLeggings_1");
LanguageRegistry.addName(MyLeggings_1, EnumChatFormatting.AQUA + "Corrupt Leggings");
// LOAD BOOTS
MyBoots_1 = new MyArmor(2063, MyArmorMaterial_1, 0, 3, "myarmor").setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyBoots_1, "MyBoots_1");
LanguageRegistry.addName(MyBoots_1, EnumChatFormatting.AQUA + "Corrupt Boots");
// LOAD THE ITEM
MyItem_1 = new MyItem(2030, "MyItem_1").setCreativeTab(MyCreativeTab_1).setMaxStackSize(64);
GameRegistry.registerItem(MyItem_1, "MyItem_1");
LanguageRegistry.addName(MyItem_1, EnumChatFormatting.GOLD + "Lightninium Ingot");
// LOAD THE CRAFTING ITEM
MyItem_2 = new MyItem(2032, "MyItem_2").setCreativeTab(MyCreativeTab_1).setMaxStackSize(64);
GameRegistry.registerItem(MyItem_2, "MyItem_2");
LanguageRegistry.addName(MyItem_2, EnumChatFormatting.RED + "Grenade Pin");
// LOAD THE PROJECTILE
MyProjectile_1 = new MyProjectile(2031, "MyProjectile_1").setCreativeTab(MyCreativeTab_1).setMaxStackSize(32);
GameRegistry.registerItem(MyProjectile_1, "MyProjectile_1");
LanguageRegistry.addName(MyProjectile_1, EnumChatFormatting.RED + "Lightninium X");
// REGISTER THE PROJECTILE ENTITY
EntityRegistry.registerGlobalEntityID(MyEntityProjectile.class, "MyProjectile_1", 1);
EntityRegistry.registerModEntity(MyEntityProjectile.class, "MyProjectile_1", 1, this, 256, 1, true);
LanguageRegistry.instance().addStringLocalization("entity.modid.MyProjectile_1.name", "Lightninium X");
RenderingRegistry.registerEntityRenderingHandler(MyEntityProjectile.class, new MyRenderProjectile(MyProjectile_1));
// LOAD THE FOOD
/** itemID, healAmount, saturationModifier (f), isWolfsFavoriteMeat, Texture Name */
MyFood_1 = new MyFood(2040, 4, 15.0F, false, "MyFood_1").setAlwaysEdible().setPotionEffect(Potion.resistance.id, 900, 2, 1.0F).setCreativeTab(MyCreativeTab_1);
GameRegistry.registerItem(MyFood_1, "MyFood_1");
LanguageRegistry.addName(MyFood_1, EnumChatFormatting.RED + "Corrupted Notch Apple");
// LOAD THE BLOCK ORE
MyBlock_1 = new MyBlock(250, Material.rock, "MyBlock_1").setLightValue(0.5F).setResistance(10.0F).setHardness(5.0F).setStepSound(Block.soundStoneFootstep).setCreativeTab(MyCreativeTab_1);
GameRegistry.registerBlock(MyBlock_1, "MyBlock_1");
LanguageRegistry.addName(MyBlock_1, EnumChatFormatting.GOLD + "Lightninium Ore");
MinecraftForge.setBlockHarvestLevel(MyBlock_1, "pickaxe", 3);
// LOAD THE BLOCK BIOME BLOCK
MyBlock_2 = new MyBlock(251, Material.rock, "MyBlock_2").setLightValue(0.1F).setResistance(10.0F).setHardness(5.0F).setStepSound(Block.soundStoneFootstep).setCreativeTab(MyCreativeTab_1);
GameRegistry.registerBlock(MyBlock_2, "MyBlock_2");
LanguageRegistry.addName(MyBlock_2, EnumChatFormatting.RED + "Corrupt Stone");
MinecraftForge.setBlockHarvestLevel(MyBlock_2, "pickaxe", 0);
// LOAD THE LIGHTNINIUM BLOCK
MyBlock_3 = new MyBlock(252, Material.rock, "MyBlock_3").setLightValue(0.8F).setResistance(20.0F).setHardness(5.0F).setStepSound(Block.soundStoneFootstep).setCreativeTab(MyCreativeTab_1);
GameRegistry.registerBlock(MyBlock_3, "MyBlock_3");
LanguageRegistry.addName(MyBlock_3, EnumChatFormatting.GOLD + "Lightninium Block");
MinecraftForge.setBlockHarvestLevel(MyBlock_3, "pickaxe", 2);
// LOAD BIOME
MyBiome_1 = new MyBiome(30);
GameRegistry.addBiome(MyBiome_1);
// LOAD EXTREME BIOME
HudsonBiome = new HudsonBiome(31);
GameRegistry.addBiome(HudsonBiome);
// REMOVE OTHER BIOMES
/**
GameRegistry.removeBiome(BiomeGenBase.beach);
GameRegistry.removeBiome(BiomeGenBase.desert);
GameRegistry.removeBiome(BiomeGenBase.desertHills);
GameRegistry.removeBiome(BiomeGenBase.desertHills);
GameRegistry.removeBiome(BiomeGenBase.extremeHills);
GameRegistry.removeBiome(BiomeGenBase.extremeHillsEdge);
GameRegistry.removeBiome(BiomeGenBase.forest);
GameRegistry.removeBiome(BiomeGenBase.forestHills);
GameRegistry.removeBiome(BiomeGenBase.frozenOcean);
GameRegistry.removeBiome(BiomeGenBase.frozenRiver);
GameRegistry.removeBiome(BiomeGenBase.iceMountains);
GameRegistry.removeBiome(BiomeGenBase.icePlains);
GameRegistry.removeBiome(BiomeGenBase.jungle);
GameRegistry.removeBiome(BiomeGenBase.jungleHills);
GameRegistry.removeBiome(BiomeGenBase.mushroomIsland);
GameRegistry.removeBiome(BiomeGenBase.ocean);
GameRegistry.removeBiome(BiomeGenBase.plains);
GameRegistry.removeBiome(BiomeGenBase.river);
GameRegistry.removeBiome(BiomeGenBase.swampland);
GameRegistry.removeBiome(BiomeGenBase.taiga);
GameRegistry.removeBiome(BiomeGenBase.taigaHills);
*/
// REGISTER YOUR ENTITY
EntityRegistry.registerGlobalEntityID(MyEntityZombie.class, "Corrupt Zombie", EntityRegistry.findGlobalUniqueEntityId());
EntityRegistry.addSpawn(MyEntityZombie.class, 30, 10, 20, EnumCreatureType.monster, MyBiome_1);
EntityRegistry.addSpawn(MyEntityZombie.class, 30, 10, 20, EnumCreatureType.monster, HudsonBiome);
registerEntityEgg(MyEntityZombie.class, (new Color(51, 39, 57)).getRGB(), (new Color(86, 29, 28)).getRGB());
RenderingRegistry.registerEntityRenderingHandler(MyEntityZombie.class, new MyRenderZombie());
ModLoader.addLocalization("entity.Corrupt Zombie.name", "Corrupt Zombie");
// REGISTER YOUR ENTITY
EntityRegistry.registerGlobalEntityID(MyEntityFourm.class, "Extremely Corrupt Zombie", EntityRegistry.findGlobalUniqueEntityId());
EntityRegistry.addSpawn(MyEntityFourm.class, 10, 1, 5, EnumCreatureType.monster, HudsonBiome);
registerEntityEgg(MyEntityFourm.class, (new Color(51, 39, 57)).getRGB(), (new Color(86, 29, 28)).getRGB());
RenderingRegistry.registerEntityRenderingHandler(MyEntityFourm.class, new MyRenderFourm(new MyModelFourm(), 0.3F));
ModLoader.addLocalization("entity.Extremely Corrupt Zombie.name", "Extremely Corrupt Zombie");
// REGISTER HAMMER MODEL
EntityRegistry.registerGlobalEntityID(MyEntityCow.class, "Hammer Model", EntityRegistry.findGlobalUniqueEntityId());
registerEntityEgg(MyEntityCow.class, (new Color(0, 255, 0)).getRGB(), (new Color(255, 0, 0)).getRGB());
RenderingRegistry.registerEntityRenderingHandler(MyEntityCow.class, new MyRenderCow(new MyModelCow(), 0.3F));
ModLoader.addLocalization("entity.Hammer Model.name", "Hammer Model");
// LOAD THE ACHIEVEMENTS
MyAchievement_1 = new Achievement(2001, "MyAchievement_1", -2, 2, MyBlock_1, AchievementList.diamonds).registerAchievement();
MyAchievement_2 = new Achievement(2002, "MyAchievement_2", -3, -1, MyItem_1, MyAchievement_1).registerAchievement();
MyAchievement_3 = new Achievement(2003, "MyAchievement_3", -5, -1, MyHammer_1, MyAchievement_2).registerAchievement();
// (id, "NameOfAchievement", x, y coordinates on Achievement map, icon, Required Achievement to unlock)
// For no Pre-required achievement, use "(Achievement)null"
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
}
@EventHandler
public static void init( FMLInitializationEvent event )
{
/**
* RECIPES SECTION
* *********************************************************** */
// SWORD RECIPE
GameRegistry.addRecipe(new ItemStack(MySword_1, 1), new Object[]
{
" L",
"RL ",
"IR ",
'L', MyItem_1,
'I', Item.ingotIron,
'R', Item.redstone,
});
// HAMMER RECIPE
GameRegistry.addRecipe(new ItemStack(MyHammer_1, 1), new Object[]
{
"LLL",
"LEL",
" I ",
'L', MyItem_1,
'I', Item.ingotIron,
'E', MyBlock_3,
});
// PICKAXE RECIPE
GameRegistry.addRecipe(new ItemStack(MyPickaxe_1, 1), new Object[]
{
"LLL",
" R ",
" I ",
'I', Item.ingotIron,
'L', MyItem_1,
'R', Item.redstone,
});
// SHOVEL RECIPE
GameRegistry.addRecipe(new ItemStack(MyShovel_1, 1), new Object[]
{
"L",
"R",
"I",
'I', Item.ingotIron,
'L', MyItem_1,
'R', Item.redstone,
});
// HOE RECIPE
GameRegistry.addRecipe(new ItemStack(MyHoe_1, 1), new Object[]
{
"LL",
" S",
" S",
'S', Item.stick,
'L', MyItem_1,
});
// LAUNCHER RECIPE
GameRegistry.addRecipe(new ItemStack(MyGun_1, 1), new Object[]
{
"MII",
"I ",
'I', Item.ingotIron,
'M', MyItem_1,
});
// BLOCK RECIPE
GameRegistry.addRecipe(new ItemStack(MyBlock_3, 1), new Object[]
{
"III",
"III",
"III",
'I', MyItem_1,
});
// CRAFTING ITEM RECIPE
GameRegistry.addRecipe(new ItemStack(MyItem_2, 2), new Object[]
{
"II",
"I ",
'I', Item.ingotIron,
});
// PROJECTILE RECIPE
GameRegistry.addRecipe(new ItemStack(MyProjectile_1, 4), new Object[]
{
" IP",
"IBI",
" I ",
'I', MyItem_1,
'B', Block.tnt,
'P', MyItem_2,
});
// FOOD RECIPE
GameRegistry.addRecipe(new ItemStack(MyFood_1, 1), new Object[]
{
"BBB",
"BAB",
"BBB",
'A', Item.appleRed,
'B', MyItem_1,
});
// SMELTING RECIPE
GameRegistry.addSmelting(MyBlock_1.blockID, (new ItemStack(MyItem_1, 1)), 50);
// LIGHTNINIUM INGOT RECIPIE
GameRegistry.addRecipe(new ItemStack(MyItem_1, 9), new Object[]
{
"L",
'L', MyBlock_3,
});
// HELMET RECIPE
GameRegistry.addRecipe(new ItemStack(MyHelmet_1, 1), new Object[]
{
"XRX",
"X X",
'X', MyItem_1,
'R', Item.redstone,
});
// CHESTPLATE RECIPE
GameRegistry.addRecipe(new ItemStack(MyChest_1, 1), new Object[]
{
"X X",
"XEX",
"XXX",
'X', MyItem_1,
'E', Item.emerald,
});
// LEGGINGS RECIPE
GameRegistry.addRecipe(new ItemStack(MyLeggings_1, 1), new Object[]
{
"XRX",
"X X",
"X X",
'X', MyItem_1,
'R', Item.redstone,
});
// BOOTS RECIPE
GameRegistry.addRecipe(new ItemStack(MyBoots_1, 1), new Object[]
{
"X X",
"D D",
'X', MyItem_1,
'D', Item.diamond,
});
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
/**
* EXTRA METHODS SECTION
* *********************************************************** */
// REGISTER THE ORE GENERATION
GameRegistry.registerWorldGenerator(new MyBlockGen());
// CHANGE THE TEXT OF THE ACHIEVEMENT
LanguageRegistry.instance().addStringLocalization("achievement.MyAchievement_1", "en_US", "A " + EnumChatFormatting.ITALIC + "Shocking " + EnumChatFormatting.RESET + "Discovery");
LanguageRegistry.instance().addStringLocalization("achievement.MyAchievement_1.desc", "en_US", "Mine Lightninium Ore With A Diamond Pickaxe");
LanguageRegistry.instance().addStringLocalization("achievement.MyAchievement_2", "en_US", "Pro Smelter");
LanguageRegistry.instance().addStringLocalization("achievement.MyAchievement_2.desc", "en_US", "Smelt Lightninium Ore In A Furnace");
LanguageRegistry.instance().addStringLocalization("achievement.MyAchievement_3", "en_US", "DA POWWERRRR!!!");
LanguageRegistry.instance().addStringLocalization("achievement.MyAchievement_3.desc", "en_US", "Craft The Corrupt Hammer");
// REGISTER PICKUP HANDLER
MyPickupHandler MyPickupHandler_1 = new MyPickupHandler();
GameRegistry.registerPickupHandler(MyPickupHandler_1);
// REGISTER CRAFTING HANDLER
MyCraftingHandler MyCraftingHandler_1 = new MyCraftingHandler();
GameRegistry.registerCraftingHandler(MyCraftingHandler_1);
// CHANGE TAB NAME
LanguageRegistry.instance().addStringLocalization("itemGroup.MyCreativeTab_1", "en_US", EnumChatFormatting.RED + "Corrupt Items Mod");
/* ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ */
}
@EventHandler
public static void postInit( FMLPostInitializationEvent event )
{
}
}
Dear god my eyes. That is some of the messiest code I have ever seen. You're only using one class and it looks terrible. As for you question, maybe you could describe how the link didn't work?
Please watch all of the videos in those playlists from Vswe before you begin Wuppy's tutorials. If you think the videos are too long, then TOO BAD. Java is complex and learning it cannot be done in 5 minutes. No one will want to help you unless you have tried to help yourself.
In my origimal post, I pasted 4 files. It was actually a lot better looking, but the way I had it layed out was messed up when I pasted it into this thread.
Oops. Wrong account. LOL
Edit: minecraft runs fine when I test it. It's just the item is still 2D
Can you just help me? It's annoying when people say your code is messy when I'm not asking if my code is messy or not. Please just tell me how to do this in 1.6.4.
And I do not use MCreator.
It's obviously messy enough that nobody wants to look at it, let alone help. Read through this and follow it loosely. Repackage your mod, split it up into different classes correctly, then come back. Maybe people will look at it, then.
It is set up correctly! When you run Minecraft, The items load PERFECTLY! I'm just trying to find out how to make my items 3D. Can you give likns to tutorials that would help me THAT WORK IN 1.6.4?
Edit: *links
Mod File:
Hammer File:
Model File:
My Client Proxy And Common Proxy have nothing in them.
It's not simple at all to do 3D items, luckily I found an article on how to do this right here. Isn't Google great?
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
what do I put in the @mod file?
Vswe's Java tutorials (part 2) (WATCH THESE BEFORE YOU DO ANYTHING)
Wuppy's modding tutorials
Please watch all of the videos in those playlists from Vswe before you begin Wuppy's tutorials. If you think the videos are too long, then TOO BAD. Java is complex and learning it cannot be done in 5 minutes. No one will want to help you unless you have tried to help yourself.
Oops. Wrong account. LOL
Edit: minecraft runs fine when I test it. It's just the item is still 2D
^^ my thoughts exactly.
I think hes using MCreator or something like that, because any tutorial that shows modding like that is insane.
And I do not use MCreator.
Also,
uw0tm8
Edit: *links