• 0

    posted a message on Furnace In Your Inventory Mod (Furnace Backpack)
    I will start looking into this. I love the backpack mod as well and having something like this could come in handy for players who don't really want to settle down with a base.
    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on More Metals v_0.2.0 [1.4.7]
    Discontinued, moving mod into new direction.
    Posted in: WIP Mods
  • 0

    posted a message on Problem with texture changing with graphics update
    I'm having problems with my custom leaf texture updating between the fancy/fast versions.
    Leaf Class:

    package net.MOD.blocks;
    
    import java.util.ArrayList;
    import java.util.List;
    import java.util.Random;
    
    import net.MOD.common.CommonProxy;
    import net.MOD.src.MOD;
    import net.minecraft.block.Block;
    import net.minecraft.block.BlockLeavesBase;
    import net.minecraft.block.material.Material;
    import net.minecraft.creativetab.CreativeTabs;
    import net.minecraft.entity.player.EntityPlayer;
    import net.minecraft.item.Item;
    import net.minecraft.item.ItemStack;
    import net.minecraft.world.ColorizerFoliage;
    import net.minecraft.world.IBlockAccess;
    import net.minecraft.world.World;
    import net.minecraftforge.common.IShearable;
    import cpw.mods.fml.relauncher.Side;
    import cpw.mods.fml.relauncher.SideOnly;
    
    public class blockLeaf extends BlockLeavesBase implements IShearable{
    private int baseIndexInPNG;
    public static final String[] LEAF_TYPES = new String[] {"oak", "spruce", "birch", "jungle"};
    int[] adjacentTreeBlocks;
    
    public blockLeaf(int par1, int par2){
    super(par1, par2, Material.leaves, false);
    this.baseIndexInPNG = par2;
    this.setTickRandomly(true);
    this.setCreativeTab(CreativeTabs.tabDecorations);
    }
    
    public void breakBlock(World par1World, int par2, int par3, int par4, int par5, int par6){
    byte var7 = 1;
    int var8 = var7 + 1;
    
    if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8)){
    for (int var9 = -var7; var9 <= var7; ++var9){
    for (int var10 = -var7; var10 <= var7; ++var10){
    for (int var11 = -var7; var11 <= var7; ++var11){
    int var12 = par1World.getBlockId(par2 + var9, par3 + var10, par4 + var11);
    
    if (Block.blocksList[var12] != null){
    Block.blocksList[var12].beginLeavesDecay(par1World, par2 + var9, par3 + var10, par4 + var11);
    }}}}}
    }
    
    public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random){
    if (!par1World.isRemote){
    int var6 = par1World.getBlockMetadata(par2, par3, par4);
    
    if ((var6 & 8) != 0 && (var6 & 4) == 0){
    byte var7 = 4;
    int var8 = var7 + 1;
    byte var9 = 32;
    int var10 = var9 * var9;
    int var11 = var9 / 2;
    
    if (this.adjacentTreeBlocks == null){
    this.adjacentTreeBlocks = new int[var9 * var9 * var9];
    }
    
    int var12;
    
    if (par1World.checkChunksExist(par2 - var8, par3 - var8, par4 - var8, par2 + var8, par3 + var8, par4 + var8)){
    int var13;
    int var14;
    int var15;
    
    for (var12 = -var7; var12 <= var7; ++var12){
    for (var13 = -var7; var13 <= var7; ++var13){
    for (var14 = -var7; var14 <= var7; ++var14){
    var15 = par1World.getBlockId(par2 + var12, par3 + var13, par4 + var14);
    
    Block block = Block.blocksList[var15];
    
    if (block != null && block.canSustainLeaves(par1World, par2 + var12, par3 + var13, par4 + var14)){
    this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = 0;
    }
    else if (block != null && block.isLeaves(par1World, par2 + var12, par3 + var13, par4 + var14)){
    this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -2;
    }
    else{
    this.adjacentTreeBlocks[(var12 + var11) * var10 + (var13 + var11) * var9 + var14 + var11] = -1;
    }}}
    }
    
    for (var12 = 1; var12 <= 4; ++var12){
    for (var13 = -var7; var13 <= var7; ++var13){
    for (var14 = -var7; var14 <= var7; ++var14){
    for (var15 = -var7; var15 <= var7; ++var15){
    if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11] == var12 - 1){
    if (this.adjacentTreeBlocks[(var13 + var11 - 1) * var10 + (var14 + var11) * var9 + var15 + var11] == -2){
    this.adjacentTreeBlocks[(var13 + var11 - 1) * var10 + (var14 + var11) * var9 + var15 + var11] = var12;
    }
    
    if (this.adjacentTreeBlocks[(var13 + var11 + 1) * var10 + (var14 + var11) * var9 + var15 + var11] == -2){
    this.adjacentTreeBlocks[(var13 + var11 + 1) * var10 + (var14 + var11) * var9 + var15 + var11] = var12;
    }
    
    if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 - 1) * var9 + var15 + var11] == -2){
    this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 - 1) * var9 + var15 + var11] = var12;
    }
    
    if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 + 1) * var9 + var15 + var11] == -2){
    this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11 + 1) * var9 + var15 + var11] = var12;
    }
    
    if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + (var15 + var11 - 1)] == -2){
    this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + (var15 + var11 - 1)] = var12;
    }
    
    if (this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11 + 1] == -2){
    this.adjacentTreeBlocks[(var13 + var11) * var10 + (var14 + var11) * var9 + var15 + var11 + 1] = var12;
    }}}}}}
    }
    
    var12 = this.adjacentTreeBlocks[var11 * var10 + var11 * var9 + var11];
    
    if (var12 >= 0){
    par1World.setBlockMetadata(par2, par3, par4, var6 & -9);
    }
    else{
    this.removeLeaves(par1World, par2, par3, par4);
    }}}
    }
    
    @SideOnly(Side.CLIENT)
    public void randomDisplayTick(World par1World, int par2, int par3, int par4, Random par5Random){
    if (par1World.canLightningStrikeAt(par2, par3 + 1, par4) && !par1World.doesBlockHaveSolidTopSurface(par2, par3 - 1, par4) && par5Random.nextInt(15) == 1){
    double var6 = (double)((float)par2 + par5Random.nextFloat());
    double var8 = (double)par3 - 0.05D;
    double var10 = (double)((float)par4 + par5Random.nextFloat());
    par1World.spawnParticle("dripWater", var6, var8, var10, 0.0D, 0.0D, 0.0D);
    }
    }
    
    private void removeLeaves(World par1World, int par2, int par3, int par4){
    this.dropBlockAsItem(par1World, par2, par3, par4, par1World.getBlockMetadata(par2, par3, par4), 0);
    par1World.setBlockWithNotify(par2, par3, par4, 0);
    }
    
    public int quantityDropped(Random par1Random){
    return par1Random.nextInt(20) == 0 ? 1 : 0;
    }
    
    public int idDropped(int par1, Random par2Random, int par3){
    return MOD.treeSapling.blockID;
    }
    
    //Chance of dropping item
    public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7){
    if (!par1World.isRemote){
    byte var8 = 20;
    
    if ((par5 & 3) == 3){
    var8 = 40;
    }
    
    if (par1World.rand.nextInt(var8) == 0){
    int var9 = this.idDropped(par5, par1World.rand, par7);
    this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(var9, 1, this.damageDropped(par5)));
    }
    
    if ((par5 & 3) == 0 && par1World.rand.nextInt(200) == 0){
    this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(Item.appleRed, 1, 0));
    }
    if ((par5 & 3) == 0 && par1World.rand.nextInt(300) == 0){
    this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(MOD.hardenedStick, 1, 0));
    }}
    }
    
    public void harvestBlock(World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6){
    super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
    }
    
    public int damageDropped(int par1){
    return par1 & 3;
    }
    
    public boolean isOpaqueCube(){
    return this.graphicsLevel;
    }
    
    public int getBlockTextureFromSideAndMetadata(int par1, int par2){
    int texture = setGraphicsLevel(graphicsLevel);
    return texture;
    }
    
    @SideOnly(Side.CLIENT)
    public int setGraphicsLevel(boolean par1){
    this.graphicsLevel=par1;
    if (par1==true){
    return this.baseIndexInPNG;}
    else{
    return this.baseIndexInPNG+1;}
    }
    
    protected ItemStack createStackedBlock(int par1){
    return new ItemStack(this.blockID, 1, par1 & 3);
    }
    
    @Override
    public boolean isShearable(ItemStack item, World world, int x, int y, int z){
    return true;
    }
    
    @Override
    public ArrayList<ItemStack> onSheared(ItemStack item, World world, int x, int y, int z, int fortune){
    ArrayList<ItemStack> ret = new ArrayList<ItemStack>();
    ret.add(new ItemStack(this, 1, world.getBlockMetadata(x, y, z) & 3));
    return ret;
    }
    
    @Override
    public void beginLeavesDecay(World world, int x, int y, int z){
    world.setBlockMetadata(x, y, z, world.getBlockMetadata(x, y, z) | 8);
    }
    
    @Override
    public boolean isLeaves(World world, int x, int y, int z){
    return true;
    }
    
    public String getTextureFile(){
    return CommonProxy.BLOCK_PNG;
    }
    }


    The texture is stuck on the fast graphics. This isn't the top of my priority list but I'd like to figure out how to fix this.
    Posted in: Modification Development
  • 0

    posted a message on Updated Tree Generation?
    Found Darkhax's Tutorials, just make sure you use the tree generation AND bonemeal event tutorials.
    Posted in: Modification Development
  • 0

    posted a message on Mizore Shirayuki Skin (rosario+vampire)
    either way its amazing
    Posted in: Skins
  • 0

    posted a message on Updated Tree Generation?
    Does anyone know where to find a good up to date tutorial on tree generation? I've run through a couple but none of them seem to be working out for me...

    Suggestions?
    Posted in: Modification Development
  • 0

    posted a message on Why won't my ore spawn,shiftedIndex?
    Quote from Darkdan13l

    Where would I insert this code? I'm new to ore generation
    Never messed with it before

    In your main mod class, under you other game registries add the
    GameRegistry.registerWorldGenerator(new ORE_GEN_CLASS());

    Then create a new class with the name of whatever you substitute in as ORE_GEN_CLASS. That is where you'll put the rest of the generation code:

    @Override
    public void generate(Random random, int chunkX, int chunkZ, World world,
    IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
    switch (world.provider.dimensionId)
    	 {
    	 case -1: generateNether();break;
    		 case 0: generateSurface(world, random, chunkX*16, chunkZ*16);break;
    		 case 1: generateEnd();
    	 }
    }
    private void generateEnd() {}
    private void generateNether() {}
    private void generateSurface(World world, Random random, int chunkX, int chunkZ) {
    for(int i = 0; i<50; i++){
    int xCoord = chunkX+random.nextInt(16);
    int yCoord = random.nextInt(65);
    int zCoord = chunkZ=random.nextInt(16);
    (new WorldGenMinable(MY_BASE_CLASS.MY_ORE.blockID, 16)).generate(world, random, xCoord, yCoord, zCoord);
    }
    
    }

    By the way...
    for(int i = 0; i<50; i++){

    set i< the number of veins you want in the chunk

    int yCoord = random.nextInt(65);

    set the 65 = to the layer you want your ore to start spawning at

    and lastly
    (new WorldGenMinable(MY_BASE_CLASS.MY_ORE.blockID, 16)).generate(world, random, xCoord, yCoord, zCoord);

    set the 16 = to the number of ore you want to have in each vein
    Posted in: Modification Development
  • 0

    posted a message on Why won't my ore spawn,shiftedIndex?
    I was having problems with this before and fixed it... the topic here should hopefully help you... if not then youtube or google search for a tutorial.
    Posted in: Modification Development
  • 0

    posted a message on More Metals v_0.2.0 [1.4.7]

    More Metals Mod
    version 0.2.0


    This mod currently has:
    Version 0.2.0
    • a new tree
    • 2 new sword types
    • 2 new crafting materials
    • mod items can spawn in certain loot chests


    Version 0.1.0
    • 3 new ores
    • 3 new blocks
    • 3 new ingots
    • 3 new armor sets
    • 3 new tool sets
    • a new furnace

    Things I'd like to add:
    • more ores, blocks and ingots
    • armor and tool sets
    • new swords with special abilities
    • tools similar to a paxel or shickaxe
    • furnaces
    • work bench
    • custom dungeons
    • mobs
    This is my first mod and I'm also looking for suggestions to add to it.

    Requires Forge http://www.minecraft...pic,4804.0.html

    Downloads:
    Primary: http://adf.ly/IBKZu

    Please only use this download if adf.ly is down: http://www.mediafire.com/?mu5ojj6f3toptst

    Version 0.1.0

    Primary: http://adf.ly/I079B
    Please only use this download if adf.ly is down: http://www.mediafire...i4yt7qv8xv6d74q

    Looking for any and all feedback! :D
    Posted in: WIP Mods
  • 0

    posted a message on [Forge] Micros Tutorials [Single chest posted, link inside]
    Quote from KashansTV

    Ok thank you guys. Texture won't work, i don't know why. It's registered in the common proxy and client. But i could fix the crash when braking the block while burning. Look at TileEntityExtruder var10

    Original code:
    public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9)
    {
    if (par1World.isRemote)
    {
    return true;
    }
    else if (!par5EntityPlayer.isSneaking())
    {
    TileEntityExtruder var10 = (TileEntityExtruder) par1World.getBlockTileEntity(par2, par3, par4);
    if (var10 != null)
    {
    par5EntityPlayer.openGui(Trees.instance, 0, par1World, par2, par3, par4);
    }
    return true;
    }
    else
    {
    return false;
    }
    }


    New code:

    public boolean onBlockActivated(World par1World, int par2, int par3,
    int par4, EntityPlayer par5EntityPlayer, int par6, float par7,
    float par8, float par9) {
    if (par1World.isRemote) {
    return true;
    } else if (!par5EntityPlayer.isSneaking()) {
    TileEntity var10 = (TileEntity) par1World
    	 .getBlockTileEntity(par2, par3, par4);
    if (var10 != null) {
    par5EntityPlayer.openGui(Trees.instance, 0, par1World, par2,
    	 par3, par4);
    }
    return true;
    } else {
    return false;
    }
    }


    Now I will try fixing smelting recipies.


    For anyone who comes across this problem in the future here's the fix (block file):

    public static void updateFurnaceBlockState(boolean par0, World par1World,
       int par2, int par3, int par4) {
      int var5 = par1World.getBlockMetadata(par2, par3, par4);
      TileEntity var6 = par1World.getBlockTileEntity(par2, par3, par4);
      keepFurnaceInventory = true;
      if (par0) {
       par1World.setBlockWithNotify(par2, par3, par4,
    	 YourMod.YourActiveFurnaceBlock.blockID);
      } else {
       par1World.setBlockWithNotify(par2, par3, par4,
    	 YourMod.YourIdleFurnaceBlock.blockID);
      }

    Posted in: Tutorials
  • 0

    posted a message on [Forge] Micros Tutorials [Single chest posted, link inside]
    Finally fixed it... After I added the proxy's I was still having the problem so I started going though and compairing the tutorial vs. my code and in the furnace block file in the onBlockActivated I had
    {
    if (!par1World.isRemote)
    {
    return true;
    }


    I removed the ! and PRESTO I can move items around in my new gui.

    Thanks for all the help :D
    Posted in: Tutorials
  • 0

    posted a message on [Forge] Micros Tutorials [Single chest posted, link inside]
    Could it be a problem with not having Client and Server proxy's set up? I haven't looked into those yet but I keep seeing them mentioned...
    Posted in: Tutorials
  • 0

    posted a message on [Forge] Micros Tutorials [Single chest posted, link inside]
    Quote from microjunk

    It should work fine with that too, make sure all references in your container and gui furnace are correct


    As far as I can see I have all the code referenced correctly...

    Here's my code, maybe I missed something.

    Container:

    public class ContainerHardenFurnace extends Container
    {
    private TileEntityHardenFurnace furnace;
    private int lastCookTime = 0;
    private int lastBurnTime = 0;
    private int lastItemBurnTime = 0;
    
    public ContainerHardenFurnace(InventoryPlayer thePlayer, TileEntityHardenFurnace furnaceEntity)
    {
    this.furnace = furnaceEntity;
    	 this.addSlotToContainer(new Slot(furnaceEntity, 0, 56, 17));
    	 this.addSlotToContainer(new Slot(furnaceEntity, 1, 56, 53));
    	 this.addSlotToContainer(new SlotHardenFurnace(thePlayer.player, furnaceEntity, 2, 116, 35));
    	 int var3;
    	 for (var3 = 0; var3 < 3; ++var3)
    	 {
    			 for (int var4 = 0; var4 < 9; ++var4)
    			 {
    					 this.addSlotToContainer(new Slot(thePlayer, var4 + var3 * 9 + 9, 8 + var4 * 18, 84 + var3 * 18));
    			 }
    		 }
    
    		 for (var3 = 0; var3 < 9; ++var3)
    		 {
    				 this.addSlotToContainer(new Slot(thePlayer, var3, 8 + var3 * 18, 142));
    		 }
    }
    
    public void addCraftingToCrafters(ICrafting par1ICrafting)
    {
    		 super.addCraftingToCrafters(par1ICrafting);
    		 par1ICrafting.sendProgressBarUpdate(this, 0, this.furnace.furnaceCookTime);
    		 par1ICrafting.sendProgressBarUpdate(this, 1, this.furnace.furnaceBurnTime);
    		 par1ICrafting.sendProgressBarUpdate(this, 2, this.furnace.currentItemBurnTime);
    }
    
    public void detectAndSendChanges()
    {
    		 super.detectAndSendChanges();
    
    		 for (int var1 = 0; var1 < this.crafters.size(); ++var1)
    		 {
    				 ICrafting var2 = (ICrafting)this.crafters.get(var1);
    
    				 if (this.lastCookTime != this.furnace.furnaceCookTime)
    				 {
    						 var2.sendProgressBarUpdate(this, 0, this.furnace.furnaceCookTime);
    				 }
    
    				 if (this.lastBurnTime != this.furnace.furnaceBurnTime)
    				 {
    						 var2.sendProgressBarUpdate(this, 1, this.furnace.furnaceBurnTime);
    				 }
    
    				 if (this.lastItemBurnTime != this.furnace.currentItemBurnTime)
    				 {
    						 var2.sendProgressBarUpdate(this, 2, this.furnace.currentItemBurnTime);
    				 }
    		 }
    
    		 this.lastCookTime = this.furnace.furnaceCookTime;
    		 this.lastBurnTime = this.furnace.furnaceBurnTime;
    		 this.lastItemBurnTime = this.furnace.currentItemBurnTime;
    }
    
    @SideOnly(Side.CLIENT)
    public void updateProgressBar(int par1, int par2)
    {
    		 if (par1 == 0)
    		 {
    				 this.furnace.furnaceCookTime = par2;
    		 }
    
    		 if (par1 == 1)
    		 {
    				 this.furnace.furnaceBurnTime = par2;
    		 }
    
    		 if (par1 == 2)
    		 {
    				 this.furnace.currentItemBurnTime = par2;
    		 }
    }
    
    public boolean canInteractWith(EntityPlayer par1EntityPlayer)
    {
    		 return this.furnace.isUseableByPlayer(par1EntityPlayer);
    }
    
    public ItemStack transferStackInSlot(EntityPlayer par1EntityPlayer, int par2)
    {
    		 ItemStack var3 = null;
    		 Slot var4 = (Slot)this.inventorySlots.get(par2);
    
    		 if (var4 != null && var4.getHasStack())
    		 {
    				 ItemStack var5 = var4.getStack();
    				 var3 = var5.copy();
    
    				 if (par2 == 2)
    				 {
    						 if (!this.mergeItemStack(var5, 3, 39, true))
    						 {
    								 return null;
    						 }
    
    						 var4.onSlotChange(var5, var3);
    				 }
    				 else if (par2 != 1 && par2 != 0)
    				 {
    						 if (HardenFurnaceRecipes.smelting().getSmeltingResult(var5) != null)
    						 {
    								 if (!this.mergeItemStack(var5, 0, 1, false))
    								 {
    										 return null;
    								 }
    						 }
    						 else if (TileEntityHardenFurnace.isItemFuel(var5))
    						 {
    								 if (!this.mergeItemStack(var5, 1, 2, false))
    								 {
    										 return null;
    								 }
    						 }
    						 else if (par2 >= 3 && par2 < 30)
    						 {
    								 if (!this.mergeItemStack(var5, 30, 39, false))
    								 {
    										 return null;
    								 }
    						 }
    						 else if (par2 >= 30 && par2 < 39 && !this.mergeItemStack(var5, 3, 30, false))
    						 {
    								 return null;
    						 }
    				 }
    				 else if (!this.mergeItemStack(var5, 3, 39, false))
    				 {
    						 return null;
    				 }
    
    				 if (var5.stackSize == 0)
    				 {
    						 var4.putStack((ItemStack)null);
    				 }
    				 else
    				 {
    						 var4.onSlotChanged();
    				 }
    
    				 if (var5.stackSize == var3.stackSize)
    				 {
    						 return null;
    				 }
    
    				 var4.onPickupFromSlot(par1EntityPlayer, var5);
    		 }
    
    		 return var3;
    }
    }


    GUI:

    public class GuiHardenFurnace extends GuiContainer
    {
    private TileEntityHardenFurnace furnaceInventory;
    public GuiHardenFurnace(InventoryPlayer inventory,
    TileEntityHardenFurnace tile_entity) {
    super(new ContainerHardenFurnace(inventory, tile_entity));
    furnaceInventory = tile_entity;
    }
    protected void drawGuiContainerForegroundLayer(int par1, int par2)
    {
    		 this.fontRenderer.drawString(StatCollector.translateToLocal("Hardened Furnace"), 60, 6, 4210752);
    		 this.fontRenderer.drawString(StatCollector.translateToLocal("container.inventory"), 8, this.ySize - 96 + 2, 4210752);
    }
    protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3)
    {
    		 int var4 = this.mc.renderEngine.getTexture("/mm/gui/furnace.png");
    		 GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    		 this.mc.renderEngine.bindTexture(var4);
    		 int var5 = (this.width - this.xSize) / 2;
    		 int var6 = (this.height - this.ySize) / 2;
    		 this.drawTexturedModalRect(var5, var6, 0, 0, this.xSize, this.ySize);
    		 int var7;
    		 if (this.furnaceInventory.isBurning())
    		 {
    				 var7 = this.furnaceInventory.getBurnTimeRemainingScaled(12);
    				 this.drawTexturedModalRect(var5 + 56, var6 + 36 + 12 - var7, 176, 12 - var7, 14, var7 + 2);
    		 }
    		 var7 = this.furnaceInventory.getCookProgressScaled(24);
    		 this.drawTexturedModalRect(var5 + 79, var6 + 34, 176, 14, var7 + 1, 16);
    }
    }

    Posted in: Tutorials
  • 0

    posted a message on [Forge] Micros Tutorials [Single chest posted, link inside]
    So I was able to finally get everything working, furnace is textured correctly, gui opens up and stays open, haven't had any problems except that I can't move items in my inventory while my gui is open. If you have an idea as to why this is but need to see my code let me know...
    Posted in: Tutorials
  • 0

    posted a message on Ore Generation Help Please?
    Thanks for the help, between adding in the breaks and messing around with some more code I finally got my ores to gen in the world. For anyone who ends up coming to this post later the code I ended up having in my generation class that worked is:
    @Override
    public void generate(Random random, int chunkX, int chunkZ, World world,
       IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
      switch (world.provider.dimensionId)
        {
        case -1: generateNether();break;
    	 case 0: generateSurface(world, random, chunkX*16, chunkZ*16);break;
    	 case 1: generateEnd();
        }
      }
    private void generateEnd() {}
    private void generateNether() {}
    private void generateSurface(World world, Random random, int chunkX, int chunkZ) {
      for(int i = 0; i<50; i++){
       int xCoord = chunkX+random.nextInt(16);
       int yCoord = random.nextInt(65);
       int zCoord = chunkZ=random.nextInt(16);
       (new WorldGenMinable(MY_BASE_CLASS.MY_ORE.blockID, 16)).generate(world, random, xCoord, yCoord, zCoord);
      }
     
    }
    Posted in: Modification Development
  • To post a comment, please .