Commit graph

1984 Commits

Autor SHA1 Nachricht Datum
Mike Primm
eaa3154b0e [Bleeding] Cache packet ID instead of doing lookups each time it is needed 2012-08-19 09:51:04 -05:00
Mike Primm
627cf2ef8b [Bleeding] Remove redundant chunkList from ChunkProviderServer
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.
2012-08-19 09:51:00 -05:00
Travis Watkins
97ac0a3f14 Add LongObjectHashMap and LongHashSet
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.
2012-08-19 09:51:00 -05:00
Travis Watkins
7b20caf8fe Use TrigMath in hotspots
Use our implementation of atan2 in AI routines as profiling shows these are
hotspots and (for these cases) our implementation is much faster.
2012-08-19 09:51:00 -05:00
Mike Primm
8219081385 [Bleeding] Change Vec3DPool to a stack based pool
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.
2012-08-19 09:50:57 -05:00
Travis Watkins
d628c886d2 Optimize entity AI goal selector
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.
2012-08-19 09:50:57 -05:00
Travis Watkins
858d36efc9 Add iterator cache to UnsafeList and use it in hotspots
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.
2012-08-19 09:50:57 -05:00
Mike Primm
6d777ade16 [Bleeding] Optimize chunk loading
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.
2012-08-19 09:50:45 -05:00
Mike Primm
852602e430 Add files from mc-dev for diff visibility 2012-08-19 09:19:28 -05:00
EvilSeph
b44fc8ed28 Updated version to 1.3.1-R2.1-SNAPSHOT for development towards next release. 2012-08-19 09:01:23 -04:00
EvilSeph
29ca5d1f50 Updated version to 1.3.1-R2.0 in pom.xml for RB. 2012-08-19 08:47:47 -04:00
Mike Primm
5254993510 Fix issues with chunk saving. Fixes BUKKIT-2158, BUKKIT-2018 and BUKKIT-2229 2012-08-19 08:36:47 -04:00
Wesley Wolfe
cacfc71b46 Add more detailed CrashReport for CraftBukkit. Addresses BUKKIT-2319 2012-08-17 23:18:22 -05:00
Wesley Wolfe
acedd049c5 Add CrashReport for diff visiblity 2012-08-17 22:22:20 -05:00
John Driscoll
0bde47a173 Don't extend pistons until data is set. Fixes BUKKIT-2153 2012-08-17 17:06:46 -05:00
Wesley Wolfe
050a9276bc Removed unneeded mc-dev imports. Fixes BUKKIT-682 2012-08-17 16:37:53 -05:00
Travis Watkins
add387dee3 Call PlayerQuitEvent in correct location. Fixes BUKKIT-2193 2012-08-15 12:22:52 -05:00
feildmaster
fc35d000e4 Use correct SlotType's for merchants. Fixes BUKKIT-2257 2012-08-15 06:00:55 -05:00
feildmaster
b059962a5c Implement methods for spawning FallingBlocks and add various FallingBlock methods. Adds BUKKIT-2282 2012-08-14 07:38:23 -05:00
feildmaster
8748c8c757 Enable hardcore support. Fixes BUKKIT-2259
- 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)
2012-08-12 16:50:00 -05:00
feildmaster
aa92f0e313 Update CreatureSpawner.setSpawnedType(EntityType) to 1.3
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)
2012-08-12 14:11:36 -05:00
feildmaster
bfc5189818 Fix "block update packet" not being sent to the correct world. Fixes BUKKIT-2023 2012-08-12 14:11:34 -05:00
Wesley Wolfe
342f9c3bd3 Implement player speed API. Addresses BUKKIT-2205 2012-08-10 00:00:04 -05:00
Wesley Wolfe
77cda7e715 Add PlayerAbilities for diff visibility 2012-08-09 23:16:19 -05:00
feildmaster
27c1c85adb Implement BlockBreakEvent block experience. Adds BUKKIT-2033 2012-08-08 19:49:10 -05:00
feildmaster
8d946b88b3 Add BlockMobSpawner and BlockOre for diff visibility 2012-08-08 19:49:08 -05:00
Wesley Wolfe
a16e0b6323 Change socket traffic class try-catch. Fixes BUKKIT-2093 2012-08-08 07:00:41 -05:00
Wesley Wolfe
25fe93479f Restore port to the hostname. Fixes BUKKIT-2124 2012-08-08 07:00:29 -05:00
EvilSeph
24809ef986 Re-add support for full chunk saving so the server save-alls on stop. Fixes BUKKIT-2158 2012-08-08 03:08:46 -04:00
EvilSeph
a133bc7182 Make periodic chunk saving less aggressive and fixed double player data saving. Fixes BUKKIT-1994 and fixes BUKKIT-2144 2012-08-07 18:52:53 -04:00
EvilSeph
05b5a068cb Updated version to 1.3.1-R1.1-SNAPSHOT for development towards next release. 2012-08-07 17:10:11 -04:00
EvilSeph
fad4f39ac8 Updated version to 1.3.1-R1.0 in pom.xml for RB 2012-08-07 02:34:24 -04:00
Wesley Wolfe
2bb7a5f94d Implement new deprecated warning state configuration option 2012-08-06 23:52:49 -05:00
Travis Watkins
bfbdbbd05c Tripwire isn't redstone, only fire interact events. 2012-08-06 19:47:22 -05:00
Travis Watkins
7a3dfecba0 Don't force chunks to load again, causes chunk leaks with multiworld. 2012-08-06 17:31:03 -05:00
Wesley Wolfe
0792b15887 Pistons no longer extend before they are pistons. Fixes BUKKIT-1999 2012-08-06 09:55:38 -05:00
feildmaster
59aaa6a80a Fix dispenser removing data from items. Fixes BUKKIT-2045 2012-08-06 09:09:05 -05:00
THDigi
7dc47892a4 Don't rotate ShapedRecipes. Fixes BUKKIT-1334
ShapedRecipe's getShape() always returns a 90deg rotated shape of the original shape, this commit fixes it.
2012-08-06 07:11:35 -05:00
Travis Watkins
164c066453 Fix "moved too quickly" detection. 2012-08-05 23:57:22 -05:00
Travis Watkins
e1a4273957 Fire events for tripwire and hooks. 2012-08-05 23:57:22 -05:00
Travis Watkins
982efb8c24 Add BlockTripwire and BlockTripwireHook from mc-dev for diff visibility. 2012-08-05 23:57:22 -05:00
Travis Watkins
304cb019e4 Fire EntityDeathEvent for pigs. Fixes BUKKIT-2100 2012-08-05 23:57:22 -05:00
Wesley Wolfe
9cccb1c89e Fix Vec3DPool; don't pool objects indefinitely or O(n^2) clear() 2012-08-05 21:36:25 -05:00
Wesley Wolfe
f5777cc0b7 Add Vec3DPool for diff visibility 2012-08-05 21:36:09 -05:00
Wesley Wolfe
44234c47ce Cease execution if block is AIR. Fixes BUKKIT-2104 2012-08-05 21:32:01 -05:00
Travis Watkins
a574ec54cc Put forceChunkLoad back to its original value. 2012-08-05 20:03:12 -05:00
Travis Watkins
beb71069b7 Don't use Packet56 and clear client cache on world changes. 2012-08-05 18:42:03 -05:00
Wesley Wolfe
0e013fa4b0 Fixed PlayerManager ConcurrentModificationExceptions. Fixes BUKKIT-1972 2012-08-04 22:12:16 -05:00
Wesley Wolfe
9804665fec Fix bounding box pool to use a dynamic cache size
Also changed insane array copy routine. This should reduce server lag
spikes that occur periodically.
2012-08-04 21:11:28 -05:00
Wesley Wolfe
14a470985d Add AABBPool for diff visibility 2012-08-04 21:06:17 -05:00