Hmm well that's a setting in eclipse, just type it all out XD lol
When I do type it out manually then it says the imports cpw and net.minecraftforge cannot be resolved. And if it is a settinghow can I change it? thank you.
Looks great! I've always wanted to make a mod, but I don't really have the time right now. I'll look into you're videos and check it out. Thanks for the great tutorial!
and i need help for my armors, it shows up when you hold it on your hand but when you wear the armor it shows black squares, here's my code:
package emx2000.obsidianstuff;
import net.minecraft.block.Block;
import net.minecraft.item.EnumArmorMaterial;
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;
@Mod(modid="ObsidianStuff",name="Obsidian Stuff",version="v1.0")
@NetworkMod(clientSideRequired=true,serverSideRequired=false)
public class ObsidianStuff {
public static Item ObsidianFragment;
public static Item PurifiedObsidian;
public static Item ObsidianIngot;
public static Item ObsidianAxe;
public static Item ObsidianShovel;
public static Item ObsidianPickaxe;
public static Item ObsidianHoe;
public static Item ObsidianSword;
public static Item ObsidianChestplate;
public static Item ObsidianBoots;
public static Item ObsidianLeggings;
public static Item ObsidianHelmet;
public static EnumToolMaterial ObsidianTools = EnumHelper.addToolMaterial("ObsidianTools", 3, 2500, 10.0F, 5.0F, 20);
public static EnumArmorMaterial ObsidianArmor = EnumHelper.addArmorMaterial("ObsidianArmor", 8, new int[] { 5, 9, 8, 5 }, 30);
@Init
public void load(FMLInitializationEvent event){
RenderingRegistry.addNewArmourRendererPrefix("ObsidianArmor");
ObsidianFragment = new ObsidianItems(2000).setUnlocalizedName("obsidian_fragment");
PurifiedObsidian = new ObsidianItems(2001).setUnlocalizedName("obsidian_purified");
ObsidianIngot = new ObsidianItems(2002).setUnlocalizedName("obsidian_ingot");
ObsidianAxe = new ObsidianAxe(2003, ObsidianTools).setUnlocalizedName("obsidian_axe");
ObsidianShovel = new ObsidianShovel(2004, ObsidianTools).setUnlocalizedName("obsidian_shovel");
ObsidianPickaxe = new ObsidianPickaxe(2005, ObsidianTools).setUnlocalizedName("obsidian_pickaxe");
ObsidianHoe = new ObsidianHoe(2006, ObsidianTools).setUnlocalizedName("obsidian_hoe");
ObsidianSword = new ObsidianSword(2007, ObsidianTools).setUnlocalizedName("obsidian_sword");
ObsidianHelmet = new ObsidianArmor(2008, ObsidianArmor, 5, 0).setUnlocalizedName("obsidian_helmet");
ObsidianChestplate = new ObsidianArmor(2009, ObsidianArmor, 5, 1).setUnlocalizedName("obsidian_chestplate");
ObsidianLeggings = new ObsidianArmor(2010, ObsidianArmor, 5, 2).setUnlocalizedName("obsidian_leggings");
ObsidianBoots = new ObsidianArmor(2011, ObsidianArmor, 5, 3).setUnlocalizedName("obsidian_boots");
LanguageRegistry.addName(ObsidianFragment, "Obsidian Fragment");
LanguageRegistry.addName(PurifiedObsidian, "Refined Obsidian Fragment");
LanguageRegistry.addName(ObsidianAxe, "Obsidian Axe");
LanguageRegistry.addName(ObsidianShovel, "Obsidian Shovel");
LanguageRegistry.addName(ObsidianPickaxe, "Obsidian Pickaxe");
LanguageRegistry.addName(ObsidianHoe, "Obsidian Hoe");
LanguageRegistry.addName(ObsidianSword, "Obsidian Sword");
LanguageRegistry.addName(ObsidianHelmet, "Obsidian Helmet");
LanguageRegistry.addName(ObsidianChestplate, "Obsidian Chestplate");
LanguageRegistry.addName(ObsidianLeggings, "Obsidian Leggings");
LanguageRegistry.addName(ObsidianBoots, "Obsidian Boots");
GameRegistry.addShapelessRecipe(new ItemStack(ObsidianFragment,4), new Object[]{
Block.obsidian});
GameRegistry.addRecipe(new ItemStack(ObsidianIngot,1), new Object[]{
" T ","TYT"," T ",'T',PurifiedObsidian,'Y',Item.ingotIron,
});
GameRegistry.addRecipe(new ItemStack(ObsidianAxe,1), new Object[]{
"TT ","TY "," Y ",'T',ObsidianIngot,'Y',Item.stick,
});
GameRegistry.addRecipe(new ItemStack(ObsidianAxe,1), new Object[]{
"TT "," YT"," Y ",'T',ObsidianIngot,'Y',Item.stick,
});
GameRegistry.addRecipe(new ItemStack(ObsidianShovel,1), new Object[]{
" T "," Y "," Y ",'T',ObsidianIngot,'Y',Item.stick,
});
GameRegistry.addRecipe(new ItemStack(ObsidianShovel,1), new Object[]{
"T ","Y ","Y ",'T',ObsidianIngot,'Y',Item.stick,
});
GameRegistry.addRecipe(new ItemStack(ObsidianShovel,1), new Object[]{
" T"," Y"," Y",'T',ObsidianIngot,'Y',Item.stick,
});
GameRegistry.addRecipe(new ItemStack(ObsidianPickaxe,1), new Object[]{
"TTT"," Y "," Y ",'T',ObsidianIngot,'Y',Item.stick,
});
GameRegistry.addRecipe(new ItemStack(ObsidianHoe,1), new Object[]{
"TT "," Y "," Y ",'T',ObsidianIngot,'Y',Item.stick,
});
GameRegistry.addRecipe(new ItemStack(ObsidianHoe,1), new Object[]{
" TT"," Y "," Y ",'T',ObsidianIngot,'Y',Item.stick,
});
GameRegistry.addRecipe(new ItemStack(ObsidianSword,1), new Object[]{
" T "," T "," Y ",'T',ObsidianIngot,'Y',Item.stick,
});
GameRegistry.addRecipe(new ItemStack(ObsidianSword,1), new Object[]{
" T"," T"," Y",'T',ObsidianIngot,'Y',Item.stick,
});
GameRegistry.addRecipe(new ItemStack(ObsidianSword,1), new Object[]{
"T ","T ","Y ",'T',ObsidianIngot,'Y',Item.stick,
});
GameRegistry.addRecipe(new ItemStack(ObsidianHelmet,1), new Object[]{
"TTT","T T"," ",'T',ObsidianIngot
});
GameRegistry.addRecipe(new ItemStack(ObsidianHelmet,1), new Object[]{
" ","TTT","T T",'T',ObsidianIngot
});
GameRegistry.addRecipe(new ItemStack(ObsidianChestplate,1), new Object[]{
"T T","TTT","TTT",'T',ObsidianIngot
});
GameRegistry.addRecipe(new ItemStack(ObsidianLeggings,1), new Object[]{
"TTT","T T","T T",'T',ObsidianIngot
});
GameRegistry.addRecipe(new ItemStack(ObsidianBoots,1), new Object[]{
"T T","T T"," ",'T',ObsidianIngot
});
GameRegistry.addRecipe(new ItemStack(ObsidianBoots,1), new Object[]{
" ","T T","T T",'T',ObsidianIngot
});
GameRegistry.addSmelting(ObsidianStuff.ObsidianFragment.itemID, new ItemStack(PurifiedObsidian, 1), 10F);
}
}
package emx2000.obsidianstuff;
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 ObsidianArmor extends ItemArmor {
public ObsidianArmor(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 == ObsidianStuff.ObsidianHelmet.itemID
|| stack.itemID == ObsidianStuff.ObsidianChestplate.itemID
|| stack.itemID == ObsidianStuff.ObsidianBoots.itemID) {
return "minecraft:textures/models/armor/obsidian armor_1.png";
}
if (stack.itemID == ObsidianStuff.ObsidianLeggings.itemID) {
return "minecraft:textures/models/armor/obsidian_armor_2.png";
} else {
return null;
}
}
public void registerIcons(IconRegister reg) {
if (itemID == ObsidianStuff.ObsidianChestplate.itemID) {
this.itemIcon = reg.registerIcon("obsidian_chestplate");
}
if (itemID == ObsidianStuff.ObsidianLeggings.itemID) {
this.itemIcon = reg.registerIcon("obsidian_leggings");
}
if (itemID == ObsidianStuff.ObsidianBoots.itemID) {
this.itemIcon = reg.registerIcon("obsidian_boots");
}
if (itemID == ObsidianStuff.ObsidianHelmet.itemID) {
this.itemIcon = reg.registerIcon("obsidian_helmet");
}
}
}
See how it says "minecraft:textures/models/armour/obsidian_armor_1" (or 2) get rid f the models part, make a new folder inside the textures folder called armour and put them there, and change it to "minecraft:textures/armor/obsidian_armor_1" (again or 2) and it should work ^-^
See how it says "minecraft:textures/models/armour/obsidian_armor_1" (or 2) get rid f the models part, make a new folder inside the textures folder called armour and put them there, and change it to "minecraft:textures/armor/obsidian_armor_1" (again or 2) and it should work ^-^
Okay, will try it out, thanks for the reply!
Edit:
Turns out i accidentally typed
"minecraft:textures/models/armour/obsidian armor_1.png"
instead of
"minecraft:textures/models/armour/obsidian_armor_1.png"
It was a silly typo, btw thanks for helping me!
Edit:
how do i set the CreativeTab of the armor items?
Edit:
Turns out i accidentally typed
"minecraft:textures/models/armour/obsidian armor_1.png"
instead of
"minecraft:textures/models/armour/obsidian_armor_1.png"
It was a silly typo, btw thanks for helping me!
Edit:
how do i set the CreativeTab of the armor items?
Same as usual, go to the creative tab code section and grab the bottom code, like I at the bottom, that's it
Synasonic.I love your series because it means I might be able to make my own mod but im having a problem. My forge doesn't have and "install" command. What do I do?https://www.dropbox....05 23.00.50.png
Synasonic.I love your series because it means I might be able to make my own mod but im having a problem. My forge doesn't have and "install" command. What do I do?https://www.dropbox....05 23.00.50.png
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
}
In that code notice the "public class AmethystBlock extends Block {"
Change that to "public class AmethystBlock extends BlockGlass {" and it will not be x-ray.
I thought this would be the best place to ask but I've had trouble with loading the sprites and not the texture. I checked out your videos and our code is about the same. Although I have the sprite in the right folders, it claims I do not have it in the correct location? Help?
Rollback Post to RevisionRollBack
"A delayed game is eventually good, but a rushed game is forever bad."
~Shigeru Miyamoto
I thought this would be the best place to ask but I've had trouble with loading the sprites and not the texture. I checked out your videos and our code is about the same. Although I have the sprite in the right folders, it claims I do not have it in the correct location? Help?
I'm trying to help, but...
What do you mean by sprites? Item icons? And can show your codes and log?
Hmm well that's a setting in eclipse, just type it all out XD lol
When I do type it out manually then it says the imports cpw and net.minecraftforge cannot be resolved. And if it is a settinghow can I change it? thank you.
Be the change our world needs.
Project Realism - A Charity Network
can you do a tutorial on how to make clickable blocks like crafting tables etc, thanks
Sure but people really want me to do mobs first
okay, mobs sounds great too!
and i need help for my armors, it shows up when you hold it on your hand but when you wear the armor it shows black squares, here's my code:
See how it says "minecraft:textures/models/armour/obsidian_armor_1" (or 2) get rid f the models part, make a new folder inside the textures folder called armour and put them there, and change it to "minecraft:textures/armor/obsidian_armor_1" (again or 2) and it should work ^-^
Okay, will try it out, thanks for the reply!
Edit:
Turns out i accidentally typed
"minecraft:textures/models/armour/obsidian armor_1.png"
instead of
"minecraft:textures/models/armour/obsidian_armor_1.png"
It was a silly typo, btw thanks for helping me!
Edit:
how do i set the CreativeTab of the armor items?
Same as usual, go to the creative tab code section and grab the bottom code, like I at the bottom, that's it
You need to download the forge src.
http://files.minecraftforge.net/minecraftforge/minecraftforge-src-1.6.4-9.11.1.916.zip
Make sure you set the workspace to /forge/mcp/eclipse.
Hey i know the fix.
Look at the code:
Change that to "public class AmethystBlock extends BlockGlass {" and it will not be x-ray.
~Shigeru Miyamoto
I'm trying to help, but...
What do you mean by sprites? Item icons? And can show your codes and log?
Ya sprites is confusing me...