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.

super_aardvark

Members
  • Joined

  • Last visited

  1. If a tool breaks when breaking a block, PlayerDestroyItemEvent is fired twice: first, properly, in EntityPlayer.destroyCurrentEquippedItem, and a second time, erroneously, in ItemInWorldManager.tryHarvestBlock (which first makes the call to destroyCurrentEquippedItem). See ItemInWorldManager.java:323-324 in the latest build. I trust that's clear enough without including any kind of log.
  2. FYI the hot bar comprises indices 0-8 of mainInventory.
  3. I also haven't done much modding in Minecraft in general. Many moons ago I made a simple patch to let mobs break blocks, mostly as a coding exercise/intro to modding. Now I've created a tiny mod that will replace a broken tool with another one from your inventory. (I was getting tired of opening up my inventory every time my pick broke.) I did this with MCP alone, but I want to make it available to others and have it play nicely with other mods. It seems like that's what a mod loader like FML is for... am I right? From the little I've read so far about MCForge, it seems like it's mostly designed to help people add new blocks, items, that kind of thing. This mod is a small patch (about 8 new lines) to EntityPlayer.java. If you're just dropping new files into minecraft.jar, my mod will obviously conflict with any other mod that touches that file. Can I use Forge to package my mod in a way that can be merged with other mods? Thanks EDIT: Ok, I'm on my way to answering my own question... found this in the Forge version of EntityPlayer, where my code change went: MinecraftForge.EVENT_BUS.post(new PlayerDestroyItemEvent(this, orig)); I think I saw something about events on the wiki... I'll check there. EDIT 2: Got it working.

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.