summaryrefslogtreecommitdiffstats
path: root/src/main/java/net
Commit message (Collapse)AuthorAgeLines
* Fire BlockFadeEvent when soil turns back to dirt. Fixes BUKKIT-1854Travis Watkins2012-11-17-2/+12
|
* Don't wait for main thread when processing commands.Travis Watkins2012-11-17-42/+54
| | | | | | | | In order to correctly handle disconnects for invalid chat we setup a Waitable and pass it to the main thread then wait for it to be processed. However, commands are also chat packets and they are already on the main thread. In this case, waiting will deadlock the server so we should just do a normal disconnect.
* Don't create tile entity when block placement fails. Fixes BUKKIT-2924Travis Watkins2012-11-16-0/+6
| | | | | | | | | End portals can only be placed in the end during the dragon's death. Attempts to place them outside of this window causes the block to remove itself. However, we still create the tile entity for the portal which leads to exceptions spamming the console about a tile entity existing without the appropriate block. In these cases we should not place the tile entity at all.
* Ignore empty custom payload packets. Fixes BUKKIT-2957Travis Watkins2012-11-16-0/+6
|
* Use synchronous calls and wait for chat disconnect. Fixes BUKKIT-2946Wesley Wolfe2012-11-16-4/+59
| | | | | | | When invalid chat is detected we currently drop the connection with no hint as to why as anything else is not allowed while we're off the main thread. To give valid disconnect reasons and fire proper events instead pass these off to the main thread and wait for it to process them.
* Update tile entity when interact event is cancelled.Travis Watkins2012-11-16-0/+5
| | | | | | | If a plugin cancels a PlayerInteractEvent when left clicking a block the client may have removed this block if they are in creative mode or if the block breaks in a single hit. In this case, we need to update the client's tile entity as well as telling it the block still exists.
* Update CraftBukkit to Minecraft 1.4.5.Travis Watkins2012-11-16-4/+8
|
* Remove fire ticks if damage has been canceled. Fixes BUKKIT-2933feildmaster2012-11-15-0/+3
|
* Don't thread single chunk compression. Fixes BUKKIT-2927Travis Watkins2012-11-15-32/+3
| | | | | | | | | | | | | Packet 51 is used to send updates about large changes to single chunks and to remove chunks from the client when they get out of range. In the first case a single packet object is created and queued for all relevant players. With our current chunk compression scheme this means the first player to have the packet processed will start the compression and get the packet correctly but the rest will get garbage. Since this packet never contains much data it is better to simply handle compression of it on the main thread like vanilla does instead of putting in locks and dealing with their overhead and complexity.
* Update tile entity on client on cancelled block break. Fixes BUKKIT-2935Travis Watkins2012-11-14-1/+11
| | | | | | | | When a client tries to break a block it assumes it has done so unless told otherwise by the server. This means the client also wipes out any tile entity data it has for the block as well. We do not send this data when updating the client so clients lose things like text on signs, skull type, etc when they aren't allowed to break the block.
* Rework skull dropping. Fixes BUKKIT-2930 and BUKKIT-2820Travis Watkins2012-11-14-13/+23
| | | | | | | | | Skulls need their tile entity in order to create an item correctly when broken unlike every other block. Instead of sprinkling special cases all over the code just override dropNaturally for skulls to read from their tile entity and make sure everything that wants to drop them calls this method before removing the block. There is only one case where this wasn't already true so we end up with much less special casing.
* Add crafting result slot for sheep breeding. Fixes BUKKIT-2926Travis Watkins2012-11-14-0/+1
| | | | | | | | | Sheep now use the crafting system when breeding to determine what color their baby should be. This triggers an event but the event wants the crafting inventory to have a result slot which sheep do not have. This event could be useful for plugins to control the output of sheep breeding so instead of disabling it we add a result slot so the event fires without issue.
* Clear out empty extended block ID array. Fixes BUKKIT-2923Travis Watkins2012-11-14-0/+14
| | | | | | | | | | | | If a chunk gets a block added to it that requires the extended block id nibble array (block id greater than 255) the array is created and saved with the chunk. When the blocks are verified to make sure they exist these entries are erased but the extended block id array is not. This causes the server and client to disagree about how much data a chunk has which makes the client crash while trying to load the chunk for rendering. To resolve these issues we now clear the extended block id array on chunk load if there is no valid data in it.
* Potentially fix glitch with falling entities.Travis Watkins2012-11-13-0/+1
| | | | | | | | | | | When a block creates a falling entity the block is not immediately removed from the world. Instead, the falling entity is responsible for removing it but only if the block still exists. Due to certain piston mechanics it is possible to move the block before this check happens and thus the block is not removed. This should be fine as the entity will kill itself in this situation. However, the code does not stop here and continues running the rest of the entity logic which includes either placing a block in the world or placing a block item in the world depending on the circumstances.
* Add EntityFallingBlock from mc-devTravis Watkins2012-11-13-0/+178
|
* Correct digging behavior. Fixes BUKKIT-2780Travis Watkins2012-11-13-11/+10
| | | | | | | | | | | If a block is air we return immediately so miss the cleanup work that would normally happen in this case in vanilla. This causes us to get in to a situation where, due to odd packet sending from the client, we never properly stop an attempt by the client to break a block and thus it eventually breaks. We also use our own variable for block damage and never sync it up with the vanilla one so damage reporting to other clients is not always correct.
* Update CraftBukkit to Minecraft 1.4.4.Travis Watkins2012-11-13-2524/+3212
|
* Migrate world data with world when switching from vanilla Minecraft toEvilSeph2012-11-02-0/+9
| | | | Bukkit. Fixes BUKKIT-2816 and BUKKIT-2760
* [Bleeding] Fix mistranslation affecting time of the server vs time of day.md_52012-11-02-3/+3
| | | | Fixes BUKKIT-2797
* Fire HangingBreakEvent when explosions remove hanging entities. Fixes ↵EvilSeph2012-10-31-6/+6
| | | | BUKKIT-2764
* Fix NPE when blowing up an item frame. Fixes BUKKIT-2763Travis Watkins2012-10-31-1/+1
|
* Implement API for ambient mob spawn limit. Add spawn-limit.ambient toTravis Watkins2012-10-31-1/+4
| | | | bukkit.yml. Adds BUKKIT-2765
* Use BlockCommandSender for dispatching Command block commandsTravis Watkins2012-10-31-10/+13
| | | | Also allow commands that don't start with a / to match vanilla behavior
* Expose API for managing and using GameRules. Adds BUKKIT-2757feildmaster2012-10-31-14/+20
|
* Hook command block up to ConsoleCommandSender. Fixes BUKKIT-2684Travis Watkins2012-10-31-4/+64
| | | | | This will need to have its own CommandSender but this makes command blocks work for now with any command console can run.
* [Bleeding] Fire damage is no longer a valid reason for hanging entity removalh31ix2012-10-31-13/+2
|
* [Bleeding] Implement new Hanging events. Adds BUKKIT-2754h31ix2012-10-31-40/+64
|
* Remove Anvil debug. Fixes BUKKIT-2732EvilSeph2012-10-30-1/+1
|
* [Bleeding] Prevent players from appearing to be sneaking after they change ↵md_52012-10-30-1/+1
| | | | dimensions whilst doing so.
* Disable portal support for entities for now. Restore allowNether check.EvilSeph2012-10-30-3/+3
| | | | | Relates to: BUKKIT-2695 BUKKIT-2675
* Update map cursors to reflect 1.4 changes. Fixes BUKKIT-2740feildmaster2012-10-29-2/+1
|
* Get skull data before destroying block. Fixes BUKKIT-2723Travis Watkins2012-10-29-2/+13
| | | | | | | | | Skull blocks store their type in a tile entity and use their block data as rotation. When breaking a block the block data is used for determining what item to drop. Simply changing this to use the skull method for getting their drop data is not enough because their tile entity is already gone. Therefore we have to special case skulls to get the correct data _and_ get that data before breaking the block.
* Fix bug preventing non bed-reliant spawns from being successfully set. Fixes ↵EvilSeph2012-10-29-1/+1
| | | | BUKKIT-2708
* Drop skulls like every other block. Fixes BUKKIT-2678Travis Watkins2012-10-29-1/+4
| | | | | Instead of having a special case for skulls just use the normal logic for breaking a block. This avoids issues when interacting with API.
* Prevent health from wrapping around.EvilSeph2012-10-28-4/+6
|
* Update PotionEffects on player death. Fixes BUKKIT-2673h31ix2012-10-28-0/+3
| | | | | | | On player death player PotionEffects need to be updated so that a player's invisibility and other effects are removed, otherwise they will persist after a respawn. This is a carry-over from our use of persistent player entities.
* Clamp difficulty levels to prevent invalid valuesTravis Watkins2012-10-28-1/+1
| | | | | | | Some features added in 1.4.2 use the difficulty value as an index to an array so while before having it set to an invalid value would do nothing or maybe cause an odd side effect somewhere it now crashes the server. This patch ensures difficulty values are clamped between 0 and 3, inclusive.
* Don't filter item data for anvils. Fixes BUKKIT-2640Travis Watkins2012-10-28-1/+1
| | | | | | | Filtering item data is usually a good idea to make sure we don't have invalid data or data on items that shouldn't have it. However, anvils use item data in slightly different way and so running its code for filtering here causes the data to be corrupted.
* Use correct variable for squid Y motion. Fixes BUKKIT-2648Travis Watkins2012-10-28-1/+1
|
* Fix missed rename for ore exp dropping. Fixes BUKKIT-2662Travis Watkins2012-10-28-1/+1
|
* Fix incorrect method names missed during update. Fixes BUKKIT-2653h31ix2012-10-28-2/+2
| | | | | | A couple method names were changed between 1.3.2 and 1.4.2 but were missed in the update. One of these affects being able to enchant bows and the other is used for updating player animations while firing.
* These books are too powerful!EvilSeph2012-10-28-1/+1
|
* Remove spawn-radius setting in bukkit.yml in favour of spawn-protection inEvilSeph2012-10-28-3/+4
| | | | server.properties. Fixes BUKKIT-2657
* Fixed generator-settings not being set. Fixes BUKKIT-2652EvilSeph2012-10-28-0/+1
|
* Don't pass vanilla plugin channels to plugins. Fixes BUKKIT-2638Travis Watkins2012-10-27-23/+22
| | | | | | | | Vanilla has its own handlers for plugin channel messages for things like texture packs, books, and anvils. When vanilla handles one of these messages we should not also pass it to plugins because they will be duplicating work and potentially running in to situations our plugin system isn't setup to handle. This is how 1.3.2 worked but was lost in the 1.4.2 update.
* Update CraftBukkit to Minecraft 1.4(.2).Travis Watkins2012-10-27-4716/+9687
|
* Made books less powerful, though you should still read them!EvilSeph2012-10-27-1/+15
|
* Delegate tab-completion. Fixes BUKKIT-2181. Adds BUKKIT-2602Score_Under2012-10-15-0/+5
| | | | | | CommandMap now contains the functionality for tab completion. This commit replaces the vanilla implementation and simply delegates it to the Bukkit API.
* Queue tasks from secondary threads. Fixes BUKKIT-2546 and BUKKIT-2600Wesley Wolfe2012-10-14-42/+90
| | | | | | | | | | | | | | | | | | | | | This change affects the old chat compatibility layer from an implementation only standpoint. It does not queue the 'event' to fire, but rather queues a runnable that allows the calling thread to wait for execution to finish. The other effect of this change is that rcon connects now have their commands queued to be run on next server tick using the same implementation. The internal implementation is in org.bukkit.craftbukkit.util.Waitable. It is very similar to a Future<T> task, but only contains minimal implementation with object.wait() and object.notify() calls under the hood of waitable.get() and waitable.run(). PlayerPreLoginEvent now properly implements thread-safe event execution by queuing the events similar to chat and rcon. This is still a poor way albeit proper way to implement thread-safety; PlayerPreLoginEvent will stay deprecated.
* Ensure entity isn't destroyed when trying to show it. Fixes BUKKIT-2038Travis Watkins2012-10-13-2/+4
| | | | | | | | | If two players (or a player and any other entity) are teleported to the same location in the same tick they will both get added to the other's destroy queue then have a new entity spawn packet sent. Next tick the destroy queue will be processed and they will then be invisible to each other. To prevent this situation we remove the entity from the destroy queue when sending out a spawn packet for them.