Skip to content

Commit

Permalink
rebuild old indexes, first work
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahvdAa committed Sep 21, 2023
1 parent 6267e26 commit b6e46e9
Show file tree
Hide file tree
Showing 128 changed files with 194 additions and 207 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,18 +61,18 @@ index 3ba785845a63e46a44fc48264d08c96bfc34ab8b..92bd58010e8c89e361e28aec59447349
entityliving1 = entityliving2;
} else {
diff --git a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
index b402543da876e6d14b263443b2d692f33eb08863..4d2d23ff118e9307d50ca2a5194b83450c91a752 100644
index 7918deb55e6ed2e16eba501ab380a456270d9512..a81475d0cd3c5b75b4abe0d1a01389372a4d9ab1 100644
--- a/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
+++ b/src/main/java/net/minecraft/world/item/crafting/RecipeManager.java
@@ -192,7 +192,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
Builder<ResourceLocation, Recipe<?>> builder = ImmutableMap.builder();
@@ -197,7 +197,7 @@ public class RecipeManager extends SimpleJsonResourceReloadListener {
Builder<ResourceLocation, RecipeHolder<?>> builder = ImmutableMap.builder();

recipes.forEach((irecipe) -> {
- Map<ResourceLocation, Recipe<?>> map1 = (Map) map.computeIfAbsent(irecipe.getType(), (recipes) -> {
+ Map<ResourceLocation, Recipe<?>> map1 = (Map) map.computeIfAbsent(irecipe.getType(), (recipes_) -> { // Paper - remap fix
recipes.forEach((recipeholder) -> {
- Map<ResourceLocation, RecipeHolder<?>> map1 = (Map) map.computeIfAbsent(recipeholder.value().getType(), (recipes) -> {
+ Map<ResourceLocation, RecipeHolder<?>> map1 = (Map) map.computeIfAbsent(recipeholder.value().getType(), (recipes_) -> { // Paper - remap fix
return new Object2ObjectLinkedOpenHashMap<>(); // CraftBukkit
});
ResourceLocation minecraftkey = irecipe.getId();
ResourceLocation minecraftkey = recipeholder.id();
diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java
index ad52c3fc6210939a39ef77a382c640a24ee44838..6b7dd01778f0a5d3a96d2d04af4b525d17efbfba 100644
--- a/src/test/java/org/bukkit/DyeColorsTest.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ public net.minecraft.server.packs.VanillaPackResourcesBuilder safeGetPath(Ljava/
Co-authored-by: Jake Potrebic <[email protected]>

diff --git a/build.gradle.kts b/build.gradle.kts
index 3ec94658ddd0c2f7b3716742c247656d9c7c8866..b1c84b847f8845407eafc89d8b027b34cc6a95b8 100644
index 91a5d6e9775010336da28ed6e2f6654b0f7248f6..32d475a636d4ba90eeaecfac148143f940cba6e2 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -9,10 +9,9 @@ plugins {
Expand All @@ -23,8 +23,8 @@ index 3ec94658ddd0c2f7b3716742c247656d9c7c8866..b1c84b847f8845407eafc89d8b027b34
implementation("org.ow2.asm:asm:9.5")
+ implementation("org.ow2.asm:asm-commons:9.5") // Paper - ASM event executor generation
implementation("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
runtimeOnly("org.xerial:sqlite-jdbc:3.43.0.0")
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
@@ -23,6 +22,8 @@ dependencies {

testImplementation("junit:junit:4.13.2")
Expand All @@ -33,7 +33,7 @@ index 3ec94658ddd0c2f7b3716742c247656d9c7c8866..b1c84b847f8845407eafc89d8b027b34
+ implementation("io.netty:netty-all:4.1.87.Final"); // Paper - Bump netty
}

val craftbukkitPackageVersion = "1_20_R1" // Paper
val craftbukkitPackageVersion = "1_20_R2" // Paper
@@ -34,6 +35,7 @@ tasks.jar {
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
Expand Down Expand Up @@ -99,7 +99,7 @@ index 3ec94658ddd0c2f7b3716742c247656d9c7c8866..b1c84b847f8845407eafc89d8b027b34
+ jvmArgs("-DPaper.isRunDev=true")
}
diff --git a/src/main/java/net/minecraft/resources/ResourceLocation.java b/src/main/java/net/minecraft/resources/ResourceLocation.java
index 6eb213981aeb7e75e1ed75f1483bc98187726f6f..de37a6e2edf36107a04b3707b9c5bbd608fcab20 100644
index 68e3d54c79924d72b22eb3bc142ff47aa1700895..d3300e43523429fdd0e61c5aa9aed2e6bc78e07e 100644
--- a/src/main/java/net/minecraft/resources/ResourceLocation.java
+++ b/src/main/java/net/minecraft/resources/ResourceLocation.java
@@ -26,6 +26,7 @@ public class ResourceLocation implements Comparable<ResourceLocation> {
Expand All @@ -111,10 +111,10 @@ index 6eb213981aeb7e75e1ed75f1483bc98187726f6f..de37a6e2edf36107a04b3707b9c5bbd6
private final String path;

diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index e7240acad17dc9c0d93f2792cc0d90c1855ac436..ba96530f00faa1d113a14242eb8192349c7c944f 100644
index 84dab998d5b91b9c5690e9e086b17a60b6dec058..2ac60ea28ce722cdef61cfdc69bbbdf391628238 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -110,6 +110,17 @@ public class Main {
@@ -107,6 +107,17 @@ public class Main {
*/ // CraftBukkit end

try {
Expand All @@ -133,20 +133,20 @@ index e7240acad17dc9c0d93f2792cc0d90c1855ac436..ba96530f00faa1d113a14242eb819234
Path path = (Path) optionset.valueOf("pidFile"); // CraftBukkit

diff --git a/src/main/java/net/minecraft/server/packs/repository/ServerPacksSource.java b/src/main/java/net/minecraft/server/packs/repository/ServerPacksSource.java
index 03bf7dfc289c6a02f19678d3c7041c027154b99d..43ce85977472fd831fa272ff1d81df4586352d72 100644
index 7db49f077704f03d1815f8382523199bd6c9a0dc..4ed8f38ba9c7b075b99a0da0e213a1e9d03ac717 100644
--- a/src/main/java/net/minecraft/server/packs/repository/ServerPacksSource.java
+++ b/src/main/java/net/minecraft/server/packs/repository/ServerPacksSource.java
@@ -28,7 +28,7 @@ public class ServerPacksSource extends BuiltInPackSource {
}
@@ -32,7 +32,7 @@ public class ServerPacksSource extends BuiltInPackSource {

private static VanillaPackResources createVanillaPackSource() {
@VisibleForTesting
public static VanillaPackResources createVanillaPackSource() {
- return (new VanillaPackResourcesBuilder()).setMetadata(BUILT_IN_METADATA).exposeNamespace("minecraft").applyDevelopmentConfig().pushJarResources().build();
+ return (new VanillaPackResourcesBuilder()).setMetadata(BUILT_IN_METADATA).exposeNamespace("minecraft", ResourceLocation.PAPER_NAMESPACE).applyDevelopmentConfig().pushJarResources().build(); // Paper
}

@Override
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index e325cb56f2bafce21ce06bb5c674837abbb676e7..8a30ebbac91a0750c00ebbcb5372e6d2a45c064a 100644
index bf691570a019d4c1e2affceb7b707b65e943345b..541aa0cd6c89a6df8e4244aaea7a610cf7200e54 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -209,7 +209,7 @@ public class Main {
Expand All @@ -157,7 +157,7 @@ index e325cb56f2bafce21ce06bb5c674837abbb676e7..8a30ebbac91a0750c00ebbcb5372e6d2
+ Date buildDate = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss Z").parse(Main.class.getPackage().getImplementationVendor()); // Paper

Calendar deadline = Calendar.getInstance();
deadline.add(Calendar.DAY_OF_YEAR, -21);
deadline.add(Calendar.DAY_OF_YEAR, -3);
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java b/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
index 93046379d0cefd5d3236fc59e698809acdc18f80..774556a62eb240da42e84db4502e2ed43495be17 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Versioning.java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Subject: [PATCH] Test changes


diff --git a/build.gradle.kts b/build.gradle.kts
index b1c84b847f8845407eafc89d8b027b34cc6a95b8..784a2ae459d4a6afd6773d2298838c07c9152250 100644
index 32d475a636d4ba90eeaecfac148143f940cba6e2..b6f741435b7c63d748b79669d3d8f420db52c3a7 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -12,6 +12,7 @@ dependencies {
Expand All @@ -14,8 +14,8 @@ index b1c84b847f8845407eafc89d8b027b34cc6a95b8..784a2ae459d4a6afd6773d2298838c07
implementation("org.ow2.asm:asm-commons:9.5") // Paper - ASM event executor generation
+ testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
implementation("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
runtimeOnly("org.xerial:sqlite-jdbc:3.43.0.0")
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
diff --git a/src/test/java/io/papermc/paper/testing/DummyServer.java b/src/test/java/io/papermc/paper/testing/DummyServer.java
new file mode 100644
index 0000000000000000000000000000000000000000..e944e9dca13883c57e93e480ae5adfe51c342532
Expand Down Expand Up @@ -126,7 +126,7 @@ index 0000000000000000000000000000000000000000..c88749e839ee1a9cf8439c4218c8a98a
+ }
+}
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
index 4f392c199fc31808d339659156f2e9b229e755e2..453e2189b842a6f6f52186578af1ee2e2fcba2e4 100644
index 7e665ec6bdf394b98d17687afdb8af9a7a6b0e0f..31d3a6967f509286bcfe1cf55d1a3dc637927e55 100644
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
@@ -54,6 +54,7 @@ public abstract class AbstractTestingBase {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public org.spigotmc.SpigotWorldConfig getString(Ljava/lang/String;Ljava/lang/Str
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES

diff --git a/build.gradle.kts b/build.gradle.kts
index 784a2ae459d4a6afd6773d2298838c07c9152250..b60a9ab80589eb8a3e9ece76c7eb24cd3d6dbe96 100644
index b6f741435b7c63d748b79669d3d8f420db52c3a7..ba38153a37e864ab7f02a169da3df8806122aa76 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -13,6 +13,7 @@ dependencies {
Expand All @@ -23,8 +23,8 @@ index 784a2ae459d4a6afd6773d2298838c07c9152250..b60a9ab80589eb8a3e9ece76c7eb24cd
testImplementation("org.mockito:mockito-core:4.9.0") // Paper - switch to mockito
+ implementation("org.spongepowered:configurate-yaml:4.1.2") // Paper - config files
implementation("commons-lang:commons-lang:2.6")
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
runtimeOnly("org.xerial:sqlite-jdbc:3.43.0.0")
runtimeOnly("com.mysql:mysql-connector-j:8.1.0")
diff --git a/src/main/java/com/destroystokyo/paper/PaperConfig.java b/src/main/java/com/destroystokyo/paper/PaperConfig.java
new file mode 100644
index 0000000000000000000000000000000000000000..ef41cf3a7d1e6f2bfe81e0fb865d2f969bbc77c1
Expand Down Expand Up @@ -4567,10 +4567,10 @@ index 0000000000000000000000000000000000000000..70cc7b45e7355f6c8476a74a070f1266
+ }
+}
diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java
index ba96530f00faa1d113a14242eb8192349c7c944f..ac59339d9ed4b0860de7d338e5b7610175e27165 100644
index 2ac60ea28ce722cdef61cfdc69bbbdf391628238..9cfdd5d8c1650d9c9bdfbc07980239e507ff942d 100644
--- a/src/main/java/net/minecraft/server/Main.java
+++ b/src/main/java/net/minecraft/server/Main.java
@@ -142,6 +142,10 @@ public class Main {
@@ -139,6 +139,10 @@ public class Main {
dedicatedserversettings.forceSave();
Path path2 = Paths.get("eula.txt");
Eula eula = new Eula(path2);
Expand All @@ -4581,7 +4581,7 @@ index ba96530f00faa1d113a14242eb8192349c7c944f..ac59339d9ed4b0860de7d338e5b76101

if (optionset.has("initSettings")) { // CraftBukkit
// CraftBukkit start - SPIGOT-5761: Create bukkit.yml and commands.yml if not present
@@ -176,7 +180,7 @@ public class Main {
@@ -173,7 +177,7 @@ public class Main {
}

File file = (File) optionset.valueOf("universe"); // CraftBukkit
Expand All @@ -4591,25 +4591,25 @@ index ba96530f00faa1d113a14242eb8192349c7c944f..ac59339d9ed4b0860de7d338e5b76101
String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
index 60e683ac0adaa192c502d059f6e448d0a23e8a09..6877a10fe56b46cf3fb7ccccf5a55e57d03048e9 100644
index bc4f2e0a7086825ba8d1a503a65a4375d6c90d72..1561b26e1b4115f4d5631f20b31c2238d1d23202 100644
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
@@ -294,6 +294,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
@@ -289,6 +289,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
private static final int SAMPLE_INTERVAL = 100;
public final double[] recentTps = new double[ 3 ];
// Spigot end
+ public final io.papermc.paper.configuration.PaperConfigurations paperConfigurations;

public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
AtomicReference<S> atomicreference = new AtomicReference();
@@ -384,6 +385,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
@@ -379,6 +380,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
}
Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
// CraftBukkit end
+ this.paperConfigurations = services.paperConfigurations(); // Paper
}
// CraftBukkit end

private void readScoreboard(DimensionDataStorage persistentStateManager) {
diff --git a/src/main/java/net/minecraft/server/Services.java b/src/main/java/net/minecraft/server/Services.java
index 71e7beac6cf1e0f813d5ff3e9c51c13491be7139..f1cc27809c1e8612f7c4fa912f5e39c07b09d808 100644
--- a/src/main/java/net/minecraft/server/Services.java
Expand Down Expand Up @@ -4649,7 +4649,7 @@ index 71e7beac6cf1e0f813d5ff3e9c51c13491be7139..f1cc27809c1e8612f7c4fa912f5e39c0

@Nullable
diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
index ea5657d31f51469d6c0b9463fcc5cea9c270fb2e..546ad678af2705e3956f5f139aa847354a6fdeae 100644
index 97065ae5eb30edfb2cb3fbc53769f8ffc7712377..a9ec28c3cf3ed50d929c80ac21959d82603ff0aa 100644
--- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
+++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java
@@ -183,6 +183,10 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface
Expand All @@ -4676,7 +4676,7 @@ index 37ab411817008d4e6194e177d88d50931e53b42e..ca23639f15107ccd43b874ae38fa3727
}
// CraftBukkit end
diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java
index d40998a5330be64849a5bc2b49781b70ef149a0e..82435da47f0f7db73556310f84dc538a7c5f0809 100644
index df03b655bc5b864164da101bbf7edbca4cc7e147..f3a41559be5ad0b40762d368d8582704c8305961 100644
--- a/src/main/java/net/minecraft/server/level/ServerLevel.java
+++ b/src/main/java/net/minecraft/server/level/ServerLevel.java
@@ -234,7 +234,7 @@ public class ServerLevel extends Level implements WorldGenLevel {
Expand Down Expand Up @@ -4717,10 +4717,10 @@ index cda55e481ddbcc1de5478125c5db20ebba168e7d..bacd4d875642cd93c3185f788745dd73
this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);

diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index 396e847ab81100684f61830011f2e675d5f284a4..34209c5f4465eadb095336d8023739e6f0f2785b 100644
index f4a2fbf89320df88e99b20a56b4feeba7e395dd2..cbfc9b90805ecce074d42cfeb0b68d84cdafcac6 100644
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -916,6 +916,7 @@ public final class CraftServer implements Server {
@@ -919,6 +919,7 @@ public final class CraftServer implements Server {
}

org.spigotmc.SpigotConfig.init((File) console.options.valueOf("spigot-settings")); // Spigot
Expand All @@ -4729,7 +4729,7 @@ index 396e847ab81100684f61830011f2e675d5f284a4..34209c5f4465eadb095336d8023739e6
world.serverLevelData.setDifficulty(config.difficulty);
world.setSpawnSettings(config.spawnMonsters, config.spawnAnimals);
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
index 8a30ebbac91a0750c00ebbcb5372e6d2a45c064a..67d408b79422cf0c4aed6636cfd4ebb9e13e19f9 100644
index 541aa0cd6c89a6df8e4244aaea7a610cf7200e54..8d5c4fbaab751802fdb47d218c7d28f619d9eb62 100644
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -141,6 +141,19 @@ public class Main {
Expand Down Expand Up @@ -4813,7 +4813,7 @@ index 0000000000000000000000000000000000000000..0396589795da1f83ddf62426236dde9a
+ }
+}
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
index 453e2189b842a6f6f52186578af1ee2e2fcba2e4..52a6f1791c7de062d5d567d7cc9ee68731fd6e67 100644
index 31d3a6967f509286bcfe1cf55d1a3dc637927e55..a2f79ff9765e2dcdb7980085c96f12cbbc40e832 100644
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
@@ -63,6 +63,7 @@ public abstract class AbstractTestingBase {
Expand Down
Loading

0 comments on commit b6e46e9

Please sign in to comment.