Class BlockSnapshot


  • public class BlockSnapshot
    extends java.lang.Object
    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 Detail

      • DEBUG

        private static final boolean DEBUG
      • flags

        private final int flags
      • world

        @Nullable
        private java.lang.ref.WeakReference<IWorld> world
      • toString

        private java.lang.String toString
    • Method Detail

      • getCurrentBlock

        public BlockState getCurrentBlock()
      • getWorld

        @Nullable
        public IWorld getWorld()
      • getReplacedBlock

        public BlockState getReplacedBlock()
      • getTileEntity

        @Nullable
        public TileEntity getTileEntity()
      • restore

        public boolean restore()
      • restore

        public boolean restore​(boolean force)
      • restore

        public boolean restore​(boolean force,
                               boolean notifyNeighbors)
      • restoreToLocation

        public boolean restoreToLocation​(IWorld world,
                                         BlockPos pos,
                                         boolean force,
                                         boolean notifyNeighbors)
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getFlag

        public int getFlag()