Help Sign In/Register

Minecraft Forums

Advanced Search
  • News
  • Rules
  • Forum
  • Chat
  • Mods
  • Maps
  • Resource Packs
  • Minecraft Station
  • Minecraft Server Hosting
Desktop View
  • Home
  • Member List
  • SergeantBalthazar's Profile
  • Send Private Message
  • View SergeantBalthazar's Profile
  • SergeantBalthazar
  • Registered Member
  • Member for 9 years, 10 months, and 2 days
    Last active Sat, Feb, 23 2013 13:01:47
  • 0 Followers
  • 150 Total Posts
  • 2 Thanks
  • Member
  • Posts
  • Threads
  • Reputation
  • Comments
  • Received
  • Given
  • View SergeantBalthazar's Profile

    1

    Mar 3, 2012
    SergeantBalthazar posted a message on MineCraft Machinima: Cast And Crew Needed!
    Bump for people to see this. I hate bumping but nobody's going to see this otherwise.
    Posted in: Video/Series Help
  • View SergeantBalthazar's Profile

    1

    Feb 21, 2012
    SergeantBalthazar posted a message on [1.1] Kunii's Basic - Advanced Modding Tutorials!
    Quote from Kyron

    that code returns 2 + a random number between 0 and 2.


    nextInt(3) means an int in the array of 3 numbers, which starts with a 0

    1=>0
    2=>1
    3=>2



    So it basically gives a random number between 2 and 4

    Thanks. I have learned something new today :biggrin.gif:
    Posted in: Tutorials
  • To post a comment, please login.
  • View Dan_Gray's Profile

    1

    Feb 19, 2012
    Dan_Gray posted a message on [ModLoader][1.8.1] Strength's Tutorials/Help (28/11/11) *Generation*
    Quote from SergeantBalthazar

    Well that didn't help one bit, so I went back into my code, changed the "abstract class" back into "public class" and got no errors, but I get a new crash report on the CMD, which is all about codes which I have not edited. So, could you take a look guys?
    Error
    == MCP 5.6 (data: 5.6, client: 1.1, server: 1.1) ==
    [07:21:55] 27 achievements
    [07:21:55] 174 recipes
    [07:21:56] ModLoader 1.1 Initializing...
    [07:21:56] Mod Initialized: mod_FirstBlock 1.1.0
    [07:21:56] Overriding /terrain.png with /FirstBlock.png @ 30. 43 left.
    [07:21:56] Exception in thread "Minecraft main thread" java.lang.ExceptionInInit
    ializerError
    [07:21:56]      at net.minecraft.client.Minecraft.startGame(Minecraft.java:316)
    [07:21:56]      at net.minecraft.client.Minecraft.run(Minecraft.java:620)
    [07:21:56]      at java.lang.Thread.run(Unknown Source)
    [07:21:56] Caused by: java.lang.RuntimeException: java.lang.NullPointerException
    
    [07:21:56]      at net.minecraft.src.ModLoader.init(ModLoader.java:745)
    [07:21:56]      at net.minecraft.src.ModLoader.AddAllRenderers(ModLoader.java:15
    0)
    [07:21:56]      at net.minecraft.src.RenderManager.<init>(RenderManager.java:78)
    
    [07:21:56]      at net.minecraft.src.RenderManager.<clinit>(RenderManager.java:9
    )
    [07:21:56]      ... 3 more
    [07:21:56] Caused by: java.lang.NullPointerException
    [07:21:56]      at net.minecraft.src.CraftingManager.addRecipe(CraftingManager.j
    ava:361)
    [07:21:56]      at net.minecraft.src.ModLoader.AddRecipe(ModLoader.java:344)
    [07:21:56]      at net.minecraft.src.mod_FirstBlock.load(mod_FirstBlock.java:19)
    
    [07:21:56]      at net.minecraft.src.ModLoader.init(ModLoader.java:714)
    [07:21:56]      ... 6 more
    [07:24:14]
    [07:24:14]
    [07:24:14]
    [07:24:14]
    [07:24:14]
    [07:24:14]
    [07:24:14]
    Press any key to continue . . .


    OK I FIXED EVERYTHING. CODE IS BELOW.

    mod_FirstBlock

    package net.minecraft.src;
    
    public class mod_FirstBlock extends BaseMod
    {
            public static Block First;
            
            public static int firstID = 233;
            
            static 
        	{
        		First = new BlockFirst(firstID, ModLoader.addOverride("/terrain.png", "/FirstBlock.png")).setHardness(1.0F).setBlockName("First").setResistance(6000.0F).setLightValue(0.3F);
        	}
            
            public String getVersion()
            {
                    return "1.1.0";
            }
            
            public void load()
            {
                    ModLoader.RegisterBlock(First);
                    ModLoader.AddName(First, "First Block");
                    ModLoader.AddRecipe(new ItemStack(First), new Object[]{
                    	"X X", "XX ", " X ", Character.valueOf('X'), Block.dirt
                    });
            }       
    }



    The firstID thing means the Block ID.

    I changed the way the block is registered. You should use this way next time. To add a block use these statements:


    public static Block YOURBLOCKNAMEHERE;
    
    public static int yourblocknamehereID = PUTDESIREDBLOCKIDHERE;
    
    static 
    {
     YourBlockNameHere = new BlockNamehere(yourblocknamehereID, ModLoader.addOverride("/terrain.png", "/nameoftexturehere.png")).setHardness(1.0F).setBlockName("Your Block Name Here").setResistance(6000.0F).setLightValue(0.3F);
    }


    BlockFirst

    package net.minecraft.src;
    
    import java.util.Random;
    
    public class BlockFirst extends Block{
    
    	public BlockFirst(int i, int j){
    		super(i, j, Material.ground);
    	}
    	public int idDropped(int i, Random random)
    	{
    		return mod_FirstBlock.First.blockID;
    	}
    
    }


    Pictures:

    Texture



    Pic of block in-game:


    +1 me if i helped :tongue.gif:.
    Posted in: Tutorials
  • View Dan_Gray's Profile

    1

    Feb 19, 2012
    Dan_Gray posted a message on [ModLoader][1.8.1] Strength's Tutorials/Help (28/11/11) *Generation*
    Quote from SergeantBalthazar

    I thought I'd add the cmd reading and the class that seems to have a problem.
    CMD:
    == MCP 5.6 (data: 5.6, client: 1.1, server: 1.1) ==
    [22:19:14] 27 achievements
    [22:19:14] 174 recipes
    [22:19:15] ModLoader 1.1 Initializing...
    [22:19:15] Failed to load mod from "mod_FirstBlock.class"
    [22:19:15] Done.
    [22:19:15] WARNING: Found unknown Windows version: Windows 7
    [22:19:15] Attempting to use default windows plug-in.
    [22:19:15] Loading: net.java.games.input.DirectAndRawInputEnvironmentPlugin
    [22:19:15]
    [22:19:15] Starting up SoundSystem...
    [22:19:15] Initializing LWJGL OpenAL
    [22:19:15]     (The LWJGL binding of OpenAL.  For more information, see http://w
    ww.lwjgl.org)
    [22:19:15] OpenAL initialized.
    [22:19:16]
    Class File:
    package net.minecraft.src;
    
    abstract class mod_FirstBlock extends BaseMod
    {
    	public static Block First = new BlockFirst(125, 0).setHardness(1.0F).setResistance(6000.0F).setLightValue(1.0F).setBlockName("First");
    	
    	public String getVersion()
    	{
    		return "1.1.0";
    	}
    	
    	public void load()
    	{
    		ModLoader.RegisterBlock(First);
    		First.blockIndexInTexture = ModLoader.addOverride("/terrain.png", "/FirstBlock.png");
    		ModLoader.AddName(First, "First Block");
    		ModLoader.AddRecipe(new ItemStack(First, 1), new Object[] {
    		"$ $", "$$ ", " $ ", Character.valueOf('$'), Block.dirt.blockID
    		});
    	}	
    }
    Any further help would be appreciated :smile.gif:
    Thanks,
    - Balthazar
    P.S. The mod class does say "abstract" yes, but that is because ModLoader's new code requires it to be an abstract class. The public class will no longer work.


    I already found your mistake. You must be using a tutorial that is for an older version of minecraft. Because in Minecraft 1.0+ the "Public String Version()" has been changed to "Public String getVersion()". And the "Public Mod Namehere()" has been changed to "Public void load()". If you look in your code spoilers above, I have changed the code to work so just replace your code with the one above. And if your looking to do anything else I suggest adding "import net.minecraft.src.*;" below the "package net.minecraft.src" to be able to use most of the methods minecraft used. +1 me if i helped :tongue.gif:.
    Posted in: Tutorials
  • View Kunii's Profile

    2

    Feb 12, 2012
    Kunii posted a message on [1.1] Kunii's Basic - Advanced Modding Tutorials!
    Kunii's Modding Tutorials!

    The following tutorial series will be MOSTLY based off ModLoader(Link).
    I don't stand responsible to ANY damage you may or may not deal to the community or own hardware!
    The tutorials will be sorted by difficulty, which means the easy stuff will come first, then the advanced stuff!

    Bright Green = Very Easy.
    Dark Green = Easy.
    Yellow = Medium.
    Bright Red = Difficult.
    Red = Hard.
    Black = Very Hard.


    Setting up MCP with modloader

    You need:
    Text editor(Preferably Eclipse!)
    MCP(Minecraft Coder Pack)
    ModLoader
    7Zip/Winrar


    1. I assume you have set up JDK, so lets get MCP! Go to this page and extract the folder to your desktop, or any desired locations!
    2. Download modloader.
    3. Get a fresh minecraft bin folder(%AppData%\Roaming\.minecraft\), and put it in "MCP FOLDER\jars\". Get a fresh resources folder(%AppData%\Roaming\.minecraft\), and put it in the same location as the bin folder!
    4. Open your minecraft.jar in "MCP FOLDER\jars\bin\", and drag the modloader files in there.
    5. Go back to the MCP folder and run "decompile.bat". It should decompile just fine.
    6. (If you get an error saying "2 Hunks out of 2 Failed", don't worry! It doesn't do anything.)

    Finished!



    Very Easy Tutorials:

    Block Tutorial

    mod_Tutorial:
    package net.minecraft.src;
    
    public class mod_Tutorial extends BaseMod{
    
    	public static Block TutorialBlock = new Tutorial_Block1(190, 255, Material.grass).setHardness(0F).setResistance(1F).setLightValue(1.0F).setBlockName("Tutorial_Block1");
    
    
    
    	@Override
    	public void load() {
    		
    		ModLoader.RegisterBlock(TutorialBlock);
    		TutorialBlock.blockIndexInTexture = ModLoader.addOverride("/gui/items.png", "/Tutorial/TutorialBlock.png"); /*This is NOT Needed! If you don't have it, minecraft will use the default texture!*/
    		ModLoader.AddName(TutorialBlock, "Tutorial Food");
    		
    		ModLoader.AddRecipe(new ItemStack(TutorialBlock, 64), new Object[] {
    			"#", Character.valueOf('#'), Block.dirt}); 
    	}
    	
    	public String getVersion() {return "Modding Tutorials - By Kunii";}
    }

    (Optional)Change all the "Tutorial"s to your own name! (mod_Food, Block1, TestBlock, etc.)
    (Optional)Change the 190 to your own item id.
    (Optional)Change "/Tutorial/TutorialBlock.png" to your own picture path!

    (190, 255, Material.grass)

    190 = The block id. 1 - 255
    255 = The texture. The
    TutorialBlock.blockIndexInTexture = ModLoader.addOverride("/gui/items.png", "/Tutorial/TutorialBlock.png");
    will override this texture.
    Material.grass = The block material. I set it to grass material, which means it will be easier to mine with a shovel.

    .setHardness(0F) = The hardness of the block. 0F = Instant break.
    .setResistance(1F) = The explosion resistance. -1F = Unbreakable by explosions.
    .setLightValue(1F) = The light the block emits. 1F = The level of a torch. If you go ANY higher, it will crash!
    .setBlockName("Tutorial_Block1") = The name minecraft refers to when it uses it in-game.

    package net.minecraft.src;
    
    import java.util.*;
    
    public class Tutorial_Block1 extends Block{
    
    	protected Tutorial_Block1(int i, int j, Material material) {
    		super(i, j, material);
    	}
    
    	public int quantityDropped(Random r){
    		return 1;
    	}
    }

    (Optional)Change all the "Tutorial"s to your own name! (Testmod_Block, Block1, TestBlock, etc.)
    (Optional)
    public int quantityDropped(Random r){return 1;}
    Change the {return 1;} to how many blocks / items it will drop!

    Item Tutorial

    mod_Tutorial:
    package net.minecraft.src;
    
    public class mod_Tutorial extends BaseMod{
    
    	public static final Item TutorialItem = new Tutorial_Item1(1501).setItemName("Tutorial_Item1");
    
    	@Override
    	public void load() {
    		
    		//TutorialItem .blockIndexInTexture = ModLoader.addOverride("/gui/items.png", "/Tutorial/TutorialItem .png"); /*This is NOT Needed! If you don't have it, minecraft will use the default texture!*/
    		ModLoader.AddName(TutorialItem , "Tutorial Item");
    		
    		ModLoader.AddRecipe(new ItemStack(TutorialItem , 64), new Object[] {
    			"##", Character.valueOf('#'), Block.dirt});
    	}
    	
    	public String getVersion() {return "Modding Tutorials - By Kunii";}
    }

    The same as a block!

    Tutorial_Block1:
    package net.minecraft.src;
    
    public class Tutorial_Item1 extends Item{
    
    	protected Tutorial_Item1(int i) {
    		super(i);
    		maxStackSize = 64;
    	}
    
    }

    Change all the 'Tutorial's to your own name.
    "maxStackSize = 64;", change the 64 to the max stack size you want!

    Recipe Tutorial(Shaped and Shapeless!)

    Shaped Recipe
    mod_Tutorial:
    @Override
    	public void load() {		
    		ModLoader.AddRecipe(new ItemStack(TutorialBlock, 64), new Object[] {
    			"###","###","###", Character.valueOf('#'), Block.dirt}); 
    	}

    (TutorialBlock, 64) = Creates a stack 64 Tutorial Blocks. (TutorialBlock, -1) = Creates an infinite stack of Tutorial Blocks.

    "###","###","###", Character.valueOf('#'), Block.dirt});

    " ##","# #","## " = The shape of your recipe. The first (" ##"), is the top row of a crafting table. The second ("# #"), is the middle row of a crafting table. The last ("###"), is the bottom row of a crafting table. If you want spaces in the recipe, simply put a space there ("# #"," # ","# #" - This will make an X as the crafting recipe!).

    Shapeless Recipe
    mod_Tutorial:
    @Override
    	public void load() {		
    		ModLoader.AddShapelessRecipe(new ItemStack(TutorialBlock, 64), new Object
    			{Block.dirt,});
    	}

    (Optional)Change the TutorialBlock to your own block / item!
    (TutorialBlock, 64) = Creates a stack 64 Tutorial Blocks. (TutorialBlock, -1) = Creates an infinite stack of Tutorial Blocks.
    {Block.dirt,}); = The items / blocks you craft with. Each item / block is separated with a comma.

    Furnace Smelting Recipe Tutorial

    mod_Tutorial:
    @Override
    	public void load() {
    		//Block
    		ModLoader.AddSmelting(Block.dirt.blockID, new ItemStack(TutorialBlock, 64));
    		//Item
    		ModLoader.AddSmelting(Item.bone.shiftedIndex, new ItemStack(TutorialBlock, 64));
    	}

    Block:
    Change the TutorialBlock to your own block / Item.
    Change 64 to the amount you want to get.
    Change ' Block.dirt.blockID ' to the block you want to smelt with.

    Item:
    Change the TutorialBlock to your own block / Item.
    Change 64 to the amount you want to get.
    Change ' Item.bone.shiftedIndex ' to the item you want to smelt with.
    Change

    Food Tutorial

    mod_Tutorial:
    package net.minecraft.src;
    
    public class mod_Tutorial extends BaseMod{
    
    	
    	public static final Item TutorialFood = new ItemFood(1502, 4, false).setItemName("TutorialFood");
    
    
    	@Override
    	public void load() {
    		
    		TutorialFood.iconIndex = ModLoader.addOverride("/gui/items.png", "/Tutorial/TutorialFood.png"); /*This is NOT Needed! If you don't have it, minecraft will use the default texture!*/
    		ModLoader.AddName(TutorialFood, "Tutorial Food");
    		
    		ModLoader.AddRecipe(new ItemStack(TutorialFood, 64), new Object[] {
    			"##","#", Character.valueOf('#'), Block.dirt}); 
    	}
    	
    	public String getVersion() {return "Modding Tutorials - By Kunii";}
    }

    Help:
    (Optional)Change all the "Tutorial"s to your own name! (mod_Food, SugarFood, FoodFood, etc.)
    (Optional)Change the 1502 to your own item id.
    (Optional)Change "/Tutorial/TutorialFood.png" to your own picture path!

    (1502, 4, false)

    1502 = The item ID. 1 - 32767
    4 = How many hunger bars it fills. 1 is half a hunger bar. 4 = 2 Hunger bars. 20 = 10 (Full) Hunger bars!
    false = If you can feed a wolf with it. true / false.




    No new updates will be done for two weeks!
    I won't be here! ;/

    Keep posting suggestions on what i should do next!
    Posted in: Tutorials
  • To post a comment, please login.

Social Media

Services

Sign In

Help

Advertise

Resources

Terms of Service

Privacy Policy

Our Communities

  • MMO-Champion
  • HearthPwn
  • Minecraft Forum
  • Overframe
  • MTG Salvation
  • DiabloFans

© 2021 MagicFind, Inc. All rights reserved.

Mobile View