Commit Graph

458 Commits

Author SHA1 Message Date
Aikar
1953f52da1 SPIGOT-2439: Consistently fire Chunk(Load|Unload)Event
Clean up implementation and firing of both of these events by routing
both unload and load behaviors to consistent method calls.

This fixes issues where a few places would not call Load or Unload events
when it should have.

Additionally, reduces diff by moving the neighbor marking code into these
consistent points.

Additional benefits of the change include improving the neighbor marking
methods to use getChunkIfLoaded instead of getLoadedChunkAt in some places,
as the latter will cause chunks to be marked active and not unload.

Finally, this also updates CraftWorld.loadChunk to use the new methods, as the
previous logic did not properly handle the new unload queue.
2016-06-23 10:34:08 +10:00
Ryan Michela
9af379fc47 SPIGOT-1319: Add EntityBreedEvent 2016-06-19 20:14:09 +10:00
Jadon Fowler
63839165bc
Fix infinite loop when saving chunks
Running `/save-all flush` would start an infinite loop that prints:
    ThreadedAnvilChunkStorage (world): All chunks are saved
2016-06-18 04:31:44 -07:00
md_5
02f4218da5 SPIGOT-2414: Repeated disconnects 2016-06-15 13:45:11 +10:00
md_5
71cd505d45 SPIGOT-2405: Better event for combust due to fire 2016-06-15 13:31:35 +10:00
md_5
7f1a32252b SPIGOT-2385: RegionFileCache synchronization issues 2016-06-12 19:28:27 +10:00
md_5
ac58f3840e SPIGOT-2348: EntityTeleportEvent cancellation 2016-06-12 12:51:53 +10:00
md_5
1f507256e7 SPIGOT-2322: Chunks generating with missing / corrupted data. 2016-06-12 12:28:08 +10:00
md_5
f642d4bcc3 SPIGOT-2397: More calls to VehicleEntityCollisionEvent 2016-06-12 10:45:03 +10:00
minoneer
e2ff10bdcd SPIGOT-1124: Changed To-Location on Teleport event ignored 2016-06-12 10:33:08 +10:00
md_5
fa83b1b80c SPIGOT-2388: Damage must be nulled out in some circumstances 2016-06-12 10:13:51 +10:00
md_5
d5ecbd0e93 SPIGOT-2387: Magma does not provide a block for EntityDamageEvent. 2016-06-11 16:11:51 +10:00
md_5
3ae3ea08f2 SPIGOT-1550, SPIGOT-2306: Custom payload / book + event fixes 2016-06-11 12:21:04 +10:00
Tom E
10c10b3124 SPIGOT-2366: Fix a missed diff PortalTravelAgent.patch 2016-06-09 21:25:21 +10:00
md_5
5a55e13868 SPIGOT-2365: Missed hanging diff 2016-06-09 20:42:49 +10:00
md_5
b2f31b74d0 SPIGOT-2364: Fix hanging placing. 2016-06-09 14:27:59 +10:00
md_5
885f4dce9e Restore some Vanilla behaviour to fix magma blocks 2016-06-09 12:50:21 +10:00
md_5
a8a4bedd2a Update to Minecraft 1.10 2016-06-09 11:43:49 +10:00
md_5
5ae53e0d5c SPIGOT-2335: EntityCreeper.setPowered 2016-05-31 20:53:37 +10:00
md_5
71e5248c8b SPIGOT-636: Decouple EntityCombustByEntity from damageEntity 2016-05-28 22:10:59 +10:00
md_5
106ced01e0 Implement PlayerChangedMainHandEvent 2016-05-27 18:53:36 +10:00
md_5
3c19fef26e SPIGOT-2321: Fully check Vanilla command permissions 2016-05-26 21:06:28 +10:00
md_5
042911fef4 SPIGOT-2311: Cancelling PlayerPortalEvent causes invulnerability until relog 2016-05-25 18:25:49 +10:00
md_5
a022dd22fd SPIGOT-2303: Use getChunkIfLoaded 2016-05-22 13:57:44 +10:00
md_5
8982e3f33e SPIGOT-2297: Reintroduce getChunkIfLoaded 2016-05-22 11:36:38 +10:00
md_5
6d133d5440 SPIGOT-2282: Get loaded chunk 2016-05-15 22:14:47 +10:00
md_5
3d0ed18e38 Fix CraftBukkit crash report details not showing 2016-05-15 22:12:06 +10:00
md_5
23da8b0ab7 SPIGOT-2270: Retain Java 6 compat 2016-05-12 12:09:28 +10:00
md_5
901c5327f8 SPIGOT-2271: Custom furnace experience error 2016-05-12 12:07:58 +10:00
md_5
e22506f964 Use direct chunk access for neighbour counts on unload 2016-05-11 16:01:17 +10:00
md_5
7e9122e74d Fix some [but not all] chunk unload issues 2016-05-11 15:34:16 +10:00
md_5
c5e9a169fa Minecraft 1.9.4 2016-05-10 21:47:39 +10:00
md_5
4cb32587ac SPIGOT-2255: Nether Structure generation ConcurrentModificationException 2016-05-07 16:33:01 +10:00
Thinkofname
ed60c01794 SPIGOT-2134: Use the correct listener in CommandExecute 2016-05-01 20:38:40 +01:00
md_5
4377b86b29 SPIGOT-2218: Drop horse chest on death 2016-04-26 09:26:23 +10:00
Thinkofname
22dcde52c9 Ignore movement packets from dead players.
As funny as the idea sounds of having corpses sliding around it
shouldn't really be allowed. Due to other checks added by CB
previously this was mostly harmless anyway.
2016-04-24 17:35:59 +01:00
Jacob Martin
78434e8910 Remove debug message. 2016-04-23 09:49:06 -05:00
Thinkofname
b103841da3 SPIGOT-2171: Fix shield blocking sounds 2016-04-20 13:01:20 +01:00
Thinkofname
199b11bdd0 SPIGOT-2157: Fix enderman not playing their animation when attacking 2016-04-20 11:40:16 +01:00
Thinkofname
a4786c824f SPIGOT-2134: Support /execute being chained 2016-04-20 11:24:48 +01:00
Thinkofname
f060bba1ca SPIGOT-2043: Ensure VehicleMoveEvent is always fired for boats 2016-04-20 11:12:14 +01:00
Thinkofname
b5a4d07141 SPIGOT-2014: Respect the spectatorsGenerateChunks gamerule 2016-04-20 11:00:35 +01:00
Thinkofname
b70058afa2 SPIGOT-2191: Fix a missed diff from 1.8.8 2016-04-17 17:47:51 +01:00
md_5
f6313791d0 staticify backported method 2016-04-12 18:25:18 +10:00
md_5
1e2fcb38e4 Backport changes from 16w15a 2016-04-12 14:06:08 +10:00
md_5
11e8c6d338 SPIGOT-2145: Add missed EntityTeleportEvent diff 2016-04-08 19:06:31 +10:00
md_5
f326992b8b SPIGOT-2128: Flint and steel duplicate place event 2016-04-04 17:18:01 +10:00
Thinkofname
f01861f80b SPIGOT-2115: Fix entities being added to the world multiple times when teleported 2016-04-02 01:12:03 +01:00
Thinkofname
048849ce51 SPIGOT-2102: Don't reduce the movement limit below vanilla's default 2016-04-01 23:21:09 +01:00
Thinkofname
420afc57ef Handle cases where Mojang uses an empty string for permission checks 2016-04-01 22:58:20 +01:00
Aikar
f92e01ba5c MC-100382: Fix Pathfinding Memory Leak
https://bugs.mojang.com/browse/MC-100382

A reference to a ChunkCache is never cleaned up after doing a pathfind operation,
resulting in leaking chunks. The leaked chunks then hold references to other
entities that may also be leaking ChunkCache's, creating a cascading problem.
2016-03-31 19:47:11 -04:00
Thinkofname
6247aa00cc SPIGOT-2101: Check the result of damageEntity before applying knockback from sweep attacks 2016-03-31 12:50:58 +01:00
Thinkofname
45bb40353a SPIGOT-2098: Fix sound effects for 1.9.0 clients 2016-03-31 11:34:47 +01:00
Thinkofname
9dc467e4c8 Fix a diff mistake in MobEffectList 2016-03-31 00:00:11 +01:00
Thinkofname
6e527e5b88 Update to Minecraft 1.9.2 2016-03-30 21:06:51 +01:00
Thinkofname
7fc5cd856e Support Minecraft 1.9.2 2016-03-30 16:58:31 +01:00
md_5
23ce4d1b96 Add 1.9.1 support. 2016-03-30 15:46:47 +01:00
Aikar
44216f12ed SPIGOT-2033: Re-add missed diff for entity.valid 2016-03-29 11:31:36 +11:00
Thinkofname
fc9ee90fc5 Limit the length of byte arrays 2016-03-28 21:19:05 +01:00
md_5
cac90f6236 Arrows use interactable condition 2016-03-27 20:58:45 +11:00
md_5
cd36f6f257 SPIGOT-2060: Method to control whether entities collide 2016-03-27 20:19:41 +11:00
md_5
1ea1adc10f SPIGOT-2056: Fix killedByTeam scoreboard criteria 2016-03-27 11:11:15 +11:00
md_5
6bf25cde7e SPIGOT-2034: Rework damage again, this time for snowballs. 2016-03-26 14:12:35 +11:00
md_5
99f22a5c59 SPIGOT-2050: Add back code to only fire VehicleEnterEvent for loaded chunks. 2016-03-26 09:19:10 +11:00
md_5
8e5eab2655 SPIGOT-1746: Tile entities may not always tick. 2016-03-25 14:04:27 +11:00
md_5
18658965d3 Apply DataConverters to ItemStack instances 2016-03-25 11:03:39 +11:00
Zach Brown
712213dacc Fix player dimension change invulnerability never getting unset when certain dimensions are disabled 2016-03-24 08:48:04 +11:00
2008Choco
9a072ddc1f SPIGOT-1733: Add PlayerPickupArrowEvent 2016-03-23 17:23:33 +11:00
Matthew
5fe510da59 SPIGOT-1934: Expand EnderDragon API - implement dragon phases 2016-03-23 07:30:12 +11:00
md_5
616a9687a1 SPIGOT-1975: Fix falling blocks when height > 1 2016-03-22 18:04:02 +11:00
md_5
d4e50bef9d Improve shield damage 2016-03-22 14:54:21 +11:00
md_5
c91d092bcd SPIGOT-1993: Move hand check to proper location 2016-03-20 16:53:36 +11:00
md_5
622014a3b4 SPIGOT-1984: Fix default interact state when sneaking 2016-03-20 13:48:21 +11:00
md_5
6cac62c64d Fix strange potion diff 2016-03-20 13:42:12 +11:00
md_5
549962feaf SPIGOT-1991: Further damage fixes 2016-03-20 13:40:12 +11:00
t00thpick1
b3f6de0da5 SPIGOT-1904: AreaEffectCloud events and additional API 2016-03-20 11:29:03 +11:00
0x277F
02b26eec0e SPIGOT-1986: Fix flying players spamming EntityToggleGlideEvent 2016-03-20 11:01:52 +11:00
md_5
a8eec15e53 SPIGOT-1981: Another attempt at damage 2016-03-20 10:56:05 +11:00
md_5
8269b99393 SPIGOT-1968: Use correct explosion yield 2016-03-19 12:19:17 +11:00
md_5
ff617f73cd SPIGOT-1956: Don't deplete projectile item when event cancelled 2016-03-19 11:13:15 +11:00
md_5
2bfda1f8f4 SPIGOT-1680 / SPIGOT-1963: Improve damage blocking modifier accuracy 2016-03-18 19:04:23 +11:00
Matthew
f09f7d8754 Implement SpectralArrow#getGlowingTicks and SpectralArrow#setGlowingTicks(int) 2016-03-18 14:30:14 +11:00
Matthew
e80114dff4 Implement EndGateway#isExactTeleport and EndGateway#setExactTeleport(boolean) 2016-03-18 14:30:03 +11:00
Matthew
205982588f Implement EndGateway#getExitLocation and EndGateway#setExitLocation(Location) 2016-03-18 14:30:03 +11:00
Matthew
45adbd9c6f SPIGOT-1931: Call PlayerFishEvent before modifying hooked entities velocity 2016-03-16 07:11:44 +11:00
md_5
00d333414a SPIGOT-1927: Don't allow circular entity riding 2016-03-15 15:09:39 +11:00
0x277F
feb2fd5e43 SPIGOT-1930: Fix spam for EntityToggleGlideEvent 2016-03-15 15:02:11 +11:00
BlackHole
87e677ce49 Add spawn reasons for entities involved in a skeleton trap 2016-03-14 16:54:38 +11:00
md_5
ab8459e181 SPIGOT-1532: Add PlayerSwapHandItemsEvent 2016-03-14 16:53:46 +11:00
Matthew
cbebfa439f SPIGOT-1849: Call EntityBlockFormEvent when an entity forms frosted ice using frost walker 2016-03-13 08:25:27 +11:00
md_5
6026dad124 Fix switch case labelling and drop items check. 2016-03-12 21:07:17 +11:00
0x277F
1386bd3ddf SPIGOT-1571: Add Entity Glide Events. 2016-03-12 21:01:07 +11:00
md_5
d0e326a071 SPIGOT-1900: Stub out expensive and redundant method call 2016-03-12 20:43:04 +11:00
md_5
0619f0eb3b SPIGOT-1725: Fix dynamic scoreboard criteria on non-main scoreboards 2016-03-12 17:57:40 +11:00
t00thpick1
4a8818c5fd SPIGOT-1638 / SPIGOT-1673: Rework Potions API 2016-03-12 12:38:22 +11:00
md_5
75286088fe SPIGOT-1893: Wrong RegainReason for eating. 2016-03-12 11:12:38 +11:00
md_5
7d73fbba6e SPIGOT-1875: Broken leashes not dropping 2016-03-11 19:24:57 +11:00
md_5
7d330bc9f3 SPIGOT-1813: EntityCombustByEntityEvent not Cancelled 2016-03-11 07:01:38 +11:00
Thinkofdeath
c126d6101e Backport a bug fix from the pre-release
A mistake in the buffer size calculation caused the buffer for chunk
packets to be around 16 times the size they should have been.
2016-03-10 19:47:48 +00:00
md_5
dd016e7135 SPIGOT-1847: Maps in non default worlds 2016-03-10 16:42:07 +11:00