mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-22 02:25:28 +01:00
fix compile issues
This commit is contained in:
parent
2e76d3f1e2
commit
e4efb590e4
@ -5,7 +5,7 @@ Subject: [PATCH] Deprecate and replace methods with old StructureType
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index 52c601328bbf5c1642aa620c8bb466a9d2d231be..c8fa12acaf52cd3923a7a8702ccc50cfdc9170a2 100644
|
||||
index 50efe16bb80c618c3dfae03b70c8c165183af8ec..85ad1f7f0de9a6f9048981c3ee509b42ddbeef1a 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -949,9 +949,6 @@ public final class Bukkit {
|
||||
@ -84,7 +84,7 @@ index 52c601328bbf5c1642aa620c8bb466a9d2d231be..c8fa12acaf52cd3923a7a8702ccc50cf
|
||||
/**
|
||||
* Reloads the server, refreshing settings and plugin information.
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 8ba2fbaab7428a42b506fd000fbc162f68ddaed1..50ffca9bccfb582d58ccb13f0decf66e5d91aef3 100644
|
||||
index 1b8d6a3333a4fa9155b79644e683e2343c134e12..640ef81d204f480f4af83d420c7e968ce569a38d 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -817,16 +817,15 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
@ -70,10 +70,10 @@ index a77c0411a68a9bad33ddfb335b7a996a843e478c..739d9d3ec789e58c10c8d818a9ca59ce
|
||||
/**
|
||||
* Banned player names
|
||||
diff --git a/src/main/java/org/bukkit/Bukkit.java b/src/main/java/org/bukkit/Bukkit.java
|
||||
index c8fa12acaf52cd3923a7a8702ccc50cfdc9170a2..e20e4239a5a1f952e1c70e899549989d5e42f73c 100644
|
||||
index 85ad1f7f0de9a6f9048981c3ee509b42ddbeef1a..2d466b308b2f8bd31c50f5d05416eadf20c9cb71 100644
|
||||
--- a/src/main/java/org/bukkit/Bukkit.java
|
||||
+++ b/src/main/java/org/bukkit/Bukkit.java
|
||||
@@ -1663,11 +1663,27 @@ public final class Bukkit {
|
||||
@@ -1611,11 +1611,27 @@ public final class Bukkit {
|
||||
* @param <T> The ban target
|
||||
*
|
||||
* @return a ban list of the specified type
|
||||
@ -102,10 +102,10 @@ index c8fa12acaf52cd3923a7a8702ccc50cfdc9170a2..e20e4239a5a1f952e1c70e899549989d
|
||||
/**
|
||||
* Gets a set containing all player operators.
|
||||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java
|
||||
index 50ffca9bccfb582d58ccb13f0decf66e5d91aef3..6246251caf2c6f025c824b8e7a944b8d48751fa1 100644
|
||||
index 640ef81d204f480f4af83d420c7e968ce569a38d..20750c09d819d62f32491db8672936b929e1098e 100644
|
||||
--- a/src/main/java/org/bukkit/Server.java
|
||||
+++ b/src/main/java/org/bukkit/Server.java
|
||||
@@ -1425,10 +1425,25 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
@@ -1374,10 +1374,25 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi
|
||||
* @param <T> The ban target
|
||||
*
|
||||
* @return a ban list of the specified type
|
@ -7,7 +7,7 @@ Subject: [PATCH] Fix removing recipes from RecipeIterator
|
||||
public net.minecraft.world.item.crafting.RecipeManager byName
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java
|
||||
index 4e0f7564f04d5d566660a2623fb1b325e3b4e67c..39d2d67bf478beb4c72e41e6f59337893cf47e69 100644
|
||||
index 4e0f7564f04d5d566660a2623fb1b325e3b4e67c..ca0c82fdd7bd1c2055e84253d90b17857c51b771 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java
|
||||
@@ -9,6 +9,7 @@ import org.bukkit.inventory.Recipe;
|
||||
@ -18,7 +18,7 @@ index 4e0f7564f04d5d566660a2623fb1b325e3b4e67c..39d2d67bf478beb4c72e41e6f5933789
|
||||
|
||||
public RecipeIterator() {
|
||||
this.recipes = MinecraftServer.getServer().getRecipeManager().recipes.byType.entries().iterator();
|
||||
@@ -21,11 +22,19 @@ public class RecipeIterator implements Iterator<Recipe> {
|
||||
@@ -21,11 +22,17 @@ public class RecipeIterator implements Iterator<Recipe> {
|
||||
|
||||
@Override
|
||||
public Recipe next() {
|
||||
@ -32,9 +32,7 @@ index 4e0f7564f04d5d566660a2623fb1b325e3b4e67c..39d2d67bf478beb4c72e41e6f5933789
|
||||
@Override
|
||||
public void remove() {
|
||||
+ // Paper start - fix removing recipes from RecipeIterator
|
||||
+ if (this.currentRecipe instanceof org.bukkit.Keyed keyed) {
|
||||
+ MinecraftServer.getServer().getRecipeManager().byName.remove(org.bukkit.craftbukkit.util.CraftNamespacedKey.toMinecraft(keyed.getKey()));
|
||||
+ }
|
||||
+ if (true) throw new UnsupportedOperationException();
|
||||
+ // Paper end - fix removing recipes from RecipeIterator
|
||||
this.recipes.remove();
|
||||
}
|
||||
|
@ -4,26 +4,11 @@ Date: Mon, 8 Apr 2024 16:43:16 +0200
|
||||
Subject: [PATCH] API for checking sent chunks
|
||||
|
||||
|
||||
diff --git a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
|
||||
index 852d75a73dae7448cbe1e2f5e164b235efa8a969..a608f57ebca98eda88ad749d0aad021678be54f9 100644
|
||||
--- a/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
|
||||
+++ b/src/main/java/ca/spottedleaf/moonrise/patches/chunk_system/player/RegionizedPlayerChunkLoader.java
|
||||
@@ -1078,5 +1078,10 @@ public final class RegionizedPlayerChunkLoader {
|
||||
|
||||
// now all tickets should be removed, which is all of our external state
|
||||
}
|
||||
+
|
||||
+ // For external checks
|
||||
+ public it.unimi.dsi.fastutil.longs.LongOpenHashSet getSentChunksRaw() {
|
||||
+ return this.sentChunks;
|
||||
+ }
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index e02fa642f11809607e30e22b51c65373edd70842..ad740739437be632fc7fedec488a7d0c49534688 100644
|
||||
index ed29e06422aa5e73adfaf9578cda3dfc5777f64c..550e175c7fec97818644933a4e4f7805e54d7d5f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -3483,6 +3483,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
@@ -3518,6 +3518,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
}
|
||||
// Paper end
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Fix CraftWorld#isChunkGenerated
|
||||
The upstream implementation is returning true for non-full chunks.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 8221597951c5e768fa8af23adc1a57871c76f3a6..90d4834f97d3ba996d46493246b1947511553424 100644
|
||||
index 2058671a77cac4cfa6494461a5142abae14402b6..d41c81158c00931e6b11093cce141f6a3085ba05 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -372,11 +372,28 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@@ -417,11 +417,28 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
||||
@Override
|
||||
public boolean isChunkGenerated(int x, int z) {
|
||||
@ -29,7 +29,7 @@ index 8221597951c5e768fa8af23adc1a57871c76f3a6..90d4834f97d3ba996d46493246b19475
|
||||
}
|
||||
+ final java.util.concurrent.CompletableFuture<ChunkAccess> future = new java.util.concurrent.CompletableFuture<>();
|
||||
+ ca.spottedleaf.moonrise.common.util.ChunkSystem.scheduleChunkLoad(
|
||||
+ this.world, x, z, false, ChunkStatus.EMPTY, true, ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor.Priority.NORMAL, future::complete
|
||||
+ this.world, x, z, false, ChunkStatus.EMPTY, true, ca.spottedleaf.concurrentutil.util.Priority.NORMAL, future::complete
|
||||
+ );
|
||||
+ world.getChunkSource().mainThreadProcessor.managedBlock(future::isDone);
|
||||
+ return future.thenApply(c -> {
|
Loading…
Reference in New Issue
Block a user