public class TWorld extends TElement implements ObjectContainer
Constructor and Description |
---|
TWorld()
Constructs an instance of a game world.
|
Modifier and Type | Method and Description |
---|---|
static TWorld |
create(java.io.InputStream in)
Creates this object from an input stream, expecting its byte representation.
|
TWorld |
getParent()
Gets this object's parent.
|
boolean |
isValidEntryType(BlockEntryType type)
Checks if this element handles a particular entry type.
|
Block |
resolveBlock(BlockEntry blockEntry)
Resolves a block using a block entry on this element
by going backwards through its lineage.
|
FunctionEntry |
resolveFunction(java.lang.String functionName)
Resolves a function entry using a function name on this element
by going backwards through its lineage.
|
void |
setArchetype(boolean archetype)
Sets if this element is an Archetype.
|
void |
setParent(TElement parent)
Sets a parent on this object.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addBlock, addFunction, equals, equals, fromBytes, getBlock, getBlockEntries, getFunction, getFunctionEntries, getIdentity, hashCode, isArchetype, readBytes, setIdentity, setIdentityForced, toBytes, toString, writeBytes
public static TWorld create(java.io.InputStream in) throws java.io.IOException
in
- the input stream to read from.java.io.IOException
- if a read error occurs.public final boolean isValidEntryType(BlockEntryType type)
TElement
isValidEntryType
in class TElement
type
- the entry type to check.public void setParent(TElement parent)
TElement
public void setArchetype(boolean archetype)
TElement
setArchetype
in class TElement
archetype
- true if so, false if not.public TWorld getParent()
TElement
getParent
in class TElement
TElement.setParent(TElement)
public Block resolveBlock(BlockEntry blockEntry)
TElement
resolveBlock
in class TElement
blockEntry
- the block entry to use.public FunctionEntry resolveFunction(java.lang.String functionName)
TElement
resolveFunction
in class TElement
functionName
- the function name to use.