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.

IamP

Members
  • Joined

  • Last visited

Everything posted by IamP

  1. .

    IamP replied to IamP's topic in Modder Support
    It's work now.
  2. .

    IamP replied to IamP's topic in Modder Support
    Thanks for your recommendation
  3. .

    IamP posted a topic in Modder Support
    this is my code @SubscribeEvent public void checkItem(BlockEvent.EntityPlaceEvent event) { if (!event.getWorld().isRemote()) { if (event.getEntity() instanceof PlayerEntity) { PlayerEntity player = (PlayerEntity) event.getEntity(); Hand hand = player.getActiveHand(); ItemStack stack = player.getHeldItem(hand); System.out.println(stack); if (stack.getCount() == 1) { System.out.println(stack); int i = this.findItem(player, stack.getItem().getItem()); if (i != -1) { ItemStack item = player.inventory.mainInventory.get(i); player.inventory.mainInventory.set(i, ItemStack.EMPTY); player.setHeldItem(hand, item); System.out.println(stack + " 1"); } } } } } public int findItem(PlayerEntity player, Item item) { for (int i = 0; i < player.inventory.getSizeInventory(); i++) { ItemStack stack = player.inventory.mainInventory.get(i); if (!stack.isEmpty() && stack.getItem().getItem() == item) { return i; } } return -1; }

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.