Update to Minecraft 1.21.2

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2024-10-23 02:15:00 +11:00
parent 2c4beb962b
commit d3a23f42c3
522 changed files with 8501 additions and 6477 deletions

View File

@@ -24,11 +24,15 @@
private static void replaceMissingSections(IRegistry<BiomeBase> iregistry, ChunkSection[] achunksection) {
for (int i = 0; i < achunksection.length; ++i) {
@@ -270,10 +279,11 @@
public void setUnsaved(boolean flag) {
this.unsaved = flag;
+ if (!flag) this.persistentDataContainer.dirty(false); // CraftBukkit - SPIGOT-6814: chunk was saved, pdc is no longer dirty
@@ -275,6 +284,7 @@
public boolean tryMarkSaved() {
if (this.unsaved) {
this.unsaved = false;
+ this.persistentDataContainer.dirty(false); // CraftBukkit - SPIGOT-6814: chunk was saved, pdc is no longer dirty
return true;
} else {
return false;
@@ -282,7 +292,7 @@
}
public boolean isUnsaved() {
@@ -37,14 +41,14 @@
}
public abstract ChunkStatus getPersistedStatus();
@@ -449,6 +459,27 @@
@@ -458,6 +468,27 @@
}
}
+ // CraftBukkit start
+ public void setBiome(int i, int j, int k, Holder<BiomeBase> biome) {
+ try {
+ int l = QuartPos.fromBlock(this.getMinBuildHeight());
+ int l = QuartPos.fromBlock(this.getMinY());
+ int i1 = l + QuartPos.fromBlock(this.getHeight()) - 1;
+ int j1 = MathHelper.clamp(j, l, i1);
+ int k1 = this.getSectionIndex(QuartPos.toBlock(j1));