Class MobSpawner

java.lang.Object
  extended by MobSpawner
All Implemented Interfaces:
ComplexBlock

public class MobSpawner
extends java.lang.Object
implements ComplexBlock

MobSpawner.java - Wrapper for mob spawners.


Constructor Summary
Constructor and Description
MobSpawner(db spawner)
          Creates an interface for the spawner.
 
Method Summary
Modifier and Type Method and Description
 Block getBlock()
          Returns the Block associated with this ComplexBlock
 java.lang.String getSpawn()
          Deprecated. 
 int getX()
          Returns the X coordinates of this block
 int getY()
          Returns the Y coordinates of this block
 int getZ()
          Returns the Z coordinates of this block
 void setDelay(int delay)
          Allows delay of what to spawn to change on-the-fly Modification of this is near-useless as delays get randomized after spawn.
 void setSpawn(java.lang.String spawn)
          Allows what to spawn to change on-the-fly
 void update()
          Sends the updated block information to clients.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MobSpawner

public MobSpawner(db spawner)
Creates an interface for the spawner.

Parameters:
spawner -
Method Detail

getX

public int getX()
Description copied from interface: ComplexBlock
Returns the X coordinates of this block

Specified by:
getX in interface ComplexBlock
Returns:
X

getY

public int getY()
Description copied from interface: ComplexBlock
Returns the Y coordinates of this block

Specified by:
getY in interface ComplexBlock
Returns:
Y

getZ

public int getZ()
Description copied from interface: ComplexBlock
Returns the Z coordinates of this block

Specified by:
getZ in interface ComplexBlock
Returns:
Z

getBlock

public Block getBlock()
Description copied from interface: ComplexBlock
Returns the Block associated with this ComplexBlock

Specified by:
getBlock in interface ComplexBlock
Returns:
Block

update

public void update()
Description copied from interface: ComplexBlock
Sends the updated block information to clients.

Specified by:
update in interface ComplexBlock

setSpawn

public void setSpawn(java.lang.String spawn)
Allows what to spawn to change on-the-fly

Parameters:
spawn -

getSpawn

@Deprecated
public java.lang.String getSpawn()
Deprecated. 

Returns the spawn used. This DOESN't work anymore.

Returns:

setDelay

public void setDelay(int delay)
Allows delay of what to spawn to change on-the-fly Modification of this is near-useless as delays get randomized after spawn. See: Block.setSpawnData() if you want to adjust this value.

Parameters:
delay -