• 2

    posted a message on Redstone in RC2
    Thats a lagfix bug. Torches arent updating very well.
    Thats not something you can fix directly. Just wait :/
    But its not a good thing for a release candidate...
    Posted in: Redstone Discussion and Mechanisms
  • 1

    posted a message on The Even Better Nether Portals Mod
    Well yes, its a good idea, but i'm a modder and i'll tell you that's extremely hard, a insane challenge even to notch.
    To do that we'll need something like double rendering :/
    First, With that you'll just need to go thru the portal and you already in the nether, which is a problem because this means your computer have to get all the nether fully loaded every time you get near the portal or load the game. It would double the amount of things the computer should handle...

    Second, The amount of time to create the nether is big and if we render it when the game is running it would take even more.
    Finally, The loading when you get into the nether is inevitable, there's tons of things that changes from the surface like the fog and lightning.

    Think why theres no mirror mod :/
    Posted in: Requests / Ideas For Mods
  • 1

    posted a message on What Free Games do you Recommend?
    (real life?)


    Lord of the rings sounds to be good and free. But its not completely free. Its not totally free, but in LotRO there’s a huge amount of content to enjoy before you’re forced to lay down any cash (if you ever like it).
    http://www.pcgamer.com/2011/09/28/lord-of-the-rings-online-rise-of-isengard-out-now/
    Posted in: General Gaming
  • 1

    posted a message on [1.8.1] Moar Diamonds!!
    Quote from scokeev9

    If you don't like it, don't download it. Having too many diamonds isn't the same as having infinite of everything.


    Sorry, but i love when someone leaves a honest feedback, something unlike "Cool i might check it later" for me is like a hug.

    I believe I can make the difference when I tell the modder its problem, I don't want to see him giving up because someone dint liked his mod, I don't want to tell him he's perfect, I don't want him to be someone who just create incomplete mods and most important, i don't want to lie to him. I want to see him as a great modder, someone who understand the players ideas and needs, someone who can fix his problems and step forwards.

    If i say i don't like someone who makes a mod to craft 1 dirt into 64 diamonds, its not because I'm flaming him or i hate him, its because i believe he can do better.
    Posted in: Minecraft Mods
  • 3

    posted a message on [1.8.1] Moar Diamonds!!
    i really think you want to use toomanyitems, bro, really or you CARE about overpowering mods, or just link to a inventory editor :] Theres easier ways to get a lot of diamonds... :/ overpowering is useless since creative mode/toomanyitems mod...
    Posted in: Minecraft Mods
  • 1

    posted a message on [Creating Mods] Block Manipulation [10/06/11]
    *Reserved*
    I saw others tutorials reserving others posts -.-
    Total failure, i can do everything in the same post :/
    Posted in: Tutorials
  • 18

    posted a message on [Creating Mods] Block Manipulation [10/06/11]
    Minecraft Mods
    Block Manipulation
         Now, congratz, you made a block and it looks like stone but it have a different name... You got far (that is a lie) but that the time to learn more! Let me explain how far can you go with blocks! Grab your block and lets kill entities, self-multiply, drops blocks around it, explode your world, eat soup, make the old-looking water, make plants,liquids and infinite fun!

    This tutorial is "INDEV" and im working to finish this.

    Basic Requirements:
    1. Minecraft
    2. MCP updated for your Minecraft Version

    This tutorial is dynamic and may work for any minecraft version.

    1. How to set up Minecraft Coder Pack (for MC 1.8.1)

         First thing to mod a block is having the block, which you should had (or have, whatever), you have to set up MCP which is very simple, if you already have done, jump this tutorial.
    I have 3 .zip archives, they are "Minecraft 1.8.1 MCP", "Minecraft 1.8.1 bin" and "Minecraft 1.8.1 Modloader". You'll need only these 3 things to set up MCP efficiently.

    1. Make a new folder and put MCP on it.
    2. Inside this new folder should have a folder named "jars", open it.
    3. You have to put your CLEAN .minecraft/bin (the entire folder) here. Remmember to put a bin folder containing minecraft.jar, lwjgl.jar, etc. (MCP Folder\jars\bin\minecraft.jar)
    4. Open minecraf.jar and install Modloader (delete META-INF too)
    5. Your MCP folder have a file called "decompile.bat", click twice/run it.
    6. If you get a error like "!! Unpredictable results" or the famous "RenderBlocks", dont worry, it IS something important but we'll try to live without all its features. In others words, Ignore it.
    7. When it says Press any key to continue, you press THE "any key" and it'll close, we're ready to start our adventure.

    Additionally, you can set a shortcut to Minecraft Source just incase you want to acess it quick, click the spoiler for it:

    1. Visit "MCP Folder\src\minecraft\net\minecraft";
    2. Rightclick "src" folder and select "Copy";
    3. Go back to your MCP Folder and Rightclick anywhere and select the option "Paste Shortcut" or "Paste New Shortcut" (depends which OS your using)

    Now everytime you click this shortcut you'll be 'redirected' to minecraft source easily.

    [Important Note] Minecraft source can be found at MCP Folder\src\minecraft\net\minecraft\src

    How to make a new Block
    (Risugami's Modloader)

         Now we're going to learn how to use Modloader to create your block. Making blocks without modloader is certainly easier but will have a low-compatibility, which we have to avoid.

    Start by creating a file at "MCP\src\minecraft\net\minecraft\src": "BlockDifferent.java"
    Remember you can edit the filename (if you edit every time "BlockDifferent" shows up)

    Insert this text into it:

    package net.minecraft.src; // Thats gives 'access' to others classes and variables.
    import java.util.Random; // This will bring us java classes to generate random numbers. 
    //(this is not necessary if were not making random numbers, but we'll eventually)
    
    public class BlockDifferent extends Block
    {
    
    	public BlockDifferent(int id, int texture, Material material)
    	{
    		super(id, texture, material);
    	}
    
    }


    This is a "Empty Block", with no codes in it, it just a copy of any other block which we can change to customize it.
    All values will be default for a block like that. (it will be a stone block we can break quick)

    Then create a file at "MCP\src\minecraft\net\minecraft\src": "mod_LearningMCP.java"
    If you change every "mod_LearningMCP" text on the code you can change the name of this mod.

    Put this code into mod_LearningMCP:

    package net.minecraft.src;
    
    import net.minecraft.client.Minecraft;
    
    public class mod_LearningMCP extends BaseMod
    {
    
    public static final Block myblock = new BlockDifferent(150, 1, Material.ground).setBlockName("OurBlock");
    
    	public mod_LearningMCP()
    	{
    		ModLoader.RegisterBlock(myblock);
    		ModLoader.AddName(myblock, "My Little Block");
    	}
    
    	public String Author()
    	{
    	return "Yourself";
    	}
    
    	public String Version()
    	{
    	return "MC Learning Mod 1.8.1";
    	}
    	
    }


    Explanation of the code:

    package net.minecraft.src;
    
    import net.minecraft.client.Minecraft;
    
    public class mod_LearningMCP extends BaseMod
    { // set the name of your mod and type (obs: the name must be the same of the file and starts with "mod_".
    
    public static final Block myblock = new BlockDifferent(150, 1, Material.ground).setBlockName("OurBlock");
    // This lines inserts our BlockDifferent into Minecraft.
    // Public means it can be accessed by others places than this particular file.
    // Static means it will never become another block.
    // final literally closes the variable so you cant use it to create an item (like static thing but for variable-type)
    // Block makes our variables a "Block.java" copy, but with our changes.
    // setBlockName("OurBlock") this changes the block name, block names arent the floating text over it or nothing like that.
    //Without blocknames minecraft would be confused because it doesnt know how to "call" it to make it appear in the game, in other words, it would crash minecraft when Modloader runs your mod. 
    // BlockNames can match thousands of time, you can make 10 blocks with the same "name" that nothing will change. but every block needs one distinct variable.
    // myblock is the variable we'll call our block.
    // new BlockDifferent creates a new block with the "properties" of your BlockDifferent class (file)
    // (150,1,Material.ground) are parameters, respectively (BlockID,BlockTexture,BlockMaterial) (check out BlockDifferent.java file you'll find it)
    	public mod_LearningMCP()
    	{
    		ModLoader.RegisterBlock(myblock);
    		// This line inserts the ITEM our block WILL use.
    		// If you dont want your block to be dropped(and placed again like any other block)
    		//you can just remove this registering line.
    		ModLoader.AddName(myblock, "My Little Block");
    		//AddName function creates the floating text over the block when you put your mouse over and its totally for GRAPHICS purposes.
    		//NOTE: .setBlockName("Name") is NOT equal to that and doesnt need to have the same text.
    	}
    
    	public String Author()
    	{ // This will eventually appears when the game crashes because of your mod.
    	return "Yourself";
    	}
    
    	public String Version()
    	{ // This will eventually appears when the game crashes because of your mod.
    	return "MC Learning Mod 1.8.1";
    	}
    	
    }

    myblock is now our variable to call our block.
    if we are in others classes (others files than mod_LearningMCp) doing "mod_LearningMCP.myblock" will return our block (we can use for others things later)

    Now, you can go back to your MCP folder and run "recompile.bat" which will put your change into minecraft.
    When its done, you press any key (hopefully with no errors) and run startclient.bat, if it runs minecraft it worked, otherwise, you should run recompile.bat again and see what errors you got and try to fix or post them on this topic so i can eventually help.

    Ok, even if you mod worked fine, how do we get our block?
    There is currently 3 ways:
    1. Hacking into your block Id.
    2. Adding a recipe to it.
    3. Making it spawn with world generation.

    We are going to explain how to make a recipe to it just to make sure you have your block. The others ways are pointless due to the fact this is a block tutorial.

    Adding a Recipe to a block
    (Risugami's Modloader)

         Adding a recipe is not complicated. In this case we're going to add just as the only way to reach our block. To add a recipe we need to edit mod_YourModName main class, which is found specificly at:
    	public mod_YourModName()
    	{
    
    	}

         We'll add to it (in a new line) one procedure (function), but firstly we need to know a few things:
    1. What block will it result. (not the ID)
    2. How many will it result. (between 0 and 65)
    3. The recipe design we're using.
    4. All the items our recipe will require. (not the ID)

    Adding this code between the "{" and "}" from "public mod_YourModName":
    ModLoader.AddRecipe(new ItemStack(myblock, 64), new Object[] {
    "X", Character.valueOf('X'), Block.dirt
    });

    myblock is the variable to the block or item (block, in this case) i want to create.
    64 is the number of blocks or items i want to create.
    "X" is the parameter for "shape" of what im crafting (in this case, only 1 X is needed.
    'X' tells the code that the next thing you'll put in the code is the MEANING of every 'X' at the recipe.
    Block.dirt Identical to myblock, but it is one of notch's blocks, in this case dirt. (Vanilla blocks need "Block." first.)

         Now we added that, you can get your block easily. But before i finish this, if you in any case want to make a complex and realistic recipe, you can read the "CraftingManager.java" and read others recipes of common blocks and items that you know how to craft, this way you just use your epic reverse engineering skills to learn.more about it.

    Adding properties to your block
         There are 2 ways to add properties to your block, one is by adding to the final of the variable;
    Example of indirect property:
    (new BlockMyBlock(189, 49, Material.glass)).setHardness(0.5F).setStepSound(soundGlassFootstep).setBlockName("CustomBlock");


    the second way to add variables is to add to the codes directly at the block's file.
    Example of direct property:
    package net.minecraft.src;
    import java.util.Random;
    
    public class BlockMyBlock extends Block
    {
    	public BlockMyBlock(int i, int j, Material material)
    	{
    		super(189, 49, Material.glass);
    		setHardness(0.5F);
    		setStepSound(soundGlassFootstep);
    		setBlockName("CustomBlock");
    	}
    
    }


    I prefer the second way, because its dynamic and easy to use. Notch and a lot of others modders use the indirect way, which make smaller files with the same result. If you knew java already or already modded a lot, you can put your properties easily together so you can access every quickly.

    Example of usage to our block:
    package net.minecraft.src;
    import java.util.Random;
    
    public class BlockDifferent extends Block
    {
    	public BlockDifferent(int i, int j, Material material)
    	{
    		super(i, j, material);
    		setHardness(0.1F);
    		setResistance(5F);
    	}
    
    }


    Now, if your a new modder, you probably wondering a few stuff about properties probably because you dont know which properties to use, but most importantly, what the hell they means?

    Block Properties List

    [This may not apply to java, this is a simplified way to refer to procedures and functions)

    Properties change how blocks looks like or works. This is a row of procedures (functions with no resulting variable) you can use in your block (or in the declaration) to make some basic changes.

                   setHardness

    setHardness(float f);

    example: setHardness(1F);, setHardness(0.5F);, setHardness(-1F);
    Hardness is a float value which let you configurate the time it takes to "mine" or "destroy" your block.

    If you want specify the time in seconds, you should do:
    setHardness( (float) ( number * 1.5 ) )

    number = the seconds it takes to destroy the block

    If you dont understand why there's (float) in the code, read this spoiler:

    In java, we need to specify what kind of number we are using.
    When we dealing with float or double values, they have to be specific or else java would confuse both (because they're pretty similar variable kinds).

    Correct usage would be:

    float me1 = 2.4;
    me1 = 1.35F;
    me1 = me1+3F;
    etc
    double me2 = 3;
    me2 = 1.35D;
    me2 = me2+3F;
    etc

    The F and D means Float and Double, you can also put it in the start of the number.

    float me1 = 2.4;
    me1 = (float) 1.35;

    This can be used to translate variables. (turn doubles into float and floats into double)

    float me1 = 1.3;
    double final = (double) me1;

    If you don't specify, you'll probably be unable to compile it (In minecraft case, recompile).

    Example: if your hardness is 2, it will takes 3 seconds to gather the block
             if your hardness is 10 (obsidian reference), it will takes 15 seconds to gather the block

    Writing a value equal to -1F and your result will be an unbreakable block. (Example: bedrock)
    Writing a value equal to 0F and your result will be an instant breaking block. (Example: "sapling")


                   setResistance

    setResistance(float f);

    example: setResistance(10F);, setResistance(2F);,setResistance(0F);
    This resistance is Blast Resistance, change how explosion works with your block.

    Minecraft Wiki - Blast Resistance Check for more info about explosion and block resistance.

                   setLightValue

    setLightValue(float f);

    example: setLightValue(1);, setLightValue(0.9375);, setLightValue(0);

    Values highter than 1 will crash minecraft.
    This light value is used for blocks that emit light. They'r between 0 and 1 as a float value and then are multiplied by 15 later, this multiplied value is used at minecraft wiki - Wiki Note: data values are the 0 to 1 values, Light level are 0 to 15 values.

                   setLightOpacity

    setLightOpacity(int i);

    example: setLightOpacity(0);, setLightOpacity(3);, setLightOpacity(1);
    Blocks stops 100% of light in minecraft, this means the light cant move through non-opaque blocks.
    if LightOpacity of a block is higher than 0, light will be able to moves through it and being visible in the other sides, like glass. HIGLY IMPORTANT: THATS AN INTEGER VALUE! (non-fractional value)

    If that doesnt explain enough, here is: Minecraft Wiki - Non-Opaque Blocks

                   setStepSound

    setStepSound(StepSound stepsound);


    Pretty self-explanatory. This is minecraft function for making sounds when a player moves over the block OR attempt to destroy it.
    Here's a full list of what you can use: *There is a way to extend this list by modding and creating others songs.*
    setStepSound(soundPowderFootstep);
    setStepSound(soundWoodFootstep);
    setStepSound(soundGravelFootstep);
    setStepSound(soundGrassFootstep);
    setStepSound(soundStoneFootstep);
    setStepSound(soundMetalFootstep);
    setStepSound(soundGlassFootstep);
    setStepSound(soundClothFootstep);
    setStepSound(soundSandFootstep);


                   setTickOnLoad

    setTickOnLoad(boolean flag);

    example: setTickOnLoad(true);, setTickOnLoad(false);

    This is for making a block ticks, it mean it will randomly runs the function updateTick() (if specified in the block class), we are going to learn more about it later.

    Examples:
    This is used on Grass block, so grass can turn nearby dirt into grass or become dirt.
    This is used on SAPLINGS, so it can slowly generate trees.
    This is used on LEAVES, so it can check if theres any log near and if not, destroy itself.
    This is used on REDSTONE TORCHES, so switches, burns and update to fix errors (which are the key for random-redstone-devices).

                   setBlockBounds

    setBlockBounds(float f, float f1, float f2, float f3, float f4, float f5)


    This function sets the block size, it needs 2 3D points (x,y,z).
    Block size affects how it will interacts with player (Physics) and how it going to look (Render), simplifying, With this function you can make your block graphically and physically different than others.

    Using this function you can only make box/rectangles shapes.

    Its important to remmember:
    Use Restrictions:
         - > Prefer to use when your material isn't "ground","rock" or "wood" to prevent suffocating glitches (you can suffocate yourself by touching the block). I suggest material "glass", its dynamic and have no restrictions.

    This function modify rendering of a block.
    You need to add this to your block: (between the first "{" and the last "}")

    public boolean isOpaqueCube()
    	{
    		return false;
    	}


    This will make your block act like glass. If you ever used a texture that made a block like dirt/stone/sand transparent and saw all the dungeons and stuff, that is what happens if your block isn't opaque and you make it renders differently.
    Simplistically, It makes others blocks around it appears.
    BTW, if you still have no idea how to add this piece of code to your block, scroll down to "Adding Functions to our block"

    Examples of uses:
    	public BlockDifferent(int i, int j, Material material)
    	{
    		super(i, j, material);
    		setBlockBounds(0.25F, 0.25F, 0.25F, 0.75F, 0.75F, 0.75F);
    	}


    Many results:


                   disableNeighborNotifyOnMetadataChange

    disableNeighborNotifyOnMetadataChange();


    This function dont need parameters, its used for blocks that changes the damage value (Meta Data) too frequently and these changes dont need to be interpreted as new blocks being placed. Most of blocks like redstone circuits needs to change the meta data constantly and all other blocks around would check itselfs condition of placements (example: When cactus checks itselfs, it drops if theres blocks in its sides)

    Adding new functions to your block
         Now we learned "procedures", function that we call (we tell them to happens), now we're missing real "functions", with that i mean functions we dont control when they come, its when someone rightclick the block, when its destroyed by explosion or any kind of information requeriment of our block. Before we get an insane list, we have to learn how to put these functions to our block.

    Lets say this is our block:
    package net.minecraft.src;
    import java.util.Random;
    
    public class BlockDifferent extends Block
    {
    
    	public BlockDifferent(int i, int j, Material material)
    	{
    		super(i, j, material);
    	}
    
    }


    Now lets add a funcion called "public ThisIsMine(int value)":
    package net.minecraft.src;
    import java.util.Random;
    
    public class BlockDifferent extends Block
    {
    
    	public BlockDifferent(int i, int j, Material material)
    	{
    		super(i, j, material);
    	}
    
    	public ThisIsMine(int value)
    	{
    		//Codes goes here
    	}
    
    }


    We add the 'name' of the function with its parameters (int value) and permissions (public) values and open with the "{" (I dont know whats the name of that), and end with "}" in another line.

    Now for the list of functions =D

                   renderAsNormalBlock

    public boolean renderAsNormalBlock()


    This functions asks the block class if its going to be rendered like a normal block, as the name suggests.. This value have to be set to false if your block use "getRenderType" or "SetBlockBounds" functions that modify the way the block is rendered.

    Example of use:
    public boolean renderAsNormalBlock()
    {
    return false;
    }

    Default: true (Boolean)
    (If you don't put this function in your block, it will be the default.)

                   getRenderType

    public int getRenderType()


    Another info-function. This gives you the ability of making different kind of rendering types for your block.

    Dont forget this makes blocks renders differently, you need to add these functions to prevent glitches:

    	public boolean renderAsNormalBlock()
    	{
    		return false;
    	}
    	public boolean isOpaqueCube()
    	{
    		return false;
    	}


    Example of use:
    {
    return 3;
    }

    Default: 0 (Integer)

    ~ Using numbers that doesnt exists or arent on this image list may crash minecraft.
    List of effects to your block USING 1.7.3:



    If you had problems editing the BlockDifferent.java, here is its full code to use different rendering types:
    package net.minecraft.src;
    import java.util.Random;
    
    public class BlockDifferent extends Block
    {
    	public BlockDifferent(int i, int j, Material material)
    	{
    		super(i, j, Material.glass);
    	}
    	
    	public boolean isOpaqueCube()
    	{
    		return false;
    	}
    	
    	public boolean renderAsNormalBlock()
    	{
    		return false;
    	}
    	
    	public int getRenderType()
    	{
    		return 1;
    	}
    }

                   Functionname

    Posted in: Tutorials
  • To post a comment, please or register a new account.