Commit Graph

28 Commits

Author SHA1 Message Date
Celtic Minstrel
17403d617a Fix javadoc errors/warnings 2012-02-29 21:31:28 -05:00
TomyLobo
ac257ba8a8 Moved getVehicle, leaveVehicle and isInsideVehicle from LivingEntity to Entity. Addresses BUKKIT-811 2012-02-29 13:26:25 -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
Celtic Minstrel
cbb9bc0fa3 [Bleeding] Added EntityType to replace CreatureType. 2012-02-22 22:06:19 -05:00
Nathan Adams
3a89a0b643 Fixed documentation of getNearbyEntities in Entity. Thanks to epuidokas for the PR. 2012-01-15 07:38:14 +00:00
Nathan Adams
e03e2cc1c2 Added entity.playEffect, thanks to main-- in an (unfortunately old) PR. 2012-01-14 17:35:52 +00:00
Erik Broes
dce83b6ce4 Generic cleanup of warnings, whitespace and style. 2011-12-25 16:02:30 +01:00
Nathan Adams
19a96434b3 Added cause to PlayerTeleportEvent 2011-12-04 11:03:32 +00:00
Nathan Adams
5300d1b2d6 Added new entity.get/setTicksLived for identifying an entity's age 2011-10-11 02:22:38 +01:00
Dinnerbone
e6c273e8b0 Many javadoc fixes thanks to Celtic Minstrel 2011-09-25 02:56:40 +01: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
EvilSeph
d256eea548 Added UniqueId to entities. Thanks Afforess! 2011-06-07 04:21:11 -04:00
EvilSeph
7c9b2b9f40 Added get/setLastDamageCause. Thanks sunkid! 2011-05-16 00:25:35 -04:00
Erik Broes
c4d444ce98 Whitespace + general cleanup 2011-05-15 14:06:02 +02:00
Tahg
1723111b36 added some API for entities 2011-04-04 01:14:26 -04:00
Stephen
19fb291b34 Added getNearbyEntities 2011-04-02 17:24:45 +02:00
afforess
55f5b45e4c Entity.isDead returns true if the entity has been marked for removal 2011-04-02 17:20:05 +02:00
Erik Broes
5fd86517e8 Move passenger-handling to Entity 2011-03-29 23:09:44 +02:00
Byron Shelden
bf7692c8aa Replaced void teleportTo(Location) with boolean teleport(Location).
- The return value indicates if the teleport was successful.
 - void teleportTo(...) should delegate to the new teleport(...).
2011-03-23 18:38:48 +01:00
Dinnerbone
79f7cea622 All previous deprecated methods removed (OH GOD EVERYTHING BROKEN) 2011-03-14 15:05:46 +00:00
Dinnerbone
8c23447f6f Deprecated momentum on player (remove tomorrow), added velocity 2011-03-05 18:48:32 +00:00
Dinnerbone
86344ad44e Added entity.get/setMomentum 2011-03-04 14:24:09 +00:00
Dinnerbone
dbdf8afede ConsoleCommandSender no longer has a default constructor, use ConsoleCommandSender(server). Added entity.getServer 2011-02-23 11:33:03 +00:00
sk89q
0558646377 Added Entity.remove() which marks an entity for removal. 2011-02-19 17:47:48 -08:00
Protected
993fcb2895 Added setFireTicks(), getFireTicks() and getMaxFireTicks(). 2011-02-18 17:34:58 -05:00
Erik Broes
8039c05c9f General cleanup (deprecated+whitespace) 2011-02-02 00:28:41 +01:00
Andrew Ardill
696880e64f Implementation of the EntityDamage*Events.
A new event EntityDamageByProjectileEvent was created. EntityDamageByProjectileEvent
adds the ability to get the projectile entity (such as an egg) and also set if
the projectile 'bounces'. New interfaces were created to facilitate all kinds
of projectile entities. Changes were made to facilitate the new event, and
enable other events, for plugins and event listeners.
2011-01-16 14:13:44 +01:00
Dinnerbone
b923ccf636 All entity stuff in org.bukkit moved to org.bukkit.entity 2011-01-15 21:20:59 +00:00