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.

UM3 F0R TH3 W1N

Members
  • Joined

  • Last visited

  1. Hey guys, I was wondering if there is a list of events that I can use for 1.12.2 rather than scouring the mc source for events(and rarely finding any that I need). so I have to resort to asking you guys, but if there is a list somewhere that would be extremely beneficial to me and loads of other people probably. if this could be done that would be great and I probably wouldn't turn up here so often, thanks in advance if you guys can help here.
  2. I figured it out while you were typing this, sorry, I have been working a lot with lua and python lately and not much on java at all so I was getting confused lmao. but thx for the help.
  3. however Item#onUpdateuses Entity not EntityLivingBase so there is no getActivePotionEffect.
  4. Hey guys, I am making this post because a friend of mine asked me how to make his item give the player a potion effect if it is in the player's inventory, however neither of us knew how to do this, so for this reason I have come here for some insight on how to do this. I am assuming it will involve an event but I could be wrong. If it does use an event, I am clueless of which one. Thanks for the help in advance!
  5. Hey guys, I am trying to see how I can have my item do extra knockback when I hit an entity with it! How can I do this? If this can be done without applying an enchantment, that would be great but I'd prefer to not have an enchant on the item! Thanks in advance!
  6. he explained how to do the event but not the check for what block, I know how to check for a block without meta but not for a block with meta
  7. im currently testing this code here: if(event.getState().getBlock() == Blocks.LEAVES.getDefaultState().withProperty(BlockOldLeaf.VARIANT, BlockPlanks.EnumType.OAK)) { event.getDrops().add(new ItemStack(ItemInit.GREEN_APPLE)); event.setDropChance(0.05f); } else if(event.getState().getBlock() == Blocks.LEAVES2.getDefaultState().withProperty(BlockNewLeaf.VARIANT, BlockPlanks.EnumType.DARK_OAK)) { event.getDrops().add(new ItemStack(ItemInit.GREEN_APPLE)); event.setDropChance(0.05f); }
  8. I may be wrong however I believe it has something to do with: if(event.getState().getValue(BlockOldLeaf.VARIANT) == EnumType.OAK) and else if(event.getState().getValue(BlockOldLeaf.VARIANT) == EnumType.DARK_OAK)
  9. I have recently been working on having my custom apple drop from oak trees and dark oak trees, however as I was testing it the game crashed, here's the crash log: https://hastebin.com/xifabokeci.sql. Here's ApplesFromLeavesEvent.java: https://hastebin.com/alipepoqok.java. If you need any other classes tell me. Thanks for the help in advance!
  10. is it a bad idea to use this: event.getDrops().clear(); like, will it mess up anything to do with like other mod compatability
  11. incorrect, as I tested it with the chance being 1.0f and I got my custom seeds every time however vanilla seeds had the same rarity/chances as they usually do
  12. so for the grass it would be like this: @SubscribeEvent public void getSeedsFromGrass(HarvestDropsEvent event) { if(event.getState() == Blocks.GRASS) { event.getDrops().add(new ItemStack(ItemInit.TOMATO_SEEDS)); event.getDrops().add(new ItemStack(ItemInit.LEMON_SEEDS)); event.setDropChance(0.07f); } else if(event.getState() == Blocks.TALLGRASS) { event.getDrops().add(new ItemStack(ItemInit.TOMATO_SEEDS)); event.getDrops().add(new ItemStack(ItemInit.LEMON_SEEDS)); event.setDropChance(0.14f); } } ? but im still confused on the leaf part

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.