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.

Nexansv6

Members
  • Joined

  • Last visited

Everything posted by Nexansv6

  1. Hello, I have a small problem with my generated ore stacking after i break it with a pickaxe. If i spawn in both ores with Creative, and drop them with the Q button they dont stack. any advice ? Thx in advance. Block MetaData ores package NexanSv6.MechanicalCraft.Blocks; import java.util.List; import net.minecraft.src.Block; import net.minecraft.src.CreativeTabs; import net.minecraft.src.ItemStack; import net.minecraft.src.Material; import cpw.mods.fml.common.Side; import cpw.mods.fml.common.asm.SideOnly; public class BlockMetadataOres extends Block { public BlockMetadataOres(int ID) { super(ID , Material.rock); setHardness(5F); setResistance(10F); setCreativeTab(CreativeTabs.tabBlock); } public String getTextureFile() { return "/gfx/MeCOre.png"; } public int getBlockTextureFromSideAndMetadata(int i,int l) { switch(l) { case 0:return 0; case 1:return 1; default: return 0; } } public void getSubBlocks(int i,CreativeTabs tab, List list) { list.add(new ItemStack(i,1,0)); list.add(new ItemStack(i,1,1)); } } Item Metadata Ores package NexanSv6.MechanicalCraft.Blocks; import net.minecraft.src.ItemBlock; import java.util.List; import NexanSv6.MechanicalCraft.MechanicalCraft; import net.minecraft.src.CreativeTabs; import net.minecraft.src.Item; import net.minecraft.src.ItemStack; import cpw.mods.fml.common.Side; import cpw.mods.fml.common.asm.SideOnly; public class ItemMetadataOre extends ItemBlock { public ItemMetadataOre(int par1) { super(par1); setMaxDamage(0); setHasSubtypes(true); } public String getItemNameIS(ItemStack i) { switch(i.getItemDamage()) { case 0: return "Rutile Ore"; case 1: return "Bauxite Ore"; default: return""; } } public int getMetadata(int par1) { return par1; } @SideOnly(Side.CLIENT) public int getIconFromDamage(int par1) { return MechanicalCraft.metaOre.getBlockTextureFromSideAndMetadata(2, par1); } } Bauxite World Generator package NexanSv6.MechanicalCraft.WorldGeneration; import java.util.Random; import NexanSv6.MechanicalCraft.MechanicalCraft; import net.minecraft.src.BiomeGenBase; import net.minecraft.src.WorldGenMinable; import net.minecraft.src.IChunkProvider; import net.minecraft.src.World; import cpw.mods.fml.common.IWorldGenerator; public class BauxiteWorldGenerator implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ,World world, IChunkProvider chunkGenerator,IChunkProvider chunkProvider) { switch(world.provider.worldType) { case 0 :generateSurface(world,random,chunkX*16,chunkZ*16); } } public void generateSurface(World world, Random random, int blockX, int blockZ) { int XCoord = blockX + random.nextInt(16); int YCoord = random.nextInt(60); int ZCoord = blockZ + random.nextInt(16); (new WorldGenMinable(MechanicalCraft.metaOre.blockID,1,12)).generate(world, random, XCoord, YCoord, ZCoord); } } Rutile World Generator package NexanSv6.MechanicalCraft.WorldGeneration; import java.util.Random; import NexanSv6.MechanicalCraft.MechanicalCraft; import net.minecraft.src.BiomeGenBase; import net.minecraft.src.WorldGenMinable; import net.minecraft.src.IChunkProvider; import net.minecraft.src.World; import cpw.mods.fml.common.IWorldGenerator; public class RutileWorldGenerator implements IWorldGenerator { @Override public void generate(Random random, int chunkX, int chunkZ,World world, IChunkProvider chunkGenerator,IChunkProvider chunkProvider) { switch(world.provider.worldType) { case 0 :generateSurface(world,random,chunkX*16,chunkZ*16); } } public void generateSurface(World world, Random random, int blockX, int blockZ) { int XCoord = blockX + random.nextInt(16); int YCoord = random.nextInt(60); int ZCoord = blockZ + random.nextInt(16); (new WorldGenMinable(MechanicalCraft.metaOre.blockID,0,6)).generate(world, random, XCoord, YCoord, ZCoord); } }

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.