Package net.minecraftforge.common.util
Class BlockSnapshot
java.lang.Object
net.minecraftforge.common.util.BlockSnapshot
Represents a captured snapshot of a block which will not change
automatically.
Unlike Block, which only one object can exist per coordinate, BlockSnapshot can exist multiple times for any given Block.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockStateprivate static final booleanprivate final RegistryKey<World>private final intprivate final CompoundNBTprivate final BlockPosprivate Stringprivate WeakReference<IWorld> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateBlockSnapshot(RegistryKey<World> dim, IWorld world, BlockPos pos, BlockState state, CompoundNBT nbt, int flags) -
Method Summary
Modifier and TypeMethodDescriptionstatic BlockSnapshotcreate(RegistryKey<World> dim, IWorld world, BlockPos pos) static BlockSnapshotcreate(RegistryKey<World> dim, IWorld world, BlockPos pos, int flag) booleanintgetFlag()getNbt()getPos()private static CompoundNBTgetTileNBT(TileEntity te) getWorld()inthashCode()booleanrestore()booleanrestore(boolean force) booleanrestore(boolean force, boolean notifyNeighbors) booleanrestoreToLocation(IWorld world, BlockPos pos, boolean force, boolean notifyNeighbors) toString()
-
Field Details
-
DEBUG
private static final boolean DEBUG -
dim
-
pos
-
flags
private final int flags -
block
-
nbt
-
world
-
toString
-
-
Constructor Details
-
BlockSnapshot
private BlockSnapshot(RegistryKey<World> dim, IWorld world, BlockPos pos, BlockState state, @Nullable CompoundNBT nbt, int flags)
-
-
Method Details
-
create
-
create
-
getTileNBT
-
getCurrentBlock
-
getWorld
-
getReplacedBlock
-
getTileEntity
-
restore
public boolean restore() -
restore
public boolean restore(boolean force) -
restore
public boolean restore(boolean force, boolean notifyNeighbors) -
restoreToLocation
-
equals
-
hashCode
public int hashCode() -
toString
-
getPos
-
getFlag
public int getFlag() -
getNbt
-