Interface ChunkRegenerateFlag

    • Method Detail

      • create

        boolean create()
        Gets whether this flag defines that a chunk should be created if it does not exist.
        Returns:
        True if this is set to create chunks
      • entities

        boolean entities()
        Gets whether this flag will preserve entities in chunks that are regenerated. Note: It is up to the implementation to decide whether this will include moving entities to safe locations.
        Returns:
        True if this is set to preserve entities
      • withCreate

        ChunkRegenerateFlag withCreate​(boolean create)
        Gets the equivalent ChunkRegenerateFlag of this flag with all other flags while having the desired create as defined by the parameter.
        Parameters:
        create - Whether to create chunk
        Returns:
        The relative flag with the desired create
      • withEntities

        ChunkRegenerateFlag withEntities​(boolean entities)
        Gets the equivalent ChunkRegenerateFlag of this flag with all other flags while having the desired entities as defined by the parameter.
        Parameters:
        entities - Whether to preserve entities
        Returns:
        The relative flag with the desired entities
      • andFlag

        ChunkRegenerateFlag andFlag​(ChunkRegenerateFlag flag)
        Gets the equivalent ChunkRegenerateFlag of this flag with the trues set for this flag and the provided flag, such that only if both flags have the same true flags set will persist.

        For example, if this flag has create() and the incoming flag has create() returning true, the resulting flag will have create() return true as well. The inverse is also true. If either has differing flags for any of the above methods, the resulting flag will have a false value.

        Parameters:
        flag - The incoming flag to and with this flag
        Returns:
        The resulting flag with matched values
      • andNotFlag

        ChunkRegenerateFlag andNotFlag​(ChunkRegenerateFlag flag)
        Gets the equivalent ChunkRegenerateFlag of this flag where the provided flag has its values inverted before performing an and operation between this flag and the provided flag. Therefore, the returned flag will only have true for a value if the value is true for this flag and false for the provided flag.
        Parameters:
        flag - The incoming flag to compare against
        Returns:
        The resulting flag with matched values