public class StructureBuilder extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
StructureBuilder.StructureMaterial |
| Constructor and Description |
|---|
StructureBuilder(org.bukkit.World world,
GlowStructurePiece structure,
StructureBoundingBox boundingBox,
BlockStateDelegate delegate) |
| Modifier and Type | Method and Description |
|---|---|
void |
addRandomMaterial(Map<StructureBuilder.StructureMaterial,Integer> materials,
int weight,
org.bukkit.Material type,
int data) |
void |
createMobSpawner(org.bukkit.util.Vector pos,
org.bukkit.entity.EntityType entityType)
Sets the given block to a spawner for the given entity type.
|
boolean |
createRandomItemsContainer(org.bukkit.util.Vector pos,
Random random,
RandomItemsContent content,
org.bukkit.material.DirectionalContainer container,
int maxStacks)
Sets the given block to a container and fills it with random items.
|
void |
fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material type)
Fills a box with the given block.
|
void |
fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material type,
int data)
Fills a box with the given block.
|
void |
fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
int outerData,
org.bukkit.Material innerType)
Builds a box from one block, and fills it with another.
|
void |
fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
int outerData,
org.bukkit.Material innerType,
int innerData)
Builds a box from one block, and fills it with another.
|
void |
fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
int outerData,
org.bukkit.Material innerType,
org.bukkit.material.MaterialData innerData)
Builds a box from one block, and fills it with another.
|
void |
fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
org.bukkit.Material innerType)
Builds a box from one block, and fills it with another.
|
void |
fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material type,
org.bukkit.material.MaterialData data)
Fills a box with the given block.
|
void |
fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
org.bukkit.material.MaterialData outerData,
org.bukkit.Material innerType)
Builds a box from one block, and fills it with another.
|
void |
fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
org.bukkit.material.MaterialData outerData,
org.bukkit.Material innerType,
int innerData)
Builds a box from one block, and fills it with another.
|
void |
fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
org.bukkit.material.MaterialData outerData,
org.bukkit.Material innerType,
org.bukkit.material.MaterialData innerData)
Builds a box from one block, and fills it with another.
|
void |
fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
org.bukkit.Material innerType,
int innerData)
Builds a box from one block, and fills it with another.
|
void |
fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
org.bukkit.Material innerType,
org.bukkit.material.MaterialData innerData)
Builds a box from one block, and fills it with another.
|
void |
fillWithRandomMaterial(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
Random random,
Map<StructureBuilder.StructureMaterial,Integer> materials)
Sets a box of blocks to have random types, chosen independently.
|
org.bukkit.block.BlockState |
getBlockState(org.bukkit.util.Vector pos) |
StructureBuilder.StructureMaterial |
getRandomMaterial(Random random,
Map<StructureBuilder.StructureMaterial,Integer> materials)
Chooses a random
StructureBuilder.StructureMaterial from a weighted list. |
void |
setBlock(org.bukkit.util.Vector pos,
org.bukkit.Material type)
Sets the block at a given point, if it is inside this structure's bounding box.
|
void |
setBlock(org.bukkit.util.Vector pos,
org.bukkit.Material type,
int data)
Sets the block at a given point, if it is inside this builder's bounding box.
|
void |
setBlock(org.bukkit.util.Vector pos,
org.bukkit.Material type,
org.bukkit.material.MaterialData data)
Sets the block at a given point, if it is inside this structure's bounding box.
|
void |
setBlockDownward(org.bukkit.util.Vector pos,
org.bukkit.Material type)
Builds a 1x1 column out of the given block, replacing non-solid blocks starting at a given
location and proceeding downward until a solid block is reached.
|
void |
setBlockDownward(org.bukkit.util.Vector pos,
org.bukkit.Material type,
int data)
Builds a 1x1 column out of the given block, replacing non-solid blocks starting at a given
location and proceeding downward until a solid block is reached.
|
void |
setBlockDownward(org.bukkit.util.Vector pos,
org.bukkit.Material type,
org.bukkit.material.MaterialData data)
Builds a 1x1 column out of the given block, replacing non-solid blocks starting at a given
location and proceeding downward until a solid block is reached.
|
void |
setBlockWithRandomMaterial(org.bukkit.util.Vector pos,
Random random,
Map<StructureBuilder.StructureMaterial,Integer> materials) |
boolean |
spawnMob(org.bukkit.util.Vector pos,
org.bukkit.entity.EntityType entityType)
Spawns an entity if the given position is within this structure's bounding box.
|
public StructureBuilder(org.bukkit.World world,
GlowStructurePiece structure,
StructureBoundingBox boundingBox,
BlockStateDelegate delegate)
public void addRandomMaterial(Map<StructureBuilder.StructureMaterial,Integer> materials, int weight, org.bukkit.Material type, int data)
public StructureBuilder.StructureMaterial getRandomMaterial(Random random, Map<StructureBuilder.StructureMaterial,Integer> materials)
StructureBuilder.StructureMaterial from a weighted list.random - the PRNG to usematerials - a map of materials to integer weightspublic org.bukkit.block.BlockState getBlockState(org.bukkit.util.Vector pos)
public void setBlock(org.bukkit.util.Vector pos,
org.bukkit.Material type)
pos - a point relative to this structure's root pointtype - the new block typepublic void setBlock(org.bukkit.util.Vector pos,
org.bukkit.Material type,
int data)
pos - a point relative to this structure's root pointtype - the new block typedata - the new block datapublic void setBlock(org.bukkit.util.Vector pos,
org.bukkit.Material type,
org.bukkit.material.MaterialData data)
pos - a point relative to this structure's root pointtype - the new block typedata - the new block datapublic void setBlockDownward(org.bukkit.util.Vector pos,
org.bukkit.Material type)
pos - the highest point to possibly replace, relative to this structure's root
pointtype - the block type to fillpublic void setBlockDownward(org.bukkit.util.Vector pos,
org.bukkit.Material type,
int data)
pos - the highest point to possibly replace, relative to this structure's root
pointtype - the block type to filldata - the block datapublic void setBlockDownward(org.bukkit.util.Vector pos,
org.bukkit.Material type,
org.bukkit.material.MaterialData data)
pos - the highest point to possibly replace, relative to this structure's root
pointtype - the block type to filldata - the block datapublic void setBlockWithRandomMaterial(org.bukkit.util.Vector pos,
Random random,
Map<StructureBuilder.StructureMaterial,Integer> materials)
public void fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material type)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointtype - the block typepublic void fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material type,
int data)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointtype - the block typedata - the block datapublic void fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material type,
org.bukkit.material.MaterialData data)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointtype - the block typedata - the block datapublic void fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
org.bukkit.Material innerType)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointouterType - the block type for the facesinnerType - the block type for the interiorpublic void fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
org.bukkit.Material innerType,
int innerData)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointouterType - the block type for the facesinnerType - the block type for the interiorinnerData - the block data for the interiorpublic void fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
org.bukkit.Material innerType,
org.bukkit.material.MaterialData innerData)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointouterType - the block type for the facesinnerType - the block type for the interiorinnerData - the block data for the interiorpublic void fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
int outerData,
org.bukkit.Material innerType,
org.bukkit.material.MaterialData innerData)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointouterType - the block type for the facesouterData - the block data for the facesinnerType - the block type for the interiorinnerData - the block data for the interiorpublic void fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
int outerData,
org.bukkit.Material innerType)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointouterType - the block type for the facesouterData - the block data for the facesinnerType - the block type for the interiorpublic void fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
org.bukkit.material.MaterialData outerData,
org.bukkit.Material innerType)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointouterType - the block type for the facesouterData - the block data for the facesinnerType - the block type for the interiorpublic void fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
org.bukkit.material.MaterialData outerData,
org.bukkit.Material innerType,
int innerData)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointouterType - the block type for the facesouterData - the block data for the facesinnerType - the block type for the interiorinnerData - the block data for the interiorpublic void fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
int outerData,
org.bukkit.Material innerType,
int innerData)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointouterType - the block type for the facesouterData - the block data for the facesinnerType - the block type for the interiorinnerData - the block data for the interiorpublic void fill(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
org.bukkit.Material outerType,
org.bukkit.material.MaterialData outerData,
org.bukkit.Material innerType,
org.bukkit.material.MaterialData innerData)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointouterType - the block type for the facesouterData - the block data for the facesinnerType - the block type for the interiorinnerData - the block data for the interiorpublic void fillWithRandomMaterial(org.bukkit.util.Vector min,
org.bukkit.util.Vector max,
Random random,
Map<StructureBuilder.StructureMaterial,Integer> materials)
min - the minimum coordinates, relative to this structure's root pointmax - the maximum coordinates, relative to this structure's root pointrandom - the PRNG to usematerials - a map of possible blocks to integer weightspublic boolean createRandomItemsContainer(org.bukkit.util.Vector pos,
Random random,
RandomItemsContent content,
org.bukkit.material.DirectionalContainer container,
int maxStacks)
pos - a point relative to this structure's root pointrandom - the PRNG to usecontent - the distribution to draw items fromcontainer - the container to placemaxStacks - the maximum number of slots to fillpos is outside the
builder's bounding box or RandomItemsContent.fillContainer(Random, BlockState,
int) failspublic void createMobSpawner(org.bukkit.util.Vector pos,
org.bukkit.entity.EntityType entityType)
pos - a point relative to this structure's root pointentityType - the type of entity the spawner will spawnpublic boolean spawnMob(org.bukkit.util.Vector pos,
org.bukkit.entity.EntityType entityType)
pos - a point relative to this structure's root pointentityType - the type of entity to spawnpos is outside the builder's
bounding box or World.spawnEntity(Location, EntityType) failsCopyright © 2021. All rights reserved.