public class BukkitWorld extends LocalWorld
LocalWorld.KillFlagsrandom| Constructor and Description |
|---|
BukkitWorld(org.bukkit.World world)
Construct the object.
|
| Modifier and Type | Method and Description |
|---|---|
void |
checkLoadedChunk(Vector pt)
Checks if the chunk pt is in is loaded.
|
boolean |
clearContainerBlockContents(Vector pt)
Clear a chest's contents.
|
boolean |
copyFromWorld(Vector pt,
BaseBlock block)
Attempts to read a BaseBlock's extra data from the world.
|
boolean |
copyToWorld(Vector pt,
BaseBlock block)
Attempts to accurately copy a BaseBlock's extra data to the world.
|
void |
dropItem(Vector pt,
BaseItemStack item)
Drop an item.
|
boolean |
equals(Object other)
Compare if the other world is equal.
|
void |
fixAfterFastMode(Iterable<BlockVector2D> chunks)
Does some post-processing.
|
boolean |
generateBigTree(EditSession editSession,
Vector pt)
Deprecated.
|
boolean |
generateBirchTree(EditSession editSession,
Vector pt)
Deprecated.
|
boolean |
generateRedwoodTree(EditSession editSession,
Vector pt)
Deprecated.
|
boolean |
generateTallRedwoodTree(EditSession editSession,
Vector pt)
Deprecated.
|
boolean |
generateTree(EditSession editSession,
Vector pt)
Deprecated.
|
boolean |
generateTree(TreeGenerator.TreeType type,
EditSession editSession,
Vector pt)
Generates a tree
|
BiomeType |
getBiome(Vector2D pt)
Get biome type
|
BaseBlock |
getBlock(Vector pt)
Get a copy of the block at the given location.
|
int |
getBlockData(Vector pt)
Get block data.
|
int |
getBlockLightLevel(Vector pt)
Get block light level.
|
int |
getBlockType(Vector pt)
Get block type.
|
LocalEntity[] |
getEntities(Region region) |
int |
getMaxY()
Get the world's height
|
String |
getName()
Get the name of the world
|
org.bukkit.World |
getWorld()
Get the world handle.
|
int |
hashCode()
Hash code.
|
boolean |
isValidBlockType(int type)
Returns whether a block has a valid ID.
|
int |
killEntities(LocalEntity... entities) |
int |
killMobs(Vector origin,
double radius,
int flags)
Kill mobs in an area.
|
boolean |
playEffect(Vector position,
int type,
int data)
Plays the minecraft effect with the given type and data at the given position.
|
boolean |
regenerate(Region region,
EditSession editSession)
Regenerate an area.
|
int |
removeEntities(EntityType type,
Vector origin,
int radius)
Remove entities in an area.
|
void |
setBiome(Vector2D pt,
BiomeType biome)
Set the biome type
|
boolean |
setBlock(Vector pt,
Block block,
boolean notifyAdjacent)
Change the block at the given location to the given block.
|
void |
setBlockData(Vector pt,
int data)
Set block data.
|
void |
setBlockDataFast(Vector pt,
int data)
Set block data.
|
boolean |
setBlockType(Vector pt,
int type)
Set block type.
|
boolean |
setBlockTypeFast(Vector pt,
int type)
Set block type.
|
boolean |
setTypeIdAndData(Vector pt,
int type,
int data)
set block type & data
|
boolean |
setTypeIdAndDataFast(Vector pt,
int type,
int data)
set block type & data
|
void |
simulateBlockMine(Vector pt)
Simulate a block being mined.
|
static org.bukkit.TreeType |
toBukkitTreeType(TreeGenerator.TreeType type) |
dropItem, fixLighting, killMobs, killMobs, queueBlockBreakEffect, usesBlockDatapublic BukkitWorld(org.bukkit.World world)
world - public org.bukkit.World getWorld()
public String getName()
getName in class LocalWorldpublic boolean setBlockType(Vector pt, int type)
setBlockType in class LocalWorldpt - type - public boolean setBlockTypeFast(Vector pt, int type)
setBlockTypeFast in class LocalWorldpt - type - public boolean setTypeIdAndData(Vector pt, int type, int data)
setTypeIdAndData in class LocalWorldpt - type - data - public boolean setTypeIdAndDataFast(Vector pt, int type, int data)
setTypeIdAndDataFast in class LocalWorldpt - type - data - public int getBlockType(Vector pt)
getBlockType in class LocalWorldpt - public void setBlockData(Vector pt, int data)
setBlockData in class LocalWorldpt - data - public void setBlockDataFast(Vector pt, int data)
setBlockDataFast in class LocalWorldpt - data - public int getBlockData(Vector pt)
getBlockData in class LocalWorldpt - public int getBlockLightLevel(Vector pt)
getBlockLightLevel in class LocalWorldpt - public BiomeType getBiome(Vector2D pt)
getBiome in class LocalWorldpt - public void setBiome(Vector2D pt, BiomeType biome)
LocalWorldsetBiome in class LocalWorldpt - The (x, z) location to set the biome atbiome - The biome type to set topublic boolean regenerate(Region region, EditSession editSession)
regenerate in class LocalWorldregion - editSession - public boolean copyToWorld(Vector pt, BaseBlock block)
copyToWorld in class LocalWorldpt - block - public boolean copyFromWorld(Vector pt, BaseBlock block)
copyFromWorld in class LocalWorldpt - block - public boolean clearContainerBlockContents(Vector pt)
clearContainerBlockContents in class LocalWorldpt - @Deprecated public boolean generateTree(EditSession editSession, Vector pt)
generateTree in class LocalWorldpt - @Deprecated public boolean generateBigTree(EditSession editSession, Vector pt)
generateBigTree in class LocalWorldpt - @Deprecated public boolean generateBirchTree(EditSession editSession, Vector pt)
generateBirchTree in class LocalWorldpt - @Deprecated public boolean generateRedwoodTree(EditSession editSession, Vector pt)
generateRedwoodTree in class LocalWorldpt - @Deprecated public boolean generateTallRedwoodTree(EditSession editSession, Vector pt)
generateTallRedwoodTree in class LocalWorldpt - public static org.bukkit.TreeType toBukkitTreeType(TreeGenerator.TreeType type)
public boolean generateTree(TreeGenerator.TreeType type, EditSession editSession, Vector pt)
LocalWorldgenerateTree in class LocalWorldtype - The type of tree to generateeditSession - The EditSession to pass block changes throughpt - The point where the base of the tree should be locatedpublic void dropItem(Vector pt, BaseItemStack item)
dropItem in class LocalWorldpt - item - public int killMobs(Vector origin, double radius, int flags)
killMobs in class LocalWorldorigin - The center of the area to kill mobs in.radius - Maximum distance to kill mobs at; radius < 0 means kill all mobsflags - various flags that determine what to killpublic int removeEntities(EntityType type, Vector origin, int radius)
removeEntities in class LocalWorldorigin - radius - public boolean isValidBlockType(int type)
isValidBlockType in class LocalWorldtype - public void checkLoadedChunk(Vector pt)
LocalWorldcheckLoadedChunk in class LocalWorldpt - Position to checkpublic boolean equals(Object other)
LocalWorldequals in class LocalWorldpublic int hashCode()
LocalWorldhashCode in class LocalWorldpublic int getMaxY()
LocalWorldgetMaxY in class LocalWorldpublic void fixAfterFastMode(Iterable<BlockVector2D> chunks)
LocalWorldfixAfterFastMode in class LocalWorldchunks - the chunks to fixpublic boolean playEffect(Vector position, int type, int data)
LocalWorldplayEffect in class LocalWorldpublic void simulateBlockMine(Vector pt)
LocalWorldsimulateBlockMine in class LocalWorldpublic LocalEntity[] getEntities(Region region)
getEntities in class LocalWorldpublic int killEntities(LocalEntity... entities)
killEntities in class LocalWorldpublic BaseBlock getBlock(Vector pt)
WorldBlock have no effect until
World.setBlock(Vector, Block, boolean) is called.getBlock in interface WorldgetBlock in class LocalWorldpt - location of the blockpublic boolean setBlock(Vector pt, Block block, boolean notifyAdjacent)
WorldBlock to the world, so future changes to the
Block do not affect the world until this method is called again.
Implementations may or may not consider the value of the notifyAdjacent
parameter, and implementations may to choose to either apply physics anyway or
to not apply any physics (particularly in a stand-alone implementation).
The return value of this method indicates whether the change "went through," as
in the block was changed in the world in any way. If the new block is no different
than the block already at the position in the world, 'false' would be returned.
If the position is invalid (out of bounds, for example), then nothing should
occur and 'false' should be returned. If possible, the return value should be
accurate as possible, but implementations may choose to not provide an accurate
value if it is not possible to know.setBlock in interface WorldsetBlock in class LocalWorldpt - location of the blockblock - block to setnotifyAdjacent - true to to notify adjacent (perform physics)Copyright © 2010-2014. All Rights Reserved.