public class MobSpawnerBlock extends BaseBlock implements TileEntityBlock
| Constructor and Description |
|---|
MobSpawnerBlock()
Construct the mob spawner block with a pig as the mob type.
|
MobSpawnerBlock(int data)
Construct the mob spawner block with a specified data value.
|
MobSpawnerBlock(int data,
String mobType)
Construct the mob spawner block.
|
MobSpawnerBlock(String mobType)
Construct the mob spawner block with a given mob type.
|
| Modifier and Type | Method and Description |
|---|---|
short |
getDelay()
Get the spawn delay.
|
String |
getMobType()
Get the mob type.
|
CompoundTag |
getNbtData()
Get the object's NBT data (tile entity data).
|
String |
getNbtId()
Return the name of the title entity ID.
|
boolean |
hasNbtData()
Returns whether the block contains NBT data.
|
void |
setDelay(short delay)
Set the spawn delay.
|
void |
setMobType(String mobType)
Set the mob type.
|
void |
setNbtData(CompoundTag rootTag)
Set the object's NBT data (tile entity data).
|
containsFuzzy, cycleData, equals, equalsFuzzy, flip, flip, getData, getId, getType, hashCode, hasWildcardData, inIterable, internalSetData, internalSetId, isAir, rotate90, rotate90Reverse, setData, setId, setIdAndData, setType, toStringpublic MobSpawnerBlock()
public MobSpawnerBlock(String mobType)
mobType - mob typepublic MobSpawnerBlock(int data)
data - data valuepublic MobSpawnerBlock(int data,
String mobType)
data - data valuemobType - mob typepublic String getMobType()
public void setMobType(String mobType)
mobType - the mob typepublic short getDelay()
public void setDelay(short delay)
delay - the delay to setpublic boolean hasNbtData()
NbtValuedNbtValued.getNbtData()
must not return null if this method returns true.hasNbtData in interface NbtValuedhasNbtData in class BaseBlockpublic String getNbtId()
TileEntityBlockgetNbtId in interface TileEntityBlockgetNbtId in class BaseBlockpublic CompoundTag getNbtData()
NbtValuedNbtValued.setNbtData(CompoundTag)
so that the instance knows of the changes. Making changes without
calling NbtValued.setNbtData(CompoundTag) could have unintended
consequences.
NbtValued.hasNbtData() must return true if and only if method does
not return null.
getNbtData in interface NbtValuedgetNbtData in class BaseBlockpublic void setNbtData(CompoundTag rootTag)
NbtValuedsetNbtData in interface NbtValuedsetNbtData in class BaseBlockrootTag - NBT data, or null if no dataCopyright © 2010-2014. All Rights Reserved.