summaryrefslogtreecommitdiffstats
path: root/src/main/java/net/minecraft
Commit message (Collapse)AuthorAgeLines
* 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.
* Update entity target data to reflect current AI status. Fixes BUKKIT-2280EdGruberman2012-09-28-0/+2
| | | | | | | The new AI system introduced by Minecraft 1.2 no longer relies on the target field in the entity so it is frequently out of sync with what the entity is actually doing. This modifies the AI goal to update the target so our API can return the correct information.
* Allow data values on mushroom and mob spawner blocks. Fixes BUKKIT-2346Travis Watkins2012-09-28-3/+5
| | | | | | | | | In 1.2.5 and older versions of CraftBukkit we allowed the use of data values on bug mushroom and mob spawner blocks for use with plugins. For the 1.3 update the mechanism for doing this was changed and I accidentally used the wrong value when adding these, indicating that they should not have data instead of our actual intent. This change corrects this regression.
* Use this world instead of the one in the entity. Fixes BUKKIT-2315Travis Watkins2012-09-28-3/+3
| | | | | | In some situations an entity or tile entity can be added to the world but have its own 'world' field be null or otherwise incorrect. As the entity was added to this world to be ticked assume it actually is in this world.
* Replace LongObjectHashMap with a more efficient implementationTravis Watkins2012-09-21-9/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | After further testing it appears that while the original LongHashtable has issues with object creation churn and is severly slower than even java.util.HashMap in general case benchmarks it is in fact very efficient for our use case. With this in mind I wrote a replacement LongObjectHashMap modeled after LongHashtable. Unlike the original implementation this one does not use Entry objects for storage so does not have the same object creation churn. It also uses a 2D array instead of a 3D one and does not use a cache as benchmarking shows this is more efficient. The "bucket size" was chosen based on benchmarking performance of the HashMap with contents that would be plausible for a 200+ player server. This means it uses a little extra memory for smaller servers but almost always uses less than the normal java.util.HashMap. To make up for the original LongHashtable being a poor choice for generic datasets I added a mixer to the new implementation based on code from MurmurHash. While this has no noticable effect positive or negative with our normal use of chunk coordinates it makes the HashMap perform just as well with nearly any kind of dataset. After these changes ChunkProviderServer.isChunkLoaded() goes from using 20% CPU time while sampling to not even showing up after 45 minutes of sampling due to the CPU usage being too low to be noticed.
* Set last accessed variables after grabbing chunk. Fixes BUKKIT-1033Wesley Wolfe2012-09-20-1/+1
| | | | | | | | | | | | | This fix changes the 'state' of the last accessed variables to be more accurate. Changing the coordinates of the last accessed chunk should never precede actually setting the last accessed chunk, as loading a chunk may at some point call back to getChunkAt with a new set of coordinates before the chunk has actually been loaded. The coordinates would have been set, but the actual chunk would not. With no check for accuracy, this causes fringe case issues such as null block states. Big thanks to @V10lator for finding where the root of the problem was occurring.
* CraftBukkit comment fixesWesley Wolfe2012-09-14-20/+16
|
* [Bleeding] Check visibility API for sounds. Fixes BUKKIT-2210mbax2012-09-14-1/+22
| | | | | | | | | | | | This implementation of a visibility API check for sounds was created by adding extra methods carrying the source entity in WorldManager and ServerConfigurationManagerAbstract and adding a test for canSee in the SCMA sendPacketNearby method. This approach involves no logic copying, just method addition. I opted to cast to WorldManager as: 1) IWorldAccess is not in CraftBukkit at the moment 2) There is no other IWorldAccess implemented in CraftBukkit, nor is there likely to be one soon. If that day comes, easy fix.
* What is dead may never die.EvilSeph2012-09-14-0/+4
|
* Update the client after a FoodLevelChange event is fired. Fixes BUKKIT-2510EvilSeph2012-09-12-0/+4
|
* [Bleeding] Avoid spawn checks on empty worlds. Fixes BUKKIT-2508Mike Primm2012-09-12-1/+1
| | | | | Change a server wide check for players to be world specific. Worlds without players will not spawn entities.
* Reverted changes to chunk saving behaviour.EvilSeph2012-09-12-3/+1
|
* [Bleeding] Add autosave interval setting in bukkit.yml. Adds BUKKIT-2507Mike Primm2012-09-12-1/+2
| | | | | | | | | | | | | | | | | The new setting is located at "ticks-per.autosave". By changing this value, it affects how often a full save is automatically executed, measured in ticks. This value is defaulting to 0 (off) because we believe that the vast majority of servers already have a third-party solution to automatically saving the server at set intervals. Having the built in auto-save disabled by default ensures that we are not saving things twice; doing so leads to absolutely no benefits, but results in detrimental and noticeable unnecessary performance decrease. For servers that do not use an automated external script to perform saves, this setting can be turned on by setting the value higher than 0, with 900 being the value used in vanilla.
* Bulk pending cleanup.Wesley Wolfe2012-09-09-145/+158
|
* Fix crash from console-commands throwing exception. Fixes BUKKIT-2479Wesley Wolfe2012-09-06-1/+8
| | | | | | 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 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
|
* 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-0/+3
|
* Use standard format function to format logs. Addresses BUKKIT-2246EdGruberman2012-08-21-2/+2
| | | | Also fix "excess" Log Levels.
* Use a dynamic pool size for the iterator cacheTravis Watkins2012-08-20-0/+2
| | | | | | | | 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.
* 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-5/+2
| | | | | | 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-47/+27
| | | | | | | | | | | | | | | 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-6/+11
| | | | | 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-4/+28
|
* Add more detailed CrashReport for CraftBukkit. Addresses BUKKIT-2319Wesley Wolfe2012-08-17-0/+1
|
* 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
|