Commit Graph

55 Commits

Author SHA1 Message Date
feildmaster
537138e9b2 Javadoc updates
Fixes BUKKIT-1653, Fixes BUKKIT-1383 and Fixes BUKKIT-1644
2012-06-03 05:40:54 -05:00
Celtic Minstrel
53473bb182 [Bleeding] Add Chest.getBlockInventory() for convenience; this always returns a single chest inventory. Addresses BUKKIT-1247 2012-03-20 19:49:40 -04:00
Celtic Minstrel
aead3745f2 [Bleeding] Added DoubleChest wrapper so that DoubleChestInventory can return something other than null. Addresses BUKKIT-995 2012-03-15 22:12:43 -04:00
Mike Primm
2a310576d1 [Bleeding] Add APIs for editing biome data. Addresses BUKKIT-1075 2012-03-08 01:52:01 -05:00
Nathan Adams
8604b9d2af Updated Bukkit API for 1.2 2012-03-01 14:25:51 +00:00
Celtic Minstrel
18a4a25c8b Adding/expanding documentation 2012-02-29 21:31:33 -05:00
Celtic Minstrel
17403d617a Fix javadoc errors/warnings 2012-02-29 21:31:28 -05:00
Celtic Minstrel
0b77483c2f [Bleeding] Inventory framework and events. Addresses BUKKIT-856
New events:
- InventoryOpenEvent
- InventoryClickEvent - detects any clicks on a slot or outside the window
  - In the creative inventory view, only clicks on the quickbar are detected
- InventoryCloseEvent
- BrewEvent - when a potion finishes brewing
- CraftItemEvent (a subevent of InventoryClickEvent) - fired when taking the crafted item
- PrepareItemCraftEvent - fired just before updating the result slot
Changes to existing events:
- EnchantItemEvent extends InventoryEvent and also has a new whichButton() method
- PrepareItemEnchantEvent also extends InventoryEvent
- FurnaceBurnEvent and FurnaceSmeltEvent now extend BlockEvent (as does BrewEvent)
- PlayerInventoryEvent is deprecated (though it never did anything anyway)
New subclasses of Inventory:
- BrewerInventory
- CraftingInventory
- DoubleChestInventory
- EnchantingInventory
- FurnaceInventory
New methods in Inventory:
- getViewers()
- getTitle()
- getType()
- getHolder()
- iterator() - Yes, inventories are now iterable!
  - The iterator is a ListIterator that does not support add or remove
New methods in Player:
- getOpenInventory()
- openInventory()
- openWorkbench()
- openEnchanting()
- closeInventory()
- setWindowProperty()
- getItemOnCursor()
- setItemOnCursor()
Other changes:
- createInventory() methods in Server to make inventories not linked to an object
- ContainerBlock is deprecated in favour of InventoryHolder
- New InventoryView class gives direct access to an inventory window!
- Removed the Slot class which did nothing and was used nowhere

Some small credit goes to Afforess (initial conception of openInventory() methods) and Drakia (initial conception of InventoryOpenEvent and InventoryCloseEvent).
2012-02-29 15:18:56 -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
TomyLobo
b0bb7aaa66 Added missing BlockState functions. Addresses BUKKIT-807 2012-02-27 17:52:44 -05:00
Celtic Minstrel
cbb9bc0fa3 [Bleeding] Added EntityType to replace CreatureType. 2012-02-22 22:06:19 -05:00
Erik Broes
7a06777e19 Deprecation cleanup. 2012-02-18 13:05:58 -05:00
Erik Broes
4d7a141a33 [Bleeding] Add BrewingStand API. Thanks N3X15 & md_5 2012-01-17 19:50:23 +01: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
Nathan Adams
239ece5c19 Added 5 new biomes as included in MC 1.1 as part of #BUKKIT-496 2012-01-14 13:13:25 +00:00
Erik Broes
dce83b6ce4 Generic cleanup of warnings, whitespace and style. 2011-12-25 16:02:30 +01:00
Nathan Adams
f25126e66d Added new biome enum values 2011-11-22 21:21:09 +00:00
Nathan Adams
5700db0ea7 Few more style cleanups 2011-10-11 02:16:44 +01:00
Nathan Adams
14d3401121 Small javadoc cleanup 2011-10-10 21:58:44 +01:00
Celtic Minstrel
97259e5054 Remove Jukebox MaterialData in favour of Jukebox BlockState 2011-09-25 03:51:09 +01:00
Dinnerbone
e6c273e8b0 Many javadoc fixes thanks to Celtic Minstrel 2011-09-25 02:56:40 +01:00
Dinnerbone
913be2588f Ok, so we need this. *shifty eyes* 2011-09-15 01:42:07 +01:00
EvilSeph
28554c88ef Added missing Note getNote(). 2011-07-28 01:29:04 -04:00
EvilSeph
1f5c90052a Removed deprecated methods.
getNote() that returns a byte has been replaced by getRawNote().
teleportTo(Location) has been replaced by teleport(location).
teleportTo(Entity) has been replaced by teleport(Entity).
SnowForm event has been replaced by BlockForm event.
2011-07-27 23:18:33 -04: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
sunkid
81a31577f1 Added additional BlockFace enum members and fixed Sign class. 2011-07-14 11:36:27 -04: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
EvilSeph
101ef61137 Added Sky biome for the Skylands. Thanks robin0van0der0v! 2011-06-21 15:41:47 -04:00
EvilSeph
abbfb8e6e9 Added Instrument enum, Note class and get/setNote functions. Thanks xZise! 2011-06-17 03:13:34 -04:00
Erik Broes
c4d444ce98 Whitespace + general cleanup 2011-05-15 14:06:02 +02:00
sk89q
967fa10425 Added NoteBlock.play(instrument, note). 2011-05-02 11:31:29 -07:00
Erik Broes
d94fce59ff Updated README for line-ending demands, also fixed line-endigs. 2011-04-25 13:24:32 +02:00
sunkid
27d4917d0f added the MaterialData subclass Door 2011-03-25 23:07:34 +01:00
Erik Broes
75ce030c57 Reworked BlockDamageEvent to match with the latest Mojang client/server changes. 2011-03-23 16:58:43 +01:00
Tahg
adeb90dc89 added methods for getting redstone power 2011-03-10 13:23:54 -05:00
Dinnerbone
9da67772a8 Purged deprecated MobType and MobSpawner 2011-03-07 16:29:03 +00: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
EvilSeph
f3959ebf6b When deprecating, the alternative should be provided. 2011-02-19 06:00:55 -05:00
Andrew Ardill
60315ab8ec Renamed MobType->CreatureType and MobSpawner->CreatureSpawner.
This is to bring the names in line with the rest of bukkit.

Deprecated code has been left in to ensure nothing breaks as
a result of refactoring MobType.
This will be removed after 1 week, to give plugin devs time to
migrate
2011-02-17 18:01:25 +11:00
Erik Broes
8039c05c9f General cleanup (deprecated+whitespace) 2011-02-02 00:28:41 +01:00
Dinnerbone
d237a301ab Added NoteBlock.play, Dispenser.dispense 2011-02-01 23:21:53 +00:00
sk89q
578abb593b Added Block.isBlockPowered(), block.isBlockIndirectlyPowered(). 2011-01-28 10:25:13 -08:00
sk89q
7488cd29fa Added full tile entity data support for all block types that use it, including chests, dispensers, furnaces, mob spawners, and note blocks. 2011-01-23 00:37:36 -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