diff options
author | Lulu13022002 <[email protected]> | 2024-12-18 21:54:15 +0100 |
---|---|---|
committer | Lulu13022002 <[email protected]> | 2024-12-18 21:54:15 +0100 |
commit | c71ada60db618f56d7614243a16d1ba5f8f97040 (patch) | |
tree | 13c934919b2addff534d05b4c93dd06c57ef4d2b | |
parent | dce53e05b876e23aac4a2635dfeaf856fac9af15 (diff) | |
download | Paper-c71ada60db618f56d7614243a16d1ba5f8f97040.tar.gz Paper-c71ada60db618f56d7614243a16d1ba5f8f97040.zip |
get offline player data file from the right folder
5 files changed, 4 insertions, 14 deletions
diff --git a/paper-server/patches/sources/net/minecraft/world/level/pathfinder/Path.java.patch b/paper-server/patches/sources/net/minecraft/world/level/pathfinder/Path.java.patch deleted file mode 100644 index 7238ea6726..0000000000 --- a/paper-server/patches/sources/net/minecraft/world/level/pathfinder/Path.java.patch +++ /dev/null @@ -1,10 +0,0 @@ ---- a/net/minecraft/world/level/pathfinder/Path.java -+++ b/net/minecraft/world/level/pathfinder/Path.java -@@ -18,6 +_,7 @@ - private final BlockPos target; - private final float distToTarget; - private final boolean reached; -+ public boolean hasNext() { return getNextNodeIndex() < this.nodes.size(); } // Paper - Mob Pathfinding API - - public Path(List<Node> nodes, BlockPos target, boolean reached) { - this.nodes = nodes; diff --git a/paper-server/patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java.patch b/paper-server/patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java.patch index a5eebb497d..b83293fbd0 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java.patch @@ -13,7 +13,7 @@ + + i = event.getNewCurrent(); + } -+ if (blockState.is((net.minecraft.world.level.block.Block) this.wireBlock) && oldPower != i) { ++ if (blockState.is(this.wireBlock) && oldPower != i) { + // CraftBukkit end int i1 = 2; if (!updateShape || !flag) { diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/LevelStorageSource.java.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/LevelStorageSource.java.patch index 599d60a432..1c0cac272a 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/storage/LevelStorageSource.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/storage/LevelStorageSource.java.patch @@ -72,7 +72,7 @@ public Path getDimensionPath(ResourceKey<Level> dimensionPath) { - return DimensionType.getStorageFolder(dimensionPath, this.levelDirectory.path()); -+ return getStorageFolder(this.levelDirectory.path(), this.dimensionType); // CraftBukkit ++ return LevelStorageSource.getStorageFolder(this.levelDirectory.path(), this.dimensionType); // CraftBukkit } private void checkLock() { diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/PlayerDataStorage.java.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/PlayerDataStorage.java.patch index 23c6073c85..e452ec4ba4 100644 --- a/paper-server/patches/sources/net/minecraft/world/level/storage/PlayerDataStorage.java.patch +++ b/paper-server/patches/sources/net/minecraft/world/level/storage/PlayerDataStorage.java.patch @@ -52,7 +52,7 @@ + // Spigot start + boolean usingWrongFile = false; + if (org.bukkit.Bukkit.getOnlineMode() && !file.exists()) { // Paper - Check online mode first -+ file = new File(file, java.util.UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(java.nio.charset.StandardCharsets.UTF_8)).toString() + suffix); ++ file = new File(this.playerDir, java.util.UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(java.nio.charset.StandardCharsets.UTF_8)).toString() + suffix); + if (file.exists()) { + usingWrongFile = true; + LOGGER.warn("Using offline mode UUID file for player {} as it is the only copy we can find.", name); diff --git a/paper-server/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java b/paper-server/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java index 946cbc9556..3e43beaaa2 100644 --- a/paper-server/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java +++ b/paper-server/src/main/java/com/destroystokyo/paper/entity/PaperPathfinder.java @@ -135,7 +135,7 @@ public class PaperPathfinder implements com.destroystokyo.paper.entity.Pathfinde @Nullable @Override public Location getNextPoint() { - if (!path.hasNext()) { + if (path.isDone()) { return null; } return toLoc(path.nodes.get(path.getNextNodeIndex())); |