public class BlockSnapshot
extends java.lang.Object
implements java.io.Serializable
Unlike Block, which only one object can exist per coordinate, BlockSnapshot can exist multiple times for any given Block.
Constructor and Description |
---|
BlockSnapshot(int dimension,
BlockPos pos,
java.lang.String modId,
java.lang.String blockName,
int meta,
int flag,
NBTTagCompound nbt)
Raw constructor designed for serialization usages.
|
BlockSnapshot(World world,
BlockPos pos,
IBlockState state) |
BlockSnapshot(World world,
BlockPos pos,
IBlockState state,
int flag) |
BlockSnapshot(World world,
BlockPos pos,
IBlockState state,
NBTTagCompound nbt) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
static BlockSnapshot |
getBlockSnapshot(World world,
BlockPos pos) |
static BlockSnapshot |
getBlockSnapshot(World world,
BlockPos pos,
int flag) |
IBlockState |
getCurrentBlock() |
int |
getDimId() |
int |
getFlag() |
int |
getMeta() |
NBTTagCompound |
getNbt() |
BlockPos |
getPos() |
ResourceLocation |
getRegistryName() |
IBlockState |
getReplacedBlock() |
TileEntity |
getTileEntity() |
World |
getWorld() |
int |
hashCode() |
static BlockSnapshot |
readFromNBT(NBTTagCompound tag) |
boolean |
restore() |
boolean |
restore(boolean force) |
boolean |
restore(boolean force,
boolean applyPhysics) |
boolean |
restoreToLocation(World world,
BlockPos pos,
boolean force,
boolean applyPhysics) |
void |
setFlag(int flag) |
void |
setReplacedBlock(IBlockState replacedBlock) |
void |
setWorld(World world) |
void |
writeToNBT(NBTTagCompound compound) |
public BlockSnapshot(World world, BlockPos pos, IBlockState state)
public BlockSnapshot(World world, BlockPos pos, IBlockState state, NBTTagCompound nbt)
public BlockSnapshot(World world, BlockPos pos, IBlockState state, int flag)
public BlockSnapshot(int dimension, BlockPos pos, java.lang.String modId, java.lang.String blockName, int meta, int flag, NBTTagCompound nbt)
public static BlockSnapshot getBlockSnapshot(World world, BlockPos pos)
public static BlockSnapshot getBlockSnapshot(World world, BlockPos pos, int flag)
public static BlockSnapshot readFromNBT(NBTTagCompound tag)
public IBlockState getCurrentBlock()
public World getWorld()
public IBlockState getReplacedBlock()
public TileEntity getTileEntity()
public boolean restore()
public boolean restore(boolean force)
public boolean restore(boolean force, boolean applyPhysics)
public boolean restoreToLocation(World world, BlockPos pos, boolean force, boolean applyPhysics)
public void writeToNBT(NBTTagCompound compound)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public BlockPos getPos()
public int getDimId()
public void setReplacedBlock(IBlockState replacedBlock)
public int getFlag()
public void setFlag(int flag)
public NBTTagCompound getNbt()
public void setWorld(World world)
public ResourceLocation getRegistryName()
public int getMeta()