Class BedItem


public class BedItem extends PlaceAsBlockItem
  • Constructor Details

    • BedItem

      public BedItem(int itemID, int blockID)
  • Method Details

    • getTargetFacingPlacedByBlockDispenser

      public int getTargetFacingPlacedByBlockDispenser(int dispenserFacing)
      Beds can't be placed facing up or down, so defaults to north-facing metadata.
      Overrides:
      getTargetFacingPlacedByBlockDispenser in class PlaceAsBlockItem
    • onItemUsedByBlockDispenser

      public boolean onItemUsedByBlockDispenser(ItemStack stack, World world, int x, int y, int z, int facing)
      Description copied from class: Item
      This method should return true if the item is successfully placed (in which case the BD will consume the corresponding item in its inventory), false otherwise. Co-ordinates specify the BD position.
      Overrides:
      onItemUsedByBlockDispenser in class PlaceAsBlockItem
    • onItemUse

      public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float hitX, float hitY, float hitZ)
      Description copied from class: Item
      Callback for item usage. If the item does something special on right clicking, he will have one of those. Return True if something happen and false if it don't. This is for ITEMS, not BLOCKS
      Overrides:
      onItemUse in class PlaceAsBlockItem