public abstract class World extends java.lang.Object implements Identifiable
| Constructor and Description |
|---|
World() |
| Modifier and Type | Method and Description |
|---|---|
abstract Entity |
addClientEntity(EntityFactory factory)
Creates an entity only on the client side.
|
abstract <T extends Entity> |
addClientEntity(T entity)
Creates an entity only on the client side.
|
abstract Entity |
addEntity(EntityFactory factory)
Creates an entity
|
abstract Entity |
addEntity(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position,
Item item)
Creates an entity that holds an item
|
abstract java.util.Optional<Block> |
getBlock(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
Gets the block which occupies the given position.
|
abstract java.util.Set<Entity> |
getEntities(Cuboid bound)
Gets a set of entities within a certain bound
|
abstract java.util.Optional<Entity> |
getEntity(java.lang.String uniqueID)
Gets an entity based on its UUID
|
abstract void |
markChange(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
Marks a specific block to indicate it changed.
|
abstract void |
markStaticRender(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
Marks a position to render static.
|
abstract void |
playSoundAtPosition(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position,
Sound soundFactory)
Plays a sound at a certain position.
|
boolean |
removeBlock(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
Removes the block in the specified position.
|
abstract void |
removeEntity(Entity entity)
Destroys an entity, removing it from the world.
|
abstract boolean |
setBlock(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position,
BlockFactory blockFactory)
Sets the block occupying a given position.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetID, sameTypepublic abstract void markStaticRender(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
position - The position to perform the static re-rendering.public abstract void markChange(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
position - The position being changed.public abstract java.util.Optional<Block> getBlock(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
position - The position to query.public abstract boolean setBlock(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position,
BlockFactory blockFactory)
position - The position of the block to set.blockFactory - The block factory.true if the replace was successful.public boolean removeBlock(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position)
position - the position of the block to remove.true if the block was removed.public abstract Entity addEntity(EntityFactory factory)
factory - The entity factorypublic abstract Entity addEntity(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position, Item item)
position - The position to add the item toitem - The itempublic abstract Entity addClientEntity(EntityFactory factory)
TODO: Replace this with an actual particle system.
factory - The entity factorypublic abstract <T extends Entity> T addClientEntity(T entity)
TODO: Replace this with an actual particle system.
T - The entity typeentity - The entity to addpublic abstract void removeEntity(Entity entity)
entity - The entity to removepublic abstract java.util.Optional<Entity> getEntity(java.lang.String uniqueID)
uniqueID - The entity's unique IDpublic abstract java.util.Set<Entity> getEntities(Cuboid bound)
bound - The boundarypublic abstract void playSoundAtPosition(org.apache.commons.math3.geometry.euclidean.threed.Vector3D position,
Sound soundFactory)
position - The position in the world of the sound.soundFactory - The sound factory that will create the sound to be played.