Update to Minecraft 1.19.4

By: md_5 <git@md-5.net>
This commit is contained in:
CraftBukkit/Spigot
2023-03-15 03:30:00 +11:00
parent 90a887a912
commit 40076782ed
227 changed files with 2788 additions and 1621 deletions

View File

@@ -1,6 +1,6 @@
--- a/net/minecraft/world/level/storage/Convertable.java
+++ b/net/minecraft/world/level/storage/Convertable.java
@@ -69,6 +69,10 @@
@@ -68,6 +68,10 @@
import net.minecraft.world.level.levelgen.WorldDimensions;
import org.slf4j.Logger;
@@ -11,7 +11,7 @@
public class Convertable {
static final Logger LOGGER = LogUtils.getLogger();
@@ -115,7 +119,7 @@
@@ -114,7 +118,7 @@
}
private static WorldDataConfiguration readDataConfig(Dynamic<?> dynamic) {
@@ -20,7 +20,7 @@
Logger logger = Convertable.LOGGER;
Objects.requireNonNull(logger);
@@ -253,6 +257,7 @@
@@ -252,6 +256,7 @@
WorldDimensions.b worlddimensions_b = generatorsettings.dimensions().bake(iregistry);
Lifecycle lifecycle1 = worlddimensions_b.lifecycle().add(lifecycle);
WorldDataServer worlddataserver = WorldDataServer.parse(dynamic, datafixer, i, nbttagcompound2, worldsettings, levelversion, worlddimensions_b.specialWorldProperty(), generatorsettings.options(), lifecycle1);
@@ -28,7 +28,7 @@
return Pair.of(worlddataserver, worlddimensions_b);
};
@@ -334,9 +339,23 @@
@@ -333,9 +338,23 @@
return this.backupDir;
}
@@ -54,7 +54,7 @@
public static record a(List<Convertable.b> levels) implements Iterable<Convertable.b> {
@@ -389,8 +408,12 @@
@@ -388,8 +407,12 @@
public final Convertable.b levelDirectory;
private final String levelId;
private final Map<SavedFile, Path> resources = Maps.newHashMap();
@@ -68,7 +68,7 @@
this.levelId = s;
this.levelDirectory = new Convertable.b(Convertable.this.baseDir.resolve(s));
this.lock = SessionLock.create(this.levelDirectory.path());
@@ -401,7 +424,7 @@
@@ -400,7 +423,7 @@
}
public Path getLevelPath(SavedFile savedfile) {
@@ -77,7 +77,7 @@
Convertable.b convertable_b = this.levelDirectory;
Objects.requireNonNull(this.levelDirectory);
@@ -409,7 +432,7 @@
@@ -408,7 +431,7 @@
}
public Path getDimensionPath(ResourceKey<World> resourcekey) {

View File

@@ -42,8 +42,8 @@
private WorldDataServer(@Nullable DataFixer datafixer, int i, @Nullable NBTTagCompound nbttagcompound, boolean flag, int j, int k, int l, float f, long i1, long j1, int k1, int l1, int i2, boolean flag1, int j2, boolean flag2, boolean flag3, boolean flag4, WorldBorder.c worldborder_c, int k2, int l2, @Nullable UUID uuid, Set<String> set, CustomFunctionCallbackTimerQueue<MinecraftServer> customfunctioncallbacktimerqueue, @Nullable NBTTagCompound nbttagcompound1, NBTTagCompound nbttagcompound2, WorldSettings worldsettings, WorldOptions worldoptions, WorldDataServer.a worlddataserver_a, Lifecycle lifecycle) {
this.fixerUpper = datafixer;
@@ -127,7 +154,8 @@
return (NBTBase) dynamic.get("DimensionData").get("1").get("DragonFight").orElseEmptyMap().getValue();
});
return dynamic.get("DimensionData").get("1").get("DragonFight").orElseEmptyMap();
})).convert(DynamicOpsNBT.INSTANCE).getValue();
- return new WorldDataServer(datafixer, i, nbttagcompound, dynamic.get("WasModded").asBoolean(false), dynamic.get("SpawnX").asInt(0), dynamic.get("SpawnY").asInt(0), dynamic.get("SpawnZ").asInt(0), dynamic.get("SpawnAngle").asFloat(0.0F), j, dynamic.get("DayTime").asLong(j), levelversion.levelDataVersion(), dynamic.get("clearWeatherTime").asInt(0), dynamic.get("rainTime").asInt(0), dynamic.get("raining").asBoolean(false), dynamic.get("thunderTime").asInt(0), dynamic.get("thundering").asBoolean(false), dynamic.get("initialized").asBoolean(true), dynamic.get("DifficultyLocked").asBoolean(false), WorldBorder.c.read(dynamic, WorldBorder.DEFAULT_SETTINGS), dynamic.get("WanderingTraderSpawnDelay").asInt(0), dynamic.get("WanderingTraderSpawnChance").asInt(0), (UUID) dynamic.get("WanderingTraderId").read(UUIDUtil.CODEC).result().orElse((Object) null), (Set) dynamic.get("ServerBrands").asStream().flatMap((dynamic1) -> {
+ // CraftBukkit - decompile error
@@ -62,7 +62,7 @@
stream.forEach(nbttaglist::add);
@@ -162,7 +190,7 @@
nbttagcompound.put("Version", nbttagcompound2);
nbttagcompound.putInt("DataVersion", SharedConstants.getCurrentVersion().getWorldVersion());
GameProfileSerializer.addCurrentDataVersion(nbttagcompound);
DynamicOps<NBTBase> dynamicops = RegistryOps.create(DynamicOpsNBT.INSTANCE, (HolderLookup.b) iregistrycustom);
- DataResult dataresult = GeneratorSettings.encode(dynamicops, this.worldOptions, iregistrycustom);
+ DataResult<NBTBase> dataresult = GeneratorSettings.encode(dynamicops, this.worldOptions, new WorldDimensions(this.customDimensions != null ? this.customDimensions : iregistrycustom.registryOrThrow(Registries.LEVEL_STEM))); // CraftBukkit

View File

@@ -28,9 +28,9 @@
+ }
+ }
+ // CraftBukkit end
int i = nbttagcompound.contains("DataVersion", 3) ? nbttagcompound.getInt("DataVersion") : -1;
int i = GameProfileSerializer.getDataVersion(nbttagcompound, -1);
entityhuman.load(GameProfileSerializer.update(this.fixerUpper, DataFixTypes.PLAYER, nbttagcompound, i));
entityhuman.load(DataFixTypes.PLAYER.updateToCurrentVersion(this.fixerUpper, nbttagcompound, i));
@@ -63,6 +80,22 @@
return nbttagcompound;
}