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 10/05/19 in all areas

  1. In an ideal world, everyone would use Capabilities and not mess with the ItemStacks NBTTagCompound at all. So basically always use Capabilities. If we are talking computer performance, I think NBTTagCompound just boils down to a HashMap and a Capability is also stored in a HashMap. Capability are easier to read and NBT is sloppy. If we are talking the amount of time to write the code, it comes down to how much information, for small amounts NBT is faster to implement but larger amounts it's typically faster to create a Capability. In RAM NBT is a HashMap<String, INBT> where INBT is a single NBT attribute a Compound/HashMap, List/ArrayList, NBTInt/int, etc. Where as in a Capability you define your own object that is attached to a Object(Entity, ItemStack, World, etc) and you store it there in whatever manner you want(not NBT). On disk everything is converted to NBT and written in Minecraft's custom file format.
  2. Interfaces are code-objects that describe what an object has or can do. Consider this example: Knobs expose a method called "twist": interacting with a knob involves twisting. - Dimmer switches are Knobs Toggles expose a method called "change state": interacting with a toggle involves changing its state from ON to OFF or vice versa. - Light switches are Toggles Buttons expose a method called "engage": interacting with a button involves changing its state from OFF to ON, and it automatically changes back when you stop. - Keyboard keys are Buttons A bathroom fan timer implements both Knob and Button in the sense that you interact to twist it, but it automatically turns back OFF after a duration because you've stopped interacting with it. Abstract classes are a code-object that exists halfway between a typical class and a typical interface, providing some default functionality, but leaving some up to its implementors. None of that is relevant to events, however. What D7 is referring to is that the PlayerInteractEvent is that it has subclasses that are more specific. Always use the most specific event for what you are doing.

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.