• 0

    posted a message on [1.6.2]ModLoader Tutorials
    You have been so helpful :D
    Your tutorials are great.
    I have another question if you don't mind. Right now, I have a way to make it a chance to drop items. My code goes like this:
    public int quantityDropped(Random par1Random){
    return par1Random.nextInt(2) == 0 ? 1 : 0;
    
    }

    Right now, it either drops all items, or no items. Is it possible to give each item a chance to drop or not?
    Thx anyway :P
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [1.6.2]ModLoader Tutorials
    Quote from Jamesscn

    In your BlockName.java change

    return mod_fun.funBlock.blockID;


    to

    return mod_ModNameHere.BlockNameHere.blockID;


    or if it's a minecraft block:

    return Block.BlockName.blockID;


    Yeah, that's what I already have. I wanted to know how to make a block drop 6 different things when mined. Is that possible?
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [1.6.2]ModLoader Tutorials
    Quote from Jamesscn

    I found a workaround to this problem, add these three voids to your BlockName.java:

    public int idDropped(int par1, Random par2Random, int par3){
    	 return mod_fun.funBlock.blockID;
    }
    
    public int idDropped2(int par1, Random par2Random, int par3){
    	 return mod_fun.mineralBlock.blockID;
    }
    
    public void dropBlockAsItemWithChance(World par1World, int par2, int par3, int par4, int par5, float par6, int par7){
    	 if (!par1World.isRemote){
    		 int var8 = this.quantityDroppedWithBonus(par7, par1World.rand);
    
    		 for (int var9 = 0; var9 < var8; ++var9)
    		 {
    			 if (par1World.rand.nextFloat() <= par6)
    			 {
    				 int var10 = this.idDropped2(par5, par1World.rand, par7);
    				 int var11 = this.idDropped(par5, par1World.rand, par7);
    
    				 if (var10 > 0)
    				 {
    				 this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(var10, 1, this.damageDropped(par5)));
    				 this.dropBlockAsItem_do(par1World, par2, par3, par4, new ItemStack(var11, 1, this.damageDropped(par5)));
    				 }
    			 }
    		 }
    	 }
    }


    I tried that, but isn't that for making the same item have a chance to drop another? Cause I have already figured out away to make 0-2 of the same item drop. I wanted to know how to make a block drop different items when broken.
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [1.6.2]ModLoader Tutorials
    I was wondering how I might go about making a block drop several items when broken. I looked at minecraft's vanilla code, but couldn't find how to make several things drop.
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on Making blocks drop multiple items?
    Hi guys. How would I go about making a block drop more than one item? I have made a block, and 6 items that I would like to drop from it when it is mined. But I couldn't figure out how to code that. Any advice would help. Thanks
    Posted in: Modification Development
  • 0

    posted a message on [1.6.2]ModLoader Tutorials
    EDIT:
    Risugami helped me out here, and you missed a line of code in your tutorial. I didn't register the block.

    ModLoader.registerBlock(blockName);
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [1.6.2]ModLoader Tutorials
    I'm having a problem with adding my block. I did the code just like you did, and got no errors at all. But when I load up MC, the block doesn't show up in the creative menu. I decided to add a crafting recipe for it, and temporarily made it one piece of dirt. But when I put the block in, the game crashed.

    This is part of the crash code
    at net.minecraft.src.ModLoader.initStats(ModLoader.java:837)
    at net.minecraft.src.ModLoader.init(ModLoader.java:810)
    at net.minecraft.src.ModLoader.addAllRenderers(ModLoader.java:180)
    at net.minecraft.src.RenderManager.(RenderManager.java:96)
    at net.minecraft.src.RenderManager.(RenderManager.java:14)
    at net.minecraft.client.Minecraft.startGame(Minecraft.java:417)
    at net.minecraft.src.MinecraftAppletImpl.startGame(MinecraftAppletImpl.java:41)
    at net.minecraft.client.Minecraft.run(Minecraft.java:726)
    at java.lang.Thread.run(Unknown Source)
    By the way, I really like your tutorials, keep it up :D
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [1.6.2]ModLoader Tutorials
    Quote from Jamesscn

    Add this to your imports (after package net.minecraft.src but before public class):

    import java.util.Map;


    also make sure you add a space between public and void.

    I forgot to add how to make your mobs spawn naturally (fail): Add this to your BiomeGenBase.java file in the protected BiomeGenBase(int par1):

    this.spawnableCreatureList.add(new SpawnListEntry(EntitySteve.class, 8, 4, 8));


    Change EntitySteve to your mob and spawnableCreatureList if it's not a passive land mob

    THx
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [1.6.2]ModLoader Tutorials
    I really like your mob tutorial, but I get an error. When I type "public void addRenderer(Map var1){"
    Map gets an error. It says "Map cannot be resolved to a type". Also, how do I know if the mobs are spawning? Do they act like animals and rarely spawn?
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on Popgalops Beginner-Advanced Modloader Modding Tutorials (Taking requests)
    Adding food doesn't work for me. It doesn't understand the whole int int boolean thing
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on [1.6.2]ModLoader Tutorials
    Hi
    I was trying to use your code for how to add food, but I got an error. Basically the constructor with the item int int float boolean doesn't work D:
    Any fix for this, or is there a mistake in the code?
    Posted in: Mapping and Modding Tutorials
  • 0

    posted a message on Racing minigame 1-3 players, done by thebajancanadian and jeromeasf
    mitch sent me
    Posted in: Maps
  • 0

    posted a message on [Surv] Castaway - Survival on a crashed ship - 2800+ Downloads
    Quote from john10301

    MiniMax, I was wondering if I could make a lets play on Castaway with my cousin, I would tell viewers about you and your maps. :Notch: :-(o):

    That would be greatly appreciated! I'll PM you just in case you don't see this. Ill subscribe for sure if you start :D
    By the way, It's MinMax, not Minimax ;)
    Posted in: Maps
  • 0

    posted a message on Azrooh's Roleplaying [Vanilla! Absolute Freedom!]
    Fun
    Posted in: PC Servers
  • 0

    posted a message on Open 24/7 Vanilla Server All are Welcome Brand New
    不觉得好玩,我被禁止
    至少他们张贴的链接
    Posted in: PC Servers
  • To post a comment, please .