Class BaseContainerBlock<C extends bm & mn & Container<jl>>

java.lang.Object
  extended by ItemArray<C>
      extended by BaseContainerBlock<C>
Type Parameters:
C - The type of container we wish to wrap.
All Implemented Interfaces:
Inventory
Direct Known Subclasses:
Chest, Furnace

public abstract class BaseContainerBlock<C extends bm & mn & Container<jl>>
extends ItemArray<C>
implements Inventory

Generic superclass for Chests and Furnaces, as they are really similar.


Field Summary
Modifier and Type Field and Description
 
Fields inherited from class ItemArray
container
 
Constructor Summary
Constructor and Description
BaseContainerBlock(C block, java.lang.String reference)
          Create a BaseContainerBlock to act as a wrapper for a given container.
 
Method Summary
Modifier and Type Method and Description
 boolean equals(java.lang.Object obj)
          Tests the given object to see if it equals this object
 Block getBlock()
           
 java.lang.String getName()
           
 int getX()
           
 int getY()
           
 int getZ()
           
 int hashCode()
          Returns a semi-unique hashcode for this object
 void setName(java.lang.String value)
           
 java.lang.String toString()
           
 void update()
          Updates this inventory, sending the new information to clients
 
Methods inherited from class ItemArray
addItem, clearContents, getContents, getContentsSize, getEmptySlot, getItemFromId, getItemFromId, getItemFromId, getItemFromId, getItemFromSlot, hasItem, hasItem, hasItem, hasItem, hasItem, removeItem, removeItem, removeItem, removeItem, setContents, setSlot, setSlot, setSlot, setSlot
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface Inventory
addItem, clearContents, getContents, getContentsSize, getEmptySlot, getItemFromId, getItemFromId, getItemFromId, getItemFromId, getItemFromSlot, hasItem, hasItem, hasItem, hasItem, hasItem, removeItem, removeItem, removeItem, removeItem, setContents, setSlot, setSlot, setSlot, setSlot
 

Constructor Detail

BaseContainerBlock

public BaseContainerBlock(C block,
                          java.lang.String reference)
Create a BaseContainerBlock to act as a wrapper for a given container.

Parameters:
block - The in-world block to 'envelop'.
reference - Shows in toString().
Method Detail

getX

public int getX()

getY

public int getY()

getZ

public int getZ()

getBlock

public Block getBlock()

update

public void update()
Description copied from interface: Inventory
Updates this inventory, sending the new information to clients

Specified by:
update in interface Inventory

getName

public java.lang.String getName()
Specified by:
getName in interface Inventory

setName

public void setName(java.lang.String value)
Specified by:
setName in interface Inventory

equals

public boolean equals(java.lang.Object obj)
Tests the given object to see if it equals this object

Overrides:
equals in class java.lang.Object
Parameters:
obj - the object to test
Returns:
true if the two objects match

hashCode

public int hashCode()
Returns a semi-unique hashcode for this object

Overrides:
hashCode in class java.lang.Object
Returns:
hashcode

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object