summaryrefslogtreecommitdiffstats
path: root/src/main
Commit message (Collapse)AuthorAgeLines
* Bulk pending cleanup.Wesley Wolfe2012-09-09-194/+200
|
* Change local jline checks to not use String literals. Fixes BUKKIT-2455.Luke Granger-Brown2012-09-09-2/+11
| | | | | | | | | | | | | | Refactoring dependencies 'changes' the string literal in the code. This commit changes the literal to instead use a char[] to initialize a new String. On a bytecode level, there will not exist a String literal for these two values; the shade plugin will no longer refactor them. Refactoring jline also changes the other String literals we use for notifying jline of the current state. To insure that our local code reflects the inner logic in jline, the key value was changed to the static final variable located in TerminalFactory. Likewise, UnsupportedTerminal uses the explicit class name (as reflection is used later with the value that has been set).
* Add information about async tasks to CrashReports. Addresses BUKKIT-2491Wesley Wolfe2012-09-09-1/+59
| | | | | | | | | | | | Async tasks are notorious for causing CMEs and corrupted data when accessing the API. This change makes a linked list to track recent tasks that may no longer be running. It is accessed via the toString method on the scheduler. This behavior is not guaranteed, but it is accessible as such currently. Although toString is located in the scheduler, its contract does not guarantee an accurate or up to date call when accessed from a second thread.
* Fix crash from console-commands throwing exception. Fixes BUKKIT-2479Wesley Wolfe2012-09-06-2/+14
| | | | | | When 1.3.1 was released, a try-catch block was removed from the tick loop that called the method in NMS to handle commands. This restores a try-catch to prevent the console from crashing the server.
* Fix BUKKIT-2419: PlayerAbilities not being updated on teleport/respawnfeildmaster2012-08-27-0/+1
| | | | | | Minecraft resets abilities based on what it knows client side, when someone dies and is in "survival," by default they should be in "survival." However, we allow modification of the PlayerAbilities, so we send this update out to the client. Oh and, the format of the commit is like this to see if it looks any good. :)
* Fix Future task waiting logic. Fixes BUKKIT-2408Wesley Wolfe2012-08-26-1/+6
| | | | | | | | Previously, the timeout would erroneously get converted to milliseconds twice. The second conversion was removed. Spurious wakeups were not handled properly, and would instead throw a TimeoutException even if the waited time was not reached..
* Fix empty chunks not sending biome properly and causing client side issues. ↵feildmaster2012-08-25-8/+10
| | | | Fixes BUKKIT-2396
* Update to 1.3.2Travis Watkins2012-08-25-76/+100
|
* Fix EmptyChunk's not sending to the Client correctly. Fixes BUKKIT-2206feildmaster2012-08-23-0/+8
|
* Rewrite scheduler. Fixes BUKKIT-1831, and BUKKIT-845Wesley Wolfe2012-08-22-618/+533
| | | | | | | | | | | | | | | | | | | | | | | The new scheduler uses a non-blocking methodology. Combining volatile references to make a linked reference chain, with the atomic reference handling the tail, tasks are queued without waiting for locks. The main thread will no longer limit the length of time spend for scheduled tasks, but no task will run twice in the same tick. Scheduling a new task inside of a synchronous task will always run the new task during the same tick, assuming there is no supplied delay > 0. Asynchronous tasks are now run using a thread pool. Any thread-local implemenation should now account for threads being reused between executions. Race conditions were carefully examined and the order of logic is now very important. Each task is placed in a secondary collection before removal from primary collections. Thus, by reading tasks from the collections in the same order they travel, it retains state-safety. This does make modifications less responsive in some situations, as the task may be transitioning before the modifier accesses it. This cost outweighs the requirement to synchronize on the scheduler; previously any conflict would be first-come-first-serve, with the main thread backing out arbitrarily.
* Use constant Player for EnderPearlsfeildmaster2012-08-22-9/+9
| | | | Also make sure players are online before proceeding to each event
* Fix entities not having valid "isValid" states. Addresses BUKKIT-2366feildmaster2012-08-22-1/+3
|
* Fix instances where Signs have null lines. Addresses BUKKIT-684V10lator2012-08-21-1/+10
|
* Use standard format function to format logs. Addresses BUKKIT-2246EdGruberman2012-08-21-3/+3
| | | | Also fix "excess" Log Levels.
* Implement API for Sound, and playing the sounds for Worlds and Players. Adds ↵feildmaster2012-08-21-0/+22
| | | | BUKKIT-1430, BUKKIT-1226 and BUKKIT-2019
* Use a dynamic pool size for the iterator cacheTravis Watkins2012-08-20-21/+37
| | | | | | | | Many codepaths only end up with one iterator being used at a time and most of the rest only get up to two being used so using a static pool of three is wasteful. This also allows us to efficiently handle cases that exceed 3 iterators in use. Overall this dramatically increases the hit rate and results in less iterators being created.
* Implement API to retrieve and open EnderChests. Adds BUKKIT-2016feildmaster2012-08-20-0/+7
|
* Check unload queue so we don't accidentally leave a chunk loadedTravis Watkins2012-08-19-1/+2
|
* [Bleeding] Stub out MethodProfiler classMike Primm2012-08-19-123/+8
| | | | | Instead of trying to track down every place this class is used we can simply stub out the entire class so it has no extra overhead.
* [Bleeding] Strip out unused HashSet in IntHashMapMike Primm2012-08-19-3/+3
|
* [Bleeding] Cache packet ID instead of doing lookups each time it is neededMike Primm2012-08-19-3/+7
|
* [Bleeding] Remove redundant chunkList from ChunkProviderServerMike Primm2012-08-19-7/+4
| | | | | | This ArrayList duplicates part of the functionality of the much more efficient chunk map so can be removed as the map can be used in the few places this was needed.
* Add LongObjectHashMap and LongHashSetTravis Watkins2012-08-19-404/+866
| | | | | | | | | | | | | | | Replace uses of LongHashtable and LongHashset with new implementations. Remove EntryBase, LongBaseHashtable, LongHashset, and LongHashtable as they are no longer used. LongObjectHashMap does not use Entry or EntryBase classes internally for storage so has much lower object churn and greater performance. LongHashSet is not as much of performance win for our use case but for general use is up to seventeen times faster than the old implementation and is in fact faster than alternatives from "high performance" java libraries. This is being added so that if someone tries to use it in the future in a place unrelated to its current use they don't accidentally end up with something slower than the Java collections HashSet implementation.
* Use TrigMath in hotspotsTravis Watkins2012-08-19-5/+14
| | | | | Use our implementation of atan2 in AI routines as profiling shows these are hotspots and (for these cases) our implementation is much faster.
* [Bleeding] Change Vec3DPool to a stack based poolMike Primm2012-08-19-10/+61
| | | | | | | Avoid overhead of using an ArrayList and resizing it. Also allows for reuse of objects in the pool during the same tick by explicitly releasing them back to the pool. This allows for much better cache performance as well as reduced cache footprint.
* Optimize entity AI goal selectorTravis Watkins2012-08-19-24/+31
| | | | | | | | | | | 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.
* Add iterator cache to UnsafeList and use it in hotspotsTravis Watkins2012-08-19-20/+120
| | | | | Adds a specialized iterator for the list and a pool of iterators to avoid object churn. Also optimizes the clear() method to reduce object creation.
* [Bleeding] Optimize chunk loadingMike Primm2012-08-19-0/+57
| | | | | | | | ChunkSection.e() is called once per chunk section loaded and is quite expensive (about 20% of CPU time for loading the chunk). This changes the logic to add a fast path when extended block data is not being used and reorganizes the loops for more optimal array traversal. Overall this saves about 20-30% CPU time in this method.
* Add files from mc-dev for diff visibilityMike Primm2012-08-19-0/+728
|
* Fix issues with chunk saving. Fixes BUKKIT-2158, BUKKIT-2018 and BUKKIT-2229Mike Primm2012-08-19-22/+33
|
* Add more detailed CrashReport for CraftBukkit. Addresses BUKKIT-2319Wesley Wolfe2012-08-17-0/+42
|
* Add CrashReport for diff visiblityWesley Wolfe2012-08-17-0/+160
|
* Don't extend pistons until data is set. Fixes BUKKIT-2153John Driscoll2012-08-17-2/+6
|
* Removed unneeded mc-dev imports. Fixes BUKKIT-682Wesley Wolfe2012-08-17-637/+0
|
* Call PlayerQuitEvent in correct location. Fixes BUKKIT-2193Travis Watkins2012-08-15-8/+7
|
* Use correct SlotType's for merchants. Fixes BUKKIT-2257feildmaster2012-08-15-0/+7
|
* Implement methods for spawning FallingBlocks and add various FallingBlock ↵feildmaster2012-08-14-4/+49
| | | | methods. Adds BUKKIT-2282
* Enable hardcore support. Fixes BUKKIT-2259feildmaster2012-08-12-1/+1
| | | | | | | - Hardcore requires a newly generated world - You will be banned if you die in a hardcore world - You will NOT be banned if you die in a non-vanilla world - Your "heart container" will not change without logging back in. (Vanilla bug)
* Update CreatureSpawner.setSpawnedType(EntityType) to 1.3feildmaster2012-08-12-4/+5
| | | | They can spawn any valid entities now. What is a "valid" entity? A "valid" entity is an EntityType with a non-null getName(). (for example: PRIMED_TNT, FALLING_BLOCK)
* Fix "block update packet" not being sent to the correct world. Fixes BUKKIT-2023feildmaster2012-08-12-1/+2
|
* Implement player speed API. Addresses BUKKIT-2205Wesley Wolfe2012-08-10-2/+37
|
* Add PlayerAbilities for diff visibilityWesley Wolfe2012-08-09-0/+54
|
* Implement BlockBreakEvent block experience. Adds BUKKIT-2033feildmaster2012-08-08-3/+73
|
* Add BlockMobSpawner and BlockOre for diff visibilityfeildmaster2012-08-08-0/+89
|
* Change socket traffic class try-catch. Fixes BUKKIT-2093Wesley Wolfe2012-08-08-9/+4
|
* Restore port to the hostname. Fixes BUKKIT-2124Wesley Wolfe2012-08-08-2/+2
|
* Re-add support for full chunk saving so the server save-alls on stop. Fixes ↵EvilSeph2012-08-08-1/+3
| | | | BUKKIT-2158
* Make periodic chunk saving less aggressive and fixed double player data ↵EvilSeph2012-08-07-5/+1
| | | | saving. Fixes BUKKIT-1994 and fixes BUKKIT-2144
* Implement new deprecated warning state configuration optionWesley Wolfe2012-08-06-1/+9
|
* Tripwire isn't redstone, only fire interact events.Travis Watkins2012-08-06-5/+0
|