Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Neko_Dude

Members
  • Joined

  • Last visited

  1. I'm sorry and thanks I'm sort of new here.
  2. 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 } } }
  3. 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.
  4. You can learn how to add blocks to a metadata from this video: I don't own the video, but I hope it helps.

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.