Anyone can help me? i try to do a new crop for my mod but i don't know how to do! I saw a lot of tutorials but i can find the thw way to do the crops. Is for finish my mod. Help pls.
package Syn.Tutorial; //Package directory
/*
* Basic importing
*/
import net.minecraft.block.Block;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
/*
* Basic needed forge stuff
*/
@Mod(modid="ModTutorial",name="Mod Tutorial",version="v1")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)
public class ModTutorial {
/*
* ToolMaterial
*/
//Telling forge that we are creating these
//items
public static Item amethyst;
//tools
//Declaring Init
@Init
public void load(FMLInitializationEvent event){
// define items
amethyst = new Synitems(2000).setUnlocalizedName("amethyst");
// define blocks
//adding names
//items
LanguageRegistry.addName(amethyst, "Amethyst");
//blocks
//crafting
}
}
Ok and now after you have that and have changed it to your liking you will want to make a new class, mine is called "Synitems" you will want to paste this into it.
package Syn.Tutorial;
import net.minecraft.item.Item;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.*;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class Synitems extends Item {
public Synitems(int par1) {
super(par1); //Returns super constructor: par1 is ID
setCreativeTab(CreativeTabs.tabMaterials); }//Tells the game what creative mode tab it goes in
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
if (itemID == ModTutorial.amethyst.itemID) {
this.itemIcon = reg.registerIcon("amethyst"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
}
}
Now you want to make a new class, I called mine "Amethystblock"
You want to paste this into it and make the changes needed.
package Syn.Tutorial;
import java.util.Random;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class AmethystBlock extends Block {
public AmethystBlock(int par1, String texture) {
super(par1, Material.iron);
setCreativeTab(CreativeTabs.tabBlock); //place in creative tabs
}
//drops when broken with pickaxe
public int idDropped(int par1, Random par2Random, int par3)
{
return ModTutorial.amethystblock.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
this.blockIcon = reg.registerIcon("amethyst_block"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
Next make a new class by hovering over the "WorldGeneratorSyn" (it should be an error) and click create new class.
You will want to paste this into that class
package Syn.Tutorial;
import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import cpw.mods.fml.common.IWorldGenerator;
import cpw.mods.fml.common.IWorldGenerator;
public class WorldGeneratorSyn implements IWorldGenerator {
@Override
public void generate(Random random, int chunkX, int chunkZ, World world,
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
// TODO Auto-generated method stub
switch(world.provider.dimensionId){
//case -1: generateNether(world, random,chunkX*16,chunkZ*16);
case 0 : generateSurface(world, random,chunkX*16,chunkZ*16);
}
}
private void generateSurface(World world, Random random, int BlockX, int BlockZ) {
for(int i =0; i<10;i++){
int Xcoord = BlockX + random.nextInt(16);
int Zcoord = BlockZ + random.nextInt(16);
int Ycoord = random.nextInt(16);
(new WorldGenMinable(ModTutorial.AmethystOre.blockID, 4)).generate(world, random, Xcoord, Ycoord, Zcoord);
}}}
[/spoiler] 6.Smelting ( 1.6.2 / 1.6.4 ) [Spoiler]
We are making a smelting recipe which is very easy and quick. Pretty much all you need is this little line of code in your "Public void load" brackets, I usually put them underneath my crafting recipes
GameRegistry.addSmelting(ModTutorial.amethyst.itemID, new ItemStack(RefinedAmethyst, 1), 5F);
That is to make 1 Refined Amethyst
[/spoiler] 7.Publishing Our Mod ( 1.6.2 / 1.6.4 )
[Spoiler]
Forge Installer: http://files.minecraftforge.net/
[/spoiler] 8.Tools!(Pickaxe, Sword, Axe, Hoe, Shovel) And New Tool Type! ( 1.6.2 / 1.6.4 ) [Spoiler]
In this episode I will be showing you have to create your own tools!
First you want to make sure you have all the imports
next we want to define the tools (Sword, Axe, Pickaxe, Shovel, Hoe)
AmethystAxe = new SynAxe(2004, AmethystTool).setUnlocalizedName("amethytst_axe");
AmethystShovel = new SynShovel(2005, AmethystTool).setUnlocalizedName("amethyst_shovel");
AmethystPickaxe = new SynPickaxe(2006, AmethystTool).setUnlocalizedName("amethyst_pickaxe");
AmethystHoe = new SynHoe(2007, AmethystTool).setUnlocalizedName("amethyst_hoe");
AmethystSword = new SynSword(2008, AmethystTool).setUnlocalizedName("amethyst_sword");
next you want to make the corresponding classes (SynAxe, SynShovel, ect..) And put in this code, changing minor things for the different tool.
package Syn.ModTutorial;
import Syn.ModTutorial;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.ItemPickaxe;
import net.minecraft.item.ItemSword;
public class SynPickaxe extends ItemPickaxe {
public SynPickaxe(int ItemID, EnumToolMaterial material){
super(ItemID, material);
setCreativeTab(CreativeTabs.tabTools); }//Tells the game what creative mode tab it goes in
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
if (itemID == ModTutorial.AmethystPickaxe.itemID) {
this.itemIcon = reg.registerIcon("amethyst_pickaxe"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
}
}
then you want to set the name in the language registry.
GameRegistry.addRecipe(new ItemStack(AmethystPickaxe,1), new Object[]{
"TTT"," Y "," Y ",'T',amethyst,'Y',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystSword,1), new Object[]{
" T "," T "," Y ",'T',amethyst,'Y',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystAxe,1), new Object[]{
"TT ","TY "," Y ",'T',amethyst,'Y',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystHoe,1), new Object[]{
"TT "," Y "," Y ",'T',amethyst,'Y',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystShovel,1), new Object[]{
" T "," Y "," Y ",'T',amethyst,'Y',Item.stick
});
In this episode we are makin armor, thats right baby!
First you want to make sure you have all your imports
import net.minecraft.item.EnumArmorMaterial;
Next, you will want to also make sure you have your general item things defined
public static Item AmethystChestplate;
public static Item AmethystBoots;
public static Item AmethystLeggings;
public static Item AmethystHelmet;
Now you want to create the new armor type, so put this in by the area where you but the enumToolMaterial
public static EnumArmorMaterial AmethystArmor = EnumHelper.addArmorMaterial("AmethystArmor", 8, new int[] { 3, 7, 6, 3 }, 30);
Now you will need to quickly add the rendering registry so that when the armor is on your body you can actually see the texture and not a bunch of black blobs
Ok so now you want to declare them now, so pretty much just put this in there, just like the tools again
AmethystHelmet = new AmethystArmor(2055, AmethystArmor, 5, 0).setUnlocalizedName("amethyst_helmet");
AmethystChestplate = new AmethystArmor(2056, AmethystArmor, 5, 1).setUnlocalizedName("amethyst_chestplate");
AmethystLeggings = new AmethystArmor(2057, AmethystArmor, 5, 2).setUnlocalizedName("amethyst_leggings");
AmethystBoots = new AmethystArmor(2058, AmethystArmor, 5, 3).setUnlocalizedName("amethyst_boots");
after the "5" you want to keep the "0, 1, 2, 3" because those are what sets which type of armor it is
0 = Helmet 1 = Chestplate 2 = Leggings 3 = Boots
Then make a new class called "AmethystArmor" or whatever you want to call it,and put in this code
package Syn.Tutorial;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class AmethystArmor extends ItemArmor {
public AmethystArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial,
int par3, int par4) {
super(par1, par2EnumArmorMaterial, par3, par4);
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot,
int layer) {
if (stack.itemID == ModTutorial.AmethystHelmet.itemID
|| stack.itemID == ModTutorial.AmethystChestplate.itemID
|| stack.itemID == ModTutorial.AmethystBoots.itemID) {
return "minecraft:textures/armor/AmethystArmor_1.png";
}
if (stack.itemID == ModTutorial.AmethystLeggings.itemID) {
return "minecraft:textures/armor/AmethystArmor_2.png";
} else {
return null;
}
}
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
if (itemID == ModTutorial.AmethystChestplate.itemID) {
this.itemIcon = reg.registerIcon("amethyst_chestplate"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == ModTutorial.AmethystLeggings.itemID) {
this.itemIcon = reg.registerIcon("amethyst_pants"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == ModTutorial.AmethystBoots.itemID) {
this.itemIcon = reg.registerIcon("amethyst_boots"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == ModTutorial.AmethystHelmet.itemID) {
this.itemIcon = reg.registerIcon("amethyst_helmet"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
}
}
The bottom Item icon parts are just setting the texture for when the armor is inside your inventory
Now pretty much all that there is left to do is set the Language Registry and the crafting recipes
GameRegistry.addRecipe(new ItemStack(AmethystHelmet,1), new Object[]{
"TTT","T T"," ",'T',Amethyst,
});
GameRegistry.addRecipe(new ItemStack(AmethystChestplate,1), new Object[]{
"T T","TTT","TTT",'T',Amethyst,
});
GameRegistry.addRecipe(new ItemStack(AmethystLeggings,1), new Object[]{
"TTT","T T","T T",'T',Amethyst,
});
GameRegistry.addRecipe(new ItemStack(AmethystBoots,1), new Object[]{
"T T","T T"," ",'T',Amethyst,
});
Thats All! watch the video for a better explanation!
[/spoiler] 10.Creative Tabs( 1.6.2 / 1.6.4 )
[Spoiler]
VIDEO WILL BE UP SHORTLY!
Hey guys this is a really quick one, I'm probably going to be putting this one up and then another one right after it, I'm just doing a video on creative tabs because I think it is long overdue!
first you want to put in this import
import net.minecraft.creativetab.CreativeTabs;
Ok so now that you have that you want to create the tab, put this in by your armor and items and stuff
public static CreativeTabs ModTutorialTab = new ModTutorialTab(CreativeTabs.getNextID(), "Mod Tutorial Tab");
Next create the new "ModTutorialTab" Class and put this in it
package Syn.Tutorial;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import net.minecraft.creativetab.CreativeTabs;
public final class ModTutorialTab extends CreativeTabs
{
public ModTutorialTab(int par1, String par2Str)
{
super(par1, par2Str);
}
//sets the image for the creative tab
@SideOnly(Side.CLIENT)
public int getTabIconItemIndex()
{
//there is a difference between items and blocks. will give an example of both
return ModTutorial.Amethyst.itemID;
}
//sets the title/name for the creative tab
public String getTranslatedTabLabel()
{
return "Syn Tutorial Mod";
}
}
whatever is in the quotations after return at the end is what will show up in game
And what ever the top return is set at is what block will be on the tip of the tab.
to set it as the creative tab for your items just change your item creative tab code to this
setCreativeTab(ModTutorial.ModTutorialTab); }
[/spoiler] 11.Glass ( 1.6.2 / 1.6.4 )
[Spoiler]
VIDEO WILL BE UP SHORTLY!
Glass is quite an easy one so it will be a very quick video and tutorial to make it, someone asked and I wanted to get it out of the way before I did mobs.
First you want to make the item
public static Block AmethystGlass;
next you want to define the item, as always
AmethystGlass = new AmethystGlass(2070, "amethystglass").setUnlocalizedName("amethyst_glass").setHardness(0.3F).setStepSound(Block.soundGlassFootstep).setResistance(1.0F);
GameRegistry.registerBlock(AmethystGlass, "AmethystGlass");
Now what you want to do it make the new "AmethystGlass" class and put this inside it
package Syn.Tutorial;
import java.util.Random;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class AmethystGlass extends Block {
public AmethystGlass(int par1, String texture) {
super(par1, Material.glass);
setCreativeTab(CreativeTabs.tabBlock); //place in creative tabs
}
public boolean isOpaqueCube() {
return false;
}
public boolean renderAsNormalBlock() {
return false;
}
public int getRenderType() {
return 0;
}
public int getRenderBlockPass() {
return 0;
}
protected boolean canSilkHarvest() {
return true;
}
//drops when broken with pickaxe
public int idDropped(int par1, Random par2Random, int par3)
{
return ModTutorial.AmethystGlass.blockID;
}
public int quantityDropped(Random random)
{
return 0;
}
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
this.blockIcon = reg.registerIcon("amethyst_glass"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
}
Now all that's left to do is set the language registry, crafting recipe
GameRegistry.addSmelting(ModTutorial.AmethystOre.blockID, new ItemStack(AmethystGlass, 1), 5F);
now remember for the texture the spots where you want to be able to see through you want to make transparent in your texture editing program, usually if it is little checkered sqaures in the back it is a transparent spot. I will get more into detail in the video.
Im making an EPIC mod! Im adding a ton of stuff! I made amethyst armor like you with all the amethyst items and tools, when I make tin armor it doesnt work. I made the items and tools but when i make the armor it doesnt render ( and i did copy and paste
[size=medium][/size]
RenderingRegistry.addNewArmourRendererPrefix("AmethystArmor"); )
Here are my tin files and main file thing
My Main file:
[/spoiler]
[code]package SynTutorial; //Package directory
/*
* Basic importing
*/
import SynTutorial.Tools.TinPickaxe;
import SynTutorial.Tools.SynAxe;
import SynTutorial.Tools.SynHoe;
import SynTutorial.Tools.SynPickaxe;
import SynTutorial.Tools.SynShovel;
import SynTutorial.Tools.SynSword;
import SynTutorial.Tools.TinAxe;
import SynTutorial.Tools.TinShovel;
import SynTutorial.Tools.TinSword;
import SynTutorial.Tools.TinHoe;
import net.minecraft.block.Block;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.item.EnumArmorMaterial;
/*
* Basic needed forge stuff
*/
@Mod(modid="ABetterMinecraft",name="A Better Minecraft",version="v1")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)
public class Main {
/*
* ToolMaterial
*/
//Telling forge that we are creating these
//items
public static Item amethyst;
public static Item AmethystAxe;
public static Item AmethystShovel;
public static Item AmethystPickaxe;
public static Item AmethystHoe;
public static Item AmethystSword;
public static Item AmethystChestplate;
public static Item AmethystBoots;
public static Item AmethystLeggings;
public static Item AmethystHelmet;
public static Item Unknown;
public static Item Tin;
public static Item TinAxe;
public static Item TinShovel;
public static Item TinPickaxe;
public static Item TinSword;
public static Item TinHoe;
public static Item TinChestplate;
public static Item TinBoots;
public static Item TinLeggings;
public static Item TinHelmet;
//Tools
public static EnumToolMaterial AmethystTool = EnumHelper.addToolMaterial("AmethystTool", 3, 1400, 9.0F, 3.0F, 10);
public static EnumToolMaterial TinTool = EnumHelper.addToolMaterial("TinTool", 2, 1000, 7.0F, 2.0F, 10);
//Armor
public static EnumArmorMaterial AmethystArmor = EnumHelper.addArmorMaterial("AmethystArmor", 8, new int[] { 4, 8, 7, 4 }, 35);
public static EnumArmorMaterial TinArmor = EnumHelper.addArmorMaterial("TinArmor", 8, new int[] { 2, 5, 4, 1 }, 12);
//blocks
public static Block amethystblock;
public static Block AmethystOre;
public static Block TintedGlass;
public static Block TinBlock;
public static Block TinOre;
//tools
//Declaring Unit
@Init
public void load(FMLInitializationEvent event){
RenderingRegistry.addNewArmourRendererPrefix("AmethystArmor");
RenderingRegistry.addNewArmourRendererPrefix("TinArmor");
// define items
amethyst = new Synitems(2000).setUnlocalizedName("amethyst");
Unknown = new Unknown(9996).setUnlocalizedName("unknown_item");
Tin = new Tin(9993).setUnlocalizedName("tin");
//Tools
AmethystAxe = new SynAxe(2004, AmethystTool).setUnlocalizedName("amethytst_axe");
AmethystShovel = new SynShovel(2005, AmethystTool).setUnlocalizedName("amethytst_shovel");
AmethystPickaxe = new SynPickaxe(2006, AmethystTool).setUnlocalizedName("amethytst_pickaxe");
AmethystHoe = new SynHoe(2007, AmethystTool).setUnlocalizedName("amethytst_hoe");
AmethystSword = new SynSword(2008, AmethystTool).setUnlocalizedName("amethytst_sword");
TinAxe = new TinAxe(3004, TinTool).setUnlocalizedName("tin_axe");
TinShovel = new TinShovel(3005, TinTool).setUnlocalizedName("tin_shovel");
TinPickaxe = new TinPickaxe(3006, TinTool).setUnlocalizedName("tin_pickaxe");
TinSword = new TinSword(3008, TinTool).setUnlocalizedName("tin_sword");
TinHoe = new TinHoe(3070, TinTool).setUnlocalizedName("tin_hoe");
//Armor
AmethystHelmet = new AmethystArmor(2055, AmethystArmor, 5, 0).setUnlocalizedName("amethyst_helmet");
AmethystChestplate = new AmethystArmor(2056, AmethystArmor, 5, 1).setUnlocalizedName("amethyst_chestplate");
AmethystLeggings = new AmethystArmor(2057, AmethystArmor, 5, 2).setUnlocalizedName("amethyst_leggings");
AmethystBoots = new AmethystArmor(2058, AmethystArmor, 5, 3).setUnlocalizedName("amethyst_boots");
TinHelmet = new AmethystArmor(2095, TinArmor, 5, 0).setUnlocalizedName("tin_helmet");
TinChestplate = new AmethystArmor(2066, TinArmor, 5, 1).setUnlocalizedName("tin_chestplate");
TinLeggings = new AmethystArmor(2067, TinArmor, 5, 2).setUnlocalizedName("tin_leggings");
TinBoots = new AmethystArmor(2068, TinArmor, 5, 3).setUnlocalizedName("tin_boots");
// define blocks
amethystblock = new AmethystBlock(3608, "amethystblock").setUnlocalizedName("amethyst_block").setHardness(5.0F).setStepSound(Block.soundMetalFootstep).setResistance(10.0F);
GameRegistry.registerBlock(amethystblock, "amethystblock");
AmethystOre = new AmethystOre(3609, "AmethystOre").setUnlocalizedName("amethyst_ore").setHardness(10.0F).setStepSound(Block.soundMetalFootstep).setResistance(10.0F);
GameRegistry.registerBlock(AmethystOre, "AmethystOre");
TintedGlass = new TintedGlass(2070, "tintedglass").setUnlocalizedName("tintglass").setHardness(0.3F).setStepSound(Block.soundGlassFootstep).setResistance(1.0F);
GameRegistry.registerBlock(TintedGlass, "TintedGlass");
TinBlock = new TinBlock(2071, "tinblock").setUnlocalizedName("tin_block").setHardness(6.0F).setStepSound(Block.soundGlassFootstep).setResistance(5.0F);
GameRegistry.registerBlock(TinBlock, "TinBlock");
TinOre = new TinOre(2079, "TinOre").setUnlocalizedName("tin_ore").setHardness(8.0F).setStepSound(Block.soundMetalFootstep).setResistance(5.0F);
GameRegistry.registerBlock(TinOre, "TinOre");
//adding names
//items
LanguageRegistry.addName(amethyst, "Amethyst");
LanguageRegistry.addName(Unknown, "Unknown");
LanguageRegistry.addName(Tin, "Tin");
//Tools
LanguageRegistry.addName(AmethystAxe, "Amethyst Axe");
LanguageRegistry.addName(AmethystShovel, "Amethyst Shovel");
LanguageRegistry.addName(AmethystPickaxe, "Amethyst Pickaxe");
LanguageRegistry.addName(AmethystSword, "Amethyst Sword");
LanguageRegistry.addName(AmethystHoe, "Amethyst Hoe");
LanguageRegistry.addName(TinAxe, "Tin Axe");
LanguageRegistry.addName(TinShovel, "Tin Shovel");
LanguageRegistry.addName(TinPickaxe, "Tin Pickaxe");
LanguageRegistry.addName(TinSword, "Tin Sword");
LanguageRegistry.addName(TinHoe, "Tin Hoe");
//Armor
LanguageRegistry.addName(AmethystHelmet, "Amethyst Helmet");
LanguageRegistry.addName(AmethystChestplate, "Amethyst Chestplate");
LanguageRegistry.addName(AmethystBoots, "Amethyst Boots");
LanguageRegistry.addName(AmethystLeggings, "Amethyst Leggings");
LanguageRegistry.addName(TinHelmet, "Tin Helmet");
LanguageRegistry.addName(TinChestplate, "Tin Chestplate");
LanguageRegistry.addName(TinBoots, "Tin Boots");
LanguageRegistry.addName(TinLeggings, "Tin Leggings");
//blocks
LanguageRegistry.addName(amethystblock, "AmethystBlock");
LanguageRegistry.addName(AmethystOre, "AmethystOre");
LanguageRegistry.addName(TintedGlass, "Tinted Glass");
LanguageRegistry.addName(TinBlock, "Tin Block");
LanguageRegistry.addName(TinOre, "Tin Ore");
//crafting
GameRegistry.addRecipe(new ItemStack(amethystblock,1), new Object[]{
"QQQ","QQQ","QQQ",'Q',amethyst,
});
GameRegistry.addShapelessRecipe(new ItemStack(amethyst,9), new Object[]{
amethystblock});
GameRegistry.addRecipe(new ItemStack(AmethystPickaxe,1), new Object[]{
"QQQ"," L "," L ",'Q',amethyst,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystSword,1), new Object[]{
" Q "," Q "," L ",'Q',amethyst,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystAxe,1), new Object[]{
"QQ ","QY "," L ",'Q',amethyst,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystHoe,1), new Object[]{
"QQ "," L "," L ",'Q',amethyst,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystShovel,1), new Object[]{
" Q "," L "," L ",'Q',amethyst,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystHelmet,1), new Object[]{
"QQQ","Q Q"," ",'Q',amethyst,
});
GameRegistry.addRecipe(new ItemStack(AmethystChestplate,1), new Object[]{
"Q Q","QQQ","QQQ",'Q',amethyst,
});
GameRegistry.addRecipe(new ItemStack(AmethystLeggings,1), new Object[]{
"QQQ","Q Q","Q Q",'Q',amethyst,
});
GameRegistry.addRecipe(new ItemStack(AmethystBoots,1), new Object[]{
"Q Q","Q Q"," ",'Q',amethyst,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" "," "," M ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" "," ","M ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" "," "," M",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" "," M "," ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" ","M "," ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" "," M"," ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
"M "," "," ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" M "," "," ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" M"," "," ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TinBlock,1), new Object[]{
"TTT","TTT","TTT",'T',Tin,
});
GameRegistry.addShapelessRecipe(new ItemStack(Tin,9), new Object[]{
TinBlock});
GameRegistry.addRecipe(new ItemStack(TinShovel,1), new Object[]{
" T "," L "," L ",'T',Tin,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(TinPickaxe,1), new Object[]{
"TTT"," L "," L ",'T',Tin,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(TinSword,1), new Object[]{
" T "," T "," L ",'T',Tin,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(TinAxe,1), new Object[]{
"TT ","TL "," L ",'T',Tin,'L',Item.stick
});
//smelting
GameRegistry.addSmelting(Main.TinOre.blockID, new ItemStack(Tin, 1), 5F);
//World Gen
GameRegistry.registerWorldGenerator(new WorldGeneratorSyn());
GameRegistry.registerWorldGenerator(new WorldGeneratorTin());
}
}</pre><br>
[Spoiler]<br>
<br>
That was my Main file!<br>
<br>
<br>
Here is my TinArmor file<br>
[Spoiler]<br>
[/code]
package SynTutorial;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class TinArmor extends ItemArmor {
public TinArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial,
int par3, int par4) {
super(par1, par2EnumArmorMaterial, par3, par4);
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot,
int layer) {
if (stack.itemID == Main.TinHelmet.itemID
|| stack.itemID == Main.TinChestplate.itemID
|| stack.itemID == Main.TinBoots.itemID) {
return "minecraft:textures/armor/TinArmor_1.png";
}
if (stack.itemID == Main.TinLeggings.itemID) {
return "minecraft:textures/armor/TinArmor_2.png";
} else {
return null;
}
}
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
if (itemID == Main.TinChestplate.itemID) {
this.itemIcon = reg.registerIcon("tin_chestplate"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == Main.TinLeggings.itemID) {
this.itemIcon = reg.registerIcon("tin_pants"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == Main.TinBoots.itemID) {
this.itemIcon = reg.registerIcon("tin_boots"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == Main.TinHelmet.itemID) {
this.itemIcon = reg.registerIcon("tin_helmet"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
Im making an EPIC mod! Im adding a ton of stuff! I made amethyst armor like you with all the amethyst items and tools, when I make tin armor it doesnt work. I made the items and tools but when i make the armor it doesnt render ( and i did copy and paste
[size=medium][/size]
RenderingRegistry.addNewArmourRendererPrefix("AmethystArmor"); )
Here are my tin files and main file thing
My Main file:
[/spoiler]
[code]package SynTutorial; //Package directory
/*
* Basic importing
*/
import SynTutorial.Tools.TinPickaxe;
import SynTutorial.Tools.SynAxe;
import SynTutorial.Tools.SynHoe;
import SynTutorial.Tools.SynPickaxe;
import SynTutorial.Tools.SynShovel;
import SynTutorial.Tools.SynSword;
import SynTutorial.Tools.TinAxe;
import SynTutorial.Tools.TinShovel;
import SynTutorial.Tools.TinSword;
import SynTutorial.Tools.TinHoe;
import net.minecraft.block.Block;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.client.registry.RenderingRegistry;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.item.EnumArmorMaterial;
/*
* Basic needed forge stuff
*/
@Mod(modid="ABetterMinecraft",name="A Better Minecraft",version="v1")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)
public class Main {
/*
* ToolMaterial
*/
//Telling forge that we are creating these
//items
public static Item amethyst;
public static Item AmethystAxe;
public static Item AmethystShovel;
public static Item AmethystPickaxe;
public static Item AmethystHoe;
public static Item AmethystSword;
public static Item AmethystChestplate;
public static Item AmethystBoots;
public static Item AmethystLeggings;
public static Item AmethystHelmet;
public static Item Unknown;
public static Item Tin;
public static Item TinAxe;
public static Item TinShovel;
public static Item TinPickaxe;
public static Item TinSword;
public static Item TinHoe;
public static Item TinChestplate;
public static Item TinBoots;
public static Item TinLeggings;
public static Item TinHelmet;
//Tools
public static EnumToolMaterial AmethystTool = EnumHelper.addToolMaterial("AmethystTool", 3, 1400, 9.0F, 3.0F, 10);
public static EnumToolMaterial TinTool = EnumHelper.addToolMaterial("TinTool", 2, 1000, 7.0F, 2.0F, 10);
//Armor
public static EnumArmorMaterial AmethystArmor = EnumHelper.addArmorMaterial("AmethystArmor", 8, new int[] { 4, 8, 7, 4 }, 35);
public static EnumArmorMaterial TinArmor = EnumHelper.addArmorMaterial("TinArmor", 8, new int[] { 2, 5, 4, 1 }, 12);
//blocks
public static Block amethystblock;
public static Block AmethystOre;
public static Block TintedGlass;
public static Block TinBlock;
public static Block TinOre;
//tools
//Declaring Unit
@Init
public void load(FMLInitializationEvent event){
RenderingRegistry.addNewArmourRendererPrefix("AmethystArmor");
RenderingRegistry.addNewArmourRendererPrefix("TinArmor");
// define items
amethyst = new Synitems(2000).setUnlocalizedName("amethyst");
Unknown = new Unknown(9996).setUnlocalizedName("unknown_item");
Tin = new Tin(9993).setUnlocalizedName("tin");
//Tools
AmethystAxe = new SynAxe(2004, AmethystTool).setUnlocalizedName("amethytst_axe");
AmethystShovel = new SynShovel(2005, AmethystTool).setUnlocalizedName("amethytst_shovel");
AmethystPickaxe = new SynPickaxe(2006, AmethystTool).setUnlocalizedName("amethytst_pickaxe");
AmethystHoe = new SynHoe(2007, AmethystTool).setUnlocalizedName("amethytst_hoe");
AmethystSword = new SynSword(2008, AmethystTool).setUnlocalizedName("amethytst_sword");
TinAxe = new TinAxe(3004, TinTool).setUnlocalizedName("tin_axe");
TinShovel = new TinShovel(3005, TinTool).setUnlocalizedName("tin_shovel");
TinPickaxe = new TinPickaxe(3006, TinTool).setUnlocalizedName("tin_pickaxe");
TinSword = new TinSword(3008, TinTool).setUnlocalizedName("tin_sword");
TinHoe = new TinHoe(3070, TinTool).setUnlocalizedName("tin_hoe");
//Armor
AmethystHelmet = new AmethystArmor(2055, AmethystArmor, 5, 0).setUnlocalizedName("amethyst_helmet");
AmethystChestplate = new AmethystArmor(2056, AmethystArmor, 5, 1).setUnlocalizedName("amethyst_chestplate");
AmethystLeggings = new AmethystArmor(2057, AmethystArmor, 5, 2).setUnlocalizedName("amethyst_leggings");
AmethystBoots = new AmethystArmor(2058, AmethystArmor, 5, 3).setUnlocalizedName("amethyst_boots");
TinHelmet = new AmethystArmor(2095, TinArmor, 5, 0).setUnlocalizedName("tin_helmet");
TinChestplate = new AmethystArmor(2066, TinArmor, 5, 1).setUnlocalizedName("tin_chestplate");
TinLeggings = new AmethystArmor(2067, TinArmor, 5, 2).setUnlocalizedName("tin_leggings");
TinBoots = new AmethystArmor(2068, TinArmor, 5, 3).setUnlocalizedName("tin_boots");
// define blocks
amethystblock = new AmethystBlock(3608, "amethystblock").setUnlocalizedName("amethyst_block").setHardness(5.0F).setStepSound(Block.soundMetalFootstep).setResistance(10.0F);
GameRegistry.registerBlock(amethystblock, "amethystblock");
AmethystOre = new AmethystOre(3609, "AmethystOre").setUnlocalizedName("amethyst_ore").setHardness(10.0F).setStepSound(Block.soundMetalFootstep).setResistance(10.0F);
GameRegistry.registerBlock(AmethystOre, "AmethystOre");
TintedGlass = new TintedGlass(2070, "tintedglass").setUnlocalizedName("tintglass").setHardness(0.3F).setStepSound(Block.soundGlassFootstep).setResistance(1.0F);
GameRegistry.registerBlock(TintedGlass, "TintedGlass");
TinBlock = new TinBlock(2071, "tinblock").setUnlocalizedName("tin_block").setHardness(6.0F).setStepSound(Block.soundGlassFootstep).setResistance(5.0F);
GameRegistry.registerBlock(TinBlock, "TinBlock");
TinOre = new TinOre(2079, "TinOre").setUnlocalizedName("tin_ore").setHardness(8.0F).setStepSound(Block.soundMetalFootstep).setResistance(5.0F);
GameRegistry.registerBlock(TinOre, "TinOre");
//adding names
//items
LanguageRegistry.addName(amethyst, "Amethyst");
LanguageRegistry.addName(Unknown, "Unknown");
LanguageRegistry.addName(Tin, "Tin");
//Tools
LanguageRegistry.addName(AmethystAxe, "Amethyst Axe");
LanguageRegistry.addName(AmethystShovel, "Amethyst Shovel");
LanguageRegistry.addName(AmethystPickaxe, "Amethyst Pickaxe");
LanguageRegistry.addName(AmethystSword, "Amethyst Sword");
LanguageRegistry.addName(AmethystHoe, "Amethyst Hoe");
LanguageRegistry.addName(TinAxe, "Tin Axe");
LanguageRegistry.addName(TinShovel, "Tin Shovel");
LanguageRegistry.addName(TinPickaxe, "Tin Pickaxe");
LanguageRegistry.addName(TinSword, "Tin Sword");
LanguageRegistry.addName(TinHoe, "Tin Hoe");
//Armor
LanguageRegistry.addName(AmethystHelmet, "Amethyst Helmet");
LanguageRegistry.addName(AmethystChestplate, "Amethyst Chestplate");
LanguageRegistry.addName(AmethystBoots, "Amethyst Boots");
LanguageRegistry.addName(AmethystLeggings, "Amethyst Leggings");
LanguageRegistry.addName(TinHelmet, "Tin Helmet");
LanguageRegistry.addName(TinChestplate, "Tin Chestplate");
LanguageRegistry.addName(TinBoots, "Tin Boots");
LanguageRegistry.addName(TinLeggings, "Tin Leggings");
//blocks
LanguageRegistry.addName(amethystblock, "AmethystBlock");
LanguageRegistry.addName(AmethystOre, "AmethystOre");
LanguageRegistry.addName(TintedGlass, "Tinted Glass");
LanguageRegistry.addName(TinBlock, "Tin Block");
LanguageRegistry.addName(TinOre, "Tin Ore");
//crafting
GameRegistry.addRecipe(new ItemStack(amethystblock,1), new Object[]{
"QQQ","QQQ","QQQ",'Q',amethyst,
});
GameRegistry.addShapelessRecipe(new ItemStack(amethyst,9), new Object[]{
amethystblock});
GameRegistry.addRecipe(new ItemStack(AmethystPickaxe,1), new Object[]{
"QQQ"," L "," L ",'Q',amethyst,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystSword,1), new Object[]{
" Q "," Q "," L ",'Q',amethyst,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystAxe,1), new Object[]{
"QQ ","QY "," L ",'Q',amethyst,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystHoe,1), new Object[]{
"QQ "," L "," L ",'Q',amethyst,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystShovel,1), new Object[]{
" Q "," L "," L ",'Q',amethyst,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(AmethystHelmet,1), new Object[]{
"QQQ","Q Q"," ",'Q',amethyst,
});
GameRegistry.addRecipe(new ItemStack(AmethystChestplate,1), new Object[]{
"Q Q","QQQ","QQQ",'Q',amethyst,
});
GameRegistry.addRecipe(new ItemStack(AmethystLeggings,1), new Object[]{
"QQQ","Q Q","Q Q",'Q',amethyst,
});
GameRegistry.addRecipe(new ItemStack(AmethystBoots,1), new Object[]{
"Q Q","Q Q"," ",'Q',amethyst,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" "," "," M ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" "," ","M ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" "," "," M",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" "," M "," ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" ","M "," ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" "," M"," ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
"M "," "," ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" M "," "," ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{
" M"," "," ",'M',Unknown,
});
GameRegistry.addRecipe(new ItemStack(TinBlock,1), new Object[]{
"TTT","TTT","TTT",'T',Tin,
});
GameRegistry.addShapelessRecipe(new ItemStack(Tin,9), new Object[]{
TinBlock});
GameRegistry.addRecipe(new ItemStack(TinShovel,1), new Object[]{
" T "," L "," L ",'T',Tin,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(TinPickaxe,1), new Object[]{
"TTT"," L "," L ",'T',Tin,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(TinSword,1), new Object[]{
" T "," T "," L ",'T',Tin,'L',Item.stick
});
GameRegistry.addRecipe(new ItemStack(TinAxe,1), new Object[]{
"TT ","TL "," L ",'T',Tin,'L',Item.stick
});
//smelting
GameRegistry.addSmelting(Main.TinOre.blockID, new ItemStack(Tin, 1), 5F);
//World Gen
GameRegistry.registerWorldGenerator(new WorldGeneratorSyn());
GameRegistry.registerWorldGenerator(new WorldGeneratorTin());
}
}</pre><br>
[Spoiler]<br>
<br>
That was my Main file!<br>
<br>
<br>
Here is my TinArmor file<br>
[Spoiler]<br>
[/code]
package SynTutorial;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class TinArmor extends ItemArmor {
public TinArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial,
int par3, int par4) {
super(par1, par2EnumArmorMaterial, par3, par4);
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot,
int layer) {
if (stack.itemID == Main.TinHelmet.itemID
|| stack.itemID == Main.TinChestplate.itemID
|| stack.itemID == Main.TinBoots.itemID) {
return "minecraft:textures/armor/TinArmor_1.png";
}
if (stack.itemID == Main.TinLeggings.itemID) {
return "minecraft:textures/armor/TinArmor_2.png";
} else {
return null;
}
}
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
if (itemID == Main.TinChestplate.itemID) {
this.itemIcon = reg.registerIcon("tin_chestplate"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == Main.TinLeggings.itemID) {
this.itemIcon = reg.registerIcon("tin_pants"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == Main.TinBoots.itemID) {
this.itemIcon = reg.registerIcon("tin_boots"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == Main.TinHelmet.itemID) {
this.itemIcon = reg.registerIcon("tin_helmet"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
Hey Syn When i try to play my mod on the regular minecraft laucher, not the dev one, i get this
---- Minecraft Crash Report ----
// This doesn't make any sense!
Time: 1/11/14 10:57 PM
Description: There was a severe problem during mod loading that has caused the game to fail
cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: net.minecraftforge.common.MinecraftForge.setBlockHarvestLevel(Lnet/minecraft/block/Block;Ljava/lang/String;F)V
at cpw.mods.fml.common.LoadController.transition(LoadController.java:156)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:700)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:509)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
at net.minecraft.client.main.Main.main(SourceFile:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
Caused by: java.lang.NoSuchMethodError: net.minecraftforge.common.MinecraftForge.setBlockHarvestLevel(Lnet/minecraft/block/Block;Ljava/lang/String;F)V
at Mymod.Mymod.load(Mymod.java:151)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:699)
... 10 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.6.4
Operating System: Windows 8 (amd64) version 6.2
Java Version: 1.7.0_45, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 213784088 bytes (203 MB) / 458227712 bytes (437 MB) up to 954728448 bytes (910 MB)
JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{6.4.49.965} [Forge Mod Loader] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed->Pre-initialized->Initialized
Forge{9.11.1.965} [Minecraft Forge] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed->Pre-initialized->Initialized
Mymod{1.0.0} [My tools mods] (Remadize's Extra Ores' mod V1.0.zip) Unloaded->Constructed->Pre-initialized->ErroredHow would i fix this or do i need to completly re-code this?
I need help here, i've tryed to make a block harden than obsidian, but do not work, here is the code:
package Syn.Iakovsmod;
import java.util.Random;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class HardenedEnderB extends Block {
public HardenedEnderB(int par1, String texture) {
super(par1, Material.iron);
setCreativeTab(CreativeTabs.tabBlock); //place in creative tabs
this.setHardness(7500.0F);
this.setResistance(7500.0F);
}
//drops when broken with pickaxe
public int idDropped(int par1, Random par2Random, int par3)
{
return iakovsmod1.HardenedEnderB.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
this.blockIcon = reg.registerIcon("HardenedEnderB"); // You can also replace blockID and blockIcon with itemID and itemIcon
}}
It would be better for you to set resistance and hardness in your main file by doing this:
example = new ExampleBlocks(711,Material.example).setHardness(15.0F).setResistance(50.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("example");
This is how it is set in the Block.java file for every vanilla block. Resistance is the TNT blast resistance while hardness is for when you are mining. You have made your block take 150 times longer to mine than obsidian (hardness=50) while making it 3.75 times more blast resistant (obsidian=2000).
The Meaning of Life, the Universe, and Everything.
Join Date:
12/1/2013
Posts:
57
Minecraft:
chasingfire_hpps
Member Details
ok I didn't fix it
Syn help. I ran the install.cmd file and while it was installing I kept getting these 10054 errno errors. The website it says to download the files from doesn't work. Does it have to do with my computer or its settings or am i doing something wrong?
OK whoa. what the bloody hell happened there.
OK third time's the charm.
TheLOLMod.java
package Syn.MyMod; //Package directory
/*
* Basic importing
*/
import net.minecraft.block.Block;
import net.minecraft.item.EnumToolMaterial;
import net.minecraft.item.Item;
import net.minecraft.item.ItemFood;
import net.minecraft.item.ItemStack;
import net.minecraftforge.common.EnumHelper;
import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.network.NetworkMod;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.common.registry.LanguageRegistry;
/*
* Basic needed forge stuff
*/
@Mod(modid="The LOL Mod",name="The LOL Mod",version="v1")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)
public class TheLOLMod {
/*
* ToolMaterial
*/
//Telling forge that we are creating these
//items
public static Item LOL;
//blocks
public static Block lolblock;
//tools
//Declaring Init
@Init
public void load(FMLInitializationEvent event){
// define items
LOL = new Synitems(1001).setUnlocalizedName("LOL");
// define blocks
//adding names
//items
LanguageRegistry.addName(LOL, "LOL");
//blocks
LanguageRegistry.addName(lolblock, "LOL Block");
//define blocks
lolblock = new LOLBlock(1002, "lolblock").setUnlocalizedName("lol_block").setHardness(50.0F).setStepSound(Block.soundMetalFootstep).setResistance(50.0F);
GameRegistry.registerBlock(lolblock, "lolblock");
//crafting
}
}
Synitems.java
package Syn.MyMod;
import net.minecraft.item.Item;
import cpw.mods.fml.common.registry.GameRegistry;
import cpw.mods.fml.relauncher.*;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class Synitems extends Item {
public Synitems(int par1) {
super(par1); //Returns super constructor: par1 is ID
setCreativeTab(CreativeTabs.tabMaterials); }//Tells the game what creative mode tab it goes in
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
if (itemID == TheLOLMod.LOL.itemID) {
this.itemIcon = reg.registerIcon("LOL"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
}
}
LOLBlock.java
package Syn.MyMod;
import java.util.Random;
import cpw.mods.fml.common.Mod.Init;
import cpw.mods.fml.common.event.FMLInitializationEvent;
import cpw.mods.fml.common.registry.LanguageRegistry;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.creativetab.CreativeTabs;
public class LOLBlock extends Block {
public LOLBlock(int par1, String texture) {
super(par1, Material.iron);
setCreativeTab(CreativeTabs.tabBlock); //place in creative tabs
}
//drops when broken with pickaxe
public int idDropped(int par1, Random par2Random, int par3)
{
return TheLOLMod.lolblock.blockID;
}
public int quantityDropped(Random random)
{
return 1;
}
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
this.blockIcon = reg.registerIcon("lol_block"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
}
Hello, I have a little problem with the ÂFAKIN FORGE.I downloaded the recomended build placed forge folder in the mcp one and ran the install. Ive waited this  for whole 5 Âfakin hours and still it has only downloaded like 6 out of 42 libraries and they were downloaded just in the beggining
hmm idk your probably just gonne have to wait, it all depends on computer speed.
Hey Syn, there are red error lines under my world generation code that wasn't there before. Heres the code
//world gen
GameRegistry.registerWorldGenerator(new WorldGeneratorCopper());
GameRegistry.registerWorldGenerator(new WorldGeneratorAluminium());
I get the red lines under the WorldGeneratorCopper in the main file, and when I delete that piece of code I get the error on the WorldGenerationAluminium.
In the code of the two files, I never changed a thing. When I try to launch it ignoring the error I crashed.
here is the code of the copper generation
package real_life_ores.mod;
import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import cpw.mods.fml.common.IWorldGenerator;
import cpw.mods.fml.common.IWorldGenerator;
public class WorldGeneratorCopper implements IWorldGenerator {
@Override
public void generate(Random random, int chunkX, int chunkZ, World world,
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
// TODO Auto-generated method stub
switch(world.provider.dimensionId){
//case -1: generateNether(world, random,chunkX*16,chunkZ*16);
case 0 : generateSurface(world, random,chunkX*16,chunkZ*16);
}
}
private void generateSurface(World world, Random random, int BlockX, int BlockZ) {
for(int i =0; i<10;i++){
int Xcoord = BlockX + random.nextInt(16);
int Zcoord = BlockZ + random.nextInt(16);
int Ycoord = random.nextInt(70);
(new WorldGenMinable(RealLifeOres.copperore.blockID, 8)).generate(world, random, Xcoord, Ycoord, Zcoord);
}}}
and here is aluminium generation code
package real_life_ores.mod;
import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import cpw.mods.fml.common.IWorldGenerator;
import cpw.mods.fml.common.IWorldGenerator;
public class WorldGeneratorAluminium implements IWorldGenerator {
@Override
public void generate(Random random, int chunkX, int chunkZ, World world,
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
// TODO Auto-generated method stub
switch(world.provider.dimensionId){
//case -1: generateNether(world, random,chunkX*16,chunkZ*16);
case 0 : generateSurface(world, random,chunkX*16,chunkZ*16);
}
}
private void generateSurface(World world, Random random, int BlockX, int BlockZ) {
for(int i =0; i<10;i++){
int Xcoord = BlockX + random.nextInt(16);
int Zcoord = BlockZ + random.nextInt(16);
int Ycoord = random.nextInt(60);
(new WorldGenMinable(RealLifeOres.aluminiumore.blockID, 6)).generate(world, random, Xcoord, Ycoord, Zcoord);
}}}
Hey Syn, there are red error lines under my world generation code that wasn't there before. Heres the code
//world gen
GameRegistry.registerWorldGenerator(new WorldGeneratorCopper());
GameRegistry.registerWorldGenerator(new WorldGeneratorAluminium());
I get the red lines under the WorldGeneratorCopper in the main file, and when I delete that piece of code I get the error on the WorldGenerationAluminium.
In the code of the two files, I never changed a thing. When I try to launch it ignoring the error I crashed.
here is the code of the copper generation
package real_life_ores.mod;
import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import cpw.mods.fml.common.IWorldGenerator;
import cpw.mods.fml.common.IWorldGenerator;
public class WorldGeneratorCopper implements IWorldGenerator {
@Override
public void generate(Random random, int chunkX, int chunkZ, World world,
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
// TODO Auto-generated method stub
switch(world.provider.dimensionId){
//case -1: generateNether(world, random,chunkX*16,chunkZ*16);
case 0 : generateSurface(world, random,chunkX*16,chunkZ*16);
}
}
private void generateSurface(World world, Random random, int BlockX, int BlockZ) {
for(int i =0; i<10;i++){
int Xcoord = BlockX + random.nextInt(16);
int Zcoord = BlockZ + random.nextInt(16);
int Ycoord = random.nextInt(70);
(new WorldGenMinable(RealLifeOres.copperore.blockID, 8)).generate(world, random, Xcoord, Ycoord, Zcoord);
}}}
and here is aluminium generation code
package real_life_ores.mod;
import java.util.Random;
import net.minecraft.world.World;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.feature.WorldGenMinable;
import cpw.mods.fml.common.IWorldGenerator;
import cpw.mods.fml.common.IWorldGenerator;
public class WorldGeneratorAluminium implements IWorldGenerator {
@Override
public void generate(Random random, int chunkX, int chunkZ, World world,
IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
// TODO Auto-generated method stub
switch(world.provider.dimensionId){
//case -1: generateNether(world, random,chunkX*16,chunkZ*16);
case 0 : generateSurface(world, random,chunkX*16,chunkZ*16);
}
}
private void generateSurface(World world, Random random, int BlockX, int BlockZ) {
for(int i =0; i<10;i++){
int Xcoord = BlockX + random.nextInt(16);
int Zcoord = BlockZ + random.nextInt(16);
int Ycoord = random.nextInt(60);
(new WorldGenMinable(RealLifeOres.aluminiumore.blockID, 6)).generate(world, random, Xcoord, Ycoord, Zcoord);
}}}
Um, hi Synasonic. I've watched your videos and I've had no errors up until now. I'm trying to put my mod on PMC, and I did, but when I download it myself to test it no textures for my mod show up. Halp? (BTW I'm running an extremely modified code of your tutorials and it's a whole other mod but the steps for adding textures should be the same. Halp?)
Rollback Post to RevisionRollBack
I have a server. That server has a website. That website for that server is faction survival. 'nuff said. www.waltcraftmc.enjin.com
To post a comment, please login or register a new account.
Hey Syn!!!!
Can you help?
Im making an EPIC mod! Im adding a ton of stuff! I made amethyst armor like you with all the amethyst items and tools, when I make tin armor it doesnt work. I made the items and tools but when i make the armor it doesnt render ( and i did copy and paste
[size=medium][/size] RenderingRegistry.addNewArmourRendererPrefix("AmethystArmor"); ) Here are my tin files and main file thing My Main file: [/spoiler] [code]package SynTutorial; //Package directory /* * Basic importing */ import SynTutorial.Tools.TinPickaxe; import SynTutorial.Tools.SynAxe; import SynTutorial.Tools.SynHoe; import SynTutorial.Tools.SynPickaxe; import SynTutorial.Tools.SynShovel; import SynTutorial.Tools.SynSword; import SynTutorial.Tools.TinAxe; import SynTutorial.Tools.TinShovel; import SynTutorial.Tools.TinSword; import SynTutorial.Tools.TinHoe; import net.minecraft.block.Block; import net.minecraft.item.EnumToolMaterial; import net.minecraft.item.Item; import net.minecraft.item.ItemFood; import net.minecraft.item.ItemStack; import net.minecraftforge.common.EnumHelper; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.common.Mod; import cpw.mods.fml.common.Mod.Init; import cpw.mods.fml.common.event.FMLInitializationEvent; import cpw.mods.fml.common.network.NetworkMod; import cpw.mods.fml.common.registry.GameRegistry; import cpw.mods.fml.common.registry.LanguageRegistry; import net.minecraft.item.EnumArmorMaterial; /* * Basic needed forge stuff */ @Mod(modid="ABetterMinecraft",name="A Better Minecraft",version="v1") @NetworkMod(clientSideRequired=true,serverSideRequired=false) public class Main { /* * ToolMaterial */ //Telling forge that we are creating these //items public static Item amethyst; public static Item AmethystAxe; public static Item AmethystShovel; public static Item AmethystPickaxe; public static Item AmethystHoe; public static Item AmethystSword; public static Item AmethystChestplate; public static Item AmethystBoots; public static Item AmethystLeggings; public static Item AmethystHelmet; public static Item Unknown; public static Item Tin; public static Item TinAxe; public static Item TinShovel; public static Item TinPickaxe; public static Item TinSword; public static Item TinHoe; public static Item TinChestplate; public static Item TinBoots; public static Item TinLeggings; public static Item TinHelmet; //Tools public static EnumToolMaterial AmethystTool = EnumHelper.addToolMaterial("AmethystTool", 3, 1400, 9.0F, 3.0F, 10); public static EnumToolMaterial TinTool = EnumHelper.addToolMaterial("TinTool", 2, 1000, 7.0F, 2.0F, 10); //Armor public static EnumArmorMaterial AmethystArmor = EnumHelper.addArmorMaterial("AmethystArmor", 8, new int[] { 4, 8, 7, 4 }, 35); public static EnumArmorMaterial TinArmor = EnumHelper.addArmorMaterial("TinArmor", 8, new int[] { 2, 5, 4, 1 }, 12); //blocks public static Block amethystblock; public static Block AmethystOre; public static Block TintedGlass; public static Block TinBlock; public static Block TinOre; //tools //Declaring Unit @Init public void load(FMLInitializationEvent event){ RenderingRegistry.addNewArmourRendererPrefix("AmethystArmor"); RenderingRegistry.addNewArmourRendererPrefix("TinArmor"); // define items amethyst = new Synitems(2000).setUnlocalizedName("amethyst"); Unknown = new Unknown(9996).setUnlocalizedName("unknown_item"); Tin = new Tin(9993).setUnlocalizedName("tin"); //Tools AmethystAxe = new SynAxe(2004, AmethystTool).setUnlocalizedName("amethytst_axe"); AmethystShovel = new SynShovel(2005, AmethystTool).setUnlocalizedName("amethytst_shovel"); AmethystPickaxe = new SynPickaxe(2006, AmethystTool).setUnlocalizedName("amethytst_pickaxe"); AmethystHoe = new SynHoe(2007, AmethystTool).setUnlocalizedName("amethytst_hoe"); AmethystSword = new SynSword(2008, AmethystTool).setUnlocalizedName("amethytst_sword"); TinAxe = new TinAxe(3004, TinTool).setUnlocalizedName("tin_axe"); TinShovel = new TinShovel(3005, TinTool).setUnlocalizedName("tin_shovel"); TinPickaxe = new TinPickaxe(3006, TinTool).setUnlocalizedName("tin_pickaxe"); TinSword = new TinSword(3008, TinTool).setUnlocalizedName("tin_sword"); TinHoe = new TinHoe(3070, TinTool).setUnlocalizedName("tin_hoe"); //Armor AmethystHelmet = new AmethystArmor(2055, AmethystArmor, 5, 0).setUnlocalizedName("amethyst_helmet"); AmethystChestplate = new AmethystArmor(2056, AmethystArmor, 5, 1).setUnlocalizedName("amethyst_chestplate"); AmethystLeggings = new AmethystArmor(2057, AmethystArmor, 5, 2).setUnlocalizedName("amethyst_leggings"); AmethystBoots = new AmethystArmor(2058, AmethystArmor, 5, 3).setUnlocalizedName("amethyst_boots"); TinHelmet = new AmethystArmor(2095, TinArmor, 5, 0).setUnlocalizedName("tin_helmet"); TinChestplate = new AmethystArmor(2066, TinArmor, 5, 1).setUnlocalizedName("tin_chestplate"); TinLeggings = new AmethystArmor(2067, TinArmor, 5, 2).setUnlocalizedName("tin_leggings"); TinBoots = new AmethystArmor(2068, TinArmor, 5, 3).setUnlocalizedName("tin_boots"); // define blocks amethystblock = new AmethystBlock(3608, "amethystblock").setUnlocalizedName("amethyst_block").setHardness(5.0F).setStepSound(Block.soundMetalFootstep).setResistance(10.0F); GameRegistry.registerBlock(amethystblock, "amethystblock"); AmethystOre = new AmethystOre(3609, "AmethystOre").setUnlocalizedName("amethyst_ore").setHardness(10.0F).setStepSound(Block.soundMetalFootstep).setResistance(10.0F); GameRegistry.registerBlock(AmethystOre, "AmethystOre"); TintedGlass = new TintedGlass(2070, "tintedglass").setUnlocalizedName("tintglass").setHardness(0.3F).setStepSound(Block.soundGlassFootstep).setResistance(1.0F); GameRegistry.registerBlock(TintedGlass, "TintedGlass"); TinBlock = new TinBlock(2071, "tinblock").setUnlocalizedName("tin_block").setHardness(6.0F).setStepSound(Block.soundGlassFootstep).setResistance(5.0F); GameRegistry.registerBlock(TinBlock, "TinBlock"); TinOre = new TinOre(2079, "TinOre").setUnlocalizedName("tin_ore").setHardness(8.0F).setStepSound(Block.soundMetalFootstep).setResistance(5.0F); GameRegistry.registerBlock(TinOre, "TinOre"); //adding names //items LanguageRegistry.addName(amethyst, "Amethyst"); LanguageRegistry.addName(Unknown, "Unknown"); LanguageRegistry.addName(Tin, "Tin"); //Tools LanguageRegistry.addName(AmethystAxe, "Amethyst Axe"); LanguageRegistry.addName(AmethystShovel, "Amethyst Shovel"); LanguageRegistry.addName(AmethystPickaxe, "Amethyst Pickaxe"); LanguageRegistry.addName(AmethystSword, "Amethyst Sword"); LanguageRegistry.addName(AmethystHoe, "Amethyst Hoe"); LanguageRegistry.addName(TinAxe, "Tin Axe"); LanguageRegistry.addName(TinShovel, "Tin Shovel"); LanguageRegistry.addName(TinPickaxe, "Tin Pickaxe"); LanguageRegistry.addName(TinSword, "Tin Sword"); LanguageRegistry.addName(TinHoe, "Tin Hoe"); //Armor LanguageRegistry.addName(AmethystHelmet, "Amethyst Helmet"); LanguageRegistry.addName(AmethystChestplate, "Amethyst Chestplate"); LanguageRegistry.addName(AmethystBoots, "Amethyst Boots"); LanguageRegistry.addName(AmethystLeggings, "Amethyst Leggings"); LanguageRegistry.addName(TinHelmet, "Tin Helmet"); LanguageRegistry.addName(TinChestplate, "Tin Chestplate"); LanguageRegistry.addName(TinBoots, "Tin Boots"); LanguageRegistry.addName(TinLeggings, "Tin Leggings"); //blocks LanguageRegistry.addName(amethystblock, "AmethystBlock"); LanguageRegistry.addName(AmethystOre, "AmethystOre"); LanguageRegistry.addName(TintedGlass, "Tinted Glass"); LanguageRegistry.addName(TinBlock, "Tin Block"); LanguageRegistry.addName(TinOre, "Tin Ore"); //crafting GameRegistry.addRecipe(new ItemStack(amethystblock,1), new Object[]{ "QQQ","QQQ","QQQ",'Q',amethyst, }); GameRegistry.addShapelessRecipe(new ItemStack(amethyst,9), new Object[]{ amethystblock}); GameRegistry.addRecipe(new ItemStack(AmethystPickaxe,1), new Object[]{ "QQQ"," L "," L ",'Q',amethyst,'L',Item.stick }); GameRegistry.addRecipe(new ItemStack(AmethystSword,1), new Object[]{ " Q "," Q "," L ",'Q',amethyst,'L',Item.stick }); GameRegistry.addRecipe(new ItemStack(AmethystAxe,1), new Object[]{ "QQ ","QY "," L ",'Q',amethyst,'L',Item.stick }); GameRegistry.addRecipe(new ItemStack(AmethystHoe,1), new Object[]{ "QQ "," L "," L ",'Q',amethyst,'L',Item.stick }); GameRegistry.addRecipe(new ItemStack(AmethystShovel,1), new Object[]{ " Q "," L "," L ",'Q',amethyst,'L',Item.stick }); GameRegistry.addRecipe(new ItemStack(AmethystHelmet,1), new Object[]{ "QQQ","Q Q"," ",'Q',amethyst, }); GameRegistry.addRecipe(new ItemStack(AmethystChestplate,1), new Object[]{ "Q Q","QQQ","QQQ",'Q',amethyst, }); GameRegistry.addRecipe(new ItemStack(AmethystLeggings,1), new Object[]{ "QQQ","Q Q","Q Q",'Q',amethyst, }); GameRegistry.addRecipe(new ItemStack(AmethystBoots,1), new Object[]{ "Q Q","Q Q"," ",'Q',amethyst, }); GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{ " "," "," M ",'M',Unknown, }); GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{ " "," ","M ",'M',Unknown, }); GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{ " "," "," M",'M',Unknown, }); GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{ " "," M "," ",'M',Unknown, }); GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{ " ","M "," ",'M',Unknown, }); GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{ " "," M"," ",'M',Unknown, }); GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{ "M "," "," ",'M',Unknown, }); GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{ " M "," "," ",'M',Unknown, }); GameRegistry.addRecipe(new ItemStack(TintedGlass,1), new Object[]{ " M"," "," ",'M',Unknown, }); GameRegistry.addRecipe(new ItemStack(TinBlock,1), new Object[]{ "TTT","TTT","TTT",'T',Tin, }); GameRegistry.addShapelessRecipe(new ItemStack(Tin,9), new Object[]{ TinBlock}); GameRegistry.addRecipe(new ItemStack(TinShovel,1), new Object[]{ " T "," L "," L ",'T',Tin,'L',Item.stick }); GameRegistry.addRecipe(new ItemStack(TinPickaxe,1), new Object[]{ "TTT"," L "," L ",'T',Tin,'L',Item.stick }); GameRegistry.addRecipe(new ItemStack(TinSword,1), new Object[]{ " T "," T "," L ",'T',Tin,'L',Item.stick }); GameRegistry.addRecipe(new ItemStack(TinAxe,1), new Object[]{ "TT ","TL "," L ",'T',Tin,'L',Item.stick }); //smelting GameRegistry.addSmelting(Main.TinOre.blockID, new ItemStack(Tin, 1), 5F); //World Gen GameRegistry.registerWorldGenerator(new WorldGeneratorSyn()); GameRegistry.registerWorldGenerator(new WorldGeneratorTin()); } }</pre><br> [Spoiler]<br> <br> That was my Main file!<br> <br> <br> Here is my TinArmor file<br> [Spoiler]<br> [/code]
package SynTutorial;
import net.minecraft.client.renderer.texture.IconRegister;
import net.minecraft.entity.Entity;
import net.minecraft.item.EnumArmorMaterial;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemStack;
public class TinArmor extends ItemArmor {
public TinArmor(int par1, EnumArmorMaterial par2EnumArmorMaterial,
int par3, int par4) {
super(par1, par2EnumArmorMaterial, par3, par4);
}
public String getArmorTexture(ItemStack stack, Entity entity, int slot,
int layer) {
if (stack.itemID == Main.TinHelmet.itemID
|| stack.itemID == Main.TinChestplate.itemID
|| stack.itemID == Main.TinBoots.itemID) {
return "minecraft:textures/armor/TinArmor_1.png";
}
if (stack.itemID == Main.TinLeggings.itemID) {
return "minecraft:textures/armor/TinArmor_2.png";
} else {
return null;
}
}
public void registerIcons(IconRegister reg) { // Make sure to import IconRegister!
if (itemID == Main.TinChestplate.itemID) {
this.itemIcon = reg.registerIcon("tin_chestplate"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == Main.TinLeggings.itemID) {
this.itemIcon = reg.registerIcon("tin_pants"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == Main.TinBoots.itemID) {
this.itemIcon = reg.registerIcon("tin_boots"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
if (itemID == Main.TinHelmet.itemID) {
this.itemIcon = reg.registerIcon("tin_helmet"); // You can also replace blockID and blockIcon with itemID and itemIcon
}
}
}
[CODE]
[/spoiler]
Hmm well does your amethyst armor work?
---- Minecraft Crash Report ----
// This doesn't make any sense!
Time: 1/11/14 10:57 PM
Description: There was a severe problem during mod loading that has caused the game to fail
cpw.mods.fml.common.LoaderException: java.lang.NoSuchMethodError: net.minecraftforge.common.MinecraftForge.setBlockHarvestLevel(Lnet/minecraft/block/Block;Ljava/lang/String;F)V
at cpw.mods.fml.common.LoadController.transition(LoadController.java:156)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:700)
at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:249)
at net.minecraft.client.Minecraft.func_71384_a(Minecraft.java:509)
at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:808)
at net.minecraft.client.main.Main.main(SourceFile:101)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:131)
at net.minecraft.launchwrapper.Launch.main(Launch.java:27)
Caused by: java.lang.NoSuchMethodError: net.minecraftforge.common.MinecraftForge.setBlockHarvestLevel(Lnet/minecraft/block/Block;Ljava/lang/String;F)V
at Mymod.Mymod.load(Mymod.java:151)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:545)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:201)
at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:181)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74)
at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:45)
at com.google.common.eventbus.EventBus.dispatch(EventBus.java:313)
at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296)
at com.google.common.eventbus.EventBus.post(EventBus.java:267)
at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:112)
at cpw.mods.fml.common.Loader.initializeMods(Loader.java:699)
... 10 more
A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------
-- System Details --
Details:
Minecraft Version: 1.6.4
Operating System: Windows 8 (amd64) version 6.2
Java Version: 1.7.0_45, Oracle Corporation
Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
Memory: 213784088 bytes (203 MB) / 458227712 bytes (437 MB) up to 954728448 bytes (910 MB)
JVM Flags: 2 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xmx1G
AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used
Suspicious classes: FML and Forge are installed
IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
FML: MCP v8.11 FML v6.4.49.965 Minecraft Forge 9.11.1.965 4 mods loaded, 4 mods active
mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized
FML{6.4.49.965} [Forge Mod Loader] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed->Pre-initialized->Initialized
Forge{9.11.1.965} [Minecraft Forge] (minecraftforge-9.11.1.965.jar) Unloaded->Constructed->Pre-initialized->Initialized
Mymod{1.0.0} [My tools mods] (Remadize's Extra Ores' mod V1.0.zip) Unloaded->Constructed->Pre-initialized->ErroredHow would i fix this or do i need to completly re-code this?
It would be better for you to set resistance and hardness in your main file by doing this:
example = new ExampleBlocks(711,Material.example).setHardness(15.0F).setResistance(50.0F).setStepSound(Block.soundMetalFootstep).setUnlocalizedName("example");This is how it is set in the Block.java file for every vanilla block. Resistance is the TNT blast resistance while hardness is for when you are mining. You have made your block take 150 times longer to mine than obsidian (hardness=50) while making it 3.75 times more blast resistant (obsidian=2000).
Syn help. I ran the install.cmd file and while it was installing I kept getting these 10054 errno errors. The website it says to download the files from doesn't work. Does it have to do with my computer or its settings or am i doing something wrong?
*sighs*
Curse my impatience.
Just one more block...
sorry I have been trying very hard to figure it out but I am really having troubles :/
But i need to clarify again, it worked with the item but then the block didnt work? like the block made it not work?
hmm idk your probably just gonne have to wait, it all depends on computer speed.
Yeah. That seems to be what happened.
Just one more block...
can not find client bins, try recompiling!!!
can not find server
I tried the next step and got some md5 error.
Then I tried to install thos and got another error!
I get the red lines under the WorldGeneratorCopper in the main file, and when I delete that piece of code I get the error on the WorldGenerationAluminium.
In the code of the two files, I never changed a thing. When I try to launch it ignoring the error I crashed.
here is the code of the copper generation
package real_life_ores.mod; import java.util.Random; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; import cpw.mods.fml.common.IWorldGenerator; public class WorldGeneratorCopper implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { // TODO Auto-generated method stub switch(world.provider.dimensionId){ //case -1: generateNether(world, random,chunkX*16,chunkZ*16); case 0 : generateSurface(world, random,chunkX*16,chunkZ*16); } } private void generateSurface(World world, Random random, int BlockX, int BlockZ) { for(int i =0; i<10;i++){ int Xcoord = BlockX + random.nextInt(16); int Zcoord = BlockZ + random.nextInt(16); int Ycoord = random.nextInt(70); (new WorldGenMinable(RealLifeOres.copperore.blockID, 8)).generate(world, random, Xcoord, Ycoord, Zcoord); }}}and here is aluminium generation code
package real_life_ores.mod; import java.util.Random; import net.minecraft.world.World; import net.minecraft.world.chunk.IChunkProvider; import net.minecraft.world.gen.feature.WorldGenMinable; import cpw.mods.fml.common.IWorldGenerator; import cpw.mods.fml.common.IWorldGenerator; public class WorldGeneratorAluminium implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) { // TODO Auto-generated method stub switch(world.provider.dimensionId){ //case -1: generateNether(world, random,chunkX*16,chunkZ*16); case 0 : generateSurface(world, random,chunkX*16,chunkZ*16); } } private void generateSurface(World world, Random random, int BlockX, int BlockZ) { for(int i =0; i<10;i++){ int Xcoord = BlockX + random.nextInt(16); int Zcoord = BlockZ + random.nextInt(16); int Ycoord = random.nextInt(60); (new WorldGenMinable(RealLifeOres.aluminiumore.blockID, 6)).generate(world, random, Xcoord, Ycoord, Zcoord); }}}pls help
It's because you only need one generator for both
How would you use one generator file for both.
im pretty sure you do this
private void generateSurface(World world, Random random, int BlockX, int BlockZ) { for(int i =0; i<10;i++){ int Xcoord = BlockX + random.nextInt(16); int Zcoord = BlockZ + random.nextInt(16); int Ycoord = random.nextInt(60); (new WorldGenMinable(RealLifeOres.aluminiumore.blockID, 6)).generate(world, random, Xcoord, Ycoord, Zcoord); } { for(int i =0; i<10;i++){ int Xcoord = BlockX + random.nextInt(16); int Zcoord = BlockZ + random.nextInt(16); int Ycoord = random.nextInt(60); (new WorldGenMinable(RealLifeOres.aluminiumore.blockID, 6)).generate(world, random, Xcoord, Ycoord, Zcoord); }}}i think like that
www.waltcraftmc.enjin.com