• 0

    posted a message on Why refer to gold as 'butter'? Gold ingots do not look, nor act like butter!
    This has to be the single best thread, ever.

    I think a nice word to describe people who use the word butter is "zealot". They've gotten way over-hyped on a joke and won't let anyone tell them it isn't funny. It's Gold.
    Posted in: Discussion
  • 0

    posted a message on Nether Biome Block Replacement?
    Quote from allshallobey

    -words-



    Ok, some of the stuff that you guys have been bouncing back and forth is confusing me with all these chunk manager / provider things, so I'm just going to throw at you a world gen code of mine which replaces netherrack

    DISCLAIMER: I made this mod for Minecraft 1.4.6. I hope too much hasn't changed, but sorry if it has

    Go ahead and find the WorldGenMineable file (package net.minecraft.world.gen.feature). Very close to the bottom of the page, you'll find this

    Block block = Block.blocksList[par1World.getBlockId(k2, l2, i3)];
    if (d12 * d12 + d13 * d13 + d14 * d14 < 1.0D && (block != null && block.isGenMineableReplaceable(par1World, k2, l2, i3, field_94523_c)))
    {
    par1World.setBlock(k2, l2, i3, this.minableBlockId, minableBlockMeta, 2);
    }


    More importantly:
    block != null && block.isGenMineableReplaceable(par1World, k2, l2, i3, field_94523_c)

    In other words, Minecraft is checking if the place where an ore is going to be is GenMineableReplaceable. We know that Stone is where ore spawns, so GenMineableReplaceable is completely synonymous with "is Stone"

    So to Hell with that code (literally) because we replace it with:

    block != null && block == Block.netherrack)

    and now when you're creating your ore generation file, you ask for the WorldGenNether instead of the WorldGenMineable code (I haven't worked with worldgen in a while so I don't remember exactly how it goes, but if you've already got an overworld ore working then this will be easy)

    You can have my entire WorldGenNether file if you want it, but you'll have to change the package declaration etc.

    package com.voussoir.carbon;
    
    import java.util.Random;
    import net.minecraft.block.Block;
    import net.minecraft.util.MathHelper;
    import net.minecraft.world.World;
    import net.minecraft.world.gen.feature.WorldGenerator;
    
    public class WorldGenNether extends WorldGenerator
    {
    /** The block ID of the ore to be placed using this generator. */
    private int minableBlockId;
    private int minableBlockMeta = 0;
    
    /** The number of blocks to generate. */
    private int numberOfBlocks;
    
    public WorldGenNether(int par1, int par2)
    {
    this.minableBlockId = par1;
    this.numberOfBlocks = par2;
    }
    
    public WorldGenNether(int id, int meta, int number)
    {
    this(id, number);
    minableBlockMeta = meta;
    }
    
    public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)
    {
    float var6 = par2Random.nextFloat() * (float)Math.PI;
    double var7 = (double)((float)(par3 + 8) + MathHelper.sin(var6) * (float)this.numberOfBlocks / 8.0F);
    double var9 = (double)((float)(par3 + 8) - MathHelper.sin(var6) * (float)this.numberOfBlocks / 8.0F);
    double var11 = (double)((float)(par5 + 8) + MathHelper.cos(var6) * (float)this.numberOfBlocks / 8.0F);
    double var13 = (double)((float)(par5 + 8) - MathHelper.cos(var6) * (float)this.numberOfBlocks / 8.0F);
    double var15 = (double)(par4 + par2Random.nextInt(3) - 2);
    double var17 = (double)(par4 + par2Random.nextInt(3) - 2);
    
    for (int var19 = 0; var19 <= this.numberOfBlocks; ++var19)
    {
    double var20 = var7 + (var9 - var7) * (double)var19 / (double)this.numberOfBlocks;
    double var22 = var15 + (var17 - var15) * (double)var19 / (double)this.numberOfBlocks;
    double var24 = var11 + (var13 - var11) * (double)var19 / (double)this.numberOfBlocks;
    double var26 = par2Random.nextDouble() * (double)this.numberOfBlocks / 16.0D;
    double var28 = (double)(MathHelper.sin((float)var19 * (float)Math.PI / (float)this.numberOfBlocks) + 1.0F) * var26 + 1.0D;
    double var30 = (double)(MathHelper.sin((float)var19 * (float)Math.PI / (float)this.numberOfBlocks) + 1.0F) * var26 + 1.0D;
    int var32 = MathHelper.floor_double(var20 - var28 / 2.0D);
    int var33 = MathHelper.floor_double(var22 - var30 / 2.0D);
    int var34 = MathHelper.floor_double(var24 - var28 / 2.0D);
    int var35 = MathHelper.floor_double(var20 + var28 / 2.0D);
    int var36 = MathHelper.floor_double(var22 + var30 / 2.0D);
    int var37 = MathHelper.floor_double(var24 + var28 / 2.0D);
    
    for (int var38 = var32; var38 <= var35; ++var38)
    {
    double var39 = ((double)var38 + 0.5D - var20) / (var28 / 2.0D);
    
    if (var39 * var39 < 1.0D)
    {
    for (int var41 = var33; var41 <= var36; ++var41)
    {
    double var42 = ((double)var41 + 0.5D - var22) / (var30 / 2.0D);
    
    if (var39 * var39 + var42 * var42 < 1.0D)
    {
    for (int var44 = var34; var44 <= var37; ++var44)
    {
    double var45 = ((double)var44 + 0.5D - var24) / (var28 / 2.0D);
    
    Block block = Block.blocksList[par1World.getBlockId(var38, var41, var44)];
    if (var39 * var39 + var42 * var42 + var45 * var45 < 1.0D && (block != null && block == Block.netherrack))
    {
    par1World.setBlockAndMetadata(var38, var41, var44, this.minableBlockId, minableBlockMeta);
    }
    }
    }
    }
    }
    }
    }
    
    return true;
    }
    }



    Author's Note: Some of what I said may have sounded condescending. Sorry bout that. I just dont like it when people try to help me but they think I already know everything and they dont help at all, so I tried to be very complete in my explanation.


    EDIT: I didn't want to leave you hanging and I felt bad for being lazy and closing it there, so I've gone and found my nether ore code. I've cut out most of the crap you don't need:


    package com.voussoir.carbon;
    import java.util.Random;
    import net.minecraft.world.chunk.IChunkProvider;
    import net.minecraft.world.gen.feature.WorldGenMinable;
    import net.minecraft.world.*;
    import cpw.mods.fml.common.IWorldGenerator;
    
    public class CarbonWorldGenerator implements IWorldGenerator
    {
    public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
    {
    switch(world.provider.dimensionId)
    {
    case -1: generateNether(world, random, chunkX*16, chunkZ*16);
    case 0: generateSurface(world, random, chunkX*16, chunkZ*16);
    }
    }
    public void generateSurface(World world, Random random, int blockX, int blockZ)
    {
    //Overworld ore generation stuff, you probably already have something here
    }
    
    public void generateNether(World world, Random random, int blockX, int blockZ)
    {
    for(int q = 1;q<3;q++)
    {
    
    {
    int xcoord = blockX + random.nextInt(16);
    int ycoord = random.nextInt(90);
    int zcoord = blockZ + random.nextInt(16);
    (new WorldGenNether(mod_Carbon.crystalOreHell.blockID, random.nextInt(4))).generate(world, random, xcoord, ycoord, zcoord);
    }
    
    }
    }


    Don't forget to register your generator in your mod_ file

    -Voussoir
    Posted in: Modification Development
  • 0

    posted a message on Pickaxe not working in mod?
    Quote from xX_RazorBeast_Xx

    I recently made a pickaxe in my mod file:
    public static Item pickAxeName = (new ItemPickaxe(500,EnumToolMaterial.DIAMOND).setUnlocalizedName("pickaxe").func_111206_d("pickaxe"));




    I dont think EnumToolMaterial.DIAMOND* is a thing. Diamond tools use EnumToolMaterial.EMERALD. Are you not receiving an error on that line?


    *Edit: As of 1.5.2, I know for a fact that ETM.DIAMOND is not a thing
    Posted in: Modification Development
  • 0

    posted a message on Best Computers On the MCFORUM
    OP, can you rename this thread to something more along the lines of "The Make Everyone Else Jealous Thread"?

    Dang guy!
    Posted in: Hardware & Software Support
  • 1

    posted a message on SIGN THIS PETITION TO SAVE MINECRAFT CLASSIC
    I've only played Classic twice, and I didn't even know about it until I had already bought the game. Both times I played it, the ESC menu came up pretty much every other time I clicked. Building a 3x3 square brought up the menu probably six times. I can't imagine building anything at all with that bug in the way.

    I imagine Classic costs little / nothing for Mojang to maintain. They're already paying for the domain and have generated some crippling amount of income already, so if Classic makes even thirty people happy, I guess they may as well keep it up.

    That being said, I've just read through the eight page gorefest that is this thread, and what bothers me most is OP's zealotry. I feel like I'm watching one of those kids' movies where the lead role, age 11, stands up to the evil of adults who just don't understand (See: Home Alone, SpyKids, et cetera).

    _4_ needs to understand that every idea, every single one, will have opponents, and he really can't be kicking and screaming "All youre doing is putting me down"(caps, bold) or "take your negativity else ware"(sic) or "You're trying to antagonize me, now please leave my thread" or "Why are you trying to hurt my chances of just trying to help ... my classic community" or pretty much any counterargument he's made so far. Present proper arguments, craft your words, and don't be overzealous.

    As for the people who are time and time again reminding us why 'Classic isn't all that useful' and 'it's basically just toned-down creative mode': Great. If it makes even thirty people happy and costs little / nothing to maintain, great.
    Posted in: Classic - Creative Mode
  • 0

    posted a message on another gamrule idea
    Quote from Orangeclaw

    I'm not really getting the point of this, it's too vague.

    Oh, and *second, *second, and *second.


    You can speed up or slow down the passage of time, according to the posts above yours. ("/timerate multiplier" isn't that vague, really)

    Instead of a single day-night cycle lasting 20 minutes or whatever it is now, you can alter it to be however long you like. Good for people who prefer very long daytimes / nighttimes or a more earth-like feel. I like the idea.
    Posted in: Suggestions
  • 0

    posted a message on [RESOLVED] Blocks go flying
    Quote from CrafterOfMines57

    Just a suggestion (I am sorry I do not have more time to properly see any possible problem), perhaps try setting item.motionX, item.motionY, and item.motionZ to 0.


    This had no effect :(

    The tick that it's having it's motion set to zero is the same tick that it thinks it's within the block, sending it flying.

    Recent Discovery: The items love flying in the negative X direction (West). This might just be one of those South-West things that show up in Minecraft every so often, I'm not sure. If I mine a block out of a flat surface (breaking a piece of grass on a superflat world) the itemized block flies with enough velocity to jump out of the hole I've created. I'm now very convinced that this item think's its stuck inside a solid block, and am still not sure how to fix it.

    EDIT: I fixed it!

    The old code:
    itemx.setPosition(x, y, z);
    
    The new code:
    itemx.setPosition(x + 0.5, y + 0.5, z + 0.5);


    Since the entity was spawning at EXACTLY coordinate x, y, z, it was spawning in a place that intersects with many other blocks, since exact integers don't take place in the center of the block, but at the far corners. The intersection with the blocks at x-1 and other corners was the cause of the flinging. By moving the coords to the exact center of the target block, I've resolved the issue.
    Posted in: Modification Development
  • 0

    posted a message on How to make power tools?
    Quote from CrafterOfMines57

    ^
    You forgot to either call super.hitEntity() or damage the ItemStack, your tool will never get damaged if you do not do one of those.


    Hehe, I didn't forget that so much as I left it out on purpose. My items are unbreakable intentionally, but I guess I shouldn't have used that as a way of teaching someone. Also, you can use the Quote button instead of that ^ when you reply to someone. Quoting will send that person a message so they can see what you wrote.
    Posted in: Modification Development
  • 0

    posted a message on How to make power tools?
    Quote from frenchfrie14

    Could someone please say how to code for powertools though? I need it for a wizards plugin i am working on.




    I might have something to contribute here.

    Located in ItemFireSword.java or whatever you call it, you could have:
    public boolean hitEntity(ItemStack stack, EntityLiving living1, EntityLiving living2)
    {
    living1.setFire(100);
    return true;
    }


    or you could have a poison sword:
    public boolean hitEntity(ItemStack stack, EntityLiving living1, EntityLiving living2)
    {
    living1.addPotionEffect(new PotionEffect(Potion.poison.id, 16000, 5));
    return true;
    }


    You can change Potion.poison.id to a different potion such as slowness, weakness, etc. If you make your own form of arrows, you probably can find a way to sneakily insert similar codes into the arrow hitting a player.

    Edit: I didn't realize how freakin' old the original question is. I'm really not answering OP here, but I'll help French :P
    Posted in: Modification Development
  • 0

    posted a message on [RESOLVED] Blocks go flying
    This problem has been resolved. Check down below to see how I fixed it!


    I'm modding with Minecraft 1.5.2. I'll get with the times eventually.

    I have created an item which, when you right click on a block, destroys the block and drops it as an item. In other words, it's a right-click-pickaxe.

    The functionality is all there, but I've got one problem. When destroying a block the conventional way (smashing it with a pick) the block shatters and the small item rests in its place. It simply falls down, sometimes with a bit of horizontal momentum, and that's that.

    With this right-click function, however, the dropped block goes flying in various directions. Breaking a piece of stone on top of a level ground will send a cobblestone item several blocks away sometimes.

    If I had to guess, I would say that for 1 tick or so, the entity thinks it's inside a solid block, so it shoots off. I called the world.setBlockToAir function before calling the spawning of the item entity, though, so I'm not sure how to coerce the item into falling straight down.

    I have attached some screenshots here. Less than necessary, but you'll get an idea of what I mean.



    When breaking a block with a pickaxe, the apple doesn't fall far from the tree.



    When using my item, though, said apple not only falls far from the tree to begin with, but then it rolls downhill and gets pecked by birds. In some cases, the iron ore went farther than this, and landed on me (I'm three blocks away!).

    Here is my entire block breaking method. onItemUse calls this method.

    public boolean dropItem(World world, int x, int y, int z, ItemStack stack, EntityPlayer player)
    {
    if(!world.isRemote)
    {
    double xx = (double) x;
    double yy = (double) y;
    double zz = (double) z;
    Block blockle;
    blockle = Block.blocksList[world.getBlockId(x, y, z)];
    ArrayList<ItemStack> items = blockle.getBlockDropped(world, x, y, z, world.getBlockMetadata(x, y, z), 0);
    world.setBlockToAir(x, y, z);
    for (ItemStack item : items)
    {
    EntityItem itemx = new EntityItem(world, xx, yy, zz, item);
    itemx.setPosition(x, y, z);
    itemx.delayBeforeCanPickup = 10;
    world.spawnEntityInWorld(itemx);
    int rounded = Math.round(blockle.blockHardness);
    stack.damageItem(rounded, player);
    System.out.println(rounded);
    }
    
    }
    return true;
    }

    "
    world.setBlockToAir(x, y, z);
    ...
    EntityItem itemx = new EntityItem(world, xx, yy, zz, item);
    itemx.setPosition(x, y, z);
    itemx.delayBeforeCanPickup = 10;
    world.spawnEntityInWorld(itemx);

    "

    I've gone searching through Block.java and all sorts of other classes, but I'm not sure where to look for the vanilla dropping of itemized blocks post-destruction (that was a fun sentence!). This whole ordeal isn't REALLY a huge concern, but it's a nuisance and it annoys me. I was testing my item in a cave, and mining blocks near lava is next to impossible since the item almost always flies away and gets burnt up.

    Help is appreciated!
    Posted in: Modification Development
  • 0

    posted a message on Taking mod requests --- post ideas here!
    I've always liked the idea of a Grappling Hook mod.

    Right clicking shoots the hook, which can only reach a certain distance, and if it hits a block you get pulled to it. You can hang onto that block for as long as you like; right clicking again will retract the grapple, as will switching to a different item on the hotbar (Or maybe you COULD switch to a different item, allowing for interesting bow combat, hmm)

    Best of luck on whatever you decide to do!
    Posted in: Requests / Ideas For Mods
  • 0

    posted a message on Tinkers Construct
    I've only looked through the past few pages, so I'm sorry if this has been noted but I'd like to report a crash. This takes place in the most recent version of TC.

    With either a Tool Station or Tool Forge, trying to add Quartz to a non-weapon crashes the client. I have several other mods installed, so excuse any clutter in the report that I don't snip. The other mods are not the source of the problem.


    Minecraft has crashed!
    ----------------------

    Minecraft has stopped running because it encountered a problem; Rendering screen

    A full error report has been saved to C:\Users\Owner\Desktop\Minecraft Profile Manager\Multi\instances\WolvPack\minecraft\crash-reports\crash-2013-06-24_16.41.53-client.txt - Please include a copy of that file (Not this screen!) if you report this crash to anyone; without it, they will not be able to help fix the crash :(



    --- BEGIN ERROR REPORT 11d3b39e --------
    Full report at:
    C:\Users\Owner\Desktop\Minecraft Profile Manager\Multi\instances\WolvPack\minecraft\crash-reports\crash-2013-06-24_16.41.53-client.txt
    Please show that file to Mojang, NOT just this screen!

    Generated 6/24/13 4:41 PM

    -- Head --
    Stacktrace:
    at net.minecraft.client.renderer.entity.RenderItem.func_94149_a(RenderItem.java:564)
    at net.minecraft.client.renderer.entity.RenderItem.func_77015_a(RenderItem.java:393)
    at net.minecraft.client.renderer.entity.RenderItem.func_82406_b(RenderItem.java:443)
    at mods.tinker.tconstruct.client.gui.NewContainerGui.drawSlotInventory(NewContainerGui.java:431)
    at mods.tinker.tconstruct.client.gui.NewContainerGui.func_73863_a(NewContainerGui.java:131)

    -- Screen render details --
    Details:
    Screen name: mods.tinker.tconstruct.client.gui.ToolStationGui
    Mouse location: Scaled: (294, 131). Absolute: (588, 418)
    Screen size: Scaled: (632, 341). Absolute: (1264, 682). Scale factor of 2

    -- Affected level --
    Details:
    Level name: MpServer
    All players: 1 total; [EntityClientPlayerMP['Voussoir'/485408, l='MpServer', x=14.26, y=238.62, z=-8.96]]
    Chunk stats: MultiplayerChunkCache: 441
    Level seed: 0
    Level generator: ID 01 - flat, ver 0. Features enabled: false
    Level generator options:
    Level spawn location: World: (0,4,0), Chunk: (at 0,0,0 in 0,0; contains blocks 0,0,0 to 15,255,15), Region: (0,0; contains chunks 0,0 to 31,31, blocks 0,0,0 to 511,255,511)
    Level time: 309229 game time, 111207 day time
    Level dimension: 0
    Level storage version: 0x00000 - Unknown?
    Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false)
    Level game mode: Game mode: survival (ID 0). Hardcore: false. Cheats: false
    Forced entities: 6 total; [EntityPedestal['entity.PortalGun.portal_entityapg.name'/485377, l='MpServer', x=-40.50, y=237.00, z=0.50], EntityTFPenguin['Penguin'/485376, l='MpServer', x=-39.38, y=237.00, z=-76.31], EntityTFBighorn['Bighorn Sheep'/485378, l='MpServer', x=-10.13, y=237.00, z=-50.94], EntityClientPlayerMP['Voussoir'/485408, l='MpServer', x=14.26, y=238.62, z=-8.96], EntitySheep['Sheep'/485384, l='MpServer', x=-20.78, y=237.00, z=-9.78], EntityRadio['entity.PortalGun.portal_entityradio.name'/485374, l='MpServer', x=-54.44, y=225.00, z=-23.06]]
    Retry entities: 0 total; []
    Stacktrace:
    at net.minecraft.client.multiplayer.WorldClient.func_72914_a(WorldClient.java:441)
    at net.minecraft.client.Minecraft.func_71396_d(Minecraft.java:2414)
    at net.minecraft.client.Minecraft.run(Minecraft.java:776)
    at java.lang.Thread.run(Unknown Source)

    -- System Details --
    Details:
    Minecraft Version: 1.5.2
    Operating System: Windows 7 (amd64) version 6.1
    Java Version: 1.7.0_21, Oracle Corporation
    Java VM Version: Java HotSpot™ 64-Bit Server VM (mixed mode), Oracle Corporation
    Memory: 287508824 bytes (274 MB) / 921763840 bytes (879 MB) up to 3817799680 bytes (3640 MB)
    JVM Flags: 2 total; -Xms512m -Xmx4096m
    AABB Pool Size: 268 (15008 bytes; 0 MB) allocated, 92 (5152 bytes; 0 MB) used
    Suspicious classes: FML and Forge are installed
    IntCache: cache: 3, tcache: 28, allocated: 1, tallocated: 32
    FML: MCP v7.51 FML v5.2.23.737 Minecraft Forge 7.8.1.737 Optifine OptiFine_1.5.2_HD_U_D2 64 mods loaded, 64 mods active

    -snip-
    Removed much clutter where mods were declared "Available"
    -/snip-

    LWJGL: 2.4.2
    OpenGL: Intel® HD Graphics GL version 2.1.0 - Build 8.15.10.2827, Intel
    Is Modded: Definitely; Client brand changed to 'fml,forge'
    Type: Client (map_client.txt)
    Texture Pack: Default
    Profiler Position: N/A (disabled)
    Vec3 Pool Size: 146 (8176 bytes; 0 MB) allocated, 65 (3640 bytes; 0 MB) used

    java.lang.NullPointerException
    at net.minecraft.client.renderer.entity.RenderItem.func_94149_a(RenderItem.java:564)
    at net.minecraft.client.renderer.entity.RenderItem.func_77015_a(RenderItem.java:393)
    at net.minecraft.client.renderer.entity.RenderItem.func_82406_b(RenderItem.java:443)
    at mods.tinker.tconstruct.client.gui.NewContainerGui.drawSlotInventory(NewContainerGui.java:431)
    at mods.tinker.tconstruct.client.gui.NewContainerGui.func_73863_a(NewContainerGui.java:131)
    at net.minecraft.client.renderer.EntityRenderer.func_78480_b(EntityRenderer.java:1155)
    at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:871)
    at net.minecraft.client.Minecraft.run(Minecraft.java:760)
    at java.lang.Thread.run(Unknown Source)
    --- END ERROR REPORT efb59de4 ----------

    Quartz applies just fine on Broadswords, Rapiers, and Longswords. I reproduced this crash when applying quartz to a pickaxe twice, and to a shovel once. I did not try on an axe because restarting my modded client takes forever :P

    Nevertheless, this has to be one of my favorite mods of all time. Keep up the awesome work :D

    EDIT: Also, I dont know if this is intentional, but breaking blocks with 0 Hardness does damage to TC tools, when it does not do damage to vanilla tools. In other words, a vanilla pickaxe does not take damage from breaking wheat, sugar, torches, tallgrass, etc etc etc, but a TC Pickaxe will lose 1 durability. This isn't really a problem, but it sort of distances the mod tools from vanilla ones..
    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5.2][FORGE] QuickCrafting
    Quote from Blfngl

    How about:
    ItemStack swordIron = new ItemStack(Item.swordIron, 1, -1);
    int j = swordIron.getMaxDamage();
    int i = swordIron.getMaxDamage () - swordIron.getItemDamage();
    if (i < j / 2)
    {
    GameRegistry.addShapelessRecipe(new ItemStack(Item.ingotIron), new Object[]{swordIron});
    }
    else
    {
    //The normal stuff, or add a different check for armor
    }



    I just tried this out, and it didn't work. I didn't expect it to work, though, and here's why:
    The game only reads the mod_ files at the beginning of the game. You can't assign and unassign recipes mid-game, meaning the game will NEVER read that if statement, meaning it will never become a working recipe.

    It would be a cool feature to have, but I think I'd have to change the ItemSword files to get more information sent to the crafting recipe or something, which I'm obviously not going to do. Thanks for your effort though!

    Edit: Either that, or I could add 250 crafting recipes, one for each damage value of the iron sword. Then just 1562 more for Diamond....Yeahnevermind.


    Quote from BlockMaster671

    The recipes for item frames and paintings aren't equivalent, they should require 2 logs.


    Get a math job!


    Posted in: Minecraft Mods
  • 0

    posted a message on [1.5.2][FORGE] QuickCrafting
    Quote from Blfngl

    You may want to add that damaged tools won't give back all of the items, ie you have a diamond chest at half durability. It will only return four diamonds instead of eight.


    To be honest, I don't know if I can do that. Just to try it out, I gave this a shot:
    ItemStack swordIron = new ItemStack(Item.swordIron, 1, -1);
    int j = swordIron.getMaxDamage();
    int i = swordIron.getMaxDamage () - swordIron.getItemDamage();
    GameRegistry.addShapelessRecipe(new ItemStack(Item.ingotIron, (2 * (i/j))), new Object[]{swordIron});


    Which returned 2 ingots for a full-health sword, but wouldn't give anything for a damaged sword. If there is another way of making this happen, I'd be glad to know :D



    Quote from Tyler6126

    This CAN work for multiplayer... if its a cracked server. To make it SMP you gotta do all this file stuff and what not XD


    Well I'm guess that if a server has this mod installed, it will work. It doesn't matter if the server is cracked or not. I'm pretty sure Near's question was about him using it on a server, not getting it installed onto a server. A mod like this cannot be made completely client-sided like something such as Optifine or Dynamic Lights, since it adds recipes and doesn't just change something about the game.



    Update: 50 downloads? Thanks so much!
    Posted in: Minecraft Mods
  • 0

    posted a message on What are the rarest items?
    Quote from Jonathan921

    Golden Apple
    Magma Cream



    Both of these are extremely not-rare...

    Apples found by farming trees, 1 gold ingot provides the nuggets to gild it.

    Magma cream comes from Magma Cubes, which are uncommon mobs, but certainly not rare. Alternatively, they can be crafted with slime balls and blaze powder. Slimes now spawn in jungles by the dozen, and 30 - 60 minutes of building a blaze farm gives you enough rods to make your life supply of Magma Cream
    Posted in: Survival Mode
  • To post a comment, please or register a new account.