• 1

    posted a message on [1.8.1] Some Turtle's *Not your average tutorials*
    Quote from DjGyarados

    Can you make a tutorial for taming+riding mobs and probably how to create a mob for people that don't know.


    I could look into taming/riding mobs but there are an overabundance of creating a mob tutorials. Thanks for your feedback!
    Posted in: Tutorials
  • 1

    posted a message on [1.8.1] Some Turtle's *Not your average tutorials*
    I decided to make this my personal place to deposit tutorials, I've added two tutorials, one about adding new fuels(more descriptive I personally think then most) plus my randomized drop/drop type tutorials(which is also on Mad's Modding Thread).
    Posted in: Tutorials
  • 1

    posted a message on An Unexplainable Recompile Error
    Notice how your class is called "mod_Tools" and your constructor is called "mod_MarioTools", there's your issue.
    Posted in: Modification Development
  • 5

    posted a message on [1.8.1] SomeTurtle's Mods [ModLoader]

    Pack Rat Mod v1.1


    Pack Rat Mod is a mod that allows you to compress certain items for even more storage. Items such as string, coal, and redstone can be crafted into a "bundled" version to allow a more compact storage. As well there are also "recycle" recipes that allow you to take certain items (Chests, Damaged Tools/Armors, etc) and recycle them to have uses elsewhere. It also has 4 misc recipes I thought would be nice to have and now PIE!


    Changelog v1.1

    -Added bundle recipes for all dyes in the form of "Bottled <color> Dye" (-Except Blue for Obvious Reasons-).
    -Cookies can now be bundled into "Cookie Trays"
    -Coal Blocks can now be used as fuel, they are equivalent to 9 coals.
    -Wheat Block renamed to "Hay Bail"
    -Slime Blocks are now Semi-Transparent
    -Added Two craftable pies, Cherry and Pumpkin. Pumpkin restores 6 "hunger slots" while Berry restores 4 "hunger slots".
    -Reduced amount of class files from 22 to 6.
    -Reduced amount of ID's used from 23 to 9.
    -Items and Blocks have new ID's:
    ......Coal Block ID now 230
    ......Redstone Block ID now 231
    ......Hay Bail ID now 232
    ......Flint Block ID now 233
    ......Slime Block ID now 234
    ......Most Items are split between ID's 600-601
    ......Pumpkin Pie Slice ID is 602
    ......Berry Pie Slice ID is 603
    Warning:If you used Pack Rat Mod v1 and are upgrading, please unbundle all items in your world. I changed the ID's and changed how items and blocks work, so if you don't this will most likely cause issues.



    Recipes

    //Pack Rat Recipes

    - Pile O' Bones

    - Coal Block

    - Carton of Eggs

    - Bundled Feathers

    - Flint Block

    - Gun Powder Flask

    - Brown Mushroom Basket

    - Red Mushroom Basket

    - Stacked Paper

    - Ender Pearl Necklace

    - Pumpkin Seed Packet

    - Melon Seed Packet

    - Wheat Seed Packet

    - Redstone Block

    - Bundled Reeds

    - Slime Block

    - Bundled Sticks

    - Spool of String

    - Bag of Sugar

    - Wheat Block

    - Cookie Sheet

































    //Recycle Recipes
































    //Berry and Pumpkin Pie Recipes

    - Berries
    - Pumpkin Puree
    - Pie Crust
    - Berry Pie
    - Pumpkin Pie
    - Berry Pie Slices - Restores 4 "hunger slots"

    - Pumpkin Pie Slices - Restores 6 "hunger slots"


    //Misc Recipes






    Install/Uninstall Instructions

    Install
    1.) Make sure you already have ModLoader Installed.
    2.) Locate your Minecraft bins folder; Windows 7 "\AppData\Roaming\.minecraft\bin\".
    3.) Before installing this mod backup minecraft.jar to make for an easier uninstall.
    4.) Extract the file, Pack Rat Mod v1.1.zip, you just downloaded.
    5.) Drag the contents in "/MOD/" onto minecraft.jar.
    6.) Congrats the Mod Should be installed now!

    Uninstall

    If you made a backup of minecraft.jar, delete the minecraft.jar that contains this mod then reinstate the backup of minecraft.jar.

    If not, here is a list of all of the files from this mod for you to delete manually:

    /PackRatMod/ <----Folder
    BlockPRMBundledBlocks.class
    BlockPRMBundledSlime.class
    BlockPRMBundledWheat.class
    ItemPRMBundledItemsA.class
    ItemPRMBundledItemsB.class
    mod_PackRatMod.class


    Things Currently Done for v1.2

    I decided to keep a list of things I've completed for the next version and will add them here as I complete them.

    -Nothing

    Wishlist (The Future)

    There are some things I'd like to personally to accomplish and add to this mod as well as I've already received some nice suggestions. So for my reference and yours, here's a list of what I hope to accomplish with updates.

    -A special crafting table, or an item, that converts stacks of items into their corresponding bundle so you won't have to fill all 9 crafting slots each time to make a bundle.
    -A backpack with upgrades(upgrades contain more storage). (Suggested by DwarfishMiner)
    -A special recycling table that can be used to gain even more recycled materials from an item. I.E. Instead of getting 6 Silver Nuggets from a Rail, you could get 8 Silver Ingots.


    Mystery Block v1


    Mystery Block Mod adds a new block to Minecraft. This block can be found throughout the world and when mined can yield up to 10 valuable items that include; Coal, Iron, Gold, Diamond, Watermelon Seeds, Pumpkin Seeds, and even Golden Apples. It can also be crafted if your feeling lucky!


    Video


    (NOTE: THIS PICTURE IS ONLY A REFRENCE, THEY DO NOT SPAWN LIKE THIS AND ONLY HAVE VEINS UP TO TWO AND ARE QUITE RARE!)

    Recipes


    Install/Uninstall Instructions

    Install
    1.) Make sure you already have ModLoader Installed.
    2.) Locate your Minecraft bins folder; Windows 7 "\AppData\Roaming\.minecraft\bin\".
    3.) Before installing this mod backup minecraft.jar to make for an easier uninstall.
    4.) Extract the file, Mystery Mod v1.zip, you just downloaded.
    5.) Drag the contents in "/MOD/" onto minecraft.jar.
    6.) Congrats the Mod Should be installed now!

    Uninstall

    If you made a backup of minecraft.jar, delete the minecraft.jar that contains this mod then reinstate the backup of minecraft.jar.

    If not, here is a list of all of the files from this mod for you to delete manually:

    /MysteryBlock/ <----Folder
    BlockMysteryBlock.class
    mod_MysteryBlock.class


    *NEW* Creeper Proof v1 *NEW*


    Creeper Proof Mod gives you the ability to make blocks resistant to TNT blasts and Creeper Blasts. You can craft two wands, Wand of Resistance and Wand of Compliance. When you right click on a block with the Wand of Resistance, all blocks of that type become resistant to explosions from TNT and Creepers. When you right click on a block with the Wand of Compliance, the blocks return to their normal resistance.

    Video

    Recipes
    Wand of Resistance

    Wand of Compliance


    Install/Uninstall Instructions

    Install
    1.) Make sure you already have ModLoader Installed.
    2.) Locate your Minecraft bins folder; Windows 7 "\AppData\Roaming\.minecraft\bin\".
    3.) Before installing this mod backup minecraft.jar to make for an easier uninstall.
    4.) Extract the file, Pack Rat Mod v1.1.zip, you just downloaded.
    5.) Drag the contents in "/MOD/" onto minecraft.jar.
    6.) Congrats the Mod Should be installed now!

    (WARNING: I HIGHLY RECOMMEND MAKING A BACKUP OF MINECRAFT.JAR BEFORE INSTALLING!!!!!!!!!!!!)
    (UNINSTALLING WILL MOST LIKELY REQUIRE YOU TO DELETE MINECRAFT.JAR AND FORCE UPDATE OTHERWISE!!!!!)

    Uninstall

    If you made a backup of minecraft.jar, delete the minecraft.jar that contains this mod then reinstate the backup of minecraft.jar.

    If not, here is a list of all of the files from this mod for you to delete manually:

    /CreeperProof/ <----Folder
    ItemWandA.class
    ItemWandB.class
    mod_CreeperProof.class



    I just want everyone to realize that when you use the "Wand of Resistance" on a block, every block of that type will be resistant to TNT and Creepers, not just the block you clicked on. As of right now that is the only way I can get this to work I am looking into making only the blocks you click gain the resistance properties, until then this will have to suffice and that is why I provided the "Wand of Compliance". Also there are only a few blocks unaffected for now, one of them being wool. But most blocks used for building(Bark, Wooden Planks, Cobblestone, Mossy Cobblestone, etc) are all or should be all covered by this mod!




    Downloads
    Pack Rat Mod v1.1
    Pack Rat Mod v1.1 - MediaFire(AdCraft)
    Pack Rat Mod v1.1 - MediaFire
    Mystery Block v1
    Mystery Block v1 - MediaFire(AdCraft)
    Mystery Block v1 - MediaFire
    Creeper Proof v1
    Creeper Proof v1 - MediaFire(AdCraft)
    Creeper Proof v1 - MediaFire

    Please feel free to leave any comments or suggestions, feedback is always appreciated. If you find any bugs or having any problems leave a message and I'll do my best to help.
    Posted in: Minecraft Mods
  • 7

    posted a message on [1.8.1] Some Turtle's *Not your average tutorials*
    Update (Please Read): I'm going to start using this as a place to store any tutorials I create. My main goal is to provide tutorials that are rarely covered are aren't covered at all(so no new block, new item tutorials). I'm still learning and as I learn I don't mind sharing the information I've learned. I do ask you do one thing and that is learn from these tutorials! Don't just copy and paste and never look at the code again, try and understand what is happening and what you are doing.

    These tutorials are for ModLoader!

    Easy Tutorials


    Using Dyes in Recipes (This can be applied to all blocks containing damage values like Wool for instance!)
    If you noticed Dyes and Wools are stored using damage values, which allows multiple items/blocks to be stored on a single ID. Because of this the basic Item.dyePowder or Block.wool doesn't work in recipes because your not providing the Damage Value.

    To do so is actually really simple.

    Here is an example of a recipe that won't work:
    ModLoader.AddRecipe(new ItemStack(Item.dyePowder, 9), new Object[]
    { "#", Character.valueOf('#'), Block.dirt });


    To make it work you would need to replace "Item.dyePowder, 9" with "Item.dyePowder, 9, 0", so the new recipe would look like this:
    ModLoader.AddRecipe(new ItemStack(Item.dyePowder, 9, 0), new Object[]
    { "#", Character.valueOf('#'), Block.dirt });


    The 9 is the amount that will be crafted after fulfilling the recipe and the 0 is the damage value(which you could also consider the "ID" in some sense) of the Item.dyePowder. With this recipe 1 dirt block will craft 9 Black Dyes.

    Now there is a minor tweak that needs to be made when making a dye part of the recipe.

    This is an example of a recipe that won't work:
    ModLoader.AddRecipe(new ItemStack(Block.dirt, 9), new Object[]
    { "#", Character.valueOf('#'), Item.dyePowder });


    To make it work you would need to replace "Item.dyePowder" with "new ItemStack(Item.dyePowder, 1, 0)", so the new recipe would look like this.
    ModLoader.AddRecipe(new ItemStack(Block.dirt, 9), new Object[]
    { "#", Character.valueOf('#'), new ItemStack(Item.dyePowder, 1, 0) });


    The 1 always has to be there, it doesn't change, the 0 is the damage value of Item.dyePowder. With this recipe 1 Black Dye would craft 1 dirt block.

    The damage values for Item.dyePowder and their corresponding color.
    Black - 0
    Red - 1
    Green - 2
    Brown - 3
    Blue - 4
    Purple - 5
    Cyan - 6
    Light Gray - 7
    Gray - 8
    Pink - 9
    Lime Green - 10
    Yellow - 11
    Light Blue - 12
    Magenta - 13
    Orange - 14
    White - 15
    Using Weapons/Tools/Armors in Recipes
    Now for the most part using Weapons/Tools/Armors in recipes is pretty straight forward.

    Here is an example of a recipe where 1 Iron Pickaxe will create 1 Dirt Block (Just for examples sake):
    ModLoader.AddShapelessRecipe(Block.dirt, 1), new Object[]
    { Item.pickaxeSteel });


    Now this will work fine except for 1 problem, if the tool has taken any damage the recipe won't work. So to fix that we are going to have to change "Item.pickaxeSteel" to "new ItemStack(Item.pickaxeSteel, 1, -1)".

    Doing so would give us this recipe:
    ModLoader.AddShapelessRecipe(Block.dirt, 1), new Object[]
    { new ItemStack(Item.pickaxeSteel, 1, -1) });


    Now whether or not the tool has taken any damage, when crafted it will produce 1 dirt block. Now I'm not a 100% certain why this works, but I know for a fact it does.

    This can be used with all tools/weapons/armors, simply change "pickaxeSteel" to what tool/weapon/armor you would like to use.

    Adding New Fuel Sources

    Now I've only seen a few tutorials on creating few but some of them aren't really descriptive and could use just a tad bit more information, so I created this quick tutorial on the subject.

    We'll start out by creating a new mod_***.java file, we'll call this one mod_NewFuel:
    package net.minecraft.src;
    
    public class mod_NewFuel extends BaseMod
    {
    	public mod_NewFuel()
    	{
    	}
    	public String Version()
    	{
    		return "New Fuel 1.8.1";
    	}
    }


    Now lets take a look at the code that you use to add fuel:
       public int AddFuel(int i, int j)
       {
          if(i == Name.IDtype) 
          {
             return fuelAmount;
          }
          return 0;
       }


    Name = The name of the item or block you want to become a fuel source.
    IDtype = If "Name" is an item, IDtype would become shiftedIndex. If "Name" is a block, IDtype would be blockID.
    fuelAmount = Fuel amount is the amount of fuel the new item/block will possess. Each item takes 200 FA to smelt, Coal can smelt 8 items therefore it has 1600 FA.

    Now to get this to work, you would place this inside of your mod_NewFuel class but outside of your mod_NewFuel constructor, like so:
    package net.minecraft.src;
    
    public class mod_NewFuel extends BaseMod
    {
    	public int AddFuel(int i, int j)
            {
    		if(i == Block.dirt.blockID) 
    		{
    			return 400;
    		}
    		return 0;
            }
    	public mod_NewFuel()
    	{
    	}
    	public String Version()
    	{
    		return "New Fuel 1.8.1";
    	}
    }

    This would make it so dirt can be used as a fuel, it will be able to smelt 2 items.

    Now let's say you want to add more then one block or item as fuel, it's as simple as adding a new if command.
    package net.minecraft.src;
    
    public class mod_NewFuel extends BaseMod
    {
    	public int AddFuel(int i, int j)
            {
    		if(i == Block.dirt.blockID) 
    		{
    			return 400;
    		}
    		if(i == Item.ingotIron.shiftedIndex)
    		{
    			return 1000;
    		}
    		return 0;
            }
    	public mod_NewFuel()
    	{
    	}
    	public String Version()
    	{
    		return "New Fuel 1.8.1";
    	}
    }


    Now with this code, Dirt would become a fuel source that smelts 2 items while Iron Bars would become a fuel source that smelts 5 items.

    Intermediate Tutorials

    Creating a Block With Randomized Drop

    In this tutorial I'm going to show you how to make a block drop more then one item. On top of that we are going to randomize the amount that is dropped each time as well as randomize which items are dropped. Keep in mind I don't know exactly what every bit of coding does so if I state something wrong please feel free to correct me.

    Here is an example, using a mod I recently released, of what we are going to be doing:

    First we need to create a mod_Test.java file. Place the following within this file:

    package net.minecraft.src;
    
    public class mod_Test extends BaseMod
    {	
    	public mod_Test()
    	{
    	}
    	
    
    	public String Version()
    	{
    		return "1.8.1";
    	}
    }


    Now we need to create the block file, we'll name it BlockTest.java. Place the following within this file:

    package net.minecraft.src;
    
    import java.util.Random;
    
    public class BlockTest extends Block
    {
    
        public BlockTest(int i, int j)
        {
            super(i, j, Material.ground);           
        }
        public int idDropped(int i, Random random)
        {
           return mod_Test.Test.blockID;
        }
        public int quantityDropped(Random random)
        {
                return 0;
        }
    }


    Pretty basic so far, before we go any further lets go ahead and register our block, give it a name, a texture, and recipe within mod_Test.java.

    package net.minecraft.src;
    
    public class mod_Test extends BaseMod
    {	
    	public static Block Test = new BlockTest(230, 0).setHardness(1.0F).setResistance(60.0F).setBlockName("Test");
    	
    	public mod_Test()
    	{
    		ModLoader.RegisterBlock(Test);
    		Test.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/test.png");
    		ModLoader.AddRecipe(new ItemStack(Test, 1), new Object[]
    		{ "#", Character.valueOf('#'), Block.dirt });
    	}
    	
    
    	public String Version()
    	{
    		return "1.8.1";
    	}
    }


    Good now we don't need to edit mod_Test.java anymore, once we finish up with BlockTest.java we can recompile and test.

    Now back to BlockTest.java, in order to make this work we are going to have to add a few methods, the first one we'll add is called dropBlockAsItemWithChance.
    package net.minecraft.src;
    
    import java.util.Random;
    
    public class BlockTest extends Block
    {
    
        public BlockTest(int i, int j)
        {
            super(i, j, Material.ground);           
        }
        public int idDropped(int i, Random random)
        {
           return mod_Test.Test.blockID;
        }
        public int quantityDropped(Random random)
        {
                return 0;
        }
        public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f)
        {
            super.dropBlockAsItemWithChance(world, i, j, k, l, f);
            if(world.multiplayerWorld)
            {
                return;
            }
        }
    }


    To the best of my knowledge, this method is what allows us to initiate multiple drops. Now before we move on let's think of what items we are going to allow our block to drop.
    I think we'll go with Coal, Iron Ingot(bars), and Gold Ingot(bars). For each item we want to drop we are going to have to make it's own method. We'll create the method for coal first so I can break down what's going on(to the best of my knowledge).
    	public void dropCoal(World world, int i, int j, int k, int l, float f) //This creates a void method called dropCoal, the void is there so we don't need to have a return within the method.
    	{                                                                      //Within the ()'s we are telling what information needs to get passed down to the method, in this case it's identical to the dropBlockAsItemWithChance method.
    		float f1 = 0.7F;
            float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f3 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;  	   //Now I'm not 100% sure, but I believe these varibles are set to be used to make the items pop out of the block in random directions.
    		EntityItem entityitem1 = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.coal)); //This creates a new instance of EntityItem called entityitem1, it then passes the above variables as well as which item is going to drop onto EntityItem.
            entityitem1.delayBeforeCanPickup = 10; //This sets the delay before the item can be picked up, I assume this is in place so players can see the items that come out before it is sucked into their inventory.
            world.entityJoinedWorld(entityitem1); //This is what actually makes the item appear after breaking our block.
    	}


    So now we just have to create the methods for our Iron and Gold Ingot drops. The only difference between the 3 methods is the method name and item within new ItemStack(). With all 3 methods added, our BlockTest.java should look like this:
    package net.minecraft.src;
    
    import java.util.Random;
    
    public class BlockTest extends Block
    {
    
        public BlockTest(int i, int j)
        {
            super(i, j, Material.ground);           
        }
        public int idDropped(int i, Random random)
        {
           return mod_Test.Test.blockID;
        }
        public int quantityDropped(Random random)
        {
                return 0;
        }
        public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f)
        {
            super.dropBlockAsItemWithChance(world, i, j, k, l, f);
            if(world.multiplayerWorld)
            {
                return;
            }
        }
    	public void dropCoal(World world, int i, int j, int k, int l, float f)
    	{
    		float f1 = 0.7F;
            float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f3 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
    		EntityItem entityitem1 = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.coal));
            entityitem1.delayBeforeCanPickup = 10;
            world.entityJoinedWorld(entityitem1);
    	}
    	
    	public void dropIron(World world, int i, int j, int k, int l, float f)
    	{
    		float f1 = 0.7F;
            float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f3 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
    		EntityItem entityitem1 = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.ingotIron));
            entityitem1.delayBeforeCanPickup = 10;
            world.entityJoinedWorld(entityitem1);
    	}
    	
    	public void dropGold(World world, int i, int j, int k, int l, float f)
    	{
    		float f1 = 0.7F;
            float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f3 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
    		EntityItem entityitem1 = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.ingotGold));
            entityitem1.delayBeforeCanPickup = 10;
            world.entityJoinedWorld(entityitem1);
    	}
    }


    We're almost done, but now we need to create one last method. This method is going to be responsible for deciding which items should be dropped and actually dropping the items. We're going to call it getDrops and we are going to utilize a For loop and the random function to accomplish this. Before we create this method, we need to declare two variables we are going to use for the rest of the tutorial. Place the following witin the BlockTest class file(either at the top or the bottom):
    private int dropAmount;
    private int dropType;


    Now on to the to our last method, we are going to call this method getDrops. Place the following within your BlockTest class file:
    	public void getDrops(World world, int dropNumber, int i, int j, int k, int l, float f) //This creates a public method called getDrops, the void is there so we don't need a return within the method.
    	{																					   //Within the ()'s we are still feeding the same information to the method as dropBlockAsItemWithChance with the addition of dropNumber, which is going to be the amount of drops that will occur.
    		for(int z=0; z<dropNumber; z++)  //This is our For loop. It firsts sets a varible, in this case z, to 0.
    		{								//The next part is the condition that needs to be met for the For loop to, well loop. In this case if z is less than dropNumber, it will loop through the code within the {} until z is the same as dropNumber.
    										//The last little bit adds 1 to z each time the For loop loops.
    			int dropType = world.rand.nextInt(180); //This assigns a random number to the variable dropType between 0-180.
    			if (dropType <= 80) //If dropType value is less than or equal to 80, execute the code within the {}'s below.
    			{
    				dropCoal(world, i, j, k, l, f); //This calls our dropCoal method and executes it.
    			}
    			if (dropType > 80 && dropType <= 140) //If dropType value is greater then 80 and less than or equal to 140, execute the code within the {}'s below.
    			{
    				dropIron(world, i, j, k, l, f); //This calls our dropIron method and executes it.
    			}
    			if (dropType > 140 && dropType <= 180) //If dropType is greater then 140 and less than or equal to 180, execute the code within the {}'s below.
    			{
    				dropGold(world, i, j, k, l, f); //This calls our dropGold method and executes it.
    			}
    			else //If neither of the above conditions are met, execute the code within the {}'s below.
    			{
    				dropCoal(world, i, j, k, l, f);
    			}
    		}
    	}

    Now you can play around with the values that are required to get a certain drop, decreasing the range a dropType needs to fall within to get a certain item will make it more "rare". Increasing the range will make it more common. Just make sure you change the line, int dropType = world.rand.nextInt(180);, to accomdate your changes.

    We are so close to being done I can almost taste the Cooked Porkchops, sorry pig!. As of right now, when you break our Test block nothing will happen. We are going to have to call the method that makes all of the magic happen, getDrops. Before we put in the final snippet of code, verify that your BlockTest.java looks the same as below:
    package net.minecraft.src;
    
    import java.util.Random;
    
    public class BlockTest extends Block
    {
    
        public BlockTest(int i, int j)
        {
            super(i, j, Material.ground);           
        }
        public int idDropped(int i, Random random)
        {
           return mod_Test.Test.blockID;
        }
        public int quantityDropped(Random random)
        {
                return 0;
        }
        public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f)
        {
            super.dropBlockAsItemWithChance(world, i, j, k, l, f);
            if(world.multiplayerWorld)
            {
                return;
            }
        }
    	public void dropCoal(World world, int i, int j, int k, int l, float f)
    	{
    		float f1 = 0.7F;
            float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f3 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
    		EntityItem entityitem1 = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.coal));
            entityitem1.delayBeforeCanPickup = 10;
            world.entityJoinedWorld(entityitem1);
    	}
    	
    	public void dropIron(World world, int i, int j, int k, int l, float f)
    	{
    		float f1 = 0.7F;
            float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f3 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
    		EntityItem entityitem1 = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.ingotIron));
            entityitem1.delayBeforeCanPickup = 10;
            world.entityJoinedWorld(entityitem1);
    	}
    	
    	public void dropGold(World world, int i, int j, int k, int l, float f)
    	{
    		float f1 = 0.7F;
            float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f3 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
    		EntityItem entityitem1 = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.ingotGold));
            entityitem1.delayBeforeCanPickup = 10;
            world.entityJoinedWorld(entityitem1);
    	}
    		public void getDrops(World world, int dropNumber, int i, int j, int k, int l, float f)
    	{																					   
    		for(int z=0; z<dropNumber; z++)  
    		{								
    										
    			int dropType = world.rand.nextInt(180); 
    			if (dropType <= 80) 
    			{
    				dropCoal(world, i, j, k, l, f); 
    			}
    			if (dropType > 80 && dropType <= 140) 
    			{
    				dropIron(world, i, j, k, l, f); 
    			}
    			if (dropType > 140 && dropType <= 180) 
    			{
    				dropGold(world, i, j, k, l, f); 
    			}
    			else 
    			{
    				dropCoal(world, i, j, k, l, f);
    			}
    		}
    	}
    }


    Onto the final part, all we have left to do is to call our getDrops method within our dropBlockAsItemWithChance method. Change dropBlockAsItemWithChance so it looks like the following:
        public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f)
        {
            super.dropBlockAsItemWithChance(world, i, j, k, l, f);
            if(world.multiplayerWorld)
            {
                return;
            }
    			int dropAmount = world.rand.nextInt(10); //This sets dropAmount with a random number between 0-10. This is also the max amount of drops that will be allowed when the block is destroyed. Decrease of increase this value to satisfy your needs.
    			if (dropAmount == 0) //This is here to make sure that if dropAmount's value is 0, we give a player at least 1 drop.
    			{
    				getDrops(world, 1, i, j, k, l, f); //If dropAmount's value is zero, this executes getDrops and allows for only 1 item to be dropped.
    			}
    			else
    			{
    			getDrops(world, dropAmount, i, j, k, l, f); //If getAmount isn't zero, it passes off it's value to getDrops and runs the method.
    			}
        }


    There we have it, it's done, we have finally completed it. Just to be sure everything was done properly, compare your finished BlockTest.java file with the code below:
    package net.minecraft.src;
    
    import java.util.Random;
    
    public class BlockTest extends Block
    {
    
        public BlockTest(int i, int j)
        {
            super(i, j, Material.ground);           
        }
        public int idDropped(int i, Random random)
        {
           return mod_Test.Test.blockID;
        }
        public int quantityDropped(Random random)
        {
                return 0;
        }
        public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f)
        {
            super.dropBlockAsItemWithChance(world, i, j, k, l, f);
            if(world.multiplayerWorld)
            {
                return;
            }
    			int dropAmount = world.rand.nextInt(10); 
    			if (dropAmount == 0) 
    			{
    				getDrops(world, 1, i, j, k, l, f);
    			}
    			else
    			{
    			getDrops(world, dropAmount, i, j, k, l, f);
    			}
        }
    	public void dropCoal(World world, int i, int j, int k, int l, float f)
    	{
    		float f1 = 0.7F;
            float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f3 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
    		EntityItem entityitem1 = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.coal));
            entityitem1.delayBeforeCanPickup = 10;
            world.entityJoinedWorld(entityitem1);
    	}
    	
    	public void dropIron(World world, int i, int j, int k, int l, float f)
    	{
    		float f1 = 0.7F;
            float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f3 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
    		EntityItem entityitem1 = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.ingotIron));
            entityitem1.delayBeforeCanPickup = 10;
            world.entityJoinedWorld(entityitem1);
    	}
    	
    	public void dropGold(World world, int i, int j, int k, int l, float f)
    	{
    		float f1 = 0.7F;
            float f2 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f3 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
            float f4 = world.rand.nextFloat() * f1 + (1.0F - f1) * 0.5F;
    		EntityItem entityitem1 = new EntityItem(world, (float)i + f2, (float)j + f3, (float)k + f4, new ItemStack(Item.ingotGold));
            entityitem1.delayBeforeCanPickup = 10;
            world.entityJoinedWorld(entityitem1);
    	}
    		public void getDrops(World world, int dropNumber, int i, int j, int k, int l, float f)
    	{																					   
    		for(int z=0; z<dropNumber; z++)  
    		{								
    										
    			int dropType = world.rand.nextInt(180); 
    			if (dropType <= 80) 
    			{
    				dropCoal(world, i, j, k, l, f); 
    			}
    			if (dropType > 80 && dropType <= 140) 
    			{
    				dropIron(world, i, j, k, l, f); 
    			}
    			if (dropType > 140 && dropType <= 180) 
    			{
    				dropGold(world, i, j, k, l, f); 
    			}
    			else 
    			{
    				dropCoal(world, i, j, k, l, f);
    			}
    		}
    	}
    }


    One last thing, if you wanted to have the drop amount and types fixed, you could skip making the getDrops method and just make a method for each item you want to drop. Then within dropBlockAsItemWithChance call the method of the item you want as many times as you want it. Like so:
        public void dropBlockAsItemWithChance(World world, int i, int j, int k, int l, float f)
        {
            super.dropBlockAsItemWithChance(world, i, j, k, l, f);
            if(world.multiplayerWorld)
            {
                return;
            }
    		dropCoal(world, i, j, k, l, f);
    		dropCoal(world, i, j, k, l, f);
    		dropIron(world, i, j, k, l, f);
    		dropGold(world, i, j, k, l, f);
    		dropGold(world, i, j, k, l, f);
        }


    This would drop 2 pieces of coal, 1 Iron Ingot, and 2 Gold Ingots.


    I tried to make this tutorial as easy and descriptive as possible, any questions or concerns feel free to leave a message and I'll do my best to help. If throughout this tutorial I've put false information please inform me with the correct information so I can fix it, I don't want to misinform people!

    *Also, I did not steal this tutorial from Mad's Modding Tutorials, check the credits, I wrote it, I just wanted to port it over here to show I'm capable of doing more "complex" things* or things that are widely covered.

    Advanced/Hard Tutorials

    If you used these tutorials or learned from them, either leave a comment or give me +rep. I do these on my own time, just as other tutorial/mod creators do, and it's the least you could do. If you find any mistakes or incorrect information, politely correct me and I will fix it. I don't want to misinform anyone.

    Also, check out Mad's Modding Tutorials as well as Strength's Modding Tutorials! They got me started in modding and are a great resource.

    Check out my Mod Page!
    Posted in: Tutorials
  • 1

    posted a message on Help with Java please? :D
    There's a couple of things I can see.

    First:
    package net.minecraft.src;
    import java.util.Random;
    
    public class mod_ColorCraft extends BaseMod
    {
            public static final Item sword = new ItemSword(1337,EnumToolMaterial.WOOD).setItemName("BlueWooden");
            public static final Item sword = new ItemSword(1338,EnumToolMaterial.WOOD).setItemName("CyanWooden");
            public static final Item sword = new ItemSword(1339,EnumToolMaterial.WOOD).setItemName("GrayWooden");
            public static final Item Sword = new ItemSword(1340,EnumToolMaterial.WOOD).setItemName("GreenWooden");
            public static final Item Sword = new ItemSword(1341,EnumToolMaterial.WOOD).setItemName("OrangeWooden");
            public static final Item Sword = new ItemSword(1342,EnumToolMaterial.WOOD).setItemName("PinkWooden");
            public static final Item Sword = new ItemSword(1343,EnumToolMaterial.WOOD).setItemName("RedWooden");
            public static final Item Sword = new ItemSword(1344,EnumToolMaterial.WOOD).setItemName("SugarWooden");
            public static final Item Sword = new ItemSword(1345,EnumToolMaterial.WOOD).setItemName("YellowWooden");
    
    
                    

    This is the first problem, all though the .setItemName's are different, you actually don't refer to these when coding, at least from what I've experienced. Each one of these swords needs a unique name that isn't "Sword". I usually give each item the same name as the setItemName. So for instance instead of:
    public static final Item sword = new ItemSword(1337,EnumToolMaterial.WOOD).setItemName("BlueWooden");

    Change it to:
    public static final Item BlueWooden = new ItemSword(1337,EnumToolMaterial.WOOD).setItemName("BlueWooden");


    After you go through all of those your going to have to change these:
    		Sword.iconIndex = ModLoader.addOverride("gui/items.png", "/BlueWooden.png");
    		Sword.iconIndex = ModLoader.addOverride("gui/items.png", "/CyanWooden.png");
    		Sword.iconIndex = ModLoader.addOverride("gui/items.png", "/GrayWooden.png");
    		Sword.iconIndex = ModLoader.addOverride("gui/items.png", "/GreenWooden.png");
    		Sword.iconIndex = ModLoader.addOverride("gui/items.png", "/OrangeWooden.png");
    		Sword.iconIndex = ModLoader.addOverride("gui/items.png", "/PinkWooden.png");
    		Sword.iconIndex = ModLoader.addOverride("gui/items.png", "/RedWooden.png");
    		Sword.iconIndex = ModLoader.addOverride("gui/items.png", "/SugarWooden.png");
    		Sword.iconIndex = ModLoader.addOverride("gui/items.png", "/YellowWooden.png");
    		
    		ModLoader.AddName(Sword,"Blue Wooden Sword");
    		ModLoader.AddName(Sword,"Cyan Wooden Sword");
    		ModLoader.AddName(Sword,"Gray Wooden Sword");
    		ModLoader.AddName(Sword,"Green Wooden Sword");
    		ModLoader.AddName(Sword,"Orange Wooden Sword");
    		ModLoader.AddName(Sword,"Pink Wooden Sword");
    		ModLoader.AddName(Sword,"Red Wooden Sword");
    		ModLoader.AddName(Sword,"Sugar Wooden Sword");
    		ModLoader.AddName(Sword,"Yellow Wooden Sword");

    So using the example above instead of:
    Sword.iconIndex = ModLoader.addOverride("gui/items.png", "/BlueWooden.png");
    ModLoader.AddName(Sword,"Blue Wooden Sword");

    Change it to:
    BlueWooden.iconIndex = ModLoader.addOverride("gui/items.png", "/BlueWooden.png");
    ModLoader.AddName(BlueWooden,"Blue Wooden Sword");


    Now the last problem I see are within your recipes
    ModLoader.AddRecipe(new ItemStack(BlueWooden, 1), new Object []{
    " $ ", " $ ", " % ", Character.valueOf('$'), Item.dyePowder['blue'] Character.valueOf('%'), Item.swordWood


    There are two problems, one that is not how you use the different dye colors in recipes, after this post I'll post the tutorial I made on the subject that should clear that up for. Second each one of your recipes is not closed out. Your forgot the }); at the end so instead of the above it should be:
    ModLoader.AddRecipe(new ItemStack(BlueWooden, 1), new Object []{
    " $ ", " $ ", " % ", Character.valueOf('$'), Item.dyePowder['blue'] Character.valueOf('%'), Item.swordWood });


    Hope this helps, I'll post the tutorial in just a second for you.
    Posted in: Modification Development
  • 2

    posted a message on Monkeyss334 error dump
    I'm sorry Monkey, although a topic like this is a good and bad idea, you really need to learn to try and solve your own errors. Like I said in the topic that was deleted, you mine as well have us make the mod for you.

    I assume this is the same error you were getting from the last two topics and in the first one, the one that didn't get deleted, I even hinted at what needed to be done. If you couldn't figure it out then maybe modding isn't for you right now.

    Sorry if I sound like a jerk but it's the truth, needing help after you've exhausted every option is fine, needing help for every single error on the other hand I don't approve of.

    Also only providing bits and pieces isn't always the best solution because although you give us where the error is indicated, it's very possible that the error is a few lines above or below the code provided.

    And again Monkey, please learn to use the code tags.

    {code}
    code/error's here
    {/code}

    But replace the {}'s with []'s...
    Posted in: Modification Development
  • 1

    posted a message on RECIPE PROBLEM???
    Quote from sammymcman123

    When I try to add an block or item i'v made into a recipe, I always get the error saying they can't find it. They work perfectly in the game but not in recipes???


    Maybe you should post the error and the source code.
    Posted in: Modification Development
  • 1

    posted a message on simple coding help? :)
    Your mod_Name.java should look something like this:
    public class mod_NameHere extends BaseMod
    {
    	public int AddFuel(int i, int j)
    	{
    		if(i == Item.doorWood.shiftedIndex)
    		{
    			return 14400; //Fuel powder, each item cost 200, coal is 1600
    		}
    		return 0;
    	}
    	public mod_NameHere()
    	{
    	}
    	
    	
    	public String Version()
    	{
    		return "Mystery Block v1 for 1.8.1";
    	}
    }


    If that doesn't work, try instead of Item.doorWood find the block equivalent and see if that works(I believes it's Block.doorWood but I'm not sure) and change .shiftedIndex to .blockID.
    Posted in: Mods Discussion
  • 1

    posted a message on Cake House, Minature House, and Colorful Minetrack
    So I made these a while ago and just recently joined this community so I decided to show them off here. If anyone is going to appreciate Minecraft related things I figure it would be you guys. All of these are in the form of videos. Just a heads up some of the Minetrack involved using a Map Editor, and most of it was done by hand(It mostly depended on my mood for the day). Sadly no downloads...

    Cake House

    Miniature House

    My Minetrack

    Edit: Decided to add my video that's a how to play connect 4 in Minecraft.

    Edit 2: I just realized there was a video section, I feel very stupid now posting this in the screenshot section and I apologize:\.
    Posted in: Screenshots
  • To post a comment, please or register a new account.