summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
Commit message (Collapse)AuthorAgeLines
* Fix entities traveling sideways. Addresses BUKKIT-3443bloodmc2013-01-16-2/+2
| | | | Original: Update mappings to correct 1.4.6 version.
* Get the BlockState before changing the block. Fixes BUKKIT-3441feildmaster2013-01-16-2/+4
|
* Handle beds and doors the same way as other blocks. Fixes BUKKIT-3437feildmaster2013-01-16-19/+14
| | | | Relates to: BUKKIT-3438
* Throw BlockPlaceEvent when placing double slabs. Fixes BUKKIT-2469feildmaster2013-01-16-39/+61
|
* Spawn monsters without prematurely exiting. Fixes BUKKIT-3425cexikitin2013-01-14-1/+1
| | | | | | | By using return 0, we exit the loop prematurely preventing other creature types from being spawned if one type is set to 0. By using continue we move on to the other types and allow them to spawn properly.
* Update calls to DyeColor getData and getByData. Addresses BUKKIT-2786Wesley Wolfe2013-01-05-1/+1
| | | | | These two methods are now deprecated and replaced by the strictly equivalent calls using wool data.
* Implement fishing experience. Adds BUKKIT-3348feildmaster2013-01-01-1/+3
|
* Move the tile entity with the falling block. Adds BUKKIT-3349feildmaster2013-01-01-0/+27
| | | | Allows for interesting things to be done with world.spawn()
* Fix "setSitting" on tameable animals. Fixes BUKKIT-1534feildmaster2013-01-01-1/+1
| | | | | | | | This makes it so animals (tame or not) will sit properly and not move around. Wild animals that are sitting may override the sitting position if they are attacking.
* Add PathfinderGoalSit for diff visibilityfeildmaster2013-01-01-0/+39
|
* [Bleeding] Fix corruption due to thread safety issues. Fixes BUKKIT-3333Mike Primm2012-12-30-3/+3
| | | | | | | | | | | | | | | | | | | | The 'tag' NBTTagCompound field of the ItemStack assumes that it is OK to save a reference to an NBT supplied via load() and assumes it is OK to supply a reference to the internal field during a save(). Neither is true, as Chunk NBT structures are required to be read-only once created (due to being written asynchronously off the server thread AND due to the potential to be passed to a new Chunk if the same chunk is reloaded before the writing of the NBT is completed by the File I/O thread). Keeping a live reference to the NBT copy passed in, or to the NBT value passed back during saving, creates serious thread safety issues which can result in corrupted data being written to the world data files. The specific issue here was uncovered by the recent change to use setName("") on the ItemStack.tag object. When a chunk is being loaded again before its save is completed, this results in name of the field in the NBT being set to "". This causes it to be saved as "" instead of "tag" resulting in it not being properly reloaded in the future which results in the itemstack losing all of its metadata.
* /dev/null does not accept EnchantmentThornsWesley Wolfe2012-12-29-1/+5
|
* [Bleeding] Implement periodic chunk garbage collectorMike Primm2012-12-29-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | This adds two settings to bukkit.yml, allowing activation and control of two chunk garbage collection triggering conditions: chunk-gc/period-in-ticks controls a periodic GC, run once every N ticks (default is 600); chunk-gc/load-threshold causes the GC to run once after every N calls to loadChunk() on a given world (this call is an API call used by plugins, and is distinct from the path taken for routine player movement-based loading). In both cases, setting to zero will disable the given GC scheduling strategy. In either case, the act of doing the GC is simply one of scanning the loaded chunks, seeing which are NOT being used by one or more players (due to view-distance) and which are not already queued for unload, and queueing them for a normal unload. Ultimately, the unload is then processed the same as if the chunk were unloaded due to leaving the view-distance range of all players, so the impact on plugins should be no different (and strategies such as handling the ChunkUnloadEvent in order to prevent unload will still work). The initial interval for the periodic GC is randomized on a per-world basis, in order to avoid all world being GCed at the same time - minimizing potential lag spikes.
* Fix persistence on tamed pets. Fixes BUKKIT-3300feildmaster2012-12-28-2/+8
| | | | | | With the persistence api introduced, pets did not have their persistence flag updated to reflect their persistence. This caused tame ocelots to not persist under specific conditions.
* Update maxhealth for entities that have variable max health. Fixes BUKKIT-3308feildmaster2012-12-27-4/+27
| | | | | | | | Slimes and wolves have health that can change based on certain conditions. So we check if their max health should be updated, and if it has been customized in any way. We also scale the wolf's health for their tail
* Fix discrepancies in NBT and ItemMeta. Fixes BUKKIT-3279feildmaster2012-12-27-1/+2
| | | | | | | | | | | An ItemStack gains the tag name "tag" when the stack is serialized to NBT, however items don't have a tag *until* they are serialized at least once. So to solve this, we remove the tag name when loading the NBT data. Another problem with NBT are TagLists, when transferring tag lists between the server and the client the names are lost, and so we simply don't add a name to the tag.
* Fire BlockRedstoneEvent for repeaters. Fixes BUKKIT-1157Travis Watkins2012-12-27-0/+14
|
* Add BlockDiode from mc-dev for diff visibility.Travis Watkins2012-12-27-0/+214
|
* Don't update physics until after the place event. Fixes BUKKIT-3316Wizjany2012-12-27-3/+9
| | | | | | If you cancel a BlockPlaceEvent for a sign the world is updated as if the block was placed and then destroyed. To avoid this we set the block without updating physics then apply the update after the event.
* Never remove players when unloading chunks. Fixes BUKKIT-3129cexikitin2012-12-27-3/+1
| | | | | | | | When unloading chunks we have a check to ensure we do not remove players from the world due to the issues this would cause. However, our check to see if the player is in this chunk is reversed and is in fact entirely wrong. Even if the player isn't currently in this chunk we do not want to remove them as that will still cause the same issues.
* Fix fireballs being motionless (again). Fixes BUKKIT-3299feildmaster2012-12-25-7/+10
| | | | | | The key "direction" incorrectly mapped to variables that were already set in the entity. In order to prevent loading incorrect data we renamed "direction" to "power."
* Perform permission removals after the quit event. Fixes BUKKIT-3303feildmaster2012-12-24-4/+1
| | | | | | | The player would have no permissions (other than their OP status) when checked in the Quit event. This is because we removed permissions before the event occurred. By calling it afterwards, we can persist the data until the server finally removes the player.
* Implement entity max health methods. Adds BUKKIT-266feildmaster2012-12-23-17/+38
|
* Update firework power when modifying meta. Fixes BUKKIT-3272Travis Watkins2012-12-22-1/+1
|
* Fire BlockDispenseEvent for fireworks. Adds BUKKIT-3246Travis Watkins2012-12-22-2/+38
|
* Add DispenseBehaviorFireworks and EntityFireworks for diff visibilityTravis Watkins2012-12-22-0/+147
|
* One record per JukeBox.Wesley Wolfe2012-12-22-0/+1
|
* Add BlockJukeBox for diff visibilityWesley Wolfe2012-12-22-0/+76
|
* Implement Skull BlockState. Adds BUKKIT-3259meiskam2012-12-21-0/+6
|
* Added TileEntitySkull for diff visibilitymeiskam2012-12-21-0/+50
|
* Check file existence before determining readOnly. Fixes BUKKIT-3255feildmaster2012-12-21-1/+1
|
* Fix loading Items entities with an invalid item. Addresses BUKKIT-3249feildmaster2012-12-21-1/+12
|
* Don't save server properties when it's read only. Fixes BUKKIT-3250feildmaster2012-12-21-0/+5
|
* Fix command line arguments being ignored. Fixes BUKKIT-3247feildmaster2012-12-21-2/+2
|
* Add a null check for Item Entities. Fixes BUKKIT-3249feildmaster2012-12-21-0/+5
|
* 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.
* 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-1327/+1794
|
* [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!
* Implement ItemFactory and ItemMeta values. Adds BUKKIT-15Wesley Wolfe2012-12-17-91/+72
|
* Load chunks asynchronously for players.Travis Watkins2012-12-12-22/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
|
* 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.
* Add EntityEquipment API. Adds BUKKIT-3103feildmaster2012-12-10-2/+4
| | | | | | | | 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] Fix NPE with a null bedSpawnLocation. Fixes BUKKIT-1500EdGruberman2012-12-10-0/+1
|
* Implement FurnaceExtractEvent. Adds BUKKIT-2114feildmaster2012-12-08-0/+16
|
* Add SlotFurnaceResult for diff visibilityfeildmaster2012-12-08-0/+69
|