summaryrefslogtreecommitdiffstats
path: root/src/main/java
Commit message (Collapse)AuthorAgeLines
...
* Add API to allow plugins to request players switch to a texture pack. Adds ↵Wojciech Stryjewski2012-12-20-0/+10
| | | | | | | | | | BUKKIT-2579 The setTexturePack method causes the player's client to download and switch to a texture pack specified by a URL. Note: Players can disable server textures on their client, in which case this API would not affect them.
* Add the ability to make Enchanted Books. Fixes BUKKIT-3220feildmaster2012-12-20-4/+21
|
* Remove obsolete fix for the endfeildmaster2012-12-20-10/+0
| | | | The end was getting block offsets, causing client side issues.
* Fetch correct info for skulls in block.getDrops(). Fixes BUKKIT-3205Travis Watkins2012-12-20-3/+18
|
* [Bleeding] Fix exception in getChunkSnapshot() - sky light can be nullMike Primm2012-12-20-2/+6
|
* Filter invalid ItemStacks from Packets.feildmaster2012-12-20-1/+1
| | | | | Invalid ItemStacks are causing Fireworks to disconnect players and prevent them from reconnecting
* Update CraftBukkit to Minecraft 1.4.6feildmaster2012-12-20-1416/+1920
|
* [Bleeding] Check visibility API for sounds. Fixes BUKKIT-3114mbax2012-12-18-18/+2
| | | | | | | With 1.4, entity sound tracking changed for the better. Our previous method additions can now be removed. All that's left is checking if the source can be seen by the recipient of the sound packet. Thanks, Mojang!
* Fix PotionMeta not applying the correct Id. Fixes BUKKIT-3193feildmaster2012-12-18-1/+1
|
* Add missing name in PotionEffect for Witherfeildmaster2012-12-18-0/+2
|
* Refactor get/setChestPlate to Chestplate. Addresses BUKKIT-3189feildmaster2012-12-18-4/+4
|
* Change enchantment comparisons to isSimilar. Fixes BUKKIT-3183Wesley Wolfe2012-12-17-11/+3
| | | | | | | The purpose of the isSimilar method was designed to consider all NBT data, not solely enchantments, without the need to have exact stack size matches. The respective methods in CraftInventory were still comparing enchantments instead of the ItemMeta.
* Clarify functionality in CraftInventory. Fixes BUKKIT-3097Wesley Wolfe2012-12-17-9/+39
| | | | | | | | | | | Changes some NPEs to IllegalArgumentExceptions for exception consistency. Contains(ItemStack, int) correctly calculates number of ItemStacks. Adds a containsAtLeast(ItemStack, int) for finding a combined amount of a single similar ItemStack. Makes some utility methods private to prevent ambiguity in use.
* Implement ItemFactory and ItemMeta values. Adds BUKKIT-15Wesley Wolfe2012-12-17-271/+1961
|
* ItemStack.asBukkitStack(null) should return Air. Fixes BUKKIT-3170feildmaster2012-12-15-4/+5
|
* Fix EntityEquipment positions being reversed. Fixes BUKKIT-3157deathmarine2012-12-12-6/+6
|
* Load chunks asynchronously for players.Travis Watkins2012-12-12-22/+345
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When a player triggers a chunk load via walking around or teleporting there is no need to stop everything and get this chunk on the main thread. The client is used to having to wait some time for this chunk and the server doesn't immediately do anything with it except send it to the player. At the same time chunk loading is the last major source of file IO that still runs on the main thread. These two facts make it possible to offload chunks loaded for this reason to another thread. However, not all parts of chunk loading can happen off the main thread. For this we use the new AsynchronousExecutor system to split chunk loading in to three pieces. The first is loading data from disk, decompressing it, and parsing it in to an NBT structure. The second piece is creating entities and tile entities in the chunk and adding them to the world, this is still done on the main thread. The third piece is informing everyone who requested a chunk load that the load is finished. For this we register callbacks and then run them on the main thread once the previous two stages are finished. There are still cases where a chunk is needed immediately and these will still trigger chunk loading entirely on the main thread. The most obvious case is plugins using the API to request a chunk load. We also must load the chunk immediately when something in the world tries to access it. In these cases we ignore any possibly pending or in progress chunk loading that is happening asynchronously as we will have the chunk loaded by the time they are finished. The hope is that overall this system will result in less CPU time and pauses due to blocking file IO on the main thread thus giving more consistent performance. Testing so far has shown that this also speeds up chunk loading client side although some of this is likely to be because we are sending less chunks at once for the client to process. Thanks for @ammaraskar for help with the implementation of this feature.
* Add RegionFile from mc-dev for diff visibilityTravis Watkins2012-12-12-0/+250
|
* Add utility class AsynchronousExecutorWesley Wolfe2012-12-12-0/+294
| | | | | | This class is a general purpose task execution system, that uses stages to separate processing blocks for asynchronous and synchronous executions.
* 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/+16
| | | | | | | | 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
* Players should be able to pick up items by default. Fixes BUKKIT-3143feildmaster2012-12-10-0/+1
| | | | As an added feature, players defaulted to being able to not pick up items if the flag was false. However, since minecraft doesn't normally use the flag on players, the flag was always false.
* Missed a renamefeildmaster2012-12-10-1/+1
|
* Add EntityEquipment API. Adds BUKKIT-3103feildmaster2012-12-10-3/+213
| | | | | | | | 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
* [Bleeding] Correct getEyeHeight value. Fixes BUKKIT-3130h31ix2012-12-10-1/+1
|
* Only display help aliases when there are aliases. Fixes BUKKIT-1621feildmaster2012-12-10-3/+6
|
* Pass null help values values as empty strings to HelpTopicsfeildmaster2012-12-10-10/+10
| | | | Fixes BUKKIT-2618 and BUKKIT-2561
* [Bleeding] Fix NPE with a null bedSpawnLocation. Fixes BUKKIT-1500EdGruberman2012-12-10-2/+7
|
* Implement FurnaceExtractEvent. Adds BUKKIT-2114feildmaster2012-12-08-0/+16
|
* Add SlotFurnaceResult for diff visibilityfeildmaster2012-12-08-0/+69
|
* [Bleeding] Fix NPE in getBedSpawnLocation. Fixes BUKKIT-1949EdGruberman2012-12-08-0/+2
|
* Correctly shoot arrows with the spawnArrow Method. Fixes BUKKIT-3116Dark Arc2012-12-08-2/+5
|
* 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.
* Provide a faster way to get a location. Adds BUKKIT-3120Travis Watkins2012-12-07-0/+39
| | | | | | | | | | | | | | | | 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.
* Use shooter constructor for Fireballs. Fixes BUKKIT-3121feildmaster2012-12-07-8/+6
| | | | Fixes fireballs exploding in the shooter's face and not having a shooter for the projectile. (Two birds with one stone!)
* Add the ability to launch WitherSkulls. Fixes BUKKIT-3106feildmaster2012-12-07-3/+6
|
* Fix "Commands Only" chat flag. Fixes BUKKIT-2238feildmaster2012-12-07-1/+1
| | | | Thanks for the commit @mrapple
* Implement API for wolves collar color. Adds BUKKIT-3109feildmaster2012-12-05-0/+9
|
* Don't run command blocks in empty worlds. Fixes BUKKIT-3094Travis Watkins2012-12-05-1/+6
|
* Persistence isn't just animals. Fix BUKKIT-3105feildmaster2012-12-05-1/+3
| | | | Also set to this value if the persistence hasn't been updated
* Add a custom shutdown message set in bukkit.yml. Addresses BUKKIT-3031feildmaster2012-12-05-2/+9
|
* Allow placing blocks in spawn if ops.txt is empty. Fixes BUKKIT-3004Travis Watkins2012-12-05-0/+1
|
* 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.
* Fire EntityFormBlockEvent for FallingBlocks. Adds BUKKIT-3078Wesley Wolfe2012-12-04-5/+14
|
* Implement API for mob despawn when away from players. Adds BUKKIT-2986Travis Watkins2012-12-04-3/+11
| | | | | | | | 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.
* Fix leaky pipes (water flow). Fixes BUKKIT-3085feildmaster2012-12-01-3/+3
| | | | (Also, fix mistranslation for VehicleBlockCollisionEvent)
* [BREAKING] Update BlockFace directions. Fixes BUKKIT-1567, BUKKIT-3069feildmaster2012-12-01-31/+31
| | | | The answer is 42
* Fix missed refactoring in EntityWitherWesley Wolfe2012-11-30-1/+1
|
* Add data values to EntityChangeBlockEvent. Adds BUKKIT-3077, BUKKIT-3076Wesley Wolfe2012-11-30-16/+16
| | | | This change affects Endermen and Silverfish, adding a data value for the block change event.
* Use carried item for endermen's changed-block's id. Fixes BUKKIT-3075Wesley Wolfe2012-11-30-1/+1
|