Commit Graph

26 Commits

Author SHA1 Message Date
Wesley Wolfe
1f83111208 Deprecate magic values 2013-08-28 01:44:09 -05:00
Edmond Poon
409595c2a2 Pulling all pending Bukkit-JavaDoc changes 2013-04-02 00:11:22 -04:00
Travis Watkins
0700565d8b Provide a faster way to get a location. Adds BUKKIT-3120
Currently when a plugin wants to get the location of something it calls
getLocation() which returns a new Location object. In some scenarios this
can cause enough object creation/destruction churn to be a significant
overhead. For this cases we add a method that updates a provided Location
object so there is no object creation done. This allows well written code
to work on several locations with only a single Location object getting
created.

Providing a more efficient way to set a location was also looked at but
the current solution is the fastest we can provide. You are not required
to create a new Location object every time you want to set something's
location so, with proper design, you can set locations with only a single
Location object being created.
2012-12-07 21:18:31 -06:00
feildmaster
537138e9b2 Javadoc updates
Fixes BUKKIT-1653, Fixes BUKKIT-1383 and Fixes BUKKIT-1644
2012-06-03 05:40:54 -05:00
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