summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft/server/EntityLiving.java
Commit message (Collapse)AuthorAgeLines
* Implement ItemFactory and ItemMeta values. Adds BUKKIT-15Wesley Wolfe2012-12-17-1/+1
|
* Don't run mob pickup code on players. Fixes BUKKIT-3150Travis Watkins2012-12-12-1/+2
| | | | | | | When a player has canPickUpLoot set to true the code for mob pickup is triggerd which does not know how to deal with player inventory. Since players have their own logic for picking up items we simply disable this code for them.
* Fix players not being able to pickup items due to default values.feildmaster2012-12-11-7/+8
| | | | | | | | The old flag for picking up loot was default to false, making existing players not able to pickup items. We now use this flag for Players, which gives us the problem we had in 48b46f83. To fix this, we add an incremental flag that will be cross-examined to check if the data was saved before or after the flag level was introduced. Addresses BUKKIT-3143
* Add EntityEquipment API. Adds BUKKIT-3103feildmaster2012-12-10-2/+2
| | | | | | | | Adds: - Getting/Setting equipment - getting/setting drop rates - getting/setting ability to pick up items -- As an added feature, players with this flag start off with a canceled PlayerPickupItemEvent
* Update entity state correctly when marked as persistent. Fixes BUKKIT-3123Travis Watkins2012-12-07-0/+4
| | | | | | | | | | When a mob is marked with the persistent flag (animal or anything with setRemoveWhenFarAway(false)) the entire block of code for checking if they should be despawned is skipped. However, one part of this code updates the mob state if a player is close enough to them. It turns out this state is used by the AI system to decide if the mob should move around randomly or not. To stop mobs from being frozen in place we now update this state if the persistent flag is set as well.
* Persistence isn't just animals. Fix BUKKIT-3105feildmaster2012-12-05-1/+3
| | | | Also set to this value if the persistence hasn't been updated
* Ensure animals don't despawn due to old default setting.Travis Watkins2012-12-04-1/+8
| | | | | | | | | | | The old default for the persistent flag on mobs was false which was then written out to their NBT data when they were saved. We now use this data for all mobs, not just non-animal mobs. However, this means animals that spawned before that change will now start despawning like monsters do. To avoid this we add a new flag to the mob's saved data to mark if the data was saved before or after we started using it and ignore it if it was before.
* Implement API for mob despawn when away from players. Adds BUKKIT-2986Travis Watkins2012-12-04-3/+3
| | | | | | | | As of 1.4 mobs have a flag to determine if they despawn when away from a player or not. Unfortunately animals still use their own system to prevent despawning instead of making use of this flag. This change modifies them to use the new system (defaults to true) and to add API for plugins to adjust this.
* Update CraftBukkit to Minecraft 1.4.4.Travis Watkins2012-11-13-221/+251
|
* Prevent health from wrapping around.EvilSeph2012-10-28-4/+6
|
* Update CraftBukkit to Minecraft 1.4(.2).Travis Watkins2012-10-27-319/+782
|
* Bulk pending cleanup.Wesley Wolfe2012-09-09-36/+36
|
* Optimize entity AI goal selectorTravis Watkins2012-08-19-4/+4
| | | | | | | | | | | Remove redundant ArrayList to avoid excessive object creation and CPU overhead, the entries are added to the list then immediately iterated through to run so just run them directly. Swap order of some conditionals to perform the more efficient check first as if it fails the list lookup will not be executed. Remove profiling hooks including some rather expensive calls to getSimpleName.
* Update CraftBukkit to Minecraft 1.3.1feildmaster2012-08-02-438/+406
|
* Cleaned up CraftBukkit comments in NMS.Wesley Wolfe2012-07-23-14/+8
| | | | | | | | | | | | | Added newlines at the end of files Fixed improper line endings on some files Matched start - end comments Added some missing comments for diffs Fixed syntax on some spots Minimized some diff Removed some no longer used files Added comment on some required files with no changes Fixed imports of items used once Added imports for items used more than once
* Add missing setLastDamageCause. Thanks MonsieurApplefeildmaster2012-07-13-1/+1
|
* Apply setLastDamageCause after processing events and the event has not been ↵feildmaster2012-07-02-0/+3
| | | | | | | | canceled. Fixes BUKKIT-1881 This allows previous causes to be available during the event, as well as making the damage cause a valid one. If EntityDamageEvent is canceled, then it's not the last DamageCause. Also prevents setting DamageCause involuntarily through construction.
* Update players when potion effects are moved from them. Fixes BUKKIT-789Travis Watkins2012-04-24-1/+1
|
* Avoid doing unnecessary range checks when we're looping from start to end.Travis Watkins2012-04-23-18/+14
| | | | | | | | | | | | | | | | | | Make EntityLiving call AI logic every tick again. Rework PathfinderGoalSelector logic. Adds UnsafeList for use in places where we use ArrayList and know we won't get index out of range errors. Added usage to World's tickEntities, Chunk's entitySlices to speed up searching for entities, and to PathfinderGoalSelector to speed up dealing with AI goals. Reworked logic in PathfinderGoalSelector with help from fullwall. This code no longer uses an extra ArrayList for setting up goals and only updates which goals should be run every other time it is called. Removed only calling PathfinderGoalSelector every other tick from EntityLiving as we now only setup new goals every other tick. This ensures existing goals run every tick to properly update mob movement.
* Optimize AI and EntityLiving tickingTravis Watkins2012-04-21-18/+28
| | | | | | | | Reduce usage of getCubes as it is an expensive call. Remove iterator usage and object creation from PathfinderGoalSelector methods as these are called very often. Update EntityLiving goal selectors less often as this is still quite an expensive task.
* Properly call EntityDeathEvent for mobs. Fixes BUKKIT-1519feildmaster2012-04-15-1/+12
|
* Updated to Minecraft version 1.2.4. Updated version string to 1.2.4-R0.1.Nathan Adams2012-03-22-62/+64
|
* [Bleeding] Account for new rare drops in EntityDeath events. Fixes BUKKIT-1105zerg9602012-03-21-8/+19
|
* Fixed EntityDamageByEntityEvent to call for every attackable entity. Fixes ↵feildmaster2012-03-15-1/+10
| | | | BUKKIT-1129, Fixes BUKKIT-1054 and Fixes BUKKIT-147.
* Updated CraftBukkit to 1.2Nathan Adams2012-03-01-169/+320
|
* Updated to rename revision 02Erik Broes2012-03-01-9/+9
|
* [Bleeding] Added Potions API. Fixes BUKKIT-389fullwall2012-02-10-1/+1
|
* Cleanup.EvilSeph2012-02-10-1/+3
|
* [Bleeding] Fixed EnderDragon suffocation.Feildmaster2012-02-09-1/+1
|
* Cleanup.EvilSeph2012-01-27-0/+1
|
* Update for 1.1_01 renames.Erik Broes2012-01-15-30/+30
| | | | | We know these updates (can) break plugins bypassing Bukkit. They are needed for smooth updates however. There will be another one right before before 1.1-R1.
* Updated to Minecraft 1.1Erik Broes2012-01-12-186/+267
|
* Update to mc-dev rename revision 01Nathan Adams2012-01-12-8/+8
|
* Fix CraftBukkit comments.Erik Broes2012-01-12-9/+9
|
* The dead are not meant to walk. Fixes BUKKIT-95. Thanks Evenprime!EvilSeph2011-12-12-1/+1
|
* Implemented getKiller in LivingEntityNathan Adams2011-12-11-1/+1
|
* Fix for entity spawning and some code cleanupTahg2011-12-06-1/+1
|
* Performance update to remove several very high counts of temp object creationTahg2011-12-06-1/+3
|
* Ensure that DeathEvents are raised even for non loot-dropping living entitiesAndrew Ardill2011-12-02-3/+3
| | | | Related to BUKKIT-129
* Updated to use mc-dev rename revision 1Nathan Adams2011-11-30-37/+38
|
* Remove expensive debugcalls from production codeErik Broes2011-11-26-6/+6
|
* Fixed trapdoors + few commentsNathan Adams2011-11-23-2/+2
|
* Update for 1.0.0Erik Broes2011-11-20-297/+495
|
* Update to mcdev rename revision 01 for 1.8.1Dinnerbone2011-09-24-27/+27
|
* Refactored a bunch of death code into the event factoryDinnerbone2011-09-21-12/+19
|
* Rename revision 2Dinnerbone2011-09-15-6/+6
|
* Update for Minecraft 1.8Dinnerbone2011-09-15-198/+366
|
* Update for 1.7.3Dinnerbone2011-07-08-2/+2
|
* Added reasons for entities regaining health.EvilSeph2011-06-30-2/+7
|
* Update to Minecraft 1.7Dinnerbone2011-06-30-44/+44
|