public class BlockSnapshot
extends java.lang.Object
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,
ResourceLocation registryName,
int meta,
int flag,
NBTTagCompound nbt)
Raw constructor designed for serialization usages.
|
BlockSnapshot(int dimension,
BlockPos pos,
java.lang.String modId,
java.lang.String blockName,
int meta,
int flag,
NBTTagCompound nbt)
|
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 notifyNeighbors) |
boolean |
restoreToLocation(World world,
BlockPos pos,
boolean force,
boolean notifyNeighbors) |
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, @Nullable NBTTagCompound nbt)
public BlockSnapshot(World world, BlockPos pos, IBlockState state, int flag)
@Deprecated public BlockSnapshot(int dimension, BlockPos pos, java.lang.String modId, java.lang.String blockName, int meta, int flag, @Nullable NBTTagCompound nbt)
public BlockSnapshot(int dimension, BlockPos pos, ResourceLocation registryName, int meta, int flag, @Nullable 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()
@Nullable public TileEntity getTileEntity()
public boolean restore()
public boolean restore(boolean force)
public boolean restore(boolean force, boolean notifyNeighbors)
public boolean restoreToLocation(World world, BlockPos pos, boolean force, boolean notifyNeighbors)
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)
@Nullable public NBTTagCompound getNbt()
public void setWorld(World world)
public ResourceLocation getRegistryName()
public int getMeta()