• 1

    posted a message on More Armor Slots

    Well, that basically breaks minecraft combat, then. Wearing 2 sets of Iron Armor would give you 120% damage reduction, or making you functionally immortal.

    Posted in: Requests / Ideas For Mods
  • 1

    posted a message on Explosion doesn't do damage

    LapisSea, it doesn't look like the first is his problem.


    I think it would be something along the lines of using the player as the entity that the explosion is called on, or it could be that that last boolean is set to false. I'm not sure what that "false" value gives, but all my explosions have "true" there. Perhaps you could spawn a custom TNT-clone entity when the block is broken that has a nearly 0 tick fuse. That SHOULD solve the problem if it's an issue with using the player as the exploding entity.

    Posted in: Modification Development
  • 1

    posted a message on Portable chest

    CoolAlias has a solid tutorial on making a backpack. Here's his GitHub version of it: https://github.com/coolAlias/Forge_Tutorials/blob/master/InventoryItemTutorial.java


    There's a version of it floating around in forum format on this site, too.

    Posted in: Modification Development
  • 1

    posted a message on Recipe is not working - any idea why?

    Where is this code? Is it inside it's own class? If so, you'll need it to be inside a "init" method that you call in your main class (or a proper proxy).


    If it's in the main on its own, it should work.


    As for the structure of that particular line itself...


    GameRegistry.addShapelessRecipe(new ItemStack(ModItems.tutoriumRound, 32), new Object[]{ModItems.tutorialItem, Items.redstone, Items.glowstone_dust, new ItemStack(ModItems.craftingPendulum, 1, OreDictionary.WILDCARD_VALUE)});


    This should give you an idea of how to set up the line.The first itemstack is what you want to produce (and with the option of the number produced), and the ItemStacks in the "consumed" area of the line are ONLY required when you want to do something special with an item, like allow it to craft using damaged items, or have it require multiple copies of the item in the same slot.

    Posted in: Modification Development
  • 1

    posted a message on Help with Father Toast's Mob Properties: Different drops depending on what killed the mob

    Ah. I see. I know nothing about that sort of mod, but let me show you my code for MY Drop Handler. This is how it would be "typically" done, I believe.


    If you can load in other mod's mobs, then you could use this method on them that way. Most of the time, you'd want a specific thing to drop from a specific mob, and if you want to muck around with other mod's mobs, then you're likely already wanting to muck around with other mods in general.



    https://github.com/Exo594/TutorialWork/blob/master/src/main/java/com/exo594/tutorial/handlers/DropHandler.java


    This bit of code gets witches to drop a custom item of mine when they die. You can specify the mob, the type, amount and chance of a drop this way. With only a little bit more logic (if statements checking things), you can get this code to check the weapon used.

    Posted in: Modification Development
  • 1

    posted a message on Help with Father Toast's Mob Properties: Different drops depending on what killed the mob

    I'm guessing you have some kind of Mob-Drop Handler class that can check the entity killed on the entity killed event? If you've got that, then you just need to get the item held by the player during that event. The weapon itself is a logical statement, and the NBT tag on that weapon is ANOTHER logical statement. If you want it to be a diamond sword AND Smite V, you need to check for BOTH. If it's only one of those that's required, then you only need to check for one.

    Posted in: Modification Development
  • To post a comment, please .