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.

Leaderboard

Popular Content

Showing content with the highest reputation on 04/02/17 in all areas

  1. Not to mention, Items are Singletons. There exists only 1 of each item. Any data stored in the Item class, will be global for each ItemStack containing said Item. The way you intend to work using this SelfStack will thus not work. You are given the correct ItemStack in almost all possible method parameters (here, it's par1ItemStack¹), either directly, or if need ever be, through the EntityPlayer. ¹Please edit your parameter names as well. par1, par2...par27 looks horrible and are easily mistaken for each other by the human eye.
  2. What is SelfStack, where are you getting that from? If you want to add information based on the NBT of the stack in question, you need to get the NBT from the stack in question - the one the method gives you.
  3. In addition to ItemStack#setCount, you can also use ItemStack#grow and ItemStack#shrink.
  4. You can use getCount() to get stack size or setCount() to set stackSize. The stackSize is private because ItemStack in forge 1.11.2 is never null. You should use ItemStack.EMPTY instead of null!

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.