Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

KeeperofMee

Forge Modder
  • Joined

  • Last visited

  1. How do I get the mods directory/path from code?
  2. PlayerTickEvent. player.inventory.armorItemInSlot(/*The slot.*/).getItem(); Slots: 0 = boots. 1 = leggings. 2 = chestplate. 3 = helmet.
  3. I'm trying to use ItemSmeltedEvent in order to keep track of items smelted(I've added a few "rpg stats"), the problem is that the event differently on shift and normal pickup so I printed them: The problem is that in order to keep track of the items smelted I increase my own int with the stacksize of the event.smelting, but as you can see shift click triggers twice on server side with a stacksize of 0. Is there anyway else I can keep track of items smelted properly
  4. Items/Blocks: OreDictionary.registerOre(myInstance, "oreSilver"); Recipes: GameRegistry.addRecipe(new ShapedOreRecipe("QIW", " S ", " S ", 'Q', "oreCopper", 'I', "ingotSilver", 'W','"plankWood", 'S', "stickWood"));
  5. -

    KeeperofMee replied to mickedplay's topic in Modder Support
    Could you please use readable variable names...?
  6. All the mods you had are possible to easily recreate in forge without base edits.
  7. Thank you, that's something at least, but what if it's something no one has never done? Then you study the minecraft code and learn java.
  8. Well i just don't wan't to miss 2 weeks of coding, i would not like to test it, just code and then test it back home I found some programs, I only listed the ones with java syntax: https://itunes.apple.com/us/app/koder-code-editor/id439271237?mt=8 https://itunes.apple.com/us/app/codetogo/id382677229?mt=8 https://itunes.apple.com/us/app/for-i-code-editor-for-the-ipad/id363493710?mt=8 Then there's also simple text editors(no syntax but free): https://itunes.apple.com/us/app/edhita-open-source-text-editor/id398896655?mt=8 I don't know if the next one has java syntax but I'll list it anyway: https://itunes.apple.com/se/app/vim/id492668168?mt=8 There are probably more out there but hope I could be to any help.
  9. Why would you want eclipse on an iPad, you can't test it anyway.
  10. You can also use currentScreen in any class. Minecraft.getMinecraft().currentScreen
  11. Simply copy the workbench gui classes and change the method from false to true. Don't forget the gui handler.
  12. Heres a list of damages: http://pastebin.com/Pu4GJQMJ new ItemStack(Items.dye, 1, DAMAGE)
  13. You're totally right I really shouldn't code while distracted. My new code probably isn't the best but it's better anyway, Here's the new code: @Override public void breakBlock(World world, int x, int y, int z, Block block, int meta) { super.breakBlock(world, x, y, z, block, meta); //List of drops List<ItemStack> drops = block.getDrops(world, x, y, z, meta, 0); //Loops through all drops. for(ItemStack itemstack : drops){ //Spawns the drops into the world. world.spawnEntityInWorld(new EntityItem(world, x, y, z, itemstack)); } //Sets the block to the current block. world.setBlock(x, y, z, this); }
  14. I don't usually give code but anyway when I do I add comments.. It's your loss if you copy and paste without trying to understand so please don't if you're serious about modding. @Override public void breakBlock(World world, int x, int y, int z, Block block, int meta) { //Using random ints in the drops may cause a crash. Set amounts don't. //Loops through all drops. for(int i = 0; i < block.getDrops(world, x, y, z, meta, 0).size(); i++){ //Breaks the loop if i == size. if(i == block.getDrops(world, x, y, z, meta, 0).size()){ break; } //Spawns the drops into the world. world.spawnEntityInWorld(new EntityItem(world, x, y, z, block.getDrops(world, x, y, z, meta, 0).get(i))); } //Sets the block to the current block. world.setBlock(x, y, z, this); }

Important Information

By using this site, you agree to our Terms of Use.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.