Commit Graph

71 Commits

Author SHA1 Message Date
mbax
1db19b62db Update Update Bukkit to 1.7.2 2013-11-30 19:01:48 -06:00
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
7c8d3d4007 Add method to update state without physics update. Addresses BUKKIT-3939 2013-03-31 19:16:53 -05:00
Travis Watkins
f30d89ab33 Add Beacon BlockState for hopper events. Fixes BUKKIT-3932 2013-03-29 22:25:41 -05:00
Edmond Poon
ced8459bc3 Pulling all pending Bukkit-JavaDoc changes 2013-03-27 21:12:08 -04:00
Xephi
46234ff555 Add Dropper BlockState. Adds BUKKIT-3750 2013-03-21 21:43:28 -06:00
Edmond Poon
ca7687d4f2 Pulling all pending Bukkit-JavaDoc changes 2013-03-20 00:42:05 -04:00
Nate Mortensen
9515adffff BlockState for Command Blocks. Adds BUKKIT-3805. 2013-03-19 20:51:03 -06:00
Travis Watkins
51da39dd27 Don't use deprecated interface. 2013-03-17 13:05:10 -05:00
Michael Limiero
de55f86844 Add Hopper block state and inventory type. Adds BUKKIT-3749 2013-03-17 12:57:47 -05:00
Wesley Wolfe
0b494f8896 Pulling all pending Bukkit-JavaDoc changes 2013-02-22 22:49:38 -06:00
meiskam
bc73b59d27 Add Skull BlockState and Type enum. Adds BUKKIT-3258 2012-12-21 22:24:50 -06: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
49690f9620 [BREAKING] Update BlockFace directions. Fixes BUKKIT-1567, BUKKIT-3069
If you use BlockFace in any way, to compensate the directionals being incorrect, you can still have backwards compatibility if you add in the handling in your plugin:
boolean legacyBlockFace = BlockFace.NORTH().getModX() == -1; (and then handle it accordingly)

If you didn't special case your directions to fix what's being fixed here... Hurray! Your plugin should now work.
2012-12-01 01:06:29 -06:00
Wesley Wolfe
dafef287cb Purge outdated biomes. Fixes BUKKIT-1087 2012-08-07 01:55:48 -05:00
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