• 0

    posted a message on [Outdated] Advanced modding
    I plan on doing some packet analysis of MC in the future - would such information be useful on your spreadsheet?
    Posted in: Tutorials
  • 0

    posted a message on [WIP][GAMEPLAY] WMAMP3's Minecraft Modifications
    Disclaimer: These modifications require alteration minecraft.jar, and SMP may not work with these mods installed. Some of these modifications may add new content, and it may be best to not load existing worlds that were not created with a particular modification. I am not responsible for any damage done to your computer, worlds, or your copy of Minecraft.

    Installation
    Windows:
    1) Open up %appdata%, if you don't know how to do this, start>run, then type in %appdata%
    2) Browse to .minecraft/bin
    3) Open up minecraft.jar with WinRAR or 7zip.
    4) Drag and drop the necessary files into the jar.
    5) Delete the META-INF folder in the jar.
    6) Run Minecraft, enjoy!

    Linux:
    1) Execute the following on the terminal
    cd ~
    mkdir temp
    cd temp
    jar xf ~/.minecraft/bin/minecraft.jar

    2) Copy the .class files of the desired modifications to temp
    3) Execute the following on the terminal
    cd ~/temp
    rm META-INF/MOJANG_C.*
    jar uf ~/.minecraft/bin/minecraft.jar ./


    Mods
    I will format this bit a bit better later. For now, I'll list the changes / mods I've got planned for the immediate future:
    * Modification allowing everything to be stacked up to 64 (Food / Buckets usable in stacks greater than one)
    * Modification allowing upgrades of weapons (Mobs have a ??% chance to drop an item that can be used in a recipe with a weapon. Doing so will make your character do more damage with that weapon.
    * Modification allowing you to have more hearts, dependent on the number of mobs you kill.
    * Modification for harder modes (Food heals less, monsters do more)
    * Modification for "real survival" - you constantly lose health
    * Modification for poisoned food.
    * Modification for "Torch" arrows.
    Posted in: Mods Discussion
  • 0

    posted a message on [Outdated] Advanced modding
    I find that it compiles a dream in Eclipse - simply untick the "Treat all errors as fatal option", and compile. Then it's a simple matter of getting the .class files from the bin directory of the project in the appropriate workspace, copying it to a temp file, and adding it back to minecraft.jar.

    I'll try and make a document outlining process and possibly a video a bit later.
    Posted in: Tutorials
  • 0

    posted a message on [Outdated] Advanced modding
    Quote from JaredSisco »
    Anyone know where the new food code is stored? Ive searched them all twice

    Do you mean the food item type? If so, so my post on Page 2.

    Edit: Shameless in-thread piggy-back bump of findings:

    Minecraft Alpha v1.1.2_01

    oj.class - Generic superclass for Food
    Methods
    public oj(int paramInt1, int paramInt2)
    paramInt1 - Passed to di superclass. Appears to be the Item ID.
    paramInt2 - Sets attribute 'a'. Unsure of purpose; Does not appear to be stack-size. Requires further testing. Hearts Restored * 2.

    Analysis / Findings:
    Debugging has revealed this class is instantiated at login. Initial analysis appears to indicate paramInt2 determines how much health the item heals:
    Debug: Item<4> - paramInt2: 4      // Apples heals 2.                                                                     
    Debug: Item<26> - paramInt2: 10  // Mushroom soup heals 5.                                               
    Debug: Item<41> - paramInt2: 5    // Bread heals 10                                                                       
    Debug: Item<63> - paramInt2: 3    // Pork heals 1.5                                             
    Debug: Item<64> - paramInt2: 8    // Grilled pork heals 4.                                              
    Debug: Item<66> - paramInt2: 42   // Surprisingly, the Golden Apple restores 21 hearts. (Instead of 10 - the current maximum)


    public ev a(ev paramev, cn paramcn, dm paramdm)
    paramev - Stack related - Used to decrement stack count. (paramev.a)
    paramcn - Not used; nor is it used by di generic item-class. Likely used elsewhere.
    paramdm - Damage related. Determines how much health to restore.

    Analysis / Findings:
    Method b of paramdm restores health. Suggests that dm represents an entity - likely as it extends kh dynamic-object generic (Possibly main player. Method will only restore health to a living player i.e. >0 health). It will not restore above maximum. Also appears to do something related to maximum health. (Related to attributed 'j' and 'aW' in dm - warrants further investigation.)

    Noteworthy is the fact that the parameter is signed and no validation is done on 'negative' healing. This means that damaging foods (Poisons) should work. This has been tested and confirmed.

    Attributes
    aT (Inherited) - Max Stack Size.
    a - Hearts Healed by Item * 2.

    dw.class - Crafting Class
    Methods
    public dw()
    To Test: Instantiated at start-up

    Analysis / Findings:
    Makes a number of calls, passing itself as parameter - requires further investigation.
    Following this is a list of calls to a (see below).

    public ev avoid a(ev paramev, Object[] paramArrayOfObject)
    paramev - New item "stack" to create (Constructor takes a block-generic or item-generic and a number (init. stack size).
    paramArrayOfObject - Name-Value pair for recipe - organisation as follows (Untested)

    Analysis / Findings:
    The first index is the top row of the recipe. Second is (optionally) the middle row. Third is (optionally) the bottom row.
    The next index is the first character used to represent the top row.
    The next index is the item or block represented by that character.

    Example:
    a(new ev(ly.aH, 16), new Object[] { "X X", "X#X", "X X", Character.valueOf('X'), di.m, Character.valueOf('#'), di.B });

    First parameter: Make a new stack of minecart tracks (16 in size).
    Second parameter: Recipe - lets examine in detail:
    "X X", "X#X", "X X", ---> Let's re-arrange into a more familiar format:
    X X
    X#X
    X X

    Next, lets look at the parameters that follow in the object array:
    Character.valueOf('X'), di.m, Character.valueOf('#'), di.B
    So:
    'X' maps to di.m
    '#' maps to di.B

    di is the generic item class.
    Attribute m: public static di m = new di(9).a(23);
    To shorten the analysis: The constructor for di takes an integer, which represents the decimal data value of the item - 256.
    256 + 9 = 265 = Iron Ingot (http://www.minecraftwiki.net/wiki/Data_values)

    So X is iron ingot.
    Attribute B public static di B = new di(24).a(53).d();
    256 + 24 = 280 = Stick

    Substitute "Iron Ingot" for X and "Stick" for # and we end up with:
    :Iron: :Iron: :Iron:
    :Iron: :|: :Iron:
    :Iron: :Iron: :Iron:

    Which is indeed the recipe for iron ingot.


    Further information:
    The size of the "Recipe box" appears to be dynamic - this seems to indicate a somewhat easily extensible crafting area.
    The "item" and "block" substitution function appears to function for arbitrary length. This means there should be no upper bound on the items that can be used.

    Take the above with a grain of salt; need to test.
    Posted in: Tutorials
  • 0

    posted a message on Looking for a similar mod - Leveling system
    Sounds like an interesting idea; sounds very simple to implement (Damage may be harder). I'll have a go at it when I get to analysing dynamic-objects in the obfuscated code. Can't make any promises on the timeliness of the project however, as I'm busy with work and my thesis.
    Posted in: Mods Discussion
  • 0

    posted a message on [Outdated] Advanced modding
    Quote from Donkey Kong »

    Quote from fr0stbyte124 »

    Has anyone been taking inventory off all the identified classes and methods? I remember there was a modding wiki a few months back, but I kind of don't think it's around anymore.

    Each time Notch issues an update, all the class names, methods, functions and variables change names. It's not really worth it, so I didn't really consider doing it.

    I've been making an inventory of classes, methods, with accompanying analysis (See previous post). While it's certainly true that updates modify a significant portion of the naming convention for most updates it should be possible to create a program to try and 'match' method signatures and general structure between two versions; it's simple enough to do an eyeball difference; the trick is getting the knowledge representation in a concrete format and designing an appropriate fuzzy-matching algorithm.
    Posted in: Tutorials
  • 0

    posted a message on [Outdated] Advanced modding
    I've been having a quick browse around in the code today; figured I'd use this post as a home for any findings. A public reference list for myself, if you will - who knows, maybe other people will find it useful. I provide no guarantee my findings are correct.

    Assumed decompilation is done with Java Decompiler (JD).

    Minecraft Alpha v1.1.2_01

    oj.class - Generic superclass for Food
    Methods
    public oj(int paramInt1, int paramInt2)
    paramInt1 - Passed to di superclass. Appears to be the Item ID.
    paramInt2 - Sets attribute 'a'. Unsure of purpose; Does not appear to be stack-size. Requires further testing. Hearts Restored * 2.

    Analysis / Findings:
    Debugging has revealed this class is instantiated at login. Initial analysis appears to indicate paramInt2 determines how much health the item heals:
    Debug: Item<4> - paramInt2: 4      // Apples heals 2.                                                                     
    Debug: Item<26> - paramInt2: 10  // Mushroom soup heals 5.                                               
    Debug: Item<41> - paramInt2: 5    // Bread heals 10                                                                       
    Debug: Item<63> - paramInt2: 3    // Pork heals 1.5                                             
    Debug: Item<64> - paramInt2: 8    // Grilled pork heals 4.                                              
    Debug: Item<66> - paramInt2: 42   // Surprisingly, the Golden Apple restores 21 hearts. (Instead of 10 - the current maximum)


    public ev a(ev paramev, cn paramcn, dm paramdm)
    paramev - Stack related - Used to decrement stack count. (paramev.a)
    paramcn - Not used; nor is it used by di generic item-class. Likely used elsewhere.
    paramdm - Damage related. Determines how much health to restore.

    Analysis / Findings:
    Method b of paramdm restores health. Suggests that dm represents an entity - likely as it extends kh dynamic-object generic (Possibly main player. Method will only restore health to a living player i.e. >0 health). It will not restore above maximum. Also appears to do something related to maximum health. (Related to attributed 'j' and 'aW' in dm - warrants further investigation.)

    Noteworthy is the fact that the parameter is signed and no validation is done on 'negative' healing. This means that damaging foods (Poisons) should work. This has been tested and confirmed.

    Attributes
    aT (Inherited) - Max Stack Size.
    a - Hearts Healed by Item * 2.

    dw.class - Crafting Class
    Methods
    public dw()
    To Test: Instantiated at start-up

    Analysis / Findings:
    Makes a number of calls, passing itself as parameter - requires further investigation.
    Following this is a list of calls to a (see below).

    public ev avoid a(ev paramev, Object[] paramArrayOfObject)
    paramev - New item "stack" to create (Constructor takes a block-generic or item-generic and a number (init. stack size).
    paramArrayOfObject - Name-Value pair for recipe - organisation as follows (Untested)

    Analysis / Findings:
    The first index is the top row of the recipe. Second is (optionally) the middle row. Third is (optionally) the bottom row.
    The next index is the first character used to represent the top row.
    The next index is the item or block represented by that character.

    Example:
    a(new ev(ly.aH, 16), new Object[] { "X X", "X#X", "X X", Character.valueOf('X'), di.m, Character.valueOf('#'), di.B });

    First parameter: Make a new stack of minecart tracks (16 in size).
    Second parameter: Recipe - lets examine in detail:
    "X X", "X#X", "X X", ---> Let's re-arrange into a more familiar format:
    X X
    X#X
    X X

    Next, lets look at the parameters that follow in the object array:
    Character.valueOf('X'), di.m, Character.valueOf('#'), di.B
    So:
    'X' maps to di.m
    '#' maps to di.B

    di is the generic item class.
    Attribute m: public static di m = new di(9).a(23);
    To shorten the analysis: The constructor for di takes an integer, which represents the decimal data value of the item - 256.
    256 + 9 = 265 = Iron Ingot (http://www.minecraftwiki.net/wiki/Data_values)

    So X is iron ingot.
    Attribute B public static di B = new di(24).a(53).d();
    256 + 24 = 280 = Stick

    Substitute "Iron Ingot" for X and "Stick" for # and we end up with:
    :Iron: :Iron: :Iron:
    :Iron: :|: :Iron:
    :Iron: :Iron: :Iron:

    Which is indeed the recipe for iron ingot.


    Further information:
    The size of the "Recipe box" appears to be dynamic - this seems to indicate a somewhat easily extensible crafting area.
    The "item" and "block" substitution function appears to function for arbitrary length. This means there should be no upper bound on the items that can be used.

    Take the above with a grain of salt; need to test.
    Posted in: Tutorials
  • 0

    posted a message on Sound suddenly stopped working
    My sound has stopped working too - using Ubuntu.
    Posted in: Legacy Support
  • To post a comment, please .