Interface EntityVolume.Modifiable<M extends EntityVolume.Modifiable<M>>

    • Method Detail

      • createEntity

        <E extends Entity> E createEntity​(EntityType<E> type,
                                          Vector3d position)
                                   throws IllegalArgumentException,
                                          IllegalStateException
        Create an entity instance at the given position.

        Creating an entity does not spawn the entity into the world. An entity created means the entity can be spawned at the given location. If Optional.empty() was returned, the entity is not able to spawn at the given location. Furthermore, this allows for the Entity to be customized further prior to traditional "ticking" and processing by core systems.

        Parameters:
        type - The type
        position - The position
        Returns:
        An entity, if one was created
        Throws:
        IllegalArgumentException - If the position or entity type is not valid to create
        IllegalStateException - If a constructor cannot be found
      • createEntity

        default <E extends Entity> E createEntity​(Supplier<EntityType<E>> type,
                                                  Vector3d position)
                                           throws IllegalArgumentException,
                                                  IllegalStateException
        Create an entity instance at the given position.

        Creating an entity does not spawn the entity into the world. An entity created means the entity can be spawned at the given location. If Optional.empty() was returned, the entity is not able to spawn at the given location. Furthermore, this allows for the Entity to be customized further prior to traditional "ticking" and processing by core systems.

        Parameters:
        type - The type supplier
        position - The position
        Returns:
        An entity, if one was created
        Throws:
        IllegalArgumentException - If the position or entity type is not valid to create
        IllegalStateException - If a constructor cannot be found
      • createEntity

        default <E extends Entity> E createEntity​(EntityType<E> type,
                                                  Vector3i position)
                                           throws IllegalArgumentException,
                                                  IllegalStateException
        Create an entity instance at the given position.

        Creating an entity does not spawn the entity into the world. An entity created means the entity can be spawned at the given location. If Optional.empty() was returned, the entity is not able to spawn at the given location. Furthermore, this allows for the Entity to be customized further prior to traditional "ticking" and processing by core systems.

        Parameters:
        type - The type
        position - The position
        Returns:
        An entity, if one was created
        Throws:
        IllegalArgumentException - If the position or entity type is not valid to create
        IllegalStateException - If a constructor cannot be found
      • createEntity

        default <E extends Entity> E createEntity​(Supplier<EntityType<E>> type,
                                                  Vector3i position)
                                           throws IllegalArgumentException,
                                                  IllegalStateException
        Create an entity instance at the given position.

        Creating an entity does not spawn the entity into the world. An entity created means the entity can be spawned at the given location. If Optional.empty() was returned, the entity is not able to spawn at the given location. Furthermore, this allows for the Entity to be customized further prior to traditional "ticking" and processing by core systems.

        Parameters:
        type - The type supplier
        position - The position
        Returns:
        An entity, if one was created
        Throws:
        IllegalArgumentException - If the position or entity type is not valid to create
        IllegalStateException - If a constructor cannot be found
      • createEntityNaturally

        <E extends Entity> E createEntityNaturally​(EntityType<E> type,
                                                   Vector3d position)
                                            throws IllegalArgumentException,
                                                   IllegalStateException
        Create an entity instance at the given position with the default equipment.

        Creating an entity does not spawn the entity into the world. An entity created means the entity can be spawned at the given location. If Optional.empty() was returned, the entity is not able to spawn at the given location. Furthermore, this allows for the Entity to be customized further prior to traditional "ticking" and processing by core systems.

        Parameters:
        type - The type
        position - The position
        Returns:
        An entity, if one was created
        Throws:
        IllegalArgumentException - If the position or entity type is not valid to create
        IllegalStateException - If a constructor cannot be found
      • createEntityNaturally

        default <E extends Entity> E createEntityNaturally​(Supplier<EntityType<E>> type,
                                                           Vector3d position)
                                                    throws IllegalArgumentException,
                                                           IllegalStateException
        Create an entity instance at the given position with the default equipment.

        Creating an entity does not spawn the entity into the world. An entity created means the entity can be spawned at the given location. If Optional.empty() was returned, the entity is not able to spawn at the given location. Furthermore, this allows for the Entity to be customized further prior to traditional "ticking" and processing by core systems.

        Parameters:
        type - The type supplier
        position - The position
        Returns:
        An entity, if one was created
        Throws:
        IllegalArgumentException - If the position or entity type is not valid to create
        IllegalStateException - If a constructor cannot be found
      • createEntityNaturally

        default <E extends Entity> E createEntityNaturally​(EntityType<E> type,
                                                           Vector3i position)
                                                    throws IllegalArgumentException,
                                                           IllegalStateException
        Create an entity instance at the given position with the default equipment.

        Creating an entity does not spawn the entity into the world. An entity created means the entity can be spawned at the given location. If Optional.empty() was returned, the entity is not able to spawn at the given location. Furthermore, this allows for the Entity to be customized further prior to traditional "ticking" and processing by core systems.

        Parameters:
        type - The type
        position - The position
        Returns:
        An entity, if one was created
        Throws:
        IllegalArgumentException - If the position or entity type is not valid to create
        IllegalStateException - If a constructor cannot be found
      • createEntityNaturally

        default <E extends Entity> E createEntityNaturally​(Supplier<EntityType<E>> type,
                                                           Vector3i position)
                                                    throws IllegalArgumentException,
                                                           IllegalStateException
        Create an entity instance at the given position with the default equipment.

        Creating an entity does not spawn the entity into the world. An entity created means the entity can be spawned at the given location. If Optional.empty() was returned, the entity is not able to spawn at the given location. Furthermore, this allows for the Entity to be customized further prior to traditional "ticking" and processing by core systems.

        Parameters:
        type - The type supplier
        position - The position
        Returns:
        An entity, if one was created
        Throws:
        IllegalArgumentException - If the position or entity type is not valid to create
        IllegalStateException - If a constructor cannot be found
      • createEntity

        Optional<Entity> createEntity​(DataContainer entityContainer)
        Create an entity instance at the given position.

        Creating an entity does not spawn the entity into the world. An entity created means the entity can be spawned at the given location. If Optional.empty() was returned, the entity is not able to spawn at the given location. Furthermore, this allows for the Entity to be customized further prior to traditional "ticking" and processing by core systems.

        Parameters:
        entityContainer - The data container of the entity
        Returns:
        An entity, if one was created
      • createEntity

        Optional<Entity> createEntity​(DataContainer entityContainer,
                                      Vector3d position)
        Create an entity instance at the given position.

        Creating an entity does not spawn the entity into the world. An entity created means the entity can be spawned at the given location. If Optional.empty() was returned, the entity is not able to spawn at the given location. Furthermore, this allows for the Entity to be customized further prior to traditional "ticking" and processing by core systems.

        Parameters:
        entityContainer - The data container of the entity
        position - The position of the entity to spawn at
        Returns:
        An entity, if one was created
      • spawnEntity

        boolean spawnEntity​(Entity entity)
        Spawns an Entity using the already set properties (extent, position, rotation) and applicable Values for spawning the entity.

        The requirements involve that all necessary setup of states and data is already preformed on the entity retrieved from the various createEntity(EntityType,Vector3d) methods. Calling this will make the now-spawned entity able to be processed by various systems.

        If the entity was unable to spawn, the entity is not removed, but it should be taken note that there can be many reasons for a failure.

        Parameters:
        entity - The entity to spawn
        Returns:
        True if successful, false if not
      • spawnEntities

        Collection<Entity> spawnEntities​(Iterable<? extends Entity> entities)
        Similar to spawnEntity(Entity) except where multiple entities can be attempted to be spawned.
        Parameters:
        entities - The created entities you wish to spawn
        Returns:
        The entities which spawned correctly, or empty if none