• 0

    posted a message on MCP Help Please

    I don't think standard Bukkit is compatiable with MCP. I know there are mod-enabled Bukkit servers, such as the Tekkit servers, but I don't know how they are setup.

    Well to test the plugin I guess I could just compile it then run it on a server. Thank you for your help!
    Posted in: Java Edition Support
  • 0

    posted a message on MCP Help Please

    Copy the bin folder from your .minecraft folder into the jars folder and run decompile.sh again.

    Thank you so very much sir. But also how would I set the server side up? Paste my server folder in? (Bukkit)
    Posted in: Java Edition Support
  • 0

    posted a message on MCP Help Please
    Hello everyone! Cody here. I need your guys' help with something.

    Right now i'm on my linux machine and I want to install MCP on this so I can take it with me when I leave, etc.

    Okay so here's the problem. I downloaded MCP (Newest Version) and unpacked it. I updated it and when I click "recompile.sh" it opens, then closes. I decided to run this a different way and it turns out i'm missing files. All thats in my "java" folder is "server.dat" and "server.properties" or something along those lines. Also theres nothing in my other folders. :/

    Can anyone help me please?

    All help will be greatly appreciated. Thank you and have a wonderful day. :)
    Posted in: Java Edition Support
  • 0

    posted a message on [Creating Mods] Modding tutorials [21/5/11]
    Quote from simo_415

    In this tutorial I will explain how to create a new block in Minecraft and how to make it craftable. This tutorial makes a standard block like stone.

    Creating a new block

    1. You need to make a new file called BlockExample.java in the src directory.
    2. The basic structure of this file is this:
    package net.minecraft.src;
    
    import java.util.Random;
    
    public class BlockExample extends Block
    {
    public BlockExample(int i, int j)
    {
    super(i, j, Material.rock);
    }
    
    public int idDropped(int i, Random random)
    {
    return 0;
    }
    }

    3. You now need to add this block to minecraft so that it knows about it. To do this open up Block.java
    4. You should see a whole bunch of variable declarations towards the bottom of the file, add a new one:
    public static final Block example;

    5. Below the declarations you should see initialisation of these instance variables, initialise your block.
    example = (new BlockExample(92, 1)).setHardness(1.5F).setResistance(10F).setStepSound(soundStoneFootstep);

    Like mentioned before this example block is creating a new 'stone' block.
    new BlockExample(92, 1) creates the new block, the first number is the block id - THIS HAS TO BE UNIQUE, the second number is the graphic of the block, in this case the same as stone.
    setHardness(1.5F) is the same as stone, this is how long it takes to destroy a block.
    setResistance(10F) is the same as stone, this is how strong the block is against explosions.
    setStepSound(soundStoneFootstep) is the same as stone, this is the sound it makes when you walk on it.

    You have now successfully created a new block class. To use this block you need to generate it, this can be done using the Single Player Commands mod using this command: "/give 92".

    Continue on reading if you want to add a recipe to the crafting table to make this block.

    Creating a new recipe
    1. Open up CraftingManager.java
    2. You should immediately see the constructor for the class and within it recipes being added using the addRecipe function.
    3. Scroll to the bottom of this list of recipes and add in a new one:
    addRecipe(new ItemStack(Block.example, 1), new Object[] {"##", "##", Character.valueOf('#'), Block.dirt});

    This will add a recipe in which when you craft four dirt is a square share will give you your new block.
    new ItemStack(Block.example, 1) - this specifies what item is going to be generated and the quantity.
    new Object[] {"##", "##", Character.valueOf('#'), Block.dirt} - this specifies how it is created.

    This should allow you to now craft a very basic new block using four dirt like so:
    :P :soil:
    :soil: :soil:


    Hello my friend. I've tried your new block and item and it seems it will not work. I get a crash error. I don't know if I didn't compile it correctly or something? But I also get an error with that source code.

    ex:

    "super(i, j, Material.rock);"

    It says I have to remove "j" or something and I do and It dont work.

    Could you possibly tell me what is wrong? Thank you for your time. :)
    Posted in: Tutorials
  • To post a comment, please .