Interface BlockEntity

    • Method Detail

      • isValid

        boolean isValid()
        Checks for whether the block entity is currently valid or not.

        Use this method to check if processing should be run on this BlockEntity. If it is valid, then processing can be run on it. If not, then processing should wait until it becomes valid or is destroyed.

        Returns:
        True if the block entity is valid, false if not
      • setValid

        void setValid​(boolean valid)
        Changes the validation of this block entity.

        If the block entity is invalid, no processing will be done on this BlockEntity until it either becomes valid or is reset on the next tick.

        If the block entity is valid, then processing can continue and this BlockEntity will not be reset on the next tick.

        Parameters:
        valid - True if the block entity should be validated, or false if it should be invalidated
      • mirror

        BlockEntity mirror​(Mirror mirror)
        Gets the appropriate BlockEntity for the desired Mirror.
        Parameters:
        mirror - The mirror
        Returns:
        The mirrored BlockEntity
      • locatableBlock

        LocatableBlock locatableBlock()
        Creates a LocatableBlock for this BlockEntity. Can be used as a simpler method of making them. Since this does not persist the data of this BlockEntity, it should not be used in place of a BlockSnapshot where data is being safely cloned.
        Returns:
        The created locatable block, not as a block snapshot