Commit Graph

22 Commits

Author SHA1 Message Date
Mike Primm
2a310576d1 [Bleeding] Add APIs for editing biome data. Addresses BUKKIT-1075 2012-03-08 01:52:01 -05:00
Celtic Minstrel
18a4a25c8b Adding/expanding documentation 2012-02-29 21:31:33 -05:00
rmichela
a2c69f9f51 [Bleeding] Added a Metadata framework for Entities, Blocks, and Worlds
This metadata implementation has the following features:

- All metadata is lazy. Metadata values are not actually computed until another plugin requests them. Memory and CPU are conserved by not computing and storing unnecessary metadata values.

- All metadata is cached. Once a metadata value is computed its value is cached in the metadata store to prevent further unnecessary computation. An invalidation mechanism is provided to flush the cache and force recompilation of metadata values.

- All metadata is stored in basic data types. Convenience methods in the MetadataValue class allow for the conversion of metadata data types when possible. Restricting metadata to basic data types prevents the accidental linking of large object graphs into metadata. Metadata is persistent across the lifetime of the application and adding large object graphs would damage garbage collector performance.

- Metadata access is thread safe. Care has been taken to protect the internal data structures and access them in a thread safe manner.

- Metadata is exposed for all objects that descend from Entity, Block, and World. All Entity and World metadata is stored at the Server  level and all Block metadata is stored at the World level.

- Metadata is NOT keyed on references to original objects - instead metadata is keyed off of unique fields within those objects. Doing this allows metadata to exist for blocks that are in chunks not currently in memory. Additionally, Player objects are keyed off of player name so that Player metadata remains consistent between logins.

- Metadata convenience methods have been added to all Entities, Players, Blocks, BlockStates, and World allowing direct access to an individual instance's metadata.

- Players and OfflinePlayers share a single metadata store, allowing player metadata to be manipulated regardless of the player's current online status.
2012-02-29 19:16:04 +01:00
Erik Broes
7a06777e19 Deprecation cleanup. 2012-02-18 13:05:58 -05:00
Zeerix
7c7e78b914 [Bleeding] Added Block.breakNaturally and Block.getDrops 2012-01-17 19:48:36 +01:00
Mike Primm
5c8bc62f26 [Bleeding] Added Block.getLightFromSky and getLightFromBlocks 2012-01-17 19:45:47 +01:00
Erik Broes
eb9dc64493 Generic cleaning 2012-01-15 14:37:43 +01:00
Erik Broes
dce83b6ce4 Generic cleanup of warnings, whitespace and style. 2011-12-25 16:02:30 +01:00
Nathan Adams
5700db0ea7 Few more style cleanups 2011-10-11 02:16:44 +01:00
Dinnerbone
e6c273e8b0 Many javadoc fixes thanks to Celtic Minstrel 2011-09-25 02:56:40 +01:00
Erik Broes
04d58f8c8a Deprecated Block.getFace(Face) and Block.getFace(Face,int); use getRelative() 2011-07-17 17:02:37 +02:00
Erik Broes
e403b3e000 Added Block.getPistonMoveReaction, BlockPistonExtend and BlockPistonRetractEvent 2011-07-17 17:02:37 +02:00
Dinnerbone
c7518e7033 Added helper methods World.getHighestBlockAt, Block.isEmpty, Block.isLiquid. Added methods to safely retrieve biome/temperature/humidity data for a block without generating the block. 2011-07-13 10:39:41 +01:00
Erik Broes
c4d444ce98 Whitespace + general cleanup 2011-05-15 14:06:02 +02:00
Tahg
adeb90dc89 added methods for getting redstone power 2011-03-10 13:23:54 -05:00
Dinnerbone
773cb27db1 You shouldn't be here, little method. We already have a getData. 2011-03-04 14:10:55 +00:00
Tahg
d82679b8c7 refactor Items 2011-02-21 19:57:06 -05:00
Erik Broes
8039c05c9f General cleanup (deprecated+whitespace) 2011-02-02 00:28:41 +01:00
sk89q
578abb593b Added Block.isBlockPowered(), block.isBlockIndirectlyPowered(). 2011-01-28 10:25:13 -08:00
Adam Tanner
cf5a86bf19 Block instance getLocation() method. 2011-01-21 23:59:34 +08:00
sk89q
5650443aad Added Block.getRelative(BlockFace). 2011-01-15 19:33:39 -08:00
Dinnerbone
e50b5d6ecf Moved block stuff from org.bukkit to org.bukkit.block 2011-01-15 21:37:08 +00:00