Neko_Dude
Members-
Posts
4 -
Joined
-
Last visited
Converted
-
Gender
Undisclosed
-
Location
Planet Earth - I wish I knew where.
-
Personal Text
I am new!
Neko_Dude's Achievements
Tree Puncher (2/8)
0
Reputation
-
I'm sorry and thanks I'm sort of new here.
-
In this set-up how would I add item drops (the items are of a single metadata) to a block of a single metadata? Any help would be appreciated. package tutorial; import java.util.List; import java.util.Random; import net.minecraft.block.material.Material; import net.minecraft.client.renderer.texture.IconRegister; import net.minecraft.creativetab.CreativeTabs; import net.minecraft.item.Item; import net.minecraft.item.ItemStack; import net.minecraft.util.Icon; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; public class BlockTutorialBlock extends BlockGeneralTutorial { public BlockTutorialBlock(int id, Material par2Material) { super(id, par2Material); } @SideOnly(Side.CLIENT) private Icon[] icons; @SideOnly(Side.CLIENT) public void registerIcons(IconRegister par1IconRegister) { icons = new Icon[4]; for(int i = 0; i < icons.length; i++) { icons[i] = par1IconRegister.registerIcon(Tutorial.modid + ":" + (this.getUnlocalizedName().substring(5)) + i); } } @SideOnly(Side.CLIENT) public Icon getIcon(int par1, int par2) { switch(par2) { case 0: return icons[0]; case 1: { switch(par1) { case 0: return icons[1]; case 1: return icons[2]; default: return icons[3]; } } default: { System.out.println("Invalid metadata for " + this.getUnlocalizedName()); return icons[0]; } } } @SideOnly(Side.CLIENT) public void getSubBlocks(int par1, CreativeTabs par2CreativeTabs, List par3List) { for(int i = 0; i < 2; i++) { par3List.add(new ItemStack(par1, 1, i)); } } public int damageDropped (int metadata) { return metadata; } @Override public int idDropped (int metadata, Random random, int par2) { switch (metadata) { case 0: return Tutorial.tutorialItem.itemID; case 1: return Tutorial.tutorialItem.itemID; //Different ID Here default: // Error case! return -1; // air } } }
-
Source (Forge MCP) CMD prompt won't finish
Neko_Dude replied to charburg's topic in Support & Bug Reports
Unless you're connected to NBN, it's going to take a while to download the entire thing. Meanwhile, look up a tutorial on coding or do something while you're waiting. -
Multiple Blocks in Single ID via Metadata[1.5.1]
Neko_Dude replied to iasumonecara's topic in Modder Support
You can learn how to add blocks to a metadata from this video: I don't own the video, but I hope it helps.