Support for TU24 has been extended.

Since the TU25 update still requires a lot of work and the TU24 version does not yet include all the features, I have decided to continue working with the TU24 version for now.

Merge latest changes from Minecraft Consoles:
* Added support for Big-Endian DLCs.
* Fix redstone tick persistence on chunk unload.
* Fix pistons permanently breaking server-wide on dedicated servers.
* Fix Ender Dragon damage and End Poem crash.
* Disable font mipmapping to get rid of artifacts on signs.

Other:
* Music Fixes.
* Added missing sounds (Caves, Horse Eat, Sheep Shear, Water Swim, Thorns)
* Remove duplicated sounds.
* Added High Quality ver of "The End Dragon Alive" music.
* Fix Mobs sounds volume.
* Added Old Swing Animation Option.
* Added Graphics Mode (Potato, Fast, Fancy and Extra)
* Fix a small memory leak with signs.
* Fixed Pig Zombies attacking creative players.
This commit is contained in:
GabsPuNs
2026-03-28 06:27:19 -04:00
parent 9e99b47c9a
commit f79ca9e411
301 changed files with 407 additions and 362 deletions

View File

@@ -139,26 +139,19 @@ bool MultiPlayerChunkCache::reallyHasChunk(int x, int z)
return hasData[idx];
}
void MultiPlayerChunkCache::drop(const int x, const int z)
void MultiPlayerChunkCache::drop(int x, int z)
{
const int ix = x + XZOFFSET;
const int iz = z + XZOFFSET;
if ((ix < 0) || (ix >= XZSIZE)) return;
if ((iz < 0) || (iz >= XZSIZE)) return;
const int idx = ix * XZSIZE + iz;
LevelChunk* chunk = cache[idx];
if (chunk != nullptr && !chunk->isEmpty())
// 4J Stu - We do want to drop any entities in the chunks, especially for the case when a player is dead as they will
// not get the RemoveEntity packet if an entity is removed.
LevelChunk *chunk = getChunk(x, z);
if (!chunk->isEmpty())
{
// Unload chunk but keep tile entities
// Added parameter here specifies that we don't want to delete tile entities, as they won't get recreated unless they've got update packets
// The tile entities are in general only created on the client by virtue of the chunk rebuild
chunk->unload(false);
const auto it = std::find(loadedChunkList.begin(), loadedChunkList.end(), chunk);
if (it != loadedChunkList.end()) loadedChunkList.erase(it);
cache[idx] = nullptr;
hasData[idx] = false;
chunk->loaded = false;
// 4J - We just want to clear out the entities in the chunk, but everything else should be valid
chunk->loaded = true;
}
}