public final class Bo3Object extends AbstractObject implements Bo2ObjectProvider
WPObject.BlockVisitor| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | KEY_RANDOM_ROTATION | 
ATTRIBUTE_COLLISION_MODE, ATTRIBUTE_CONNECT_BLOCKS, ATTRIBUTE_EXTEND_FOUNDATION, ATTRIBUTE_FILE, ATTRIBUTE_FREQUENCY, ATTRIBUTE_HEIGHT_MODE, ATTRIBUTE_LEAF_DECAY_MODE, ATTRIBUTE_MANAGE_WATERLOGGED, ATTRIBUTE_NEEDS_FOUNDATION, ATTRIBUTE_OFFSET, ATTRIBUTE_RANDOM_MIRRORING_ONLY, ATTRIBUTE_RANDOM_ROTATION, ATTRIBUTE_RANDOM_ROTATION_ONLY, ATTRIBUTE_REPLACE_WITH_AIR, ATTRIBUTE_REPLACE_WITH_AIR_MATERIAL, ATTRIBUTE_SPAWN_IN_LAVA, ATTRIBUTE_SPAWN_IN_WATER, ATTRIBUTE_SPAWN_ON_LAND, ATTRIBUTE_SPAWN_ON_LAVA, ATTRIBUTE_SPAWN_ON_WATER, ATTRIBUTE_SPAWN_ON_WATER_NO_COLLIDE, ATTRIBUTE_UNDERGROUND_MODE, ATTRIBUTE_VERTICAL_OFFSET, ATTRIBUTE_Y_VARIATION, COLLISION_MODE_ALL, COLLISION_MODE_NONE, COLLISION_MODE_SOLID, HEIGHT_MODE_FIXED, HEIGHT_MODE_TERRAIN, LEAF_DECAY_NO_CHANGE, LEAF_DECAY_OFF, LEAF_DECAY_ON| Modifier and Type | Method and Description | 
|---|---|
| Bo3Object | clone()Create a clone of the object. | 
| java.util.List<WPObject> | getAllObjects()Obtain a list of all different  WPObjects which this
 object provider can return. | 
| java.util.Map<java.lang.String,java.io.Serializable> | getAttributes()Get a live view of the object metadata. | 
| javax.vecmath.Point3i | getDimensions()Get the dimensions of the object. | 
| java.util.List<Entity> | getEntities()Get any entities contained in the object. | 
| boolean | getMask(int x,
       int y,
       int z)Determine whether a block should be placed at the specified relative coordinates. | 
| Material | getMaterial(int x,
           int y,
           int z)Get the material to place at the specified relative coordinates. | 
| java.lang.String | getName()Get the name of this object provider (if it represents one object this
 may be the name of the object). | 
| Bo3Object | getObject()Obtain one  WPObject, which may be the same one every time, or a
 different one from a random collection or sequence every time. | 
| java.util.List<TileEntity> | getTileEntities()Get any tile entities contained in the object. | 
| static Bo3Object | load(java.io.File file)Load a custom object in bo3 format from a file. | 
| static Bo3Object | load(java.lang.String objectName,
    java.io.File file)Load a custom object in bo3 format from a file. | 
| <T extends java.io.Serializable> | setAttribute(org.pepsoft.util.AttributeKey<T> key,
            T value)Convenience method for setting the value of an attribute stored in the
 external metadata, if any. | 
| void | setAttributes(java.util.Map<java.lang.String,java.io.Serializable> attributes)Store external metadata about the object. | 
| void | setName(java.lang.String name)Set the name of the object. | 
| void | setSeed(long seed)Sets the seed of the PRNG, for object providers which use one. | 
| boolean | visitBlocks(WPObject.BlockVisitor visitor)Visit all blocks in the object. | 
getOffset, prepareForExportequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdump, getAllMaterials, getAttribute, guessConnectBlocks, guessManageWaterlogged, guestimateOffset, hasAttributepublic static final java.lang.String KEY_RANDOM_ROTATION
public java.lang.String getName()
Bo2ObjectProvidergetName in interface Bo2ObjectProvidergetName in interface WPObjectpublic void setName(java.lang.String name)
WPObjectpublic javax.vecmath.Point3i getDimensions()
WPObjectgetDimensions in interface WPObjectpublic Material getMaterial(int x, int y, int z)
WPObjectWPObject.getMask(int, int, int) returns true. These coordinates are zero-based and must never be
 negative.getMaterial in interface WPObjectx - The relative X coordinate.y - The relative Y coordinate.z - The relative Z coordinate.public boolean getMask(int x,
                       int y,
                       int z)
WPObjectpublic Bo3Object getObject()
Bo2ObjectProviderWPObject, which may be the same one every time, or a
 different one from a random collection or sequence every time.getObject in interface Bo2ObjectProviderWPObject.public java.util.List<Entity> getEntities()
WPObjectgetEntities in interface WPObjectnull.public java.util.List<TileEntity> getTileEntities()
WPObjectgetTileEntities in interface WPObjectnull.public java.util.List<WPObject> getAllObjects()
Bo2ObjectProviderWPObjects which this
 object provider can return. This is an optional operation which may
 throw an UnsupportedOperationException if this object provider
 does not support it.getAllObjects in interface Bo2ObjectProviderpublic java.util.Map<java.lang.String,java.io.Serializable> getAttributes()
WPObjectgetAttributes in interface WPObjectnull.public void setAttributes(java.util.Map<java.lang.String,java.io.Serializable> attributes)
WPObjectsetAttributes in interface WPObjectattributes - The external metadata to store.public <T extends java.io.Serializable> void setAttribute(org.pepsoft.util.AttributeKey<T> key,
                                                          T value)
WPObjectnull will
 delete the attribute from the store. If the store becomes empty it is
 deleted entirely.setAttribute in interface WPObjectT - The type of the attribute.key - The key of the attribute to set or delete.value - The value of the attribute to set, or null to
     delete it.public void setSeed(long seed)
Bo2ObjectProvidersetSeed in interface Bo2ObjectProviderseed - The seed to set on the PRNG, if any.public boolean visitBlocks(WPObject.BlockVisitor visitor)
WPObjectvisitBlocks in interface WPObjectvisitor - The visitor to invoke for each block. If the visitor
 returns false the operation is aborted.true if all blocks were visited or
 false if the visitor returned false at some
 point.public Bo3Object clone()
WPObjectclone in interface Bo2ObjectProviderclone in interface WPObjectclone in class AbstractObjectpublic static Bo3Object load(java.io.File file) throws java.io.IOException
file - The file from which to load the object.Bo3Object containing the contents of the
     specified file.java.io.IOException - If an I/O error occurred while reading the file.public static Bo3Object load(java.lang.String objectName, java.io.File file) throws java.io.IOException
objectName - The name of the object.file - The file from which to load the object.Bo3Object containing the contents of the
     specified file.java.io.IOException - If an I/O error occurred while reading the file.