public class DefaultNmsBlock extends NmsBlock
Throwable.| Constructor and Description |
|---|
DefaultNmsBlock(int type,
int data,
net.minecraft.server.v1_7_R2.NBTTagCompound nbtData)
Create a new instance with a given type ID, data value, and raw
NBTTagCompound copy. |
DefaultNmsBlock(int type,
int data,
TileEntityBlock tileEntityBlock)
Create a new instance with a given type ID, data value, and previous
TileEntityBlock-implementing object. |
| Modifier and Type | Method and Description |
|---|---|
static DefaultNmsBlock |
get(org.bukkit.World world,
Vector position,
int type,
int data)
Build an instance from the given information.
|
CompoundTag |
getNbtData()
Get the object's NBT data (tile entity data).
|
String |
getNbtId()
Return the name of the title entity ID.
|
static net.minecraft.server.v1_7_R2.Block |
getNmsBlock(int type) |
boolean |
hasNbtData()
Returns whether the block contains NBT data.
|
static boolean |
hasTileEntity(int type) |
static boolean |
isValidBlockType(int type) |
static boolean |
set(org.bukkit.World world,
Vector position,
BaseBlock block)
Set an instance or a
TileEntityBlock to the given position. |
void |
setNbtData(CompoundTag tag)
Set the object's NBT data (tile entity data).
|
static boolean |
setSafely(BukkitWorld world,
Vector position,
Block block,
boolean notifyAdjacent)
Tries to set a block 'safely', as in setting the block data to the location, and
then triggering physics only at the end.
|
static boolean |
verify() |
containsFuzzy, cycleData, equals, equalsFuzzy, flip, flip, getType, inIterable, isAir, rotate90, rotate90Reverse, setTypegetData, getId, hashCode, hasWildcardData, setData, setId, setIdAndData, toStringpublic DefaultNmsBlock(int type,
int data,
TileEntityBlock tileEntityBlock)
TileEntityBlock-implementing object.type - block type IDdata - data valuetileEntityBlock - tile entity blockpublic DefaultNmsBlock(int type,
int data,
net.minecraft.server.v1_7_R2.NBTTagCompound nbtData)
NBTTagCompound copy.type - block type IDdata - data valuenbtData - raw NBT datapublic static boolean verify()
public boolean hasNbtData()
NbtValuedNbtValued.getNbtData() must not return
null if this method returns true.hasNbtData in interface NbtValuedhasNbtData in class Blockpublic String getNbtId()
TileEntityBlockgetNbtId in interface TileEntityBlockgetNbtId in class Blockpublic 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 Blockpublic void setNbtData(CompoundTag tag) throws DataException
NbtValuedsetNbtData in interface NbtValuedsetNbtData in class Blocktag - NBT data, or null if no dataDataException - if possibly the data is invalidpublic static DefaultNmsBlock get(org.bukkit.World world, Vector position, int type, int data)
world - world to get the block fromposition - position to get the block attype - type ID of blockdata - data value of blockpublic static boolean set(org.bukkit.World world,
Vector position,
BaseBlock block)
TileEntityBlock to the given position.world - world to set the block inposition - position to set the block atblock - the block to setpublic static boolean setSafely(BukkitWorld world, Vector position, Block block, boolean notifyAdjacent)
world - world to set the block inposition - position to set the block atblock - the block to setnotifyAdjacent - true to notify physics and what notpublic static boolean hasTileEntity(int type)
public static net.minecraft.server.v1_7_R2.Block getNmsBlock(int type)
public static boolean isValidBlockType(int type)
throws NoClassDefFoundError
NoClassDefFoundErrorCopyright © 2010-2014. All Rights Reserved.