Commit graph

40 commits

Author SHA1 Message Date
CraftBukkit/Spigot
d719a30af5 Rename Chunk "BukkitValues" key to "ChunkBukkitValues"
This will discard extra data increasing the size of the chunk from users affected by the bug in the previous commits.
The impact of this (affecting all users) is likely to be much higher than users with plugins relying on an API introduced within the last 12 hours.

By: md_5 <git@md-5.net>
2020-10-18 07:24:10 +11:00
CraftBukkit/Spigot
0632e375cf SPIGOT-6194: Read correct nbt compound into chunk pdc
Previously spigots chunk pdc loading logic would read the entire chunk
nbt compound into the persistent data container of the chunk instead of
just reading the "BukkitValues".

Furthermore this commit also now correctly checks if the nbt compounds
of entities, tile entities and chunks actually have a value for the
"BukkitValues" key, as the previous 'getCompound' call would always
return an instance, the null check was useless. This commit now uses
'get', which returns null if no key exists and then runs an instanceof
check to both validate a non-null instance and an NBTTagCompound
instance.

By: Bjarne Koll <lynxplay101@gmail.com>
2020-10-18 07:01:15 +11:00
CraftBukkit/Spigot
071360817a #672: Add PersistentDataHolder to Chunk
By: Nesaak <52047222+Nesaak@users.noreply.github.com>
2020-10-17 17:37:49 +11:00
CraftBukkit/Spigot
a0f2b74c8d Update to Minecraft 1.14-pre5
By: md_5 <git@md-5.net>
2019-04-23 12:00:00 +10:00
CraftBukkit/Spigot
3e70f09bdf SPIGOT-4563: Fix regenerating chunks saved to disk already
By: md_5 <git@md-5.net>
2019-01-03 15:44:06 +11:00
CraftBukkit/Spigot
d7e312278d Mappings Update
By: md_5 <git@md-5.net>
2018-12-26 08:00:00 +11:00
CraftBukkit/Spigot
83baf22bde Mappings Update
By: md_5 <git@md-5.net>
2018-12-13 11:00:00 +11:00
CraftBukkit/Spigot
102dee7d4f Mappings Update
By: md_5 <git@md-5.net>
2018-12-06 10:00:00 +11:00
CraftBukkit/Spigot
686bbbbc2b SPIGOT-4397: isChunkGenerated API
By: md_5 <git@md-5.net>
2018-09-26 17:19:16 +10:00
CraftBukkit/Spigot
5d0094a169 Hoist out synchronisation from ChunkRegionLoader
By: md_5 <git@md-5.net>
2018-09-10 19:13:03 +10:00
CraftBukkit/Spigot
a5d76bcbad Fix bad thread safety in ChunkRegionLoader
By: md_5 <git@md-5.net>
2018-09-09 09:39:23 +10:00
CraftBukkit/Spigot
f578d94680 Update to Minecraft 1.13.1
By: md_5 <git@md-5.net>
2018-08-26 12:00:00 +10:00
CraftBukkit/Spigot
1e014acb80 Update to Minecraft 1.13
By: md_5 <git@md-5.net>
2018-07-22 12:00:00 +10:00
CraftBukkit/Spigot
9f6ea503ec Fix issues converting certain chunks
By: md_5 <git@md-5.net>
2018-07-19 14:19:12 +10:00
CraftBukkit/Spigot
7e0a66fdd5 Update to Minecraft 1.13-pre7
By: md_5 <git@md-5.net>
2018-07-15 10:00:00 +10:00
CraftBukkit/Spigot
0d13d3970d Fix a few chunk saving race conditions
* ChunkRegionLoader.c() picks an entry in the save queue, removes that entry from the save queue and then actually writes the entry to the region file. So, between the last two steps, the entry is neither in the save queue nor is it in the region file; if somebody loads the chunk again (with ChunkRegionLoader.loadChunk()) in that gap, they'll get old data. I've delayed the removal until the saving is done.
* ChunkRegionLoader.c() also records the coords of the chunks it's currently saving in this.c. ChunkRegionLoader.a(ChunkCoordIntPair, NBTTagCompound), which adds an entry to the save queue, stops the addition of an entry if its coords are in this.c. Now, I'm guessing that Mojang's intended purpose for this mechanism was to prevent multiple parallel writes for the same chunk. The "stops the addition" bit above should then be something like "block until it's no longer in c"; in fact, the vanilla implementation is "discard the new state of the chunk". I've taken the easy route to solving this, by just making ChunkRegionLoader.c() synchronized (since, in normal use, only the chunk saving thread is in here).

By: Geoff Crossland <gcrossland+bukkit@gmail.com>
2017-08-11 17:27:33 +10:00
CraftBukkit/Spigot
ea595a5dcf Update to Minecraft 1.12
By: md_5 <git@md-5.net>
2017-06-08 18:00:00 +10:00
CraftBukkit/Spigot
40c8954e17 Update to Minecraft 1.12-pre2
By: md_5 <git@md-5.net>
2017-05-14 12:00:00 +10:00
CraftBukkit/Spigot
0f12ccbdba Drop RegionFile.chunkExists() in favour of Mojang's own version
By: Geoff Crossland <gcrossland+bukkit@gmail.com>
2017-01-31 23:52:21 +00:00
CraftBukkit/Spigot
4e412ab4e3 Update to Minecraft 1.11
By: md_5 <git@md-5.net>
2016-11-17 12:41:03 +11:00
CraftBukkit/Spigot
859ccb933b SPIGOT-2634: Concurrency issue in FileIOThread
By: md_5 <git@md-5.net>
2016-08-27 15:51:54 +10:00
CraftBukkit/Spigot
0628968019 Fix infinite loop when saving chunks
Running `/save-all flush` would start an infinite loop that prints:
    ThreadedAnvilChunkStorage (world): All chunks are saved

By: Jadon Fowler <ph4seaber@gmail.com>
2016-06-18 04:25:50 -07:00
CraftBukkit/Spigot
c93d857872 SPIGOT-2385: RegionFileCache synchronization issues
By: md_5 <git@md-5.net>
2016-06-12 19:28:27 +10:00
CraftBukkit/Spigot
a39b7e5f3a Update to Minecraft 1.10
By: md_5 <git@md-5.net>
2016-06-09 11:43:49 +10:00
CraftBukkit/Spigot
d506c12c07 Minecraft 1.9.4
By: md_5 <git@md-5.net>
2016-05-10 21:47:39 +10:00
CraftBukkit/Spigot
21d4bf5d1f Update to Minecraft 1.9
By: md_5 <git@md-5.net>
2016-03-01 08:32:46 +11:00
CraftBukkit/Spigot
332e77d249 Update to Minecraft 1.8.8 (Pre-)Release.
By: md_5 <git@md-5.net>
2015-07-27 22:19:19 +10:00
CraftBukkit/Spigot
6c1c28bd14 Cut fluff from patch headers.
By: md_5 <git@md-5.net>
2015-05-25 20:37:24 +10:00
CraftBukkit/Spigot
38b1bb1aef Update to 1.8.4
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2015-05-05 21:43:47 +01:00
CraftBukkit/Spigot
c52ea50ad9 SPIGOT-729: Revert the entity slice move
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2015-03-22 19:01:30 +00:00
CraftBukkit/Spigot
4af7c7ec4b Move the entity slice loading
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2015-03-16 19:44:51 +00:00
CraftBukkit/Spigot
85be409b13 Update to Minecraft 1.8.3
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2015-02-26 22:41:06 +00:00
CraftBukkit/Spigot
85573908bc Optimize the invalid block fixing
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-11-29 23:25:17 +00:00
CraftBukkit/Spigot
63af42bb1e Improve the invalid block handling
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-11-29 20:00:52 +00:00
CraftBukkit/Spigot
739bc35bde Fix a vanilla issue which causes invalid data values on blocks to turn to air
Worlds already loaded in 1.8 can still be saved by this but tile entities will
be lost

By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-11-29 17:31:40 +00:00
CraftBukkit/Spigot
6956c3298f Revert "Remove patch headers"
This reverts commit a8ddf37419.

By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-11-28 23:02:15 +00:00
CraftBukkit/Spigot
a8ddf37419 Remove patch headers
By: GunfighterJ <joseph.jenniges@gmail.com>
2014-11-28 16:54:14 -06:00
CraftBukkit/Spigot
ba8312ff89 Use the right name for the AsyncPlayerPreLoginEvent
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-11-28 17:43:48 +00:00
CraftBukkit/Spigot
2443e912f8 Fix eating food whilst not facing a block
By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-11-28 11:23:19 +00:00
CraftBukkit/Spigot
a419776f3c Update to Minecraft 1.8
For more information please see http://www.spigotmc.org/

By: Thinkofdeath <thinkofdeath@spigotmc.org>
2014-11-26 08:32:16 +11:00