Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 02/05/19 in all areas

  1. You should use a NonNullList (as array values are allowed to be null), but new ItemStack[]{} will create an empty array.
    1 point
  2. You can override the snow block and/or the vanilla sapling in the registry
    1 point
  3. Sneak-right clicking on a Block with an Item will only call Item#onItemUse by default, ignoring Block#onBlockActivated. To change this behaviour, either override Item#doesSneakBypassUse to return true (for your own Items) or subscribe to PlayerInteractEvent.RightClickBlock and call PlayerInteractEvent.RightClickBlock#setUseBlock with Result.ALLOW (for Items from Vanilla or other mods). This is handled in PlayerInteractionManager#processRightClickBlock on the server and PlayerControllerMP#processRightClickBlock on the client. Don't compare to ItemStack.EMPTY directly, it's just one of many possible empty ItemStacks. Use ItemStack#isEmpty instead.
    1 point
×
×
  • Create New...

Important Information

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