Skip 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.

ftrPrezR99

Members
  • Joined

  • Last visited

Everything posted by ftrPrezR99

  1. I have some blocks in my mod which detect when a player breaks them using the BreakEvent. In survival mode, the block drops an item and is immediately replaced by the same block, making an infinite farm basically. In creative mode, you can permanently destroy/place the block as normal. That seems to work well for players, but say if a modded block (like the Create mod drill) breaks them, then it seems to simply just destroy the block, without triggering the event. How could I make is such that a non-player like the drill can replicate that same behavior as a player in survival? Based upon my own research into Create's source code (plus my own testing), the drill does not seem to trigger a BreakEvent. Though I'm surprised the event just doesn't trigger on its own anyways (though I am still learning about events generally so I am probably missing something). public static class ForgeEvents { @SubscribeEvent public static void onBreak(BlockEvent.BreakEvent event) { BlockEntity blockEntity = event.getLevel().getBlockEntity(event.getPos()); boolean found = false; if (blockEntity instanceof OreVeinEntity) { //creative mode only can destroy the blocks if (!event.getPlayer().isCreative()) { //do stuff

Important Information

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

Account

Navigation

Search

Search

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.