Start working on 1.20

This commit is contained in:
Nassim Jahnke
2023-06-07 18:24:39 +02:00
parent 1004620742
commit 1bda3d4d2a
1002 changed files with 153 additions and 206 deletions

View File

@@ -14,8 +14,8 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
implementation("org.ow2.asm:asm-commons:9.4") // 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.41.2.2")
runtimeOnly("com.mysql:mysql-connector-j:8.0.32")
runtimeOnly("org.xerial:sqlite-jdbc:3.42.0.0")
runtimeOnly("com.mysql:mysql-connector-j:8.0.33")
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..0000000000000000000000000000000000000000
@@ -74,7 +74,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
+
+ when(dummyServer.getLootTable(any(NamespacedKey.class))).thenAnswer(invocation -> {
+ final NamespacedKey key = invocation.getArgument(0, NamespacedKey.class);
+ return new org.bukkit.craftbukkit.CraftLootTable(key, AbstractTestingBase.DATA_PACK.getLootTables().get(CraftNamespacedKey.toMinecraft(key)));
+ return new org.bukkit.craftbukkit.CraftLootTable(key, AbstractTestingBase.DATA_PACK.getLootData().getLootTable(CraftNamespacedKey.toMinecraft(key)));
+ });
+
+ when(dummyServer.getRegistry(any())).thenAnswer(invocation -> {
@@ -240,7 +240,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000
- @Override
- public Object handle(DummyServer server, Object[] args) {
- NamespacedKey key = (NamespacedKey) args[0];
- return new CraftLootTable(key, AbstractTestingBase.DATA_PACK.getLootTables().get(CraftNamespacedKey.toMinecraft(key)));
- return new CraftLootTable(key, AbstractTestingBase.DATA_PACK.getLootData().getLootTable(CraftNamespacedKey.toMinecraft(key)));
- }
- }
- );