Interface IBlock

All Known Subinterfaces:
IBlockFluidContainer, IBlockScripted, IBlockScriptedDoor

public interface IBlock
  • Method Details

    • getX

      int getX()
    • getY

      int getY()
    • getZ

      int getZ()
    • getPos

      IPos getPos()
    • getMetadata

      int getMetadata()
    • setMetadata

      void setMetadata​(int i)
    • getName

      java.lang.String getName()
      Returns this blocks name
    • remove

      void remove()
      Removes this block
    • isRemoved

      boolean isRemoved()
      Returns whether or not this block has been replaced by another
    • isAir

      boolean isAir()
    • setBlock

      IBlock setBlock​(java.lang.String name)
    • setBlock

      IBlock setBlock​(IBlock block)
      block - Sets the block to replace this one
      Returns the new block
    • hasTileEntity

      boolean hasTileEntity()
    • isContainer

      boolean isContainer()
      Returns whether it has items stored inside it (e.g. chests, droppers, hoppers, etc)
    • getContainer

      IContainer getContainer()
    • getTempdata

      IData getTempdata()
      Temp data stores anything but only untill it's reloaded. (works only for customnpcs blocks)
    • getStoreddata

      IData getStoreddata()
      Stored data persists through world restart. Unlike tempdata only Strings and Numbers can be saved (works only for blocks with TileEntities)
    • getWorld

      IWorld getWorld()
    • getTileEntityNBT

      INbt getTileEntityNBT()
    • setTileEntityNBT

      void setTileEntityNBT​(INbt nbt)
    • getMCTileEntity

      net.minecraft.tileentity.TileEntity getMCTileEntity()
      Expert users only
      Returns minecrafts tilentity
    • getMCBlock

      net.minecraft.block.Block getMCBlock()
      Expert users only
      Returns minecrafts block
    • blockEvent

      void blockEvent​(int type, int data)
      type - Event type
      data - Event data Example: Chests - type:1 data:1 opens the lid, type:1 data:0 closes the lid Note block - type:(0-9) data:(0-24) plays different notes
    • getDisplayName

      java.lang.String getDisplayName()
    • getMCBlockState

      net.minecraft.block.state.IBlockState getMCBlockState()
      Expert users only
      Returns minecrafts iblockstate
    • interact

      void interact​(int side)
      Simulates a player interacting with this block (can give weird results)
      side - The side of the block interacted with