Updated Upstream (Bukkit/CraftBukkit) (#11501)
Upstream has released updates that appear to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: bb4e97c6 Add support for Java 23 bc6874dd Bump asm to 9.7.1 50e8a00b PR-1064: Add specific getTopInventory methods for InventoryView derivatives 758b0a0f SPIGOT-7911: Fix Location#isWorldLoaded() for re-loaded worlds 133a64a7 Improve Registry#getOrThrow messages be0f5957 PR-1058: Add tests for Minecraft registry <-> Bukkit fields d1b31df2 PR-1062: Clarify BeaconView documentation 3fab4384 PR-1060: Cache Material to BlockType and ItemType conversion 967a7301 SPIGOT-7906: Increase YAML nesting limit to 100 6ecf033d SPIGOT-7899: Smithing recipes don't require inputs CraftBukkit Changes: 0a7bd6c81 PR-1493: Improve reroute performance and add some tests 54941524c Add support for Java 23 f4d957fff SPIGOT-7915: Fix World#getKeepSpawnInMemory() using Spawn Radius rather than Spawn Chunk Radius ded183674 Fix HIDE_ENCHANTS flag in items without enchantments 308785a0a Bump asm to 9.7.1 and re-add ClassReader to ClassWriter 72ce823cd PR-1487: Add specific getTopInventory methods for InventoryView derivatives 11a5e840c SPIGOT-7907, PR-1484: Improve merchant recipe item matching behavior to more closely align with older versions 45b66f7e4 SPIGOT-7909: Always set HIDE_ENCHANTS flag to item if flag is set 963459791 Increase outdated build delay fc5b2d75f SPIGOT-7910: Fix launching breeze wind charge from API and improve dispenser launch API c7d6428f2 SPIGOT-7856, PR-1483: End platform not dropping items after replacing blocks 2a5572b52 SPIGOT-7780, PR-1482: Cannot edit chunks during unload event 527041ab5 SPIGOT-7902, PR-1477: Fix CraftMetaPotion#hasCustomEffects() does not check if customEffects (List) is empty 5529a1769 Implement base methods for tags 30fbdbaaf Improve Registry#getOrThrow messages 6b71a7322 PR-1475: Add tests for Minecraft registry <-> Bukkit fields 5f24c255c SPIGOT-7908: Mark junit-platform-suite-engine as test scope e4c92ef65 PR-1473: Change tests to use suites, to run tests in different environments and feature flags d25e1e722 PR-1481: Fix BeaconView#set[X]Effect(null) d69a05362 PR-1480: Fix PerMaterialTest#isEdible test running for legacy materials bb3284a89 PR-1479: Use custom #isBlock method in legacy init instead of the one in Material, since it relies on legacy being init 98c57cbbe SPIGOT-7904: Fix NPE for PlayerItemBreakEvent f35bae9ec Fix missing hasJukeboxPlayable 8a6f8b6d8 SPIGOT-7881: CTRL+Pick Block saves position data into item 7913b3be7 SPIGOT-7899: Smithing recipes don't require inputs
Dieser Commit ist enthalten in:
Ursprung
755a7753af
Commit
3b9db2b194
@ -27,7 +27,7 @@ index 5dd700a956e915c00b25d91dea8d6f285ddab72b..97e78e27ee0eea2c8b24886eeb19164d
|
||||
+/.factorypath
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c46b0b620e
|
||||
index 0000000000000000000000000000000000000000..7ac6af074d76b782ef14fe4690bb5b630ededa32
|
||||
--- /dev/null
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +1,91 @@
|
||||
@ -63,8 +63,8 @@ index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c4
|
||||
+ testImplementation("org.apache.commons:commons-lang3:3.12.0")
|
||||
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
||||
+ testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
+ testImplementation("org.mockito:mockito-core:5.11.0")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.7")
|
||||
+ testImplementation("org.mockito:mockito-core:5.14.1")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
||||
+}
|
||||
+
|
||||
+configure<PublishingExtension> {
|
||||
@ -124,7 +124,7 @@ index 0000000000000000000000000000000000000000..6271e2bad0ed937c2c46a8c8fdf186c4
|
||||
+}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
deleted file mode 100644
|
||||
index 2c5ac393cffbe61330c5aa95115e7e906c0775d3..0000000000000000000000000000000000000000
|
||||
index 19c192e313d48ae35622a032e2b0911ea9fb8aa1..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,267 +0,0 @@
|
||||
@ -236,13 +236,13 @@ index 2c5ac393cffbe61330c5aa95115e7e906c0775d3..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>org.mockito</groupId>
|
||||
- <artifactId>mockito-core</artifactId>
|
||||
- <version>5.11.0</version>
|
||||
- <version>5.14.1</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm-tree</artifactId>
|
||||
- <version>9.7</version>
|
||||
- <version>9.7.1</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
|
@ -12,7 +12,7 @@ Co-authored-by: Riley Park <rileysebastianpark@gmail.com>
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 78aadebda145fe83327ceb430c4b38f9a8e45a2b..8c7a5be5193ae397ec324d78566edce90608ed57 100644
|
||||
index 665ad8b7d2728b836f26c2344111144728e00fb6..35480b9f7bb14217130b1b3a0638365a98c7a9d5 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -107,6 +107,12 @@ tasks.test {
|
||||
@ -266,10 +266,10 @@ index 89ca06ebecdaadd5dfc7bc74473ca15ad36f6eff..5974ceea58940e1799f3589eac0e39b9
|
||||
|
||||
public static Stream<Arguments> data() {
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index 5709d52ed4ac4ce8dd8b0569281279f7305c5fb9..a47ee3ce660ec4467b5ed6a4b41fb2d19179a189 100644
|
||||
index c67e0784c043ed194f6acde32411e156412a9b24..eb1fd4b911c4af76cdd3eac85d5365e7941a4a2e 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -72,6 +72,11 @@ public final class TestServer {
|
||||
@@ -83,6 +83,11 @@ public final class TestServer {
|
||||
UnsafeValues unsafeValues = mock(withSettings().stubOnly());
|
||||
when(instance.getUnsafe()).thenReturn(unsafeValues);
|
||||
|
||||
|
@ -7,7 +7,7 @@ Currently includes generated key holder classes for types
|
||||
used in the Registry Modification API
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 8c7a5be5193ae397ec324d78566edce90608ed57..877ea06c0ea8c8c0c73d23fbb996f6692c100d98 100644
|
||||
index 35480b9f7bb14217130b1b3a0638365a98c7a9d5..f7aa3f53e119b756b4645ca88cf9642d0f549d2c 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -1,6 +1,7 @@
|
||||
@ -19,7 +19,7 @@ index 8c7a5be5193ae397ec324d78566edce90608ed57..877ea06c0ea8c8c0c73d23fbb996f669
|
||||
|
||||
java {
|
||||
@@ -46,6 +47,22 @@ dependencies {
|
||||
testImplementation("org.ow2.asm:asm-tree:9.7")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
||||
}
|
||||
|
||||
+// Paper start
|
||||
|
@ -8,7 +8,7 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Co-authored-by: Yannick Lamprecht <yannicklamprecht@live.de>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 3383fb91249ea53740326b538abd905f84ff0e3c..74f0e2b812c1e2e922b136fefe505fc8cbe33e83 100644
|
||||
index b2e0bb305d015a19a4cb1e81e1b3b983c979d56d..562f8ae2d9cd2a1238bde1e5cfbf546c4f56bd6e 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -11,12 +11,28 @@ java {
|
||||
@ -1008,12 +1008,12 @@ index e3f185dc982d1c38195a4e01ddd485c13ffa58c0..918a045165cdcde264bc24082b7afebb
|
||||
/**
|
||||
* Represents black
|
||||
diff --git a/src/main/java/org/bukkit/JukeboxSong.java b/src/main/java/org/bukkit/JukeboxSong.java
|
||||
index 3bf2743fbf123af981d03f0eee6fafd68786ace5..bf487bd9a9fb627c15c7f5e0c623441d367e7c80 100644
|
||||
index 5872188c2f3c610ab220a30cf60f45c1eba1b372..c6feb13c735fabbd08676fa8828ce0b9fd54da32 100644
|
||||
--- a/src/main/java/org/bukkit/JukeboxSong.java
|
||||
+++ b/src/main/java/org/bukkit/JukeboxSong.java
|
||||
@@ -34,4 +34,14 @@ public interface JukeboxSong extends Keyed, Translatable {
|
||||
private static JukeboxSong get(@NotNull String s) {
|
||||
return Objects.requireNonNull(Registry.JUKEBOX_SONG.get(NamespacedKey.minecraft(s)), "Missing song " + s);
|
||||
@@ -33,4 +33,14 @@ public interface JukeboxSong extends Keyed, Translatable {
|
||||
private static JukeboxSong get(@NotNull String key) {
|
||||
return Registry.JUKEBOX_SONG.getOrThrow(NamespacedKey.minecraft(key));
|
||||
}
|
||||
+
|
||||
+ // Paper start - adventure
|
||||
@ -2246,10 +2246,10 @@ index b7d8dd30360a38dbdc7bbce40c8e6ced7261f833..0817f2395c2b18828565435568ce651f
|
||||
public void sendRawMessage(@Nullable UUID sender, @NotNull String message);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index 80fb27d6c54988e53857fb330f45bbf32227aee8..c7a901707048e9dc82b8f17f3285727460173c72 100644
|
||||
index 241bc2ea6157c29d6d5428c413ea14ac3822e3f7..378ef178bdcf0d71b5d80fc5028ce738437f9391 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -316,6 +316,19 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
@@ -310,6 +310,19 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
* @return True if the enchantment may be applied, otherwise False
|
||||
*/
|
||||
public abstract boolean canEnchantItem(@NotNull ItemStack item);
|
||||
@ -4422,10 +4422,10 @@ index eade62328895133c026e7e678e648e1fc846f5ee..730c42eddd38acec1cdbb19dfc8c6757
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/MenuType.java b/src/main/java/org/bukkit/inventory/MenuType.java
|
||||
index ee39bf9019fa0377beb895a22db0b2a0934a4d84..29dfad691cbdd09d043f6171defc8a7fabbc2b75 100644
|
||||
index 45d3889206fb3b7a7303490b8d4e67ede2aae7a4..34d45a105da72481a7c4f2e3831f5d2a676c91c6 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/MenuType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/MenuType.java
|
||||
@@ -146,11 +146,45 @@ public interface MenuType extends Keyed {
|
||||
@@ -145,11 +145,45 @@ public interface MenuType extends Keyed {
|
||||
* @param player the player the view belongs to
|
||||
* @param title the title of the view
|
||||
* @return the created {@link InventoryView}
|
||||
@ -4878,13 +4878,13 @@ index 12595536080ffe09df2b6ecdb83d846f50100d38..9fc47c879ee6b8edf2503f20e4736c29
|
||||
public interface WritableBookMeta extends ItemMeta {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
|
||||
index eb80f24da65918a21a2fa6691eeb64b621febaf4..941fac4eee338870d8c30cb1f64cab572cf54548 100644
|
||||
index 5fc9aaac8baaf185d8e0d4fa7012dc4e13e485b3..804cb7162b34225d5dd84aada283de568d7d6592 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
|
||||
@@ -51,4 +51,21 @@ public interface TrimMaterial extends Keyed, Translatable {
|
||||
* {@link Material#AMETHYST_SHARD}.
|
||||
*/
|
||||
public static final TrimMaterial AMETHYST = Registry.TRIM_MATERIAL.get(NamespacedKey.minecraft("amethyst"));
|
||||
@@ -57,4 +57,21 @@ public interface TrimMaterial extends Keyed, Translatable {
|
||||
private static TrimMaterial getTrimMaterial(@NotNull String key) {
|
||||
return Registry.TRIM_MATERIAL.getOrThrow(NamespacedKey.minecraft(key));
|
||||
}
|
||||
+
|
||||
+ // Paper start - adventure
|
||||
+ /**
|
||||
@ -4904,13 +4904,13 @@ index eb80f24da65918a21a2fa6691eeb64b621febaf4..941fac4eee338870d8c30cb1f64cab57
|
||||
+ // Paper end - adventure
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
|
||||
index bd512a7840d4686759097ee4cbd8b375c530956b..f2242ddc4085f7e7cdd748d860857822e3d9b007 100644
|
||||
index e8e0786467bfcea14d30b352489b7bfb1a06addc..56cfe665daba1754e41f633d7c18172bebf87028 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
|
||||
@@ -83,4 +83,21 @@ public interface TrimPattern extends Keyed, Translatable {
|
||||
* {@link Material#BOLT_ARMOR_TRIM_SMITHING_TEMPLATE}.
|
||||
*/
|
||||
public static final TrimPattern BOLT = Registry.TRIM_PATTERN.get(NamespacedKey.minecraft("bolt"));
|
||||
@@ -89,4 +89,21 @@ public interface TrimPattern extends Keyed, Translatable {
|
||||
private static TrimPattern getTrimPattern(@NotNull String key) {
|
||||
return Registry.TRIM_PATTERN.getOrThrow(NamespacedKey.minecraft(key));
|
||||
}
|
||||
+
|
||||
+ // Paper start - adventure
|
||||
+ /**
|
||||
@ -4930,7 +4930,7 @@ index bd512a7840d4686759097ee4cbd8b375c530956b..f2242ddc4085f7e7cdd748d860857822
|
||||
+ // Paper end - adventure
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
index 8250821fe7be7987c92edbc36911f88875c470fc..2aadb995ab512086ac41b48df4c724722697e166 100644
|
||||
index a37e6419fcb116afbbfe8c5895b9c226a3a010dc..871adbf2f9015dffac9edc3ce35aa6acd3b75526 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapCursor.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
@@ -17,7 +17,7 @@ public final class MapCursor {
|
||||
|
@ -6,7 +6,7 @@ Subject: [PATCH] Use ASM for event executors.
|
||||
Uses method handles for private or static methods.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 74f0e2b812c1e2e922b136fefe505fc8cbe33e83..1f627e81622e77b81b1228a467fbb9e6fd979e7a 100644
|
||||
index 562f8ae2d9cd2a1238bde1e5cfbf546c4f56bd6e..65783c7a3711fa147a4e090a9715f7e218a312ac 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -47,6 +47,9 @@ dependencies {
|
||||
@ -14,8 +14,8 @@ index 74f0e2b812c1e2e922b136fefe505fc8cbe33e83..1f627e81622e77b81b1228a467fbb9e6
|
||||
apiAndDocs("net.kyori:adventure-text-serializer-plain")
|
||||
apiAndDocs("net.kyori:adventure-text-logger-slf4j")
|
||||
+
|
||||
+ implementation("org.ow2.asm:asm:9.7")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.7")
|
||||
+ implementation("org.ow2.asm:asm:9.7.1")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||
// Paper end
|
||||
|
||||
compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
||||
|
@ -5,11 +5,11 @@ Subject: [PATCH] Paper Plugins
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 1f627e81622e77b81b1228a467fbb9e6fd979e7a..3c50362de25617d878ef58f14f67c240005ff624 100644
|
||||
index 65783c7a3711fa147a4e090a9715f7e218a312ac..c55223e0d0c30b7575bc5322e993d0205cbda85f 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -52,7 +52,7 @@ dependencies {
|
||||
implementation("org.ow2.asm:asm-commons:9.7")
|
||||
implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||
// Paper end
|
||||
|
||||
- compileOnly("org.apache.maven:maven-resolver-provider:3.9.6")
|
||||
@ -2535,10 +2535,10 @@ index a8be3e23e3e280ad301d9530de50028515612966..43b58e920e739bb949ac0673e9ef73ba
|
||||
@Override
|
||||
public FileConfiguration getConfig() {
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index a47ee3ce660ec4467b5ed6a4b41fb2d19179a189..c79faf4197f9c0a7256cefe2b001182102d2b796 100644
|
||||
index eb1fd4b911c4af76cdd3eac85d5365e7941a4a2e..2a3ae4afef2716a5fdcefbb6d5e0e011d1db9934 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -26,8 +26,7 @@ public final class TestServer {
|
||||
@@ -27,8 +27,7 @@ public final class TestServer {
|
||||
Thread creatingThread = Thread.currentThread();
|
||||
when(instance.isPrimaryThread()).then(mock -> Thread.currentThread().equals(creatingThread));
|
||||
|
||||
|
@ -634,10 +634,10 @@ index af5110b4160979c39cc1e5de6fa3bd7957b21403..15a0a733b0e5804655b5957cbf208312
|
||||
* @param location the location to remove
|
||||
* @see #getExploredLocations()
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index 45dd54afa6d6f3d9895ef52f13076d3351036e4b..cfa0d4809f9bb4ac150251efa85ba4d1808ab1b2 100644
|
||||
index c48f13cc8ece0fa9913450e4402e496ce01a03fb..af4582f3e4687933dac6ccd43667a373f8daedb6 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -228,7 +228,7 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -224,7 +224,7 @@ public interface Villager extends AbstractVillager {
|
||||
*/
|
||||
Profession NITWIT = getProfession("nitwit");
|
||||
/**
|
||||
|
@ -14,7 +14,7 @@ it without having to shade it in the plugin and going through
|
||||
several layers of logging abstraction.
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 3c50362de25617d878ef58f14f67c240005ff624..76aa23da778b0fe8a093429c56cb29b044359b40 100644
|
||||
index c55223e0d0c30b7575bc5322e993d0205cbda85f..33e4635dbe6afabecfaaaeff57495e5b3ca5f891 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -12,6 +12,8 @@ java {
|
||||
@ -33,8 +33,8 @@ index 3c50362de25617d878ef58f14f67c240005ff624..76aa23da778b0fe8a093429c56cb29b0
|
||||
+ api("org.apache.logging.log4j:log4j-api:$log4jVersion")
|
||||
+ api("org.slf4j:slf4j-api:$slf4jVersion")
|
||||
|
||||
implementation("org.ow2.asm:asm:9.7")
|
||||
implementation("org.ow2.asm:asm-commons:9.7")
|
||||
implementation("org.ow2.asm:asm:9.7.1")
|
||||
implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||
@@ -140,6 +144,8 @@ tasks.withType<Javadoc> {
|
||||
"https://jd.advntr.dev/text-serializer-legacy/$adventureVersion/",
|
||||
"https://jd.advntr.dev/text-serializer-plain/$adventureVersion/",
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Material API additions
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 111c9a6be1f3d095cf8e82b118371986b6cc0fc7..c407bc264ab6c2e5aa7122d4caec63f9b482d76d 100644
|
||||
index 625fed5709d8dd814f4143d30ddb43bc57644fe6..28f2192f8a2748dfc631ce4b33599e23e6e68c62 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -129,6 +129,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -131,6 +131,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* An enum of all material IDs accepted by the official server and client
|
||||
*/
|
||||
@ -16,8 +16,8 @@ index 111c9a6be1f3d095cf8e82b118371986b6cc0fc7..c407bc264ab6c2e5aa7122d4caec63f9
|
||||
public enum Material implements Keyed, Translatable {
|
||||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||
AIR(9648, 0),
|
||||
@@ -4662,6 +4663,22 @@ public enum Material implements Keyed, Translatable {
|
||||
}
|
||||
@@ -4681,6 +4682,22 @@ public enum Material implements Keyed, Translatable {
|
||||
});
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
|
@ -269,7 +269,7 @@ index f9c9ae463aacd593e3aa9caf037ea1e23d56c780..38ccfd0a1b38e7a87185e668d3c02081
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Location.java b/src/main/java/org/bukkit/Location.java
|
||||
index c30600666e7b32b8b4ba1e20ede04fd5ebd5a692..eec6c9cd7da6938351905129bb5a66f49a257d01 100644
|
||||
index b02efba048be00e42502111fcdd2297529926666..fb4b6f0e908ffa50c3b2f8d04d9f3810898b8d5e 100644
|
||||
--- a/src/main/java/org/bukkit/Location.java
|
||||
+++ b/src/main/java/org/bukkit/Location.java
|
||||
@@ -46,7 +46,7 @@ public class Location implements Cloneable, ConfigurationSerializable, io.paperm
|
||||
@ -300,10 +300,10 @@ index c30600666e7b32b8b4ba1e20ede04fd5ebd5a692..eec6c9cd7da6938351905129bb5a66f4
|
||||
if (this.world == null) {
|
||||
return null;
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index c407bc264ab6c2e5aa7122d4caec63f9b482d76d..a432e1c776cd5bda7ba9da8a1b608cb30495e647 100644
|
||||
index 28f2192f8a2748dfc631ce4b33599e23e6e68c62..bddfc295bb1247097cb5fdae6e13585a45c18e1c 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4683,20 +4683,20 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4702,20 +4702,20 @@ public enum Material implements Keyed, Translatable {
|
||||
* Do not use for any reason.
|
||||
*
|
||||
* @return ID of this material
|
||||
@ -328,7 +328,7 @@ index c407bc264ab6c2e5aa7122d4caec63f9b482d76d..a432e1c776cd5bda7ba9da8a1b608cb3
|
||||
public boolean isLegacy() {
|
||||
return legacy;
|
||||
}
|
||||
@@ -4772,8 +4772,10 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4791,8 +4791,10 @@ public enum Material implements Keyed, Translatable {
|
||||
* Gets the MaterialData class associated with this Material
|
||||
*
|
||||
* @return MaterialData associated with this Material
|
||||
@ -339,7 +339,7 @@ index c407bc264ab6c2e5aa7122d4caec63f9b482d76d..a432e1c776cd5bda7ba9da8a1b608cb3
|
||||
public Class<? extends MaterialData> getData() {
|
||||
Preconditions.checkArgument(legacy, "Cannot get data class of Modern Material");
|
||||
return ctor.getDeclaringClass();
|
||||
@@ -5229,7 +5231,11 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -5248,7 +5250,11 @@ public enum Material implements Keyed, Translatable {
|
||||
* material.
|
||||
*
|
||||
* @return true if this material can be interacted with.
|
||||
@ -453,25 +453,25 @@ index 48aecc9421c500137bbef1dfe3bec8de277c3ff9..aff858346776386f1288b648b221404f
|
||||
return note;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 883338632b81f6eebc03c95d5883536a5d87fc59..fbede496b05c4b9b1ecd12e711a100586776d469 100644
|
||||
index 30ba3daba730c2994b589cc321d66b503da2fe8b..4e67b944351ec3743e5eeaba3f5de99e0df15154 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -228,14 +228,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -248,14 +248,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see TrimMaterial
|
||||
*/
|
||||
- @ApiStatus.Experimental
|
||||
Registry<TrimMaterial> TRIM_MATERIAL = Bukkit.getRegistry(TrimMaterial.class);
|
||||
Registry<TrimMaterial> TRIM_MATERIAL = Objects.requireNonNull(Bukkit.getRegistry(TrimMaterial.class), "No registry present for TrimMaterial. This is a bug.");
|
||||
/**
|
||||
* Trim patterns.
|
||||
*
|
||||
* @see TrimPattern
|
||||
*/
|
||||
- @ApiStatus.Experimental
|
||||
Registry<TrimPattern> TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class);
|
||||
Registry<TrimPattern> TRIM_PATTERN = Objects.requireNonNull(Bukkit.getRegistry(TrimPattern.class), "No registry present for TrimPattern. This is a bug.");
|
||||
/**
|
||||
* Damage types.
|
||||
@@ -343,8 +341,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -385,8 +383,11 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @param input non-null input
|
||||
* @return registered object or null if does not exist
|
||||
@ -715,10 +715,10 @@ index 3e07fc1bc0e08d0cfd998711c7fd547b2b7b6b73..f4a739d8022d19a7ae0ee9bf93eb5c48
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
|
||||
index dfd8187ef941e8afe9cb28a26bf0d2cf2e4c4bc5..d285a1df492d2155f179e8abc17d0bf7527e6d38 100644
|
||||
index 6c745f4db620870d7e74ead2e846df34832a9e8e..eb6b330763931b55d73537153dbdb5cc96d3e94f 100644
|
||||
--- a/src/main/java/org/bukkit/block/BlockType.java
|
||||
+++ b/src/main/java/org/bukkit/block/BlockType.java
|
||||
@@ -3433,9 +3433,14 @@ public interface BlockType extends Keyed, Translatable {
|
||||
@@ -3437,9 +3437,14 @@ public interface BlockType extends Keyed, Translatable {
|
||||
* state as well. This method will return true if there is at least one
|
||||
* state in which additional interact handling is performed for the
|
||||
* block type.
|
||||
@ -787,10 +787,10 @@ index a7c4e4baf14dd64e454028002c1c5d4f83ec1659..53c61cfa4c2cdc3adfe1c5b43fb15eeb
|
||||
public interface SuspiciousSand extends BrushableBlock {
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index c7a901707048e9dc82b8f17f3285727460173c72..64675a3641acb50676ca0122f8473ce94de8fba7 100644
|
||||
index 378ef178bdcf0d71b5d80fc5028ce738437f9391..25985a3872ac142c0a3b2fb2dc5387ecdd3ff5b3 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -269,7 +269,7 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
@@ -263,7 +263,7 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
* @deprecated enchantment groupings are now managed by tags, not categories
|
||||
*/
|
||||
@NotNull
|
||||
@ -1875,7 +1875,7 @@ index edef478786bb7456af29ca960009873095830050..e8ac449e6280827beb6d2699df75b1d5
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
index 2aadb995ab512086ac41b48df4c724722697e166..4d96cf385fa5c6d80097bdf6282be5f0eed73307 100644
|
||||
index 871adbf2f9015dffac9edc3ce35aa6acd3b75526..0899981b9ab1f98dacc617156d12779421e4c275 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapCursor.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
@@ -163,9 +163,9 @@ public final class MapCursor {
|
||||
@ -1902,7 +1902,7 @@ index 2aadb995ab512086ac41b48df4c724722697e166..4d96cf385fa5c6d80097bdf6282be5f0
|
||||
public void setRawType(byte type) {
|
||||
Type enumType = Type.byValue(type);
|
||||
Preconditions.checkArgument(enumType != null, "Unknown type by id %s", type);
|
||||
@@ -336,9 +336,9 @@ public final class MapCursor {
|
||||
@@ -332,9 +332,9 @@ public final class MapCursor {
|
||||
* Gets the internal value of the cursor.
|
||||
*
|
||||
* @return the value
|
||||
@ -1914,7 +1914,7 @@ index 2aadb995ab512086ac41b48df4c724722697e166..4d96cf385fa5c6d80097bdf6282be5f0
|
||||
byte getValue();
|
||||
|
||||
/**
|
||||
@@ -346,9 +346,9 @@ public final class MapCursor {
|
||||
@@ -342,9 +342,9 @@ public final class MapCursor {
|
||||
*
|
||||
* @param value the value
|
||||
* @return the matching type
|
||||
@ -2836,10 +2836,10 @@ index 0ea9c6b2420a0f990bd1fdf50fc015e37a7060d8..e99644eae1c662b117aa19060d2484ac
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
index 6bbfebab2ee2b59b3f3213789ecb59e2e7f2680a..42d893ce75a75fe46a4e52b17dc405f5b609ab86 100644
|
||||
index bd9ea2fe16b81f5ef5e83427e49c898db69cd4dc..e2d1d26b9debbe1ef852f0260180200a916a7db7 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
@@ -279,9 +279,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
||||
@@ -278,9 +278,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
||||
* Returns the unique ID of this type.
|
||||
*
|
||||
* @return Unique ID
|
||||
@ -2851,7 +2851,7 @@ index 6bbfebab2ee2b59b3f3213789ecb59e2e7f2680a..42d893ce75a75fe46a4e52b17dc405f5
|
||||
public abstract int getId();
|
||||
|
||||
/**
|
||||
@@ -317,9 +317,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
||||
@@ -316,9 +316,9 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
||||
*
|
||||
* @param id Unique ID to fetch
|
||||
* @return Resulting type, or null if not found.
|
||||
|
@ -109,7 +109,7 @@ index 0000000000000000000000000000000000000000..5600fcdc9795a9f49091db48d73bbd49
|
||||
+ TRADING,
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index ecb0f32a4449f8000248c4bebf89a56df186899f..d839630d7b2e51629e52edf24e7c6dd86b5f58f6 100644
|
||||
index 5a61175ccfe67c0a3c55cc2b84772fa8f6e6a6cb..98a7c5c549e797100f6aaf440606ef31a2be1e3b 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -3,6 +3,8 @@ package org.bukkit.entity;
|
||||
@ -121,7 +121,7 @@ index ecb0f32a4449f8000248c4bebf89a56df186899f..d839630d7b2e51629e52edf24e7c6dd8
|
||||
import org.bukkit.Keyed;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.NamespacedKey;
|
||||
@@ -289,4 +291,50 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -281,4 +283,50 @@ public interface Villager extends AbstractVillager {
|
||||
return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(new Profession[0]);
|
||||
}
|
||||
}
|
||||
|
@ -144,10 +144,10 @@ index dc66bd69646ac949d1386ce8f6ff913e9475439d..4482e8f2c617c2f51b2b53762e775d11
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index a432e1c776cd5bda7ba9da8a1b608cb30495e647..c2552d37295443f79abfe58f91c8261ce06661e8 100644
|
||||
index bddfc295bb1247097cb5fdae6e13585a45c18e1c..39bf5b2e93f45000d2e894b5c3d059b889068aae 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -130,7 +130,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -132,7 +132,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* An enum of all material IDs accepted by the official server and client
|
||||
*/
|
||||
@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
|
||||
@ -156,7 +156,7 @@ index a432e1c776cd5bda7ba9da8a1b608cb30495e647..c2552d37295443f79abfe58f91c8261c
|
||||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||
AIR(9648, 0),
|
||||
STONE(22948),
|
||||
@@ -4679,6 +4679,17 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -4698,6 +4698,17 @@ public enum Material implements Keyed, Translatable {
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@ -174,7 +174,7 @@ index a432e1c776cd5bda7ba9da8a1b608cb30495e647..c2552d37295443f79abfe58f91c8261c
|
||||
/**
|
||||
* Do not use for any reason.
|
||||
*
|
||||
@@ -5428,9 +5439,11 @@ public enum Material implements Keyed, Translatable {
|
||||
@@ -5447,9 +5458,11 @@ public enum Material implements Keyed, Translatable {
|
||||
* material
|
||||
* @see #getBlockTranslationKey()
|
||||
* @see #getItemTranslationKey()
|
||||
@ -187,10 +187,10 @@ index a432e1c776cd5bda7ba9da8a1b608cb30495e647..c2552d37295443f79abfe58f91c8261c
|
||||
if (this.isItem()) {
|
||||
return asItemType().getTranslationKey();
|
||||
diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java
|
||||
index eae90e72b1dff5ab3b1a4fdcfe57187e85fe4d49..62d2b3f950860dee0898d77b0a29635c3f9a7e23 100644
|
||||
index 807e89d026bffae521ead39c514a872ae4d406b3..c9f02466a04d20579fe2258bb02acf98e163ca81 100644
|
||||
--- a/src/main/java/org/bukkit/MusicInstrument.java
|
||||
+++ b/src/main/java/org/bukkit/MusicInstrument.java
|
||||
@@ -7,7 +7,7 @@ import java.util.Collections;
|
||||
@@ -6,7 +6,7 @@ import java.util.Collections;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@ -199,9 +199,9 @@ index eae90e72b1dff5ab3b1a4fdcfe57187e85fe4d49..62d2b3f950860dee0898d77b0a29635c
|
||||
|
||||
public static final MusicInstrument PONDER_GOAT_HORN = getInstrument("ponder_goat_horn");
|
||||
public static final MusicInstrument SING_GOAT_HORN = getInstrument("sing_goat_horn");
|
||||
@@ -52,4 +52,11 @@ public abstract class MusicInstrument implements Keyed {
|
||||
|
||||
return instrument;
|
||||
@@ -46,4 +46,11 @@ public abstract class MusicInstrument implements Keyed {
|
||||
private static MusicInstrument getInstrument(@NotNull String key) {
|
||||
return Registry.INSTRUMENT.getOrThrow(NamespacedKey.minecraft(key));
|
||||
}
|
||||
+
|
||||
+ // Paper start - translation key
|
||||
@ -312,7 +312,7 @@ index 745413357506fa7399f8ba44dfe222d1f0c919f1..25db31b2e9a6d75f0c59f75237842f9a
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
|
||||
index d285a1df492d2155f179e8abc17d0bf7527e6d38..fc21405a18bac88678653674f9d42a08b3d7cb9b 100644
|
||||
index eb6b330763931b55d73537153dbdb5cc96d3e94f..5bfa98695265cdfd246411f93ab670d2c9e64ef1 100644
|
||||
--- a/src/main/java/org/bukkit/block/BlockType.java
|
||||
+++ b/src/main/java/org/bukkit/block/BlockType.java
|
||||
@@ -125,7 +125,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -324,7 +324,7 @@ index d285a1df492d2155f179e8abc17d0bf7527e6d38..fc21405a18bac88678653674f9d42a08
|
||||
|
||||
/**
|
||||
* Typed represents a subtype of {@link BlockType}s that have a known block
|
||||
@@ -3498,4 +3498,13 @@ public interface BlockType extends Keyed, Translatable {
|
||||
@@ -3502,4 +3502,13 @@ public interface BlockType extends Keyed, Translatable {
|
||||
@Nullable
|
||||
@Deprecated
|
||||
Material asMaterial();
|
||||
@ -339,10 +339,10 @@ index d285a1df492d2155f179e8abc17d0bf7527e6d38..fc21405a18bac88678653674f9d42a08
|
||||
+ // Paper end - add Translatable
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index 64675a3641acb50676ca0122f8473ce94de8fba7..daae9bb234d2e10530b2bed35fada98652514e0e 100644
|
||||
index 25985a3872ac142c0a3b2fb2dc5387ecdd3ff5b3..269a7b42479c053e3320b6a0f9ca2013cfe4bdad 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -15,7 +15,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -14,7 +14,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
/**
|
||||
* The various type of enchantments that may be added to armour or weapons
|
||||
*/
|
||||
@ -351,7 +351,7 @@ index 64675a3641acb50676ca0122f8473ce94de8fba7..daae9bb234d2e10530b2bed35fada986
|
||||
/**
|
||||
* Provides protection against environmental damage
|
||||
*/
|
||||
@@ -330,6 +330,16 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
@@ -324,6 +324,16 @@ public abstract class Enchantment implements Keyed, Translatable {
|
||||
public abstract net.kyori.adventure.text.@NotNull Component displayName(int level);
|
||||
// Paper end
|
||||
|
||||
@ -420,10 +420,10 @@ index d248069adfc67eb840951f7ab4a1fa5d30214dec..976f701ed9b9873945a5628173c580e2
|
||||
* Gets if this EntityType is enabled by feature in a world.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index d839630d7b2e51629e52edf24e7c6dd86b5f58f6..0759f66986cec2c7e3f765aaa5b1654b5ed9f4b5 100644
|
||||
index 98a7c5c549e797100f6aaf440606ef31a2be1e3b..163f1afde2e04fdf4dddb894da62b301b52ed539 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -185,7 +185,7 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -181,7 +181,7 @@ public interface Villager extends AbstractVillager {
|
||||
* Represents the various different Villager professions there may be.
|
||||
* Villagers have different trading options depending on their profession,
|
||||
*/
|
||||
@ -432,7 +432,7 @@ index d839630d7b2e51629e52edf24e7c6dd86b5f58f6..0759f66986cec2c7e3f765aaa5b1654b
|
||||
|
||||
Profession NONE = getProfession("none");
|
||||
/**
|
||||
@@ -290,6 +290,13 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -282,6 +282,13 @@ public interface Villager extends AbstractVillager {
|
||||
static Profession[] values() {
|
||||
return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(new Profession[0]);
|
||||
}
|
||||
@ -526,7 +526,7 @@ index 5bd252c0ae3b09fe141d131360c67bb9bfbf5422..78587d9fabe6371a23a7963917b054db
|
||||
+
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 5707d038bdc41448bca7d6ebf4ef5b378809f5a8..69e7cbe49ff2388dea0214f6cb26f36f29ec1453 100644
|
||||
index af09398e0864d338da530495bfd577db8adbe65a..60eec8a12f01562678732bcf38ac407e70d74965 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -27,7 +27,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -564,7 +564,7 @@ index 5707d038bdc41448bca7d6ebf4ef5b378809f5a8..69e7cbe49ff2388dea0214f6cb26f36f
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
index 270f85e99084ddf029bef076c335fe6b9bbddbb5..5dd1c084e42ee93f3a358f58ed76b0a7d36f0713 100644
|
||||
index 1db9c6bd6e44ddd3d8550a2906422c97d45eb9ea..2b1a1ad04212651ad5a43edecca12b495ce61fd5 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -576,7 +576,7 @@ index 270f85e99084ddf029bef076c335fe6b9bbddbb5..5dd1c084e42ee93f3a358f58ed76b0a7
|
||||
|
||||
/**
|
||||
* Typed represents a subtype of {@link ItemType}s that have a known item meta type
|
||||
@@ -2302,4 +2302,13 @@ public interface ItemType extends Keyed, Translatable {
|
||||
@@ -2297,4 +2297,13 @@ public interface ItemType extends Keyed, Translatable {
|
||||
@Nullable
|
||||
@Deprecated
|
||||
Material asMaterial();
|
||||
|
@ -207,10 +207,10 @@ index e0f652117e585882693736de8165ae9c689e1d68..fbe14c327ee9c1ac07893853ca7c699e
|
||||
return server.getRegistry(tClass);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f2125babf61c 100644
|
||||
index 4e67b944351ec3743e5eeaba3f5de99e0df15154..39997047be9f3796d8d5d8934eb361e23d273ebd 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -88,8 +88,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -98,8 +98,10 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Server banner patterns.
|
||||
*
|
||||
* @see PatternType
|
||||
@ -222,7 +222,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
|
||||
/**
|
||||
* Server biomes.
|
||||
*
|
||||
@@ -103,7 +105,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -113,7 +115,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @apiNote BlockType is not ready for public usage yet
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
@ -231,7 +231,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
|
||||
/**
|
||||
* Custom boss bars.
|
||||
*
|
||||
@@ -135,13 +137,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -155,13 +157,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see Cat.Type
|
||||
*/
|
||||
@ -249,7 +249,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
|
||||
/**
|
||||
* Server entity types.
|
||||
*
|
||||
@@ -153,7 +157,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -173,7 +177,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see MusicInstrument
|
||||
*/
|
||||
@ -258,7 +258,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
|
||||
/**
|
||||
* Server item types.
|
||||
*
|
||||
@@ -161,7 +165,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -181,7 +185,7 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @apiNote ItemType is not ready for public usage yet
|
||||
*/
|
||||
@ApiStatus.Internal
|
||||
@ -267,7 +267,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
|
||||
/**
|
||||
* Default server loot tables.
|
||||
*
|
||||
@@ -180,13 +184,13 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -200,13 +204,13 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see MenuType
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@ -283,13 +283,13 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
|
||||
/**
|
||||
* Server particles.
|
||||
*
|
||||
@@ -209,14 +213,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -229,14 +233,16 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Server structures.
|
||||
*
|
||||
* @see Structure
|
||||
+ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#STRUCTURE}
|
||||
*/
|
||||
- Registry<Structure> STRUCTURE = Bukkit.getRegistry(Structure.class);
|
||||
- Registry<Structure> STRUCTURE = Objects.requireNonNull(Bukkit.getRegistry(Structure.class), "No registry present for Structure. This is a bug.");
|
||||
+ @Deprecated(since = "1.20.6") // Paper
|
||||
+ Registry<Structure> STRUCTURE = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(Structure.class), "No registry present for Structure. This is a bug."); // Paper
|
||||
/**
|
||||
@ -297,18 +297,18 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
|
||||
*
|
||||
* @see StructureType
|
||||
*/
|
||||
- Registry<StructureType> STRUCTURE_TYPE = Bukkit.getRegistry(StructureType.class);
|
||||
+ Registry<StructureType> STRUCTURE_TYPE = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.STRUCTURE_TYPE); // Paper
|
||||
- Registry<StructureType> STRUCTURE_TYPE = Objects.requireNonNull(Bukkit.getRegistry(StructureType.class), "No registry present for StructureType. This is a bug.");
|
||||
+ Registry<StructureType> STRUCTURE_TYPE = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.STRUCTURE_TYPE), "No registry present for StructureType. This is a bug."); // Paper
|
||||
/**
|
||||
* Sound keys.
|
||||
*
|
||||
@@ -227,40 +233,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -247,40 +253,47 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* Trim materials.
|
||||
*
|
||||
* @see TrimMaterial
|
||||
+ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#TRIM_MATERIAL}
|
||||
*/
|
||||
- Registry<TrimMaterial> TRIM_MATERIAL = Bukkit.getRegistry(TrimMaterial.class);
|
||||
- Registry<TrimMaterial> TRIM_MATERIAL = Objects.requireNonNull(Bukkit.getRegistry(TrimMaterial.class), "No registry present for TrimMaterial. This is a bug.");
|
||||
+ @Deprecated(since = "1.20.6") // Paper
|
||||
+ Registry<TrimMaterial> TRIM_MATERIAL = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(TrimMaterial.class), "No registry present for TrimMaterial. This is a bug."); // Paper
|
||||
/**
|
||||
@ -317,7 +317,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
|
||||
* @see TrimPattern
|
||||
+ * @deprecated use {@link io.papermc.paper.registry.RegistryAccess#getRegistry(io.papermc.paper.registry.RegistryKey)} with {@link io.papermc.paper.registry.RegistryKey#TRIM_PATTERN}
|
||||
*/
|
||||
- Registry<TrimPattern> TRIM_PATTERN = Bukkit.getRegistry(TrimPattern.class);
|
||||
- Registry<TrimPattern> TRIM_PATTERN = Objects.requireNonNull(Bukkit.getRegistry(TrimPattern.class), "No registry present for TrimPattern. This is a bug.");
|
||||
+ @Deprecated(since = "1.20.6")
|
||||
+ Registry<TrimPattern> TRIM_PATTERN = Objects.requireNonNull(io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(TrimPattern.class), "No registry present for TrimPattern. This is a bug."); // Paper
|
||||
/**
|
||||
@ -357,7 +357,7 @@ index fbede496b05c4b9b1ecd12e711a100586776d469..3777f9c92d0c183d0ab5e28bbe73f212
|
||||
/**
|
||||
* Memory Keys.
|
||||
*
|
||||
@@ -297,25 +310,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -327,25 +340,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*
|
||||
* @see Frog.Variant
|
||||
*/
|
||||
@ -432,10 +432,10 @@ index 0000000000000000000000000000000000000000..f5ece852f97017f71bc129e194cb2129
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/support/TestServer.java b/src/test/java/org/bukkit/support/TestServer.java
|
||||
index c79faf4197f9c0a7256cefe2b001182102d2b796..55f1bc7d01e5184172559c43b8327ac86d58041b 100644
|
||||
index 2a3ae4afef2716a5fdcefbb6d5e0e011d1db9934..494419922f11e494c9de6f757bb76f0cfe5d7c81 100644
|
||||
--- a/src/test/java/org/bukkit/support/TestServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/TestServer.java
|
||||
@@ -37,36 +37,11 @@ public final class TestServer {
|
||||
@@ -38,46 +38,11 @@ public final class TestServer {
|
||||
|
||||
when(instance.getBukkitVersion()).thenReturn("BukkitVersion_" + TestServer.class.getPackage().getImplementationVersion());
|
||||
|
||||
@ -460,6 +460,16 @@ index c79faf4197f9c0a7256cefe2b001182102d2b796..55f1bc7d01e5184172559c43b8327ac8
|
||||
-
|
||||
- @NotNull
|
||||
- @Override
|
||||
- public Keyed getOrThrow(@NotNull NamespacedKey key) {
|
||||
- Keyed keyed = get(key);
|
||||
-
|
||||
- Preconditions.checkArgument(keyed != null, "No %s registry entry found for key %s.", aClass, key);
|
||||
-
|
||||
- return keyed;
|
||||
- }
|
||||
-
|
||||
- @NotNull
|
||||
- @Override
|
||||
- public Stream<Keyed> stream() {
|
||||
- throw new UnsupportedOperationException("Not supported");
|
||||
- }
|
||||
|
@ -43,10 +43,10 @@ index 0000000000000000000000000000000000000000..f1cd5a4f37eee8975ac3d0421b524afc
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index c2552d37295443f79abfe58f91c8261ce06661e8..7f6cb6471c5f324e2bcdf47d6c7628c2231d7727 100644
|
||||
index 39bf5b2e93f45000d2e894b5c3d059b889068aae..4ceb90598e4060678c2382568d4a691769efe126 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4690,6 +4690,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -4709,6 +4709,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
}
|
||||
// Paper end - add Translatable
|
||||
|
||||
@ -110,7 +110,7 @@ index e7931f73f10fe35ebd5fe4a04b036d53bb117ebd..cbce835ed6d44e5b8c9aaae4e36a77f8
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index 69e7cbe49ff2388dea0214f6cb26f36f29ec1453..d2af613c56010f3b0dd0d3ff7b438193127353d0 100644
|
||||
index 60eec8a12f01562678732bcf38ac407e70d74965..45fc5fab3817a8d9e1c83bcfb0add9eba023abfe 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -994,5 +994,17 @@ public class ItemStack implements Cloneable, ConfigurationSerializable, Translat
|
||||
@ -132,10 +132,10 @@ index 69e7cbe49ff2388dea0214f6cb26f36f29ec1453..d2af613c56010f3b0dd0d3ff7b438193
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
index 5dd1c084e42ee93f3a358f58ed76b0a7d36f0713..2b5a18fe7e885fa9b581c0afb299e31f3db2690c 100644
|
||||
index 2b1a1ad04212651ad5a43edecca12b495ce61fd5..9077257ed935a26af057b9d090f7d819956ebbce 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
@@ -2311,4 +2311,13 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||
@@ -2306,4 +2306,13 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||
@Override
|
||||
@NotNull String getTranslationKey();
|
||||
// Paper end - add Translatable
|
||||
|
@ -237,10 +237,10 @@ index b558fa73dbcf3747690933e6aadf7061a0de2630..be68351555bde59a4e55bf1bad261e9f
|
||||
|
||||
@NotNull
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 7f6cb6471c5f324e2bcdf47d6c7628c2231d7727..d0aaf145cf34e0c02d5c7b842c203d0630b04b53 100644
|
||||
index 4ceb90598e4060678c2382568d4a691769efe126..052d319e69f22277cb6e379e47380c7dc466d120 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -5499,6 +5499,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -5518,6 +5518,7 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
* @param world the world to check
|
||||
* @return true if this material can be used in this World.
|
||||
*/
|
||||
|
@ -41,10 +41,10 @@ index 0000000000000000000000000000000000000000..aec3b41d7c3388e26fa203e3c062f1e6
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index daae9bb234d2e10530b2bed35fada98652514e0e..53dbb852d6a34f0814b81852c7f10f55c38299e7 100644
|
||||
index 269a7b42479c053e3320b6a0f9ca2013cfe4bdad..ddd44191c67c1926e615edabb82ed0b592fbee09 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -290,11 +290,7 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
@@ -284,11 +284,7 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
* Cursed enchantments are found the same way treasure enchantments are
|
||||
*
|
||||
* @return true if the enchantment is cursed
|
||||
@ -56,7 +56,7 @@ index daae9bb234d2e10530b2bed35fada98652514e0e..53dbb852d6a34f0814b81852c7f10f55
|
||||
public abstract boolean isCursed();
|
||||
|
||||
/**
|
||||
@@ -330,6 +326,118 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
@@ -324,6 +320,118 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
public abstract net.kyori.adventure.text.@NotNull Component displayName(int level);
|
||||
// Paper end
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Improve item default attribute API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index d0aaf145cf34e0c02d5c7b842c203d0630b04b53..5c869feaecd95dbdd658e16f5739bb41540f18bd 100644
|
||||
index 052d319e69f22277cb6e379e47380c7dc466d120..eec1e53ce607d36a2e72f16a4a351869fd2f609f 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4705,6 +4705,23 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -4724,6 +4724,23 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
}
|
||||
// Paper end - item rarity API
|
||||
|
||||
@ -32,7 +32,7 @@ index d0aaf145cf34e0c02d5c7b842c203d0630b04b53..5c869feaecd95dbdd658e16f5739bb41
|
||||
/**
|
||||
* Do not use for any reason.
|
||||
*
|
||||
@@ -5412,13 +5429,34 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -5431,13 +5448,34 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
}
|
||||
}
|
||||
|
||||
@ -72,10 +72,10 @@ index d0aaf145cf34e0c02d5c7b842c203d0630b04b53..5c869feaecd95dbdd658e16f5739bb41
|
||||
*
|
||||
* @param slot the {@link EquipmentSlot} to check
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
index 2b5a18fe7e885fa9b581c0afb299e31f3db2690c..a6d1dde422de98f178c0c9add99e01203a35e5cb 100644
|
||||
index 9077257ed935a26af057b9d090f7d819956ebbce..c42cfa76ff73a3ce8a164cb94a9c3f553b005ea5 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
@@ -2261,6 +2261,21 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||
@@ -2256,6 +2256,21 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||
// @NotNull
|
||||
// EquipmentSlot getEquipmentSlot();
|
||||
|
||||
|
@ -258,10 +258,10 @@ index adb20a9abba33c32d553f620fa82b27dff64ab5f..1f6702b0de00b87dbed7f6d93e911655
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
|
||||
index 117e3e8c63e56247213b2a9cf9908915d4c65665..70cc76f0c1f4ba23bfa78591e8144bbf8d3f0868 100644
|
||||
index 104b9c8a28ddbab8f47dbf3a0ac06bec35d7c003..5101553bb71d60fee7ac234f7ef2863781dd7742 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Cat.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Cat.java
|
||||
@@ -94,4 +94,36 @@ public interface Cat extends Tameable, Sittable {
|
||||
@@ -90,4 +90,36 @@ public interface Cat extends Tameable, Sittable {
|
||||
return Lists.newArrayList(Registry.CAT_VARIANT).toArray(new Type[0]);
|
||||
}
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Option to prevent data components copy in smithing recipes
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/SmithingRecipe.java b/src/main/java/org/bukkit/inventory/SmithingRecipe.java
|
||||
index 0235f4aa50eb69f87068005c669bd486899025d6..1ef9a715a2736e88a16083c6873803a8bd6bcf29 100644
|
||||
index 717878019aa78bc3ab1acadd2908567b70614320..ee462ca9fd3e0ddcdb0fffd5dba91d82fa6ad08f 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/SmithingRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/SmithingRecipe.java
|
||||
@@ -13,6 +13,7 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
@@ -14,6 +14,7 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
private final ItemStack result;
|
||||
private final RecipeChoice base;
|
||||
private final RecipeChoice addition;
|
||||
@ -16,10 +16,10 @@ index 0235f4aa50eb69f87068005c669bd486899025d6..1ef9a715a2736e88a16083c6873803a8
|
||||
|
||||
/**
|
||||
* Create a smithing recipe to produce the specified result ItemStack.
|
||||
@@ -28,6 +29,23 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
@@ -29,6 +30,23 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
*/
|
||||
@Deprecated
|
||||
public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
|
||||
public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice base, @Nullable RecipeChoice addition) {
|
||||
+ // Paper start
|
||||
+ this(key, result, base, addition, true);
|
||||
+ }
|
||||
@ -34,13 +34,13 @@ index 0235f4aa50eb69f87068005c669bd486899025d6..1ef9a715a2736e88a16083c6873803a8
|
||||
+ * @deprecated use {@link SmithingTrimRecipe} or {@link SmithingTransformRecipe}
|
||||
+ */
|
||||
+ @Deprecated
|
||||
+ public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
|
||||
+ public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice base, @Nullable RecipeChoice addition, boolean copyDataComponents) {
|
||||
+ this.copyDataComponents = copyDataComponents;
|
||||
+ // Paper end
|
||||
this.key = key;
|
||||
this.result = result;
|
||||
this.base = base;
|
||||
@@ -65,4 +83,26 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
@@ -66,4 +84,26 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
public NamespacedKey getKey() {
|
||||
return this.key;
|
||||
}
|
||||
@ -68,10 +68,10 @@ index 0235f4aa50eb69f87068005c669bd486899025d6..1ef9a715a2736e88a16083c6873803a8
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java b/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
|
||||
index 08fd3eca8383cdc2d06c3ce973e8c402d279077e..68e7132d77151b7b8312638d8bb79ea59e2fa5a6 100644
|
||||
index 7a9d77a0cd1c287a3f940f94d4398f84720488aa..e5726da0507ee70cb9dd76c57da6a8442e771307 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
|
||||
@@ -23,6 +23,22 @@ public class SmithingTransformRecipe extends SmithingRecipe {
|
||||
@@ -24,6 +24,22 @@ public class SmithingTransformRecipe extends SmithingRecipe {
|
||||
super(key, result, base, addition);
|
||||
this.template = template;
|
||||
}
|
||||
@ -86,7 +86,7 @@ index 08fd3eca8383cdc2d06c3ce973e8c402d279077e..68e7132d77151b7b8312638d8bb79ea5
|
||||
+ * @param addition The addition ingredient
|
||||
+ * @param copyDataComponents whether to copy the data components from the input base item to the output
|
||||
+ */
|
||||
+ public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
|
||||
+ public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice template, @Nullable RecipeChoice base, @Nullable RecipeChoice addition, boolean copyDataComponents) {
|
||||
+ super(key, result, base, addition, copyDataComponents);
|
||||
+ this.template = template;
|
||||
+ }
|
||||
@ -95,10 +95,10 @@ index 08fd3eca8383cdc2d06c3ce973e8c402d279077e..68e7132d77151b7b8312638d8bb79ea5
|
||||
/**
|
||||
* Get the template recipe item.
|
||||
diff --git a/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java b/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java
|
||||
index 32cbdc342615e76ff7a896e67cb0736b0bdf1978..ce36bb5b030f17e11f74e987235be143c1925aa7 100644
|
||||
index 4271c54cfbb0fabd241794d8aea31374d7efe45a..232aa8aeef9e34146e413e56b3681919c8850687 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java
|
||||
@@ -23,6 +23,21 @@ public class SmithingTrimRecipe extends SmithingRecipe implements ComplexRecipe
|
||||
@@ -24,6 +24,21 @@ public class SmithingTrimRecipe extends SmithingRecipe implements ComplexRecipe
|
||||
super(key, new ItemStack(Material.AIR), base, addition);
|
||||
this.template = template;
|
||||
}
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add hasCollision methods to various places
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 5c869feaecd95dbdd658e16f5739bb41540f18bd..6959f36023b12ec2dece9b91a3b8a5d07b635430 100644
|
||||
index eec1e53ce607d36a2e72f16a4a351869fd2f609f..23fff8ee71b99aab8e650f3916511b7f34b5eb4e 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -4722,6 +4722,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -4741,6 +4741,21 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
}
|
||||
// Paper end - item default attributes API
|
||||
|
||||
@ -67,10 +67,10 @@ index f4a739d8022d19a7ae0ee9bf93eb5c4846b4bd40..94e1278340c0d9d2be9edc68f6454143
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
|
||||
index fc21405a18bac88678653674f9d42a08b3d7cb9b..0fa0fa4aaf55710030a2220dee98e11764d8d27a 100644
|
||||
index 5bfa98695265cdfd246411f93ab670d2c9e64ef1..a58ef2238208fbb55341f4532eaa288577ed8c0e 100644
|
||||
--- a/src/main/java/org/bukkit/block/BlockType.java
|
||||
+++ b/src/main/java/org/bukkit/block/BlockType.java
|
||||
@@ -3507,4 +3507,13 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
|
||||
@@ -3511,4 +3511,13 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
|
||||
@Override
|
||||
@NotNull String getTranslationKey();
|
||||
// Paper end - add Translatable
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] More PotionEffectType API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index c1f46c27f0571ce54f35ee0fab9b586ea62ee832..7870a796e719148a42d18f1497b56c0d8f651a43 100644
|
||||
index 39997047be9f3796d8d5d8934eb361e23d273ebd..6112db5d1153d045f2271038bada6b46d1a6a051 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -331,6 +331,33 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -361,6 +361,15 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
* @see GameEvent
|
||||
*/
|
||||
Registry<GameEvent> GAME_EVENT = io.papermc.paper.registry.RegistryAccess.registryAccess().getRegistry(io.papermc.paper.registry.RegistryKey.GAME_EVENT); // Paper
|
||||
@ -19,31 +19,13 @@ index c1f46c27f0571ce54f35ee0fab9b586ea62ee832..7870a796e719148a42d18f1497b56c0d
|
||||
+ *
|
||||
+ * @see org.bukkit.potion.PotionEffectType
|
||||
+ */
|
||||
+ Registry<org.bukkit.potion.PotionEffectType> POTION_EFFECT_TYPE = new Registry<org.bukkit.potion.PotionEffectType>() {
|
||||
+
|
||||
+ @Nullable
|
||||
+ @Override
|
||||
+ public org.bukkit.potion.PotionEffectType get(@NotNull NamespacedKey key) {
|
||||
+ return org.bukkit.potion.PotionEffectType.getByKey(key);
|
||||
+ }
|
||||
+
|
||||
+ @NotNull
|
||||
+ @Override
|
||||
+ public Iterator<org.bukkit.potion.PotionEffectType> iterator() {
|
||||
+ return java.util.Arrays.stream(org.bukkit.potion.PotionEffectType.values()).iterator();
|
||||
+ }
|
||||
+
|
||||
+ @Override
|
||||
+ public @NotNull Stream<org.bukkit.potion.PotionEffectType> stream() {
|
||||
+ return StreamSupport.stream(this.spliterator(), false);
|
||||
+ }
|
||||
+ };
|
||||
+ Registry<org.bukkit.potion.PotionEffectType> POTION_EFFECT_TYPE = EFFECT;
|
||||
+ // Paper end - potion effect type registry
|
||||
/**
|
||||
* Get the object by its key.
|
||||
*
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
index 42d893ce75a75fe46a4e52b17dc405f5b609ab86..10fa51d116b40450b51af9110d5637f3505ebf65 100644
|
||||
index e2d1d26b9debbe1ef852f0260180200a916a7db7..d02bb37768404422969d8b93e009960d0a693a93 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
@@ -17,7 +17,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -55,7 +37,7 @@ index 42d893ce75a75fe46a4e52b17dc405f5b609ab86..10fa51d116b40450b51af9110d5637f3
|
||||
private static final BiMap<Integer, PotionEffectType> ID_MAP = HashBiMap.create();
|
||||
|
||||
/**
|
||||
@@ -361,4 +361,57 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
||||
@@ -360,4 +360,57 @@ public abstract class PotionEffectType implements Keyed, Translatable {
|
||||
public static PotionEffectType[] values() {
|
||||
return Lists.newArrayList(Registry.EFFECT).toArray(new PotionEffectType[0]);
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ index 0000000000000000000000000000000000000000..049471bac6c9b830fe7717c129173a72
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
|
||||
index 70cc76f0c1f4ba23bfa78591e8144bbf8d3f0868..60cf07bff0898176c8d7af84b3e65d7a1ee8cf2e 100644
|
||||
index 5101553bb71d60fee7ac234f7ef2863781dd7742..de422f00f8fd1975669ee5431c466c9c16d699af 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Cat.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Cat.java
|
||||
@@ -13,7 +13,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@ -154,10 +154,10 @@ index 70cc76f0c1f4ba23bfa78591e8144bbf8d3f0868..60cf07bff0898176c8d7af84b3e65d7a
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/entity/Wolf.java b/src/main/java/org/bukkit/entity/Wolf.java
|
||||
index 03c4a3dedf97e06734f1ec975055214809f1fe61..4b84c04675775e2a606630b00de8afe51665cebc 100644
|
||||
index 91e96ee5362fd71d28deef1687ebeb0d8dfa05b9..c73489f4b745bc84501ce94f0227b034d9768eae 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Wolf.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Wolf.java
|
||||
@@ -10,7 +10,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -9,7 +9,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
/**
|
||||
* Represents a Wolf
|
||||
*/
|
||||
@ -166,7 +166,7 @@ index 03c4a3dedf97e06734f1ec975055214809f1fe61..4b84c04675775e2a606630b00de8afe5
|
||||
|
||||
/**
|
||||
* Checks if this wolf is angry
|
||||
@@ -35,6 +35,7 @@ public interface Wolf extends Tameable, Sittable {
|
||||
@@ -34,6 +34,7 @@ public interface Wolf extends Tameable, Sittable {
|
||||
* @return the color of the collar
|
||||
*/
|
||||
@NotNull
|
||||
@ -174,7 +174,7 @@ index 03c4a3dedf97e06734f1ec975055214809f1fe61..4b84c04675775e2a606630b00de8afe5
|
||||
public DyeColor getCollarColor();
|
||||
|
||||
/**
|
||||
@@ -42,6 +43,7 @@ public interface Wolf extends Tameable, Sittable {
|
||||
@@ -41,6 +42,7 @@ public interface Wolf extends Tameable, Sittable {
|
||||
*
|
||||
* @param color the color to apply
|
||||
*/
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose codepoint limit in YamlConfigOptions, and increase
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java
|
||||
index a090ef390dddd546ebf323aee4545cbe9950e098..488e4931006d12700782c76766876e3863308775 100644
|
||||
index 9ae41b2bd454274a15abbd557ac397724e58d184..018c20fefeee43970c8c5b5d5f2ad9c297eeccb3 100644
|
||||
--- a/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java
|
||||
+++ b/src/main/java/org/bukkit/configuration/file/YamlConfiguration.java
|
||||
@@ -97,6 +97,7 @@ public class YamlConfiguration extends FileConfiguration {
|
||||
@@ -98,6 +98,7 @@ public class YamlConfiguration extends FileConfiguration {
|
||||
public void loadFromString(@NotNull String contents) throws InvalidConfigurationException {
|
||||
Preconditions.checkArgument(contents != null, "Contents cannot be null");
|
||||
yamlLoaderOptions.setProcessComments(options().parseComments());
|
||||
|
@ -25,10 +25,10 @@ index 7522c611b5214dd09867c434d5f7cf161f5c04ca..026b1832bcd163ab89668c991bf002e6
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||
index 6959f36023b12ec2dece9b91a3b8a5d07b635430..de469f32dd9a01e0e2fde016044a783dde0c5b98 100644
|
||||
index 23fff8ee71b99aab8e650f3916511b7f34b5eb4e..77a15a99e441bd81650806142581bd5b24f30e10 100644
|
||||
--- a/src/main/java/org/bukkit/Material.java
|
||||
+++ b/src/main/java/org/bukkit/Material.java
|
||||
@@ -2499,6 +2499,8 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
@@ -2501,6 +2501,8 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla
|
||||
EGG(21603, 16),
|
||||
COMPASS(24139),
|
||||
RECOVERY_COMPASS(12710),
|
||||
@ -196,7 +196,7 @@ index e404cd1e2ba44e4c2d09524bc7cf730d8ffbdabd..cea0ebf50876dd32ab7fba6025b30f29
|
||||
public interface BundleMeta extends ItemMeta {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
index 4d96cf385fa5c6d80097bdf6282be5f0eed73307..fb6b1491202bbc1ea0d5475c9c6574b0c16943b4 100644
|
||||
index 0899981b9ab1f98dacc617156d12779421e4c275..6c33fbf720a2e11655e254aeb516e08831c2adf4 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapCursor.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
@@ -314,12 +314,26 @@ public final class MapCursor {
|
||||
|
@ -28,11 +28,11 @@ index 042d1d932a33022e4fc873652f70dc6ed342d46a..e57e34064262b90221b0621f1d13e970
|
||||
@Override
|
||||
public NamespacedKey getKey() {
|
||||
diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java
|
||||
index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..98fdfc8978fea1937e31a7427433a1927d42ec7d 100644
|
||||
index c9f02466a04d20579fe2258bb02acf98e163ca81..bffd4ab2d08e5c3f83a49a31e1e55cc1eab7b319 100644
|
||||
--- a/src/main/java/org/bukkit/MusicInstrument.java
|
||||
+++ b/src/main/java/org/bukkit/MusicInstrument.java
|
||||
@@ -53,6 +53,16 @@ public abstract class MusicInstrument implements Keyed, net.kyori.adventure.tran
|
||||
return instrument;
|
||||
@@ -47,6 +47,16 @@ public abstract class MusicInstrument implements Keyed, net.kyori.adventure.tran
|
||||
return Registry.INSTRUMENT.getOrThrow(NamespacedKey.minecraft(key));
|
||||
}
|
||||
|
||||
+ // Paper start - deprecate getKey
|
||||
@ -49,10 +49,10 @@ index 62d2b3f950860dee0898d77b0a29635c3f9a7e23..98fdfc8978fea1937e31a7427433a192
|
||||
@Override
|
||||
public @NotNull String translationKey() {
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 04dfab3fb9a9a3bc7e69cb0c1f5346f3c7d87d72..82381ea98af1c9216a2989ea83ba4aa90ba69741 100644
|
||||
index 6112db5d1153d045f2271038bada6b46d1a6a051..67cf3fcad21a8977d6fad172cc776b628ab68f25 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -367,6 +367,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -379,6 +379,79 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@Nullable
|
||||
T get(@NotNull NamespacedKey key);
|
||||
|
||||
@ -130,9 +130,9 @@ index 04dfab3fb9a9a3bc7e69cb0c1f5346f3c7d87d72..82381ea98af1c9216a2989ea83ba4aa9
|
||||
+ // Paper end - improve Registry
|
||||
+
|
||||
/**
|
||||
* Returns a new stream, which contains all registry items, which are registered to the registry.
|
||||
* Get the object by its key.
|
||||
*
|
||||
@@ -441,5 +514,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -475,5 +548,12 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
public Class<T> getType() {
|
||||
return this.type;
|
||||
}
|
||||
@ -164,7 +164,7 @@ index 8c7b50906fc5b84c5570408f357410810bbfbded..7a35120c82b88774de777d3c3176ef55
|
||||
@Override
|
||||
public NamespacedKey getKey() {
|
||||
diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||
index 9e90572745909538e942b7fbe788b5286c6cc9a3..8f651d3ebd5907836b5d09363a8b60f55e4afa38 100644
|
||||
index eaf6cd758344eeba29f00f822a50c93704af8bda..eb192030832e1741850871bec9bf999f014b6fc1 100644
|
||||
--- a/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||
+++ b/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||
@@ -56,6 +56,13 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
|
||||
@ -182,10 +182,10 @@ index 9e90572745909538e942b7fbe788b5286c6cc9a3..8f651d3ebd5907836b5d09363a8b60f5
|
||||
@NotNull
|
||||
public NamespacedKey getKey();
|
||||
diff --git a/src/main/java/org/bukkit/generator/structure/Structure.java b/src/main/java/org/bukkit/generator/structure/Structure.java
|
||||
index 1a766e68713d4014783b3224b9395644116784fa..978054ee364f9a3330525b9b50da5325ebb6ef57 100644
|
||||
index 20a7fd27ba3a029d58dd18ad9b470ffaed8c9578..a773550549b4093a5fb4ef47284c438dcddd99ab 100644
|
||||
--- a/src/main/java/org/bukkit/generator/structure/Structure.java
|
||||
+++ b/src/main/java/org/bukkit/generator/structure/Structure.java
|
||||
@@ -60,4 +60,13 @@ public abstract class Structure implements Keyed {
|
||||
@@ -61,4 +61,13 @@ public abstract class Structure implements Keyed {
|
||||
*/
|
||||
@NotNull
|
||||
public abstract StructureType getStructureType();
|
||||
@ -200,10 +200,10 @@ index 1a766e68713d4014783b3224b9395644116784fa..978054ee364f9a3330525b9b50da5325
|
||||
+ // Paper end - deprecate getKey
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
|
||||
index 941fac4eee338870d8c30cb1f64cab572cf54548..9e98625d42199c169f79335bb6231ec355c3b930 100644
|
||||
index 804cb7162b34225d5dd84aada283de568d7d6592..2a7bedf850896e358213c2a201ca3d611cb9ea67 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimMaterial.java
|
||||
@@ -68,4 +68,14 @@ public interface TrimMaterial extends Keyed, Translatable {
|
||||
@@ -74,4 +74,14 @@ public interface TrimMaterial extends Keyed, Translatable {
|
||||
@Deprecated(forRemoval = true)
|
||||
@org.jetbrains.annotations.NotNull String getTranslationKey();
|
||||
// Paper end - adventure
|
||||
@ -219,10 +219,10 @@ index 941fac4eee338870d8c30cb1f64cab572cf54548..9e98625d42199c169f79335bb6231ec3
|
||||
+ // Paper end - Registry#getKey
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
|
||||
index f2242ddc4085f7e7cdd748d860857822e3d9b007..b84e495cb4bb4f833b6193c72ae241f0c69d491c 100644
|
||||
index 56cfe665daba1754e41f633d7c18172bebf87028..db657206c158e755227e8ef8e102a2ee2cc3bf0a 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/meta/trim/TrimPattern.java
|
||||
@@ -100,4 +100,14 @@ public interface TrimPattern extends Keyed, Translatable {
|
||||
@@ -106,4 +106,14 @@ public interface TrimPattern extends Keyed, Translatable {
|
||||
@Deprecated(forRemoval = true)
|
||||
@org.jetbrains.annotations.NotNull String getTranslationKey();
|
||||
// Paper end - adventure
|
||||
|
@ -1,18 +0,0 @@
|
||||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||
From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com>
|
||||
Date: Fri, 3 May 2024 22:56:12 +0200
|
||||
Subject: [PATCH] Add missing wind charge damage type
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/damage/DamageType.java b/src/main/java/org/bukkit/damage/DamageType.java
|
||||
index 69abda41ef3a1d8948982d16b193a9a565fafa38..387f04a8201d62ab86450de043772049212a8bce 100644
|
||||
--- a/src/main/java/org/bukkit/damage/DamageType.java
|
||||
+++ b/src/main/java/org/bukkit/damage/DamageType.java
|
||||
@@ -66,6 +66,7 @@ public interface DamageType extends Keyed, Translatable {
|
||||
public static final DamageType BAD_RESPAWN_POINT = getDamageType("bad_respawn_point");
|
||||
public static final DamageType OUTSIDE_BORDER = getDamageType("outside_border");
|
||||
public static final DamageType GENERIC_KILL = getDamageType("generic_kill");
|
||||
+ DamageType WIND_CHARGE = getDamageType("wind_charge"); // Paper
|
||||
|
||||
@NotNull
|
||||
private static DamageType getDamageType(@NotNull String key) {
|
@ -6,7 +6,7 @@ Subject: [PATCH] Brigadier based command API
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 76aa23da778b0fe8a093429c56cb29b044359b40..ab84a1405acc1f0d5f267892243b82b8dab03e21 100644
|
||||
index be8492b23d10332d046150a4ff18c67cc1b0f5d2..6c1cba3e87d2e3cb3eec65345ed7dcc56fd96363 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -27,6 +27,7 @@ configurations.api {
|
@ -275,13 +275,13 @@ index 3bf5064cd6ceb05ea98b18993da46c67be140115..79db6dbc0367de2eaa397674624c765d
|
||||
ingredients.add(new RecipeChoice.ExactChoice(item));
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/SmithingRecipe.java b/src/main/java/org/bukkit/inventory/SmithingRecipe.java
|
||||
index 1ef9a715a2736e88a16083c6873803a8bd6bcf29..3072858dd4413129ec1737572838c2ea5ffd84bc 100644
|
||||
index ee462ca9fd3e0ddcdb0fffd5dba91d82fa6ad08f..0fb110a995bddcdf09b1902784e43cbe67510fba 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/SmithingRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/SmithingRecipe.java
|
||||
@@ -44,12 +44,13 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
@@ -45,12 +45,13 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
*/
|
||||
@Deprecated
|
||||
public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
|
||||
public SmithingRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice base, @Nullable RecipeChoice addition, boolean copyDataComponents) {
|
||||
+ com.google.common.base.Preconditions.checkArgument(!result.isEmpty() || this instanceof ComplexRecipe, "Recipe cannot have an empty result."); // Paper
|
||||
this.copyDataComponents = copyDataComponents;
|
||||
// Paper end
|
||||
@ -289,16 +289,34 @@ index 1ef9a715a2736e88a16083c6873803a8bd6bcf29..3072858dd4413129ec1737572838c2ea
|
||||
this.result = result;
|
||||
- this.base = base;
|
||||
- this.addition = addition;
|
||||
+ this.base = base.validate(true).clone(); // Paper
|
||||
+ this.addition = addition.validate(true).clone(); // Paper
|
||||
+ this.base = base == null ? RecipeChoice.empty() : base.validate(true).clone(); // Paper
|
||||
+ this.addition = addition == null ? RecipeChoice.empty() : addition.validate(true).clone(); // Paper
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,7 +59,7 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
*
|
||||
* @return base choice
|
||||
*/
|
||||
- @Nullable
|
||||
+ @NotNull // Paper - fix issues with recipe api
|
||||
public RecipeChoice getBase() {
|
||||
return (base != null) ? base.clone() : null;
|
||||
}
|
||||
@@ -68,7 +69,7 @@ public class SmithingRecipe implements Recipe, Keyed {
|
||||
*
|
||||
* @return addition choice
|
||||
*/
|
||||
- @Nullable
|
||||
+ @NotNull // Paper - fix issues with recipe api
|
||||
public RecipeChoice getAddition() {
|
||||
return (addition != null) ? addition.clone() : null;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java b/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
|
||||
index 68e7132d77151b7b8312638d8bb79ea59e2fa5a6..60bfdd6b8814be8e3ffdfaef8a5ac7eeff9a5830 100644
|
||||
index e5726da0507ee70cb9dd76c57da6a8442e771307..1ca5058ee3bf75e1f70c8bc33842b466f65a6240 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/SmithingTransformRecipe.java
|
||||
@@ -15,13 +15,13 @@ public class SmithingTransformRecipe extends SmithingRecipe {
|
||||
@@ -16,13 +16,13 @@ public class SmithingTransformRecipe extends SmithingRecipe {
|
||||
*
|
||||
* @param key The unique recipe key
|
||||
* @param result The item you want the recipe to create.
|
||||
@ -309,14 +327,15 @@ index 68e7132d77151b7b8312638d8bb79ea59e2fa5a6..60bfdd6b8814be8e3ffdfaef8a5ac7ee
|
||||
+ * @param base The base ingredient ({@link RecipeChoice#empty()} can be used)
|
||||
+ * @param addition The addition ingredient ({@link RecipeChoice#empty()} can be used)
|
||||
*/
|
||||
public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
|
||||
- public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice template, @Nullable RecipeChoice base, @Nullable RecipeChoice addition) {
|
||||
+ public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) { // Paper - fix issues with recipe api - prevent null choices
|
||||
super(key, result, base, addition);
|
||||
- this.template = template;
|
||||
+ this.template = template.validate(true).clone(); // Paper
|
||||
+ this.template = template == null ? RecipeChoice.empty() : template.validate(true).clone(); // Paper - fix issues with recipe api - prevent null choices
|
||||
}
|
||||
// Paper start
|
||||
/**
|
||||
@@ -29,14 +29,14 @@ public class SmithingTransformRecipe extends SmithingRecipe {
|
||||
@@ -30,14 +30,14 @@ public class SmithingTransformRecipe extends SmithingRecipe {
|
||||
*
|
||||
* @param key The unique recipe key
|
||||
* @param result The item you want the recipe to create.
|
||||
@ -328,18 +347,28 @@ index 68e7132d77151b7b8312638d8bb79ea59e2fa5a6..60bfdd6b8814be8e3ffdfaef8a5ac7ee
|
||||
+ * @param addition The addition ingredient ({@link RecipeChoice#empty()} can be used)
|
||||
* @param copyDataComponents whether to copy the data components from the input base item to the output
|
||||
*/
|
||||
public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
|
||||
- public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @Nullable RecipeChoice template, @Nullable RecipeChoice base, @Nullable RecipeChoice addition, boolean copyDataComponents) {
|
||||
+ public SmithingTransformRecipe(@NotNull NamespacedKey key, @NotNull ItemStack result, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
|
||||
super(key, result, base, addition, copyDataComponents);
|
||||
- this.template = template;
|
||||
+ this.template = template.validate(true).clone();
|
||||
+ this.template = template == null ? RecipeChoice.empty() : template.validate(true).clone(); // Paper - fix issues with recipe api - prevent null choices
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -46,7 +46,7 @@ public class SmithingTransformRecipe extends SmithingRecipe {
|
||||
*
|
||||
* @return template choice
|
||||
*/
|
||||
- @Nullable
|
||||
+ @NotNull // Paper - fix issues with recipe api - prevent null choices
|
||||
public RecipeChoice getTemplate() {
|
||||
return (template != null) ? template.clone() : null;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java b/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java
|
||||
index ce36bb5b030f17e11f74e987235be143c1925aa7..9ac27cbe7dcff0403ef34727d0461b8201aca6f1 100644
|
||||
index 232aa8aeef9e34146e413e56b3681919c8850687..a8e125ef6dd9e8d6af74b68088df91d4c2ea7a8a 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/SmithingTrimRecipe.java
|
||||
@@ -15,27 +15,27 @@ public class SmithingTrimRecipe extends SmithingRecipe implements ComplexRecipe
|
||||
@@ -16,27 +16,27 @@ public class SmithingTrimRecipe extends SmithingRecipe implements ComplexRecipe
|
||||
* Create a smithing recipe to produce the specified result ItemStack.
|
||||
*
|
||||
* @param key The unique recipe key
|
||||
@ -350,10 +379,11 @@ index ce36bb5b030f17e11f74e987235be143c1925aa7..9ac27cbe7dcff0403ef34727d0461b82
|
||||
+ * @param base The base ingredient ({@link RecipeChoice#empty()} can be used)
|
||||
+ * @param addition The addition ingredient ({@link RecipeChoice#empty()} can be used)
|
||||
*/
|
||||
public SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) {
|
||||
- public SmithingTrimRecipe(@NotNull NamespacedKey key, @Nullable RecipeChoice template, @Nullable RecipeChoice base, @Nullable RecipeChoice addition) {
|
||||
+ public SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition) { // Paper - fix issues with recipe api - prevent null choices
|
||||
super(key, new ItemStack(Material.AIR), base, addition);
|
||||
- this.template = template;
|
||||
+ this.template = template.validate(true).clone(); // Paper
|
||||
+ this.template = template == null ? RecipeChoice.empty() : template.validate(true).clone(); // Paper
|
||||
}
|
||||
// Paper start
|
||||
/**
|
||||
@ -368,13 +398,23 @@ index ce36bb5b030f17e11f74e987235be143c1925aa7..9ac27cbe7dcff0403ef34727d0461b82
|
||||
+ * @param addition The addition ingredient ({@link RecipeChoice#empty()} can be used)
|
||||
* @param copyDataComponents whether to copy the data components from the input base item to the output
|
||||
*/
|
||||
public SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
|
||||
- public SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) {
|
||||
+ public SmithingTrimRecipe(@NotNull NamespacedKey key, @NotNull RecipeChoice template, @NotNull RecipeChoice base, @NotNull RecipeChoice addition, boolean copyDataComponents) { // Paper - fix issues with recipe api - prevent null choices
|
||||
super(key, new ItemStack(Material.AIR), base, addition, copyDataComponents);
|
||||
- this.template = template;
|
||||
+ this.template = template.validate(true).clone(); // Paper
|
||||
+ this.template = template == null ? RecipeChoice.empty() : template.validate(true).clone(); // Paper
|
||||
}
|
||||
// Paper end
|
||||
|
||||
@@ -45,7 +45,7 @@ public class SmithingTrimRecipe extends SmithingRecipe implements ComplexRecipe
|
||||
*
|
||||
* @return template choice
|
||||
*/
|
||||
- @Nullable
|
||||
+ @NotNull // Paper - fix issues with recipe api - prevent null choices
|
||||
public RecipeChoice getTemplate() {
|
||||
return (template != null) ? template.clone() : null;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java b/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java
|
||||
index bc3440eb72127824b3961fbdae583bb61385f65e..17b33f8e6e3dc6a22686a498fa944382e8767077 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/StonecuttingRecipe.java
|
@ -19,27 +19,6 @@ index 637fa73d4366c2d88e2716e5c8d3465706d788a7..0f03c546ecdd6383fb36a362d18d6fb5
|
||||
this.flicker = flicker;
|
||||
this.trail = trail;
|
||||
this.colors = colors;
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
index a6d1dde422de98f178c0c9add99e01203a35e5cb..01ec84248a681180088fb1d7d22b80f8572b0305 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
@@ -31,6 +31,7 @@ import org.bukkit.inventory.meta.MapMeta;
|
||||
import org.bukkit.inventory.meta.MusicInstrumentMeta;
|
||||
import org.bukkit.inventory.meta.OminousBottleMeta;
|
||||
import org.bukkit.inventory.meta.PotionMeta;
|
||||
+import org.bukkit.inventory.meta.ShieldMeta;
|
||||
import org.bukkit.inventory.meta.SkullMeta;
|
||||
import org.bukkit.inventory.meta.SpawnEggMeta;
|
||||
import org.bukkit.inventory.meta.SuspiciousStewMeta;
|
||||
@@ -1893,7 +1894,7 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||
/**
|
||||
* ItemMeta: {@link BlockStateMeta}
|
||||
*/
|
||||
- ItemType.Typed<BlockStateMeta> SHIELD = getItemType("shield");
|
||||
+ ItemType.Typed<ShieldMeta> SHIELD = getItemType("shield"); // Paper - update shield to its new meta
|
||||
ItemType.Typed<ItemMeta> TOTEM_OF_UNDYING = getItemType("totem_of_undying");
|
||||
ItemType.Typed<ItemMeta> SHULKER_SHELL = getItemType("shulker_shell");
|
||||
ItemType.Typed<ItemMeta> IRON_NUGGET = getItemType("iron_nugget");
|
||||
diff --git a/src/main/java/org/bukkit/inventory/meta/CompassMeta.java b/src/main/java/org/bukkit/inventory/meta/CompassMeta.java
|
||||
index 5040ab6190b41442986d2a734a8e782df0eab2f6..48bac38469ce3c5b2e59ad115375e7e5a2417da7 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/meta/CompassMeta.java
|
@ -809,10 +809,10 @@ index 0000000000000000000000000000000000000000..bf49125acc8a0508bf59674bba3ed350
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/Registry.java b/src/main/java/org/bukkit/Registry.java
|
||||
index 82381ea98af1c9216a2989ea83ba4aa90ba69741..d81f687cba38ec930c555b001afc0df93c21731b 100644
|
||||
index 67cf3fcad21a8977d6fad172cc776b628ab68f25..b4ef3133fdd9d79a3381cf8f659ff561ab2b4fad 100644
|
||||
--- a/src/main/java/org/bukkit/Registry.java
|
||||
+++ b/src/main/java/org/bukkit/Registry.java
|
||||
@@ -366,6 +366,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -378,6 +378,27 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
*/
|
||||
@Nullable
|
||||
T get(@NotNull NamespacedKey key);
|
||||
@ -840,7 +840,7 @@ index 82381ea98af1c9216a2989ea83ba4aa90ba69741..d81f687cba38ec930c555b001afc0df9
|
||||
|
||||
// Paper start - improve Registry
|
||||
/**
|
||||
@@ -440,6 +461,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -452,6 +473,34 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
}
|
||||
// Paper end - improve Registry
|
||||
|
||||
@ -873,9 +873,9 @@ index 82381ea98af1c9216a2989ea83ba4aa90ba69741..d81f687cba38ec930c555b001afc0df9
|
||||
+ // Paper end - RegistrySet API
|
||||
+
|
||||
/**
|
||||
* Returns a new stream, which contains all registry items, which are registered to the registry.
|
||||
* Get the object by its key.
|
||||
*
|
||||
@@ -521,5 +570,23 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
@@ -555,5 +604,23 @@ public interface Registry<T extends Keyed> extends Iterable<T> {
|
||||
return value.getKey();
|
||||
}
|
||||
// Paper end - improve Registry
|
@ -460,12 +460,12 @@ index 91ae9c0d3ec55ce417d4b447bf3d1b0d0c174b5e..1c8e77c7243cfedef6c4d1491cf98e6e
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/GameEvent.java b/src/main/java/org/bukkit/GameEvent.java
|
||||
index 6c9689baca1763e2ef79495d38618d587e792434..4583092c2d1ffe95be2831c5d5f0e904283ab762 100644
|
||||
index cb5f7dfcdbbb548d93ad21c215ba35a9e142a7b2..e2c632afdf555418dd1dc6ad6c5d197670e2211a 100644
|
||||
--- a/src/main/java/org/bukkit/GameEvent.java
|
||||
+++ b/src/main/java/org/bukkit/GameEvent.java
|
||||
@@ -147,4 +147,22 @@ public abstract class GameEvent implements Keyed {
|
||||
|
||||
return gameEvent;
|
||||
@@ -141,4 +141,22 @@ public abstract class GameEvent implements Keyed {
|
||||
private static GameEvent getEvent(@NotNull String key) {
|
||||
return Registry.GAME_EVENT.getOrThrow(NamespacedKey.minecraft(key));
|
||||
}
|
||||
+ // Paper start
|
||||
+ /**
|
||||
@ -487,10 +487,10 @@ index 6c9689baca1763e2ef79495d38618d587e792434..4583092c2d1ffe95be2831c5d5f0e904
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
index 01ec84248a681180088fb1d7d22b80f8572b0305..0168f0a14a3e899e84c5e36963ff79950ab580fb 100644
|
||||
index c42cfa76ff73a3ce8a164cb94a9c3f553b005ea5..15d68c4997f739c39675ef8ffa5ab7967dac59f2 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -46,7 +46,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* official replacement for the aforementioned enum. Entirely incompatible
|
||||
* changes may occur. Do not use this API in plugins.
|
||||
*/
|
@ -16,7 +16,7 @@ index 9bdba60fa96edbc4be5dcf54a815579db887048b..330e3013eda204aa9b33d5e1c3104e0b
|
||||
+ ItemStack createEmptyStack(); // Paper - proxy ItemStack
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemStack.java b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
index e80261e0e66e6d3969513593dbbf3d890158676c..9464c27fe536fc5765d945631215cbe90fd5fa47 100644
|
||||
index 77edc2e1c5c865db7e101aaa186657ac85edfed9..6fc8bddfcabca8c363e0d9f958f0ce7bc39099f1 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemStack.java
|
||||
@@ -28,10 +28,38 @@ import org.jetbrains.annotations.Nullable;
|
@ -7,10 +7,10 @@ In a separate patch because it uses RegistryKeySet which
|
||||
is after the previous "more enchant api" patch.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/enchantments/Enchantment.java b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
index 53dbb852d6a34f0814b81852c7f10f55c38299e7..f38321c437b19125d57d25419e3cb564e3928d89 100644
|
||||
index ddd44191c67c1926e615edabb82ed0b592fbee09..43e306584988e39a6daca78c621a937acdce48a1 100644
|
||||
--- a/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
+++ b/src/main/java/org/bukkit/enchantments/Enchantment.java
|
||||
@@ -438,6 +438,56 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
@@ -432,6 +432,56 @@ public abstract class Enchantment implements Keyed, Translatable, net.kyori.adve
|
||||
public abstract java.util.Set<org.bukkit.inventory.EquipmentSlotGroup> getActiveSlotGroups();
|
||||
// Paper end - more Enchantment API
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add enchantment seed update API
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/view/EnchantmentView.java b/src/main/java/org/bukkit/inventory/view/EnchantmentView.java
|
||||
index e3471d50673f55e0012f73695f845a71cf188d65..3812a540941337c56f3d4e89bb6a4eb8c914b903 100644
|
||||
index 18014f3aa0cb1aab7d8ca5d9257a3a5b5c54eff2..73740c2f570dd149bf3f00766cdfa9a25098de1a 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/view/EnchantmentView.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/view/EnchantmentView.java
|
||||
@@ -17,6 +17,15 @@ public interface EnchantmentView extends InventoryView {
|
||||
@@ -22,6 +22,15 @@ public interface EnchantmentView extends InventoryView {
|
||||
*/
|
||||
int getEnchantmentSeed();
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Deprecate for removal all OldEnum-related methods
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/block/banner/PatternType.java b/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||
index e2afb2582a27b94a922754115dbb6b4ca35e0154..b726cebe9abb7195ab6558609a56f9fd18ef2a00 100644
|
||||
index eb192030832e1741850871bec9bf999f014b6fc1..70904d6c43b93cb7b9d74d20666fac93a6b4996c 100644
|
||||
--- a/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||
+++ b/src/main/java/org/bukkit/block/banner/PatternType.java
|
||||
@@ -120,7 +120,7 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
|
||||
@@ -116,7 +116,7 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
|
||||
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
|
||||
*/
|
||||
@NotNull
|
||||
@ -17,7 +17,7 @@ index e2afb2582a27b94a922754115dbb6b4ca35e0154..b726cebe9abb7195ab6558609a56f9fd
|
||||
static PatternType valueOf(@NotNull String name) {
|
||||
PatternType type = Registry.BANNER_PATTERN.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
|
||||
Preconditions.checkArgument(type != null, "No pattern type found with the name %s", name);
|
||||
@@ -132,7 +132,7 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
|
||||
@@ -128,7 +128,7 @@ public interface PatternType extends OldEnum<PatternType>, Keyed {
|
||||
* @deprecated use {@link Registry#iterator()}.
|
||||
*/
|
||||
@NotNull
|
||||
@ -27,10 +27,10 @@ index e2afb2582a27b94a922754115dbb6b4ca35e0154..b726cebe9abb7195ab6558609a56f9fd
|
||||
return Lists.newArrayList(Registry.BANNER_PATTERN).toArray(new PatternType[0]);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Cat.java b/src/main/java/org/bukkit/entity/Cat.java
|
||||
index 60cf07bff0898176c8d7af84b3e65d7a1ee8cf2e..22b7f9c2450698b0cf0807880a3d779a0b4f1c37 100644
|
||||
index de422f00f8fd1975669ee5431c466c9c16d699af..fca4671c6976aee9e981ef344244f9322651d0c9 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Cat.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Cat.java
|
||||
@@ -79,7 +79,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
|
||||
@@ -75,7 +75,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
|
||||
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
|
||||
*/
|
||||
@NotNull
|
||||
@ -39,7 +39,7 @@ index 60cf07bff0898176c8d7af84b3e65d7a1ee8cf2e..22b7f9c2450698b0cf0807880a3d779a
|
||||
static Type valueOf(@NotNull String name) {
|
||||
Type type = Registry.CAT_VARIANT.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
|
||||
Preconditions.checkArgument(type != null, "No cat type found with the name %s", name);
|
||||
@@ -91,7 +91,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
|
||||
@@ -87,7 +87,7 @@ public interface Cat extends Tameable, Sittable, io.papermc.paper.entity.CollarC
|
||||
* @deprecated use {@link Registry#iterator()}.
|
||||
*/
|
||||
@NotNull
|
||||
@ -49,10 +49,10 @@ index 60cf07bff0898176c8d7af84b3e65d7a1ee8cf2e..22b7f9c2450698b0cf0807880a3d779a
|
||||
return Lists.newArrayList(Registry.CAT_VARIANT).toArray(new Type[0]);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Frog.java b/src/main/java/org/bukkit/entity/Frog.java
|
||||
index 7cf8ae63eb7a7f6c09510a4ad9e20336863aefc1..28a255f3a906c3988c7463a9469288fe586073a8 100644
|
||||
index db34a6241d63ae986bcb048fa53f6b9e4438e206..f661a6b4797dd814a197e9245bcb2ddf2fca773f 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Frog.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Frog.java
|
||||
@@ -78,7 +78,7 @@ public interface Frog extends Animals {
|
||||
@@ -74,7 +74,7 @@ public interface Frog extends Animals {
|
||||
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
|
||||
*/
|
||||
@NotNull
|
||||
@ -61,7 +61,7 @@ index 7cf8ae63eb7a7f6c09510a4ad9e20336863aefc1..28a255f3a906c3988c7463a9469288fe
|
||||
static Variant valueOf(@NotNull String name) {
|
||||
Variant variant = Registry.FROG_VARIANT.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
|
||||
Preconditions.checkArgument(variant != null, "No frog variant found with the name %s", name);
|
||||
@@ -90,7 +90,7 @@ public interface Frog extends Animals {
|
||||
@@ -86,7 +86,7 @@ public interface Frog extends Animals {
|
||||
* @deprecated use {@link Registry#iterator()}.
|
||||
*/
|
||||
@NotNull
|
||||
@ -71,10 +71,10 @@ index 7cf8ae63eb7a7f6c09510a4ad9e20336863aefc1..28a255f3a906c3988c7463a9469288fe
|
||||
return Lists.newArrayList(Registry.FROG_VARIANT).toArray(new Variant[0]);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/entity/Villager.java b/src/main/java/org/bukkit/entity/Villager.java
|
||||
index 444744ea6f5921b0ae229995f8b15ea9d980c402..db5c7434a7e529727b556f314d5cd8e0534114fe 100644
|
||||
index bc7137eb802d4613d042fba5fd97eca54a6eea29..1db3742024e9cd1b70af2d52b4b756a544c019df 100644
|
||||
--- a/src/main/java/org/bukkit/entity/Villager.java
|
||||
+++ b/src/main/java/org/bukkit/entity/Villager.java
|
||||
@@ -194,7 +194,7 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -190,7 +190,7 @@ public interface Villager extends AbstractVillager {
|
||||
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
|
||||
*/
|
||||
@NotNull
|
||||
@ -83,7 +83,7 @@ index 444744ea6f5921b0ae229995f8b15ea9d980c402..db5c7434a7e529727b556f314d5cd8e0
|
||||
static Type valueOf(@NotNull String name) {
|
||||
Type type = Registry.VILLAGER_TYPE.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
|
||||
Preconditions.checkArgument(type != null, "No villager type found with the name %s", name);
|
||||
@@ -206,7 +206,7 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -202,7 +202,7 @@ public interface Villager extends AbstractVillager {
|
||||
* @deprecated use {@link Registry#iterator()}.
|
||||
*/
|
||||
@NotNull
|
||||
@ -92,7 +92,7 @@ index 444744ea6f5921b0ae229995f8b15ea9d980c402..db5c7434a7e529727b556f314d5cd8e0
|
||||
static Type[] values() {
|
||||
return Lists.newArrayList(Registry.VILLAGER_TYPE).toArray(new Type[0]);
|
||||
}
|
||||
@@ -305,7 +305,7 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -297,7 +297,7 @@ public interface Villager extends AbstractVillager {
|
||||
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
|
||||
*/
|
||||
@NotNull
|
||||
@ -101,7 +101,7 @@ index 444744ea6f5921b0ae229995f8b15ea9d980c402..db5c7434a7e529727b556f314d5cd8e0
|
||||
static Profession valueOf(@NotNull String name) {
|
||||
Profession profession = Registry.VILLAGER_PROFESSION.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
|
||||
Preconditions.checkArgument(profession != null, "No villager profession found with the name %s", name);
|
||||
@@ -317,7 +317,7 @@ public interface Villager extends AbstractVillager {
|
||||
@@ -309,7 +309,7 @@ public interface Villager extends AbstractVillager {
|
||||
* @deprecated use {@link Registry#iterator()}.
|
||||
*/
|
||||
@NotNull
|
||||
@ -111,10 +111,10 @@ index 444744ea6f5921b0ae229995f8b15ea9d980c402..db5c7434a7e529727b556f314d5cd8e0
|
||||
return Lists.newArrayList(Registry.VILLAGER_PROFESSION).toArray(new Profession[0]);
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/map/MapCursor.java b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
index fb6b1491202bbc1ea0d5475c9c6574b0c16943b4..a5efc52e68c602d84dc0948246a1665448344930 100644
|
||||
index 6c33fbf720a2e11655e254aeb516e08831c2adf4..eb73f3224e7d2314c4209a3743a37bdae2395670 100644
|
||||
--- a/src/main/java/org/bukkit/map/MapCursor.java
|
||||
+++ b/src/main/java/org/bukkit/map/MapCursor.java
|
||||
@@ -377,7 +377,7 @@ public final class MapCursor {
|
||||
@@ -373,7 +373,7 @@ public final class MapCursor {
|
||||
* @deprecated only for backwards compatibility, use {@link Registry#get(NamespacedKey)} instead.
|
||||
*/
|
||||
@NotNull
|
||||
@ -123,7 +123,7 @@ index fb6b1491202bbc1ea0d5475c9c6574b0c16943b4..a5efc52e68c602d84dc0948246a16654
|
||||
static Type valueOf(@NotNull String name) {
|
||||
Type type = Registry.MAP_DECORATION_TYPE.get(NamespacedKey.fromString(name.toLowerCase(Locale.ROOT)));
|
||||
Preconditions.checkArgument(type != null, "No Type found with the name %s", name);
|
||||
@@ -389,7 +389,7 @@ public final class MapCursor {
|
||||
@@ -385,7 +385,7 @@ public final class MapCursor {
|
||||
* @deprecated use {@link Registry#iterator()}.
|
||||
*/
|
||||
@NotNull
|
@ -244,7 +244,7 @@ index 330e3013eda204aa9b33d5e1c3104e0b595abdbc..c80e0ef587a001ee6de3f5c182cc9696
|
||||
/**
|
||||
* Do not use, method will get removed, and the plugin won't run
|
||||
diff --git a/src/main/java/org/bukkit/block/BlockType.java b/src/main/java/org/bukkit/block/BlockType.java
|
||||
index 0fa0fa4aaf55710030a2220dee98e11764d8d27a..e85bdd92466ee9bfcf8a82614ad09c1e2963731b 100644
|
||||
index a58ef2238208fbb55341f4532eaa288577ed8c0e..fb2b373c1822e7248a30e610d11e2c2bd438c19a 100644
|
||||
--- a/src/main/java/org/bukkit/block/BlockType.java
|
||||
+++ b/src/main/java/org/bukkit/block/BlockType.java
|
||||
@@ -125,7 +125,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@ -256,7 +256,7 @@ index 0fa0fa4aaf55710030a2220dee98e11764d8d27a..e85bdd92466ee9bfcf8a82614ad09c1e
|
||||
|
||||
/**
|
||||
* Typed represents a subtype of {@link BlockType}s that have a known block
|
||||
@@ -3486,7 +3486,9 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
|
||||
@@ -3490,7 +3490,9 @@ public interface BlockType extends Keyed, Translatable, net.kyori.adventure.tran
|
||||
*
|
||||
* @param world the world to check
|
||||
* @return true if this BlockType can be used in this World.
|
||||
@ -293,10 +293,10 @@ index 5067f1371433cccd3287af7f03e152f2c3c1ece3..e0cb282541548ac3bd24cce86b3413f5
|
||||
/**
|
||||
* Gets the unique name of this world
|
||||
diff --git a/src/main/java/org/bukkit/inventory/ItemType.java b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
index 0168f0a14a3e899e84c5e36963ff79950ab580fb..5b4449f63595193efcd1329b9df0558cfaa2c7b2 100644
|
||||
index 15d68c4997f739c39675ef8ffa5ab7967dac59f2..f96ced6ae8a969319728efb4fc4fe545923e32be 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/ItemType.java
|
||||
@@ -48,7 +48,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
@@ -47,7 +47,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
* changes may occur. Do not use this API in plugins.
|
||||
*/
|
||||
@ApiStatus.Experimental // Paper - already required for registry builders
|
||||
@ -305,7 +305,7 @@ index 0168f0a14a3e899e84c5e36963ff79950ab580fb..5b4449f63595193efcd1329b9df0558c
|
||||
|
||||
/**
|
||||
* Typed represents a subtype of {@link ItemType}s that have a known item meta type
|
||||
@@ -2306,7 +2306,9 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||
@@ -2300,7 +2300,9 @@ public interface ItemType extends Keyed, Translatable, net.kyori.adventure.trans
|
||||
*
|
||||
* @param world the world to check
|
||||
* @return true if this ItemType can be used in this World.
|
||||
@ -316,10 +316,10 @@ index 0168f0a14a3e899e84c5e36963ff79950ab580fb..5b4449f63595193efcd1329b9df0558c
|
||||
|
||||
/**
|
||||
diff --git a/src/main/java/org/bukkit/inventory/MenuType.java b/src/main/java/org/bukkit/inventory/MenuType.java
|
||||
index 29dfad691cbdd09d043f6171defc8a7fabbc2b75..5ddc24df90c3a4b9f92a49437e1aa90e3961daf3 100644
|
||||
index 34d45a105da72481a7c4f2e3831f5d2a676c91c6..529143c9007d6da4f671576f9934933f2e5d6f23 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/MenuType.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/MenuType.java
|
||||
@@ -23,7 +23,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
@@ -22,7 +22,7 @@ import org.jetbrains.annotations.NotNull;
|
||||
* created and viewed by the player.
|
||||
*/
|
||||
@ApiStatus.Experimental
|
||||
@ -329,7 +329,7 @@ index 29dfad691cbdd09d043f6171defc8a7fabbc2b75..5ddc24df90c3a4b9f92a49437e1aa90e
|
||||
/**
|
||||
* A MenuType which represents a chest with 1 row.
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffectType.java b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
index 10fa51d116b40450b51af9110d5637f3505ebf65..647452f16e4bf7e5a61520123e62d9408ec9adfb 100644
|
||||
index d02bb37768404422969d8b93e009960d0a693a93..294ba70f1e446ec8d502e5c14f82ae52547aeb21 100644
|
||||
--- a/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
+++ b/src/main/java/org/bukkit/potion/PotionEffectType.java
|
||||
@@ -17,7 +17,7 @@ import org.jetbrains.annotations.Nullable;
|
@ -125,10 +125,10 @@ index 43eac972f45d1cbb6278b048f8e6d7882c0aabeb..f193ab698edc548ec7fad89a82d03f39
|
||||
+ // Paper end - add recipeBrewTime
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/inventory/view/BrewingStandView.java b/src/main/java/org/bukkit/inventory/view/BrewingStandView.java
|
||||
index 206e9befae9863f99f44ac0e1629c2af1905787a..bb7de0b1c602e96f5b34d44a9ffa8c04e4ab5e0e 100644
|
||||
index f76db2757f6388265b7fed0f3d1c363ea4f01052..ff7227bfa13cba497ba404cdd7493f911377fab6 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/view/BrewingStandView.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/view/BrewingStandView.java
|
||||
@@ -39,4 +39,27 @@ public interface BrewingStandView extends InventoryView {
|
||||
@@ -45,4 +45,27 @@ public interface BrewingStandView extends InventoryView {
|
||||
* @throws IllegalArgumentException if the ticks are less than 0
|
||||
*/
|
||||
void setBrewingTicks(final int ticks) throws IllegalArgumentException;
|
@ -8,10 +8,10 @@ maximum level. The added API enables plugins to disable this behaviour,
|
||||
allowing enchantments that are overleveled to be applied via the anvil.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/inventory/view/AnvilView.java b/src/main/java/org/bukkit/inventory/view/AnvilView.java
|
||||
index 0344b3db789baf1da0b59f2d2cd66154b69b38a9..cc5ffd28a6d6244b99a94e52c6f5a0f73a64aed7 100644
|
||||
index 8963fefac4ce14d0239b92380ca6d3e6b5e5bb25..3c1aa1e036bee08304c1cdca59f6a5bc0ba306c0 100644
|
||||
--- a/src/main/java/org/bukkit/inventory/view/AnvilView.java
|
||||
+++ b/src/main/java/org/bukkit/inventory/view/AnvilView.java
|
||||
@@ -59,4 +59,28 @@ public interface AnvilView extends InventoryView {
|
||||
@@ -65,4 +65,28 @@ public interface AnvilView extends InventoryView {
|
||||
* @param levels the levels to set
|
||||
*/
|
||||
void setMaximumRepairCost(int levels);
|
@ -28,10 +28,10 @@ index 37dab9e868dbfb019c271a547d975a48ad1cb571..3811c0d849a3eb028ed1a6b7a2d4747f
|
||||
+/.factorypath
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..9ea079d14a92367629dc8fb30d1be043c9290964
|
||||
index 0000000000000000000000000000000000000000..82b298d454dee6a6d996aa7822dd745e70a8da74
|
||||
--- /dev/null
|
||||
+++ b/build.gradle.kts
|
||||
@@ -0,0 +1,126 @@
|
||||
@@ -0,0 +1,131 @@
|
||||
+import io.papermc.paperweight.util.*
|
||||
+
|
||||
+plugins {
|
||||
@ -45,7 +45,7 @@ index 0000000000000000000000000000000000000000..9ea079d14a92367629dc8fb30d1be043
|
||||
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") {
|
||||
+ exclude(group = "org.apache.logging.log4j", module = "log4j-api")
|
||||
+ }
|
||||
+ implementation("org.ow2.asm:asm-commons:9.7")
|
||||
+ implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||
+ implementation("commons-lang:commons-lang:2.6")
|
||||
+ runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
|
||||
+ runtimeOnly("com.mysql:mysql-connector-j:8.4.0")
|
||||
@ -55,9 +55,10 @@ index 0000000000000000000000000000000000000000..9ea079d14a92367629dc8fb30d1be043
|
||||
+ runtimeOnly("org.apache.maven.resolver:maven-resolver-transport-http:1.9.18")
|
||||
+
|
||||
+ testImplementation("org.junit.jupiter:junit-jupiter:5.10.2")
|
||||
+ testImplementation("org.junit.platform:junit-platform-suite-engine:1.10.0")
|
||||
+ testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
+ testImplementation("org.mockito:mockito-core:5.11.0")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.7")
|
||||
+ testImplementation("org.mockito:mockito-core:5.14.1")
|
||||
+ testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
||||
+}
|
||||
+
|
||||
+paperweight {
|
||||
@ -93,8 +94,12 @@ index 0000000000000000000000000000000000000000..9ea079d14a92367629dc8fb30d1be043
|
||||
+}
|
||||
+
|
||||
+tasks.test {
|
||||
+ exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
|
||||
+ useJUnitPlatform()
|
||||
+ include("**/**TestSuite.class")
|
||||
+ workingDir = temporaryDir
|
||||
+ useJUnitPlatform {
|
||||
+ forkEvery = 1
|
||||
+ excludeTags("Slow")
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+fun TaskContainer.registerRunTask(
|
||||
@ -160,10 +165,10 @@ index 0000000000000000000000000000000000000000..9ea079d14a92367629dc8fb30d1be043
|
||||
+}
|
||||
diff --git a/pom.xml b/pom.xml
|
||||
deleted file mode 100644
|
||||
index 5abcca1894a0d7795d394834f56c189c0bbeb82f..0000000000000000000000000000000000000000
|
||||
index 71a22e50d5e543d41b0d285fabfa0965a393ab2e..0000000000000000000000000000000000000000
|
||||
--- a/pom.xml
|
||||
+++ /dev/null
|
||||
@@ -1,604 +0,0 @@
|
||||
@@ -1,612 +0,0 @@
|
||||
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
- <modelVersion>4.0.0</modelVersion>
|
||||
@ -183,6 +188,7 @@ index 5abcca1894a0d7795d394834f56c189c0bbeb82f..00000000000000000000000000000000
|
||||
-
|
||||
- <properties>
|
||||
- <skipTests>true</skipTests>
|
||||
- <groups>AllFeatures,Bundle,Legacy,Normal,VanillaFeature</groups>
|
||||
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
- <api.version>unknown</api.version>
|
||||
- <bt.name>git</bt.name>
|
||||
@ -226,7 +232,7 @@ index 5abcca1894a0d7795d394834f56c189c0bbeb82f..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm-commons</artifactId>
|
||||
- <version>9.7</version>
|
||||
- <version>9.7.1</version>
|
||||
- <scope>compile</scope>
|
||||
- </dependency>
|
||||
- <!-- Mojang depends -->
|
||||
@ -448,6 +454,12 @@ index 5abcca1894a0d7795d394834f56c189c0bbeb82f..00000000000000000000000000000000
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.junit.platform</groupId>
|
||||
- <artifactId>junit-platform-suite-engine</artifactId>
|
||||
- <version>1.10.0</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.hamcrest</groupId>
|
||||
- <artifactId>hamcrest</artifactId>
|
||||
- <version>2.2</version>
|
||||
@ -456,13 +468,13 @@ index 5abcca1894a0d7795d394834f56c189c0bbeb82f..00000000000000000000000000000000
|
||||
- <dependency>
|
||||
- <groupId>org.mockito</groupId>
|
||||
- <artifactId>mockito-core</artifactId>
|
||||
- <version>5.11.0</version>
|
||||
- <version>5.14.1</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- <dependency>
|
||||
- <groupId>org.ow2.asm</groupId>
|
||||
- <artifactId>asm-tree</artifactId>
|
||||
- <version>9.7</version>
|
||||
- <version>9.7.1</version>
|
||||
- <scope>test</scope>
|
||||
- </dependency>
|
||||
- </dependencies>
|
||||
@ -675,9 +687,10 @@ index 5abcca1894a0d7795d394834f56c189c0bbeb82f..00000000000000000000000000000000
|
||||
- <version>3.2.5</version>
|
||||
- <configuration>
|
||||
- <workingDirectory>${basedir}/target/test-server</workingDirectory>
|
||||
- <excludes>
|
||||
- <exclude>org/bukkit/craftbukkit/inventory/ItemStack*Test.java</exclude>
|
||||
- </excludes>
|
||||
- <reuseForks>false</reuseForks>
|
||||
- <includes>
|
||||
- <include>**/*TestSuite.java</include>
|
||||
- </includes>
|
||||
- </configuration>
|
||||
- </plugin>
|
||||
- </plugins>
|
||||
|
@ -74,7 +74,7 @@ index 9051f0186c09eeb8ecccf62b0116f6da1800a1df..b231f90317fe7df9133674b12d478735
|
||||
private Optional<ResourceLocation> randomSequence;
|
||||
|
||||
diff --git a/src/test/java/org/bukkit/DyeColorsTest.java b/src/test/java/org/bukkit/DyeColorsTest.java
|
||||
index dfc3e4f5a5cfee0456097a44d579587719a231a7..9342abe7853a611776684c1eb0b24164148cb5f2 100644
|
||||
index e96d821da0698dd42651500fb97a0856a9e9ce02..fb7d40181abdaa5b2ce607db47c09d0d0a19c86d 100644
|
||||
--- a/src/test/java/org/bukkit/DyeColorsTest.java
|
||||
+++ b/src/test/java/org/bukkit/DyeColorsTest.java
|
||||
@@ -3,7 +3,6 @@ package org.bukkit;
|
||||
@ -82,10 +82,10 @@ index dfc3e4f5a5cfee0456097a44d579587719a231a7..9342abe7853a611776684c1eb0b24164
|
||||
import static org.hamcrest.Matchers.*;
|
||||
|
||||
-import net.minecraft.world.item.DyeColor;
|
||||
import org.bukkit.support.AbstractTestingBase;
|
||||
import org.bukkit.support.environment.Normal;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.EnumSource;
|
||||
@@ -14,7 +13,7 @@ public class DyeColorsTest extends AbstractTestingBase {
|
||||
@@ -15,7 +14,7 @@ public class DyeColorsTest {
|
||||
@EnumSource(DyeColor.class)
|
||||
public void checkColor(DyeColor dye) {
|
||||
Color color = dye.getColor();
|
||||
@ -94,7 +94,7 @@ index dfc3e4f5a5cfee0456097a44d579587719a231a7..9342abe7853a611776684c1eb0b24164
|
||||
Color nmsColor = Color.fromARGB(nmsColorArray);
|
||||
assertThat(color, is(nmsColor));
|
||||
}
|
||||
@@ -23,7 +22,7 @@ public class DyeColorsTest extends AbstractTestingBase {
|
||||
@@ -24,7 +23,7 @@ public class DyeColorsTest {
|
||||
@EnumSource(org.bukkit.DyeColor.class)
|
||||
public void checkFireworkColor(org.bukkit.DyeColor dye) {
|
||||
Color color = dye.getFireworkColor();
|
||||
@ -104,10 +104,10 @@ index dfc3e4f5a5cfee0456097a44d579587719a231a7..9342abe7853a611776684c1eb0b24164
|
||||
}
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/ParticleTest.java b/src/test/java/org/bukkit/ParticleTest.java
|
||||
index 9c9f5dd2351b3067b54d6cc5bdb572c46b12aaa8..307e8a3694c6f0b48d2df9792c3e5fdbaae1fd8e 100644
|
||||
index 688c5bae8146f6fc8cddb2632e9cbf304f0745fb..1b0df6220682328b8f1d03416cb8df2f6662a1cf 100644
|
||||
--- a/src/test/java/org/bukkit/ParticleTest.java
|
||||
+++ b/src/test/java/org/bukkit/ParticleTest.java
|
||||
@@ -250,7 +250,7 @@ public class ParticleTest extends AbstractTestingBase {
|
||||
@@ -251,7 +251,7 @@ public class ParticleTest {
|
||||
Check in CraftParticle if the conversion is still correct.
|
||||
""", bukkit.getKey()));
|
||||
|
||||
@ -117,7 +117,7 @@ index 9c9f5dd2351b3067b54d6cc5bdb572c46b12aaa8..307e8a3694c6f0b48d2df9792c3e5fdb
|
||||
Could not encoded particle param for particle %s.
|
||||
This can indicated, that the wrong particle param is created in CraftParticle.
|
||||
diff --git a/src/test/java/org/bukkit/entity/EntityTypesTest.java b/src/test/java/org/bukkit/entity/EntityTypesTest.java
|
||||
index 32df0090aab65b551b524603cce0b96e461cc358..952924abae79cc504342bbdb6f6953ab8a6cc295 100644
|
||||
index 9df52ab0f04758dd04f45f6029fe120ac1a933af..d513d926ddabd61a03172adb846afb7674ed402e 100644
|
||||
--- a/src/test/java/org/bukkit/entity/EntityTypesTest.java
|
||||
+++ b/src/test/java/org/bukkit/entity/EntityTypesTest.java
|
||||
@@ -6,7 +6,6 @@ import java.util.Set;
|
||||
@ -125,10 +125,10 @@ index 32df0090aab65b551b524603cce0b96e461cc358..952924abae79cc504342bbdb6f6953ab
|
||||
import net.minecraft.core.registries.BuiltInRegistries;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
-import net.minecraft.world.entity.EntityType;
|
||||
import org.bukkit.support.AbstractTestingBase;
|
||||
import org.bukkit.support.environment.AllFeatures;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -16,8 +15,8 @@ public class EntityTypesTest extends AbstractTestingBase {
|
||||
@@ -17,8 +16,8 @@ public class EntityTypesTest {
|
||||
public void testMaps() {
|
||||
Set<EntityType> allBukkit = Arrays.stream(EntityType.values()).filter((b) -> b.getName() != null).collect(Collectors.toSet());
|
||||
|
||||
@ -140,7 +140,7 @@ index 32df0090aab65b551b524603cce0b96e461cc358..952924abae79cc504342bbdb6f6953ab
|
||||
org.bukkit.entity.EntityType bukkit = org.bukkit.entity.EntityType.fromName(key.getPath());
|
||||
assertNotNull(bukkit, "Missing nms->bukkit " + key);
|
||||
diff --git a/src/test/java/org/bukkit/entity/PandaGeneTest.java b/src/test/java/org/bukkit/entity/PandaGeneTest.java
|
||||
index 5818bfa69a8573a2a8f350066f829d587cbc546b..8e421a1bee0c526e3024eab9ba4cc0b320842de2 100644
|
||||
index 4a3ac959f0dcc35f80371443383be1f8b42b6d95..e8520f541fda2d1cd9677f3fc7d7d295743f88b2 100644
|
||||
--- a/src/test/java/org/bukkit/entity/PandaGeneTest.java
|
||||
+++ b/src/test/java/org/bukkit/entity/PandaGeneTest.java
|
||||
@@ -2,7 +2,6 @@ package org.bukkit.entity;
|
||||
@ -149,9 +149,9 @@ index 5818bfa69a8573a2a8f350066f829d587cbc546b..8e421a1bee0c526e3024eab9ba4cc0b3
|
||||
|
||||
-import net.minecraft.world.entity.animal.Panda;
|
||||
import org.bukkit.craftbukkit.entity.CraftPanda;
|
||||
import org.bukkit.support.environment.Normal;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
@@ -10,8 +9,8 @@ public class PandaGeneTest {
|
||||
@@ -12,8 +11,8 @@ public class PandaGeneTest {
|
||||
|
||||
@Test
|
||||
public void testBukkit() {
|
||||
@ -162,7 +162,7 @@ index 5818bfa69a8573a2a8f350066f829d587cbc546b..8e421a1bee0c526e3024eab9ba4cc0b3
|
||||
|
||||
assertNotNull(nms, "NMS gene null for " + gene);
|
||||
assertEquals(gene.isRecessive(), nms.isRecessive(), "Recessive status did not match " + gene);
|
||||
@@ -21,7 +20,7 @@ public class PandaGeneTest {
|
||||
@@ -23,7 +22,7 @@ public class PandaGeneTest {
|
||||
|
||||
@Test
|
||||
public void testNMS() {
|
||||
@ -172,10 +172,10 @@ index 5818bfa69a8573a2a8f350066f829d587cbc546b..8e421a1bee0c526e3024eab9ba4cc0b3
|
||||
|
||||
assertNotNull(bukkit, "Bukkit gene null for " + gene);
|
||||
diff --git a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||
index 6c84f1289c84d0aca1935c473ffa63dae1b52598..ebcb65cb74acdb9d1bcf2b4b3551a2dc6d809bc9 100644
|
||||
index a382ca7c6e0f96e5d8be37fa8139360db13f9c2f..8fb906c77070eedec8cde263154eaf4610ad3197 100644
|
||||
--- a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||
+++ b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||
@@ -29,17 +29,17 @@ public class RegistryConstantsTest extends AbstractTestingBase {
|
||||
@@ -31,17 +31,17 @@ public class RegistryConstantsTest {
|
||||
|
||||
@Test
|
||||
public void testTrimMaterial() {
|
||||
@ -197,10 +197,10 @@ index 6c84f1289c84d0aca1935c473ffa63dae1b52598..ebcb65cb74acdb9d1bcf2b4b3551a2dc
|
||||
|
||||
for (Field field : clazz.getFields()) {
|
||||
diff --git a/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java b/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java
|
||||
index 31062b6d9ad685ea3750c6b5ddc6b295bb263e0a..5842cb5a6f3da42b8c40e6cbd5c5366572bf7684 100644
|
||||
index 52f057a3b81ae798a8ff354a90e2cc64264c0398..0c704fb9e73229f5632f1f48e59fccc0daf9ec26 100644
|
||||
--- a/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java
|
||||
+++ b/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java
|
||||
@@ -24,7 +24,7 @@ public class RegistryLoadOrderTest extends AbstractTestingBase {
|
||||
@@ -25,7 +25,7 @@ public class RegistryLoadOrderTest {
|
||||
|
||||
private static boolean initInterface = false;
|
||||
private static boolean initAbstract = false;
|
||||
|
@ -9,7 +9,7 @@ public net.minecraft.server.packs.VanillaPackResourcesBuilder safeGetPath(Ljava/
|
||||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 9ea079d14a92367629dc8fb30d1be043c9290964..f276414e9e81abf8f1f80991ebd5ab43472e07b1 100644
|
||||
index 82b298d454dee6a6d996aa7822dd745e70a8da74..ef88afa5fe914ae3fef9ffb1a971dabf568f75f3 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -8,9 +8,7 @@ plugins {
|
||||
@ -20,10 +20,10 @@ index 9ea079d14a92367629dc8fb30d1be043c9290964..f276414e9e81abf8f1f80991ebd5ab43
|
||||
- exclude(group = "org.apache.logging.log4j", module = "log4j-api")
|
||||
- }
|
||||
+ implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm-commons:9.7")
|
||||
implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
|
||||
@@ -38,6 +36,7 @@ tasks.jar {
|
||||
@@ -39,6 +37,7 @@ tasks.jar {
|
||||
val gitHash = git("rev-parse", "--short=7", "HEAD").getText().trim()
|
||||
val implementationVersion = System.getenv("BUILD_NUMBER") ?: "\"$gitHash\""
|
||||
val date = git("show", "-s", "--format=%ci", gitHash).getText().trim() // Paper
|
||||
@ -31,7 +31,7 @@ index 9ea079d14a92367629dc8fb30d1be043c9290964..f276414e9e81abf8f1f80991ebd5ab43
|
||||
attributes(
|
||||
"Main-Class" to "org.bukkit.craftbukkit.Main",
|
||||
"Implementation-Title" to "CraftBukkit",
|
||||
@@ -46,6 +45,9 @@ tasks.jar {
|
||||
@@ -47,6 +46,9 @@ tasks.jar {
|
||||
"Specification-Title" to "Bukkit",
|
||||
"Specification-Version" to project.version,
|
||||
"Specification-Vendor" to "Bukkit Team",
|
||||
@ -41,7 +41,7 @@ index 9ea079d14a92367629dc8fb30d1be043c9290964..f276414e9e81abf8f1f80991ebd5ab43
|
||||
)
|
||||
for (tld in setOf("net", "com", "org")) {
|
||||
attributes("$tld/bukkit", "Sealed" to true)
|
||||
@@ -58,6 +60,17 @@ publishing {
|
||||
@@ -59,6 +61,17 @@ publishing {
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,9 +57,9 @@ index 9ea079d14a92367629dc8fb30d1be043c9290964..f276414e9e81abf8f1f80991ebd5ab43
|
||||
+// Paper end
|
||||
+
|
||||
tasks.test {
|
||||
exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
|
||||
useJUnitPlatform()
|
||||
@@ -123,4 +136,5 @@ tasks.registerRunTask("runReobf") {
|
||||
include("**/**TestSuite.class")
|
||||
workingDir = temporaryDir
|
||||
@@ -128,4 +141,5 @@ tasks.registerRunTask("runReobf") {
|
||||
tasks.registerRunTask("runDev") {
|
||||
description = "Spin up a non-relocated Mojang-mapped test server"
|
||||
classpath(sourceSets.main.map { it.runtimeClasspath })
|
||||
@ -131,7 +131,7 @@ index feca36209fd2405fab70f564f63e627b8b78ac18..396ec10a76bdadbf5be2f0e15e88eed4
|
||||
|
||||
public static PackRepository createPackRepository(Path dataPacksPath, DirectoryValidator symlinkFinder) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 9bae4835882a7c1b5a623d57330c36cc61b9b6d1..273a6658deacbf00f6cc498cf3fcd20d144bd9e4 100644
|
||||
index dd64f5c16560d2ce6255c8319ddd0f5157237f0f..4566237fa1d49a559b2df806f9a318be46a6eade 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -199,7 +199,7 @@ public class Main {
|
||||
@ -142,7 +142,7 @@ index 9bae4835882a7c1b5a623d57330c36cc61b9b6d1..273a6658deacbf00f6cc498cf3fcd20d
|
||||
+ 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, -14);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
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
|
||||
@ -171,15 +171,15 @@ index 0000000000000000000000000000000000000000..288fbe68c6053f40e72f0feedef0ae0f
|
||||
+ "pack_format": 41
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
index 1bdf0b2b8f8e6dace403695fece80ebb3dc9e039..544307fe34cbcfa286a7d7b30900ebea127d189e 100644
|
||||
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
@@ -43,6 +43,7 @@ public abstract class AbstractTestingBase {
|
||||
public static final Registry<Biome> BIOMES;
|
||||
diff --git a/src/test/java/org/bukkit/support/RegistryHelper.java b/src/test/java/org/bukkit/support/RegistryHelper.java
|
||||
index e5dbcdcbd4187c724c3c6a3b8141a3796710c7a8..73645ea2e5c17e973ed3b888aab56f733f9c87a3 100644
|
||||
--- a/src/test/java/org/bukkit/support/RegistryHelper.java
|
||||
+++ b/src/test/java/org/bukkit/support/RegistryHelper.java
|
||||
@@ -58,6 +58,7 @@ public final class RegistryHelper {
|
||||
}
|
||||
|
||||
static {
|
||||
+ System.setProperty("Paper.pushPaperAssetsRoot", "true"); // Paper
|
||||
public static void setup(FeatureFlagSet featureFlagSet) {
|
||||
+ System.setProperty("Paper.pushPaperAssetsRoot", "true"); // Paper - build system changes - push asset root
|
||||
SharedConstants.tryDetectVersion();
|
||||
Bootstrap.bootStrap();
|
||||
// Populate available packs
|
||||
|
||||
|
@ -6,18 +6,18 @@ Subject: [PATCH] Test changes
|
||||
Co-authored-by: yannnicklamprecht <yannicklamprecht@live.de>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index f276414e9e81abf8f1f80991ebd5ab43472e07b1..7a0f2391a464eeebc5e57856300bc000b8d35e52 100644
|
||||
index ef88afa5fe914ae3fef9ffb1a971dabf568f75f3..3c1770864ab3e8708bab6cd50d6ffb5e19af5399 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -22,6 +22,7 @@ dependencies {
|
||||
@@ -23,6 +23,7 @@ dependencies {
|
||||
testImplementation("org.hamcrest:hamcrest:2.2")
|
||||
testImplementation("org.mockito:mockito-core:5.11.0")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.7")
|
||||
testImplementation("org.mockito:mockito-core:5.14.1")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
||||
+ testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
|
||||
}
|
||||
|
||||
paperweight {
|
||||
@@ -55,6 +56,12 @@ tasks.jar {
|
||||
@@ -56,6 +57,12 @@ tasks.jar {
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,10 +32,10 @@ index f276414e9e81abf8f1f80991ebd5ab43472e07b1..7a0f2391a464eeebc5e57856300bc000
|
||||
}
|
||||
diff --git a/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java b/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..e1c14886064cde56be7fcd8f22a6ecb2d222a762
|
||||
index 0000000000000000000000000000000000000000..fe52d229c31526cc32f6422328efe92edf75a7ff
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/registry/RegistryKeyTest.java
|
||||
@@ -0,0 +1,33 @@
|
||||
@@ -0,0 +1,34 @@
|
||||
+package io.papermc.paper.registry;
|
||||
+
|
||||
+import java.util.Optional;
|
||||
@ -50,7 +50,8 @@ index 0000000000000000000000000000000000000000..e1c14886064cde56be7fcd8f22a6ecb2
|
||||
+
|
||||
+import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
+
|
||||
+class RegistryKeyTest extends AbstractTestingBase {
|
||||
+@AllFeatures
|
||||
+class RegistryKeyTest {
|
||||
+
|
||||
+ @BeforeAll
|
||||
+ static void before() throws ClassNotFoundException {
|
||||
@ -64,7 +65,7 @@ index 0000000000000000000000000000000000000000..e1c14886064cde56be7fcd8f22a6ecb2
|
||||
+ @ParameterizedTest
|
||||
+ @MethodSource("data")
|
||||
+ void testApiRegistryKeysExist(final RegistryKey<?> key) {
|
||||
+ final Optional<Registry<Object>> registry = AbstractTestingBase.REGISTRY_CUSTOM.registry(ResourceKey.createRegistryKey(ResourceLocation.parse(key.key().asString())));
|
||||
+ final Optional<Registry<Object>> registry = RegistryHelper.getRegistry().registry(ResourceKey.createRegistryKey(ResourceLocation.parse(key.key().asString())));
|
||||
+ assertTrue(registry.isPresent(), "Missing vanilla registry for " + key.key().asString());
|
||||
+
|
||||
+ }
|
||||
@ -338,11 +339,35 @@ index 0000000000000000000000000000000000000000..6cbf11c898439834cffb99ef84e5df14
|
||||
+public @interface MethodParameterSource {
|
||||
+ String[] value() default {};
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/ExplosionResultTest.java b/src/test/java/org/bukkit/ExplosionResultTest.java
|
||||
index ee5ab15bb0bfeb0ff6fa0d720eeff086d92cb459..7419ea2f68607aad27929a608c402bd4c222f95d 100644
|
||||
--- a/src/test/java/org/bukkit/ExplosionResultTest.java
|
||||
+++ b/src/test/java/org/bukkit/ExplosionResultTest.java
|
||||
@@ -5,6 +5,7 @@ import net.minecraft.world.level.Explosion;
|
||||
import org.bukkit.craftbukkit.CraftExplosionResult;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
+@org.bukkit.support.environment.Normal // Paper - test changes - missing test suite annotation
|
||||
public class ExplosionResultTest {
|
||||
|
||||
@Test
|
||||
diff --git a/src/test/java/org/bukkit/registry/RegistryClassTest.java b/src/test/java/org/bukkit/registry/RegistryClassTest.java
|
||||
index 740073ddd99b5e6aba056b99d5ed3e2a94a13b6c..575a06125e0b60b5bb8b6f85131f7d6cf86f5083 100644
|
||||
--- a/src/test/java/org/bukkit/registry/RegistryClassTest.java
|
||||
+++ b/src/test/java/org/bukkit/registry/RegistryClassTest.java
|
||||
@@ -57,6 +57,7 @@ import org.objectweb.asm.Type;
|
||||
* Note: This test class assumes that feature flags only enable more features and do not disable vanilla ones.
|
||||
*/
|
||||
@AllFeatures
|
||||
+@org.junit.jupiter.api.Disabled // Paper - disabled for now as it constructs a second root registry, which is not supported on paper
|
||||
public class RegistryClassTest {
|
||||
|
||||
private static final Map<Class<? extends Keyed>, Data> INIT_DATA = new HashMap<>();
|
||||
diff --git a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||
index ebcb65cb74acdb9d1bcf2b4b3551a2dc6d809bc9..7d9dbed7281099b78d7f898885b37cdcfe8b099f 100644
|
||||
index 8fb906c77070eedec8cde263154eaf4610ad3197..8705ee2a28d5dba7bb579eae1436451502e1e3c2 100644
|
||||
--- a/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||
+++ b/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
|
||||
@@ -24,7 +24,7 @@ public class RegistryConstantsTest extends AbstractTestingBase {
|
||||
@@ -26,7 +26,7 @@ public class RegistryConstantsTest {
|
||||
@Test
|
||||
public void testDamageType() {
|
||||
this.testExcessConstants(DamageType.class, Registry.DAMAGE_TYPE);
|
||||
@ -351,68 +376,67 @@ index ebcb65cb74acdb9d1bcf2b4b3551a2dc6d809bc9..7d9dbed7281099b78d7f898885b37cdc
|
||||
}
|
||||
|
||||
@Test
|
||||
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
index 544307fe34cbcfa286a7d7b30900ebea127d189e..5bda0bc976920f224586f2c0e083b771c676e307 100644
|
||||
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
@@ -53,6 +53,11 @@ public abstract class AbstractTestingBase {
|
||||
MultiPackResourceManager resourceManager = new MultiPackResourceManager(PackType.SERVER_DATA, resourceRepository.getAvailablePacks().stream().map(Pack::open).toList());
|
||||
diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||
index 6ecafd167d4d8c79f2cbc43ea9da98a5d61d8751..f81f86cf05a8c6816d356185af6d0d84a0474dd2 100644
|
||||
--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||
+++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||
@@ -47,7 +47,7 @@ public final class DummyServerHelper {
|
||||
when(instance.getTag(any(), any(), any())).then(mock -> {
|
||||
String registry = mock.getArgument(0);
|
||||
Class<?> clazz = mock.getArgument(2);
|
||||
- MinecraftKey key = CraftNamespacedKey.toMinecraft(mock.getArgument(1));
|
||||
+ net.minecraft.resources.ResourceLocation key = CraftNamespacedKey.toMinecraft(mock.getArgument(1)); // Paper - address remapping issues
|
||||
|
||||
switch (registry) {
|
||||
case org.bukkit.Tag.REGISTRY_BLOCKS -> {
|
||||
@@ -66,24 +66,31 @@ public final class DummyServerHelper {
|
||||
}
|
||||
case org.bukkit.Tag.REGISTRY_FLUIDS -> {
|
||||
Preconditions.checkArgument(clazz == org.bukkit.Fluid.class, "Fluid namespace must have fluid type");
|
||||
- TagKey<FluidType> fluidTagKey = TagKey.create(Registries.FLUID, key);
|
||||
+ TagKey<net.minecraft.world.level.material.Fluid> fluidTagKey = TagKey.create(Registries.FLUID, key); // Paper - address remapping issues
|
||||
if (BuiltInRegistries.FLUID.getTag(fluidTagKey).isPresent()) {
|
||||
return new CraftFluidTag(BuiltInRegistries.FLUID, fluidTagKey);
|
||||
}
|
||||
}
|
||||
case org.bukkit.Tag.REGISTRY_ENTITY_TYPES -> {
|
||||
Preconditions.checkArgument(clazz == org.bukkit.entity.EntityType.class, "Entity type namespace must have entity type");
|
||||
- TagKey<EntityTypes<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key);
|
||||
+ TagKey<net.minecraft.world.entity.EntityType<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key); // Paper - address remapping issues
|
||||
if (BuiltInRegistries.ENTITY_TYPE.getTag(entityTagKey).isPresent()) {
|
||||
return new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey);
|
||||
}
|
||||
}
|
||||
- default -> throw new IllegalArgumentException();
|
||||
+ default -> new io.papermc.paper.util.EmptyTag(); // Paper - testing additions
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
+ // Paper start - testing additions
|
||||
+ final Thread currentThread = Thread.currentThread();
|
||||
+ when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
|
||||
+ final org.bukkit.plugin.PluginManager pluginManager = new org.bukkit.plugin.SimplePluginManager(instance, new org.bukkit.command.SimpleCommandMap(instance));
|
||||
+ when(instance.getPluginManager()).thenReturn(pluginManager);
|
||||
+ // Paper end - testing additions
|
||||
+
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/support/RegistryHelper.java b/src/test/java/org/bukkit/support/RegistryHelper.java
|
||||
index 73645ea2e5c17e973ed3b888aab56f733f9c87a3..4d169ff3541044d447de519d2b0973da98b0bd53 100644
|
||||
--- a/src/test/java/org/bukkit/support/RegistryHelper.java
|
||||
+++ b/src/test/java/org/bukkit/support/RegistryHelper.java
|
||||
@@ -98,6 +98,11 @@ public final class RegistryHelper {
|
||||
private static LayeredRegistryAccess<RegistryLayer> createLayers(MultiPackResourceManager resourceManager) {
|
||||
// add tags and loot tables for unit tests
|
||||
LayeredRegistryAccess<RegistryLayer> layers = RegistryLayer.createRegistryAccess();
|
||||
+ // Paper start - load registry here to ensure bukkit object registry are correctly delayed if needed
|
||||
+ try {
|
||||
+ Class.forName("org.bukkit.Registry");
|
||||
+ } catch (ClassNotFoundException ignored) {}
|
||||
+ } catch (final ClassNotFoundException ignored) {}
|
||||
+ // Paper end - load registry here to ensure bukkit object registry are correctly delayed if needed
|
||||
layers = WorldLoader.loadAndReplaceLayer(resourceManager, layers, RegistryLayer.WORLDGEN, RegistryDataLoader.WORLDGEN_REGISTRIES);
|
||||
REGISTRY_CUSTOM = layers.compositeAccess().freeze();
|
||||
// Register vanilla pack
|
||||
diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
|
||||
index 1acdf5bc439c073c1777c2c4f5743ae082f4a621..183d30e3d3d413b05c762f374a964498d6ffdec4 100644
|
||||
--- a/src/test/java/org/bukkit/support/DummyServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/DummyServer.java
|
||||
@@ -62,7 +62,7 @@ public final class DummyServer {
|
||||
when(instance.getTag(any(), any(), any())).then(mock -> {
|
||||
String registry = mock.getArgument(0);
|
||||
Class<?> clazz = mock.getArgument(2);
|
||||
- MinecraftKey key = CraftNamespacedKey.toMinecraft(mock.getArgument(1));
|
||||
+ net.minecraft.resources.ResourceLocation key = CraftNamespacedKey.toMinecraft(mock.getArgument(1)); // Paper - address remapping issues
|
||||
|
||||
switch (registry) {
|
||||
case org.bukkit.Tag.REGISTRY_BLOCKS -> {
|
||||
@@ -81,24 +81,32 @@ public final class DummyServer {
|
||||
}
|
||||
case org.bukkit.Tag.REGISTRY_FLUIDS -> {
|
||||
Preconditions.checkArgument(clazz == org.bukkit.Fluid.class, "Fluid namespace must have fluid type");
|
||||
- TagKey<FluidType> fluidTagKey = TagKey.create(Registries.FLUID, key);
|
||||
+ TagKey<net.minecraft.world.level.material.Fluid> fluidTagKey = TagKey.create(Registries.FLUID, key); // Paper - address remapping issues
|
||||
if (BuiltInRegistries.FLUID.getTag(fluidTagKey).isPresent()) {
|
||||
return new CraftFluidTag(BuiltInRegistries.FLUID, fluidTagKey);
|
||||
}
|
||||
}
|
||||
case org.bukkit.Tag.REGISTRY_ENTITY_TYPES -> {
|
||||
Preconditions.checkArgument(clazz == org.bukkit.entity.EntityType.class, "Entity type namespace must have entity type");
|
||||
- TagKey<EntityTypes<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key);
|
||||
+ TagKey<net.minecraft.world.entity.EntityType<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key); // Paper - address remapping issues
|
||||
if (BuiltInRegistries.ENTITY_TYPE.getTag(entityTagKey).isPresent()) {
|
||||
return new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey);
|
||||
}
|
||||
}
|
||||
- default -> throw new IllegalArgumentException();
|
||||
+ default -> new io.papermc.paper.util.EmptyTag(); // Paper - testing additions
|
||||
}
|
||||
|
||||
return null;
|
||||
});
|
||||
|
||||
+ // Paper start - testing additions
|
||||
+ final Thread currentThread = Thread.currentThread();
|
||||
+ when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
|
||||
+
|
||||
+ final org.bukkit.plugin.PluginManager pluginManager = new org.bukkit.plugin.SimplePluginManager(instance, new org.bukkit.command.SimpleCommandMap(instance));
|
||||
+ when(instance.getPluginManager()).thenReturn(pluginManager);
|
||||
+ // paper end - testing additions
|
||||
+
|
||||
Bukkit.setServer(instance);
|
||||
} catch (Throwable t) {
|
||||
throw new Error(t);
|
||||
return layers;
|
||||
|
@ -15,13 +15,13 @@ public net.minecraft.server.dedicated.DedicatedServerProperties reload(Lnet/mine
|
||||
public net.minecraft.world.level.NaturalSpawner SPAWNING_CATEGORIES
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 7a0f2391a464eeebc5e57856300bc000b8d35e52..94dfc105b197c9eda481cbe90bb48b71c845e702 100644
|
||||
index 2233e51bfab4ac36977984e8fe7fddb04120dddd..7f7b7f0b29107375b2438e3af0bc0f40390db4fa 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -10,6 +10,7 @@ dependencies {
|
||||
implementation("jline:jline:2.12.1")
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm-commons:9.7")
|
||||
implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||
+ implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
|
||||
implementation("commons-lang:commons-lang:2.6")
|
||||
runtimeOnly("org.xerial:sqlite-jdbc:3.46.0.0")
|
||||
@ -5226,10 +5226,10 @@ index e433037a03ffafabb952887ae3980e1d51411d4c..c061813d275fbc48d7629cc59d90dbb4
|
||||
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 10f07a6eff8f738cefef11829dd774874259b8f4..4c5b6f8d63e4c60a1dc81e68117fa049b956819a 100644
|
||||
index 357c948dd66644497583996f211f25cbe5c78828..d0c41302478bd9b0ec65020e7ef520bd3ff1f347 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -962,6 +962,7 @@ public final class CraftServer implements Server {
|
||||
@@ -964,6 +964,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
org.spigotmc.SpigotConfig.init((File) this.console.options.valueOf("spigot-settings")); // Spigot
|
||||
@ -5238,7 +5238,7 @@ index 10f07a6eff8f738cefef11829dd774874259b8f4..4c5b6f8d63e4c60a1dc81e68117fa049
|
||||
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 273a6658deacbf00f6cc498cf3fcd20d144bd9e4..cf06abf508fab734f5945e1d292c01512a50749e 100644
|
||||
index 4566237fa1d49a559b2df806f9a318be46a6eade..0ea2d13ab80559472513c6df362583b8371a9532 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -142,6 +142,19 @@ public class Main {
|
||||
@ -5362,15 +5362,15 @@ index 0000000000000000000000000000000000000000..0396589795da1f83ddf62426236dde9a
|
||||
+ }
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/support/AbstractTestingBase.java b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
index 5bda0bc976920f224586f2c0e083b771c676e307..4e9612600822bc1b52b8528dff2783d43385ec73 100644
|
||||
--- a/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
+++ b/src/test/java/org/bukkit/support/AbstractTestingBase.java
|
||||
@@ -68,6 +68,7 @@ public abstract class AbstractTestingBase {
|
||||
BIOMES = REGISTRY_CUSTOM.registryOrThrow(Registries.BIOME);
|
||||
|
||||
DummyServer.setup();
|
||||
+ io.papermc.paper.configuration.GlobalConfigTestingBase.setupGlobalConfigForTest(); // Paper
|
||||
|
||||
CraftRegistry.setMinecraftRegistry(REGISTRY_CUSTOM);
|
||||
diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||
index f81f86cf05a8c6816d356185af6d0d84a0474dd2..ba0a2ab9de34fa40dd90cecaeec4a5e54fe3e2d8 100644
|
||||
--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||
+++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||
@@ -91,6 +91,7 @@ public final class DummyServerHelper {
|
||||
when(instance.getPluginManager()).thenReturn(pluginManager);
|
||||
// Paper end - testing additions
|
||||
|
||||
+ io.papermc.paper.configuration.GlobalConfigTestingBase.setupGlobalConfigForTest(); // Paper - configuration files - setup global configuration test base
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
@ -83,7 +83,7 @@ index 85c7f3027978b1d7d6c31b7ad21b3377cdda5925..e34deaf398dc6722c3128bdd6b9bc16d
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index cf06abf508fab734f5945e1d292c01512a50749e..42a1a0588e2b506082499ac9791d039089a64631 100644
|
||||
index 0ea2d13ab80559472513c6df362583b8371a9532..13c37384defda4475de584f33d1860a2d53ce05e 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -123,6 +123,7 @@ public class Main {
|
||||
@ -115,10 +115,10 @@ index 905adf97c0d1f0d1c774a6835a5dffcfea884e58..c017ce2ca1bc535795c958a2e509af2a
|
||||
public class CraftScheduler implements BukkitScheduler {
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index b0cc506f1b3eb53e8e2299787071de707a036df0..eeffc4be4ae7168c9f69edbbff6642fd4c214b3d 100644
|
||||
index a0f228ee83fd3a913666f88381c946f8a6340644..60dc550431fa4641f8c6d964329b0e2698d1fdd6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -240,7 +240,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -246,7 +246,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
try {
|
||||
nmsStack.applyComponents(new ItemParser(Commands.createValidationContext(MinecraftServer.getDefaultRegistryAccess())).parse(new StringReader(arguments)).components());
|
||||
} catch (CommandSyntaxException ex) {
|
||||
|
@ -4438,7 +4438,7 @@ index 40adb6117b9e0d5f70103113202a07715e403e2a..c9cab509796599b13ca3422de1049aed
|
||||
long j = Util.getNanos() - i;
|
||||
int k = this.tickCount % 100;
|
||||
diff --git a/src/main/java/net/minecraft/server/level/ChunkHolder.java b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
index f40a2f348c45a29168ca3d4eef07b5b628060bee..9a009a688c02e990723917766c51e1c0e71e338d 100644
|
||||
index 814e7fdf6c089b920825effaeeb0675695b2f3fa..43513325b7052d388a63d63bd3a4edff48cf23c2 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/ChunkHolder.java
|
||||
@@ -37,9 +37,9 @@ public class ChunkHolder extends GenerationChunkHolder {
|
||||
@ -4463,7 +4463,7 @@ index f40a2f348c45a29168ca3d4eef07b5b628060bee..9a009a688c02e990723917766c51e1c0
|
||||
return (LevelChunk) ((ChunkResult) this.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).orElse(null); // CraftBukkit - decompile error
|
||||
}
|
||||
|
||||
@@ -337,12 +337,28 @@ public class ChunkHolder extends GenerationChunkHolder {
|
||||
@@ -345,12 +345,28 @@ public class ChunkHolder extends GenerationChunkHolder {
|
||||
|
||||
this.wasAccessibleSinceLastSave |= flag1;
|
||||
if (!flag && flag1) {
|
||||
@ -4492,7 +4492,7 @@ index f40a2f348c45a29168ca3d4eef07b5b628060bee..9a009a688c02e990723917766c51e1c0
|
||||
this.fullChunkFuture.complete(ChunkHolder.UNLOADED_LEVEL_CHUNK);
|
||||
this.fullChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
|
||||
}
|
||||
@@ -353,11 +369,25 @@ public class ChunkHolder extends GenerationChunkHolder {
|
||||
@@ -361,11 +377,25 @@ public class ChunkHolder extends GenerationChunkHolder {
|
||||
if (!flag2 && flag3) {
|
||||
this.tickingChunkFuture = chunkLoadingManager.prepareTickingChunk(this);
|
||||
this.scheduleFullChunkPromotion(chunkLoadingManager, this.tickingChunkFuture, executor, FullChunkStatus.BLOCK_TICKING);
|
||||
@ -4519,7 +4519,7 @@ index f40a2f348c45a29168ca3d4eef07b5b628060bee..9a009a688c02e990723917766c51e1c0
|
||||
this.tickingChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
|
||||
}
|
||||
|
||||
@@ -371,11 +401,24 @@ public class ChunkHolder extends GenerationChunkHolder {
|
||||
@@ -379,11 +409,24 @@ public class ChunkHolder extends GenerationChunkHolder {
|
||||
|
||||
this.entityTickingChunkFuture = chunkLoadingManager.prepareEntityTickingChunk(this);
|
||||
this.scheduleFullChunkPromotion(chunkLoadingManager, this.entityTickingChunkFuture, executor, FullChunkStatus.ENTITY_TICKING);
|
||||
@ -4719,10 +4719,10 @@ index 5b920beb39dad8d392b4e5e12a89880720e41942..449608e60f3900778247101581ff598f
|
||||
protected ChunkDistanceManager(final Executor workerExecutor, final Executor mainThreadExecutor) {
|
||||
super(workerExecutor, mainThreadExecutor);
|
||||
diff --git a/src/main/java/net/minecraft/server/level/DistanceManager.java b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
index b6cc33943fe7e4667944f3e6f868b3033ea9ca18..3d46412b307f08968bb9b96c0649e0405813462e 100644
|
||||
index d3769ad50ddb556cff515ea8cf853d28e490ca94..dfa0456f352ce25bc4edd1b0f04ca5a14434d7fa 100644
|
||||
--- a/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
+++ b/src/main/java/net/minecraft/server/level/DistanceManager.java
|
||||
@@ -365,7 +365,7 @@ public abstract class DistanceManager {
|
||||
@@ -370,7 +370,7 @@ public abstract class DistanceManager {
|
||||
}
|
||||
|
||||
public void removeTicketsOnClosing() {
|
||||
@ -5048,7 +5048,7 @@ index c1db114edd9e31273b76374cbd19710b01cada2b..26064174397dc95f9b117d901e22c55a
|
||||
@Override
|
||||
public float getBukkitYaw() {
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 5fa5c6fa8c143e1aa1dacc7a6b63b11ad4b074ec..5025f7f5d66f2aedd57db137ae2dc69c723768b3 100644
|
||||
index 3e00b12d166c5a6a82e61574bfefd5973ffcbb59..142d762750b9745428ae27802f7a428147a74771 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -953,6 +953,25 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@ -5547,10 +5547,10 @@ index 34933c5324126f9afdc5cba9dea997ace8f01806..1cfc906317f07a44f06a4adf021c44e3
|
||||
return false;
|
||||
} else {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 4c5b6f8d63e4c60a1dc81e68117fa049b956819a..958925a980f50cc85b10d36bcc343947cec8f285 100644
|
||||
index d0c41302478bd9b0ec65020e7ef520bd3ff1f347..99178e22846c41f1d800b69d4fed064088bbe92c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2598,4 +2598,9 @@ public final class CraftServer implements Server {
|
||||
@@ -2600,4 +2600,9 @@ public final class CraftServer implements Server {
|
||||
return this.spigot;
|
||||
}
|
||||
// Spigot end
|
||||
@ -5561,7 +5561,7 @@ index 4c5b6f8d63e4c60a1dc81e68117fa049b956819a..958925a980f50cc85b10d36bcc343947
|
||||
+ }
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 508419378c88ba8688edbd5142d9d8ba52396507..69c62699e3412f2730e3db65f196099d77698980 100644
|
||||
index 07012c01e1d8eacf37b8a86a5e4e56fb0d81c989..ac6d4c8ac26696a0c6dfa471eee764b871dd2029 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -252,8 +252,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
|
@ -3242,7 +3242,7 @@ index ed54c81a3269360acce674aa4e1d54ccb2461841..c9c849534c3998cfcab7ddcb12a71ccb
|
||||
}
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
index 5025f7f5d66f2aedd57db137ae2dc69c723768b3..1cc9078fa63da4f39ef4a551cd6a5ff207f58306 100644
|
||||
index 142d762750b9745428ae27802f7a428147a74771..d0c946b0383dbd8242a554a92bc70dcc2f5cccc6 100644
|
||||
--- a/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
+++ b/src/main/java/net/minecraft/world/item/ItemStack.java
|
||||
@@ -183,7 +183,15 @@ public final class ItemStack implements DataComponentHolder {
|
||||
@ -3327,10 +3327,10 @@ index 49c037e961c5ca5ba8d6a870cb32ffe8719adc91..2772c19f58a35713d61aab24f6f0d6f5
|
||||
}
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c54d426cb 100644
|
||||
index 99178e22846c41f1d800b69d4fed064088bbe92c..9f7634053ddfc4fc67f89cc99524e9ebd6096f46 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -644,8 +644,10 @@ public final class CraftServer implements Server {
|
||||
@@ -645,8 +645,10 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -3341,7 +3341,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -1621,7 +1623,15 @@ public final class CraftServer implements Server {
|
||||
@@ -1623,7 +1625,15 @@ public final class CraftServer implements Server {
|
||||
return this.configuration.getInt("settings.spawn-radius", -1);
|
||||
}
|
||||
|
||||
@ -3357,7 +3357,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
|
||||
public String getShutdownMessage() {
|
||||
return this.configuration.getString("settings.shutdown-message");
|
||||
}
|
||||
@@ -1795,7 +1805,20 @@ public final class CraftServer implements Server {
|
||||
@@ -1797,7 +1807,20 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -3378,7 +3378,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
|
||||
Set<CommandSender> recipients = new HashSet<>();
|
||||
for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
|
||||
if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
|
||||
@@ -1803,14 +1826,14 @@ public final class CraftServer implements Server {
|
||||
@@ -1805,14 +1828,14 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
}
|
||||
|
||||
@ -3395,7 +3395,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
|
||||
|
||||
for (CommandSender recipient : recipients) {
|
||||
recipient.sendMessage(message);
|
||||
@@ -2072,6 +2095,14 @@ public final class CraftServer implements Server {
|
||||
@@ -2074,6 +2097,14 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, type);
|
||||
}
|
||||
|
||||
@ -3410,7 +3410,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
|
||||
@Override
|
||||
public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
|
||||
Preconditions.checkArgument(type != null, "InventoryType cannot be null");
|
||||
@@ -2086,13 +2117,28 @@ public final class CraftServer implements Server {
|
||||
@@ -2088,13 +2119,28 @@ public final class CraftServer implements Server {
|
||||
return CraftInventoryCreator.INSTANCE.createInventory(owner, size);
|
||||
}
|
||||
|
||||
@ -3439,7 +3439,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
|
||||
public Merchant createMerchant(String title) {
|
||||
return new CraftMerchantCustom(title == null ? InventoryType.MERCHANT.getDefaultTitle() : title);
|
||||
}
|
||||
@@ -2157,6 +2203,17 @@ public final class CraftServer implements Server {
|
||||
@@ -2159,6 +2205,17 @@ public final class CraftServer implements Server {
|
||||
return Thread.currentThread().equals(this.console.serverThread) || this.console.hasStopped() || !org.spigotmc.AsyncCatcher.enabled; // All bets are off if we have shut down (e.g. due to watchdog)
|
||||
}
|
||||
|
||||
@ -3457,7 +3457,7 @@ index 958925a980f50cc85b10d36bcc343947cec8f285..ee0fbba1ae29bb809303ccc09f64d48c
|
||||
@Override
|
||||
public String getMotd() {
|
||||
return this.console.getMotd();
|
||||
@@ -2603,4 +2660,57 @@ public final class CraftServer implements Server {
|
||||
@@ -2605,4 +2662,57 @@ public final class CraftServer implements Server {
|
||||
public double[] getTPS() {
|
||||
return new double[]{0, 0, 0}; // TODO
|
||||
}
|
||||
@ -3554,7 +3554,7 @@ index cbdb1a56a97150c164515a4ce6d3ba06428bf321..b214e7b302abbfe1641485a05f1371ac
|
||||
public URI getUrl() {
|
||||
return this.handle.link();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
index 69c62699e3412f2730e3db65f196099d77698980..4878a1b085a83dd4a8ffdc86250b8fb4fbac5192 100644
|
||||
index ac6d4c8ac26696a0c6dfa471eee764b871dd2029..85c99c3b23df1c4fd8721e7676d8e6b82f9e6abf 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
|
||||
@@ -162,6 +162,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
|
||||
@ -3628,7 +3628,7 @@ index 69c62699e3412f2730e3db65f196099d77698980..4878a1b085a83dd4a8ffdc86250b8fb4
|
||||
// Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 42a1a0588e2b506082499ac9791d039089a64631..9c1fab8db74757e1fb57d4f47099ba6e1536cd6d 100644
|
||||
index 13c37384defda4475de584f33d1860a2d53ce05e..3b0370256b4d8c96053b340a657c6bcc6be6c9de 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -20,6 +20,12 @@ public class Main {
|
||||
@ -4803,10 +4803,10 @@ index c9cc23757a9fcc58d30b2915d4c5cfbc7d1c767a..fc0e1212022d1aa3506699b60ef33819
|
||||
return this.title;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
|
||||
index 07d406de7123593dc470af2723f2a9a2dc2157b0..01fbd8a55866af3e371c8a2eef23ef6e9ca3226d 100644
|
||||
index d89b178dc82c7e2ad6d586217c5a039688563e29..d674289b07748022b94cc6a7e6c6eb456d245c93 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
|
||||
@@ -73,6 +73,13 @@ public class CraftInventoryView<T extends AbstractContainerMenu> extends CraftAb
|
||||
@@ -73,6 +73,13 @@ public class CraftInventoryView<T extends AbstractContainerMenu, I extends Inven
|
||||
return CraftItemStack.asCraftMirror(this.container.getSlot(slot).getItem());
|
||||
}
|
||||
|
||||
@ -5191,11 +5191,11 @@ index c71a4971f127fdfc753306019313ce1a31201120..fd3b12477c30d1eabdbe57ea77902793
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 1c5d63fb6a9ed5cc40d735793cf5889e189feadf..568d6fab743039b20715d8181555f52baa05f0f3 100644
|
||||
index 8bba749bce211814f51af8a33f2ed60ba7a8b52d..0c73854243f7fa21d1ffdb3b4c85ee0a69c9c5e4 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -959,6 +959,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
|
||||
@@ -961,6 +961,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isFireResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
|
||||
}
|
||||
|
||||
+ // Paper start
|
||||
@ -5213,7 +5213,7 @@ index 1c5d63fb6a9ed5cc40d735793cf5889e189feadf..568d6fab743039b20715d8181555f52b
|
||||
@Override
|
||||
public String getDisplayName() {
|
||||
return CraftChatMessage.fromComponent(this.displayName);
|
||||
@@ -989,6 +1001,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -991,6 +1003,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return this.itemName != null;
|
||||
}
|
||||
|
||||
@ -5232,7 +5232,7 @@ index 1c5d63fb6a9ed5cc40d735793cf5889e189feadf..568d6fab743039b20715d8181555f52b
|
||||
@Override
|
||||
public String getLocalizedName() {
|
||||
return this.getDisplayName();
|
||||
@@ -1008,6 +1032,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1010,6 +1034,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return this.lore != null && !this.lore.isEmpty();
|
||||
}
|
||||
|
||||
@ -5624,10 +5624,10 @@ index ff040613083c015d9c52c0995591b64305fd5018..95444fd9fecc5bda5462ca8dfeca82c5
|
||||
|
||||
boolean hadFormat = false;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index eeffc4be4ae7168c9f69edbbff6642fd4c214b3d..b64be3f292d88fa60746a3fe542740ef8ad2b41c 100644
|
||||
index 60dc550431fa4641f8c6d964329b0e2698d1fdd6..655ceaa92b9979fe29725f9812507731bb0bb484 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -77,6 +77,43 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -79,6 +79,43 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
||||
private CraftMagicNumbers() {}
|
||||
|
||||
@ -5783,10 +5783,10 @@ index 0000000000000000000000000000000000000000..3aedd0bbc97edacc1ebf71264b310e55
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/adventure/AdventureCodecsTest.java b/src/test/java/io/papermc/paper/adventure/AdventureCodecsTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a4533ef00523
|
||||
index 0000000000000000000000000000000000000000..074e46aa4aca1a5154a0198279f60b38e05c1344
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/adventure/AdventureCodecsTest.java
|
||||
@@ -0,0 +1,403 @@
|
||||
@@ -0,0 +1,405 @@
|
||||
+package io.papermc.paper.adventure;
|
||||
+
|
||||
+import com.mojang.datafixers.util.Pair;
|
||||
@ -5828,7 +5828,8 @@ index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a453
|
||||
+import net.minecraft.world.item.ItemStack;
|
||||
+import net.minecraft.world.item.Items;
|
||||
+import org.apache.commons.lang3.RandomStringUtils;
|
||||
+import org.bukkit.support.AbstractTestingBase;
|
||||
+import org.bukkit.support.RegistryHelper;
|
||||
+import org.bukkit.support.environment.VanillaFeature;
|
||||
+import org.junit.jupiter.api.Test;
|
||||
+import org.junit.jupiter.params.ParameterizedTest;
|
||||
+import org.junit.jupiter.params.provider.EnumSource;
|
||||
@ -5863,7 +5864,8 @@ index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a453
|
||||
+import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
+import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
+
|
||||
+class AdventureCodecsTest extends AbstractTestingBase {
|
||||
+@VanillaFeature
|
||||
+class AdventureCodecsTest {
|
||||
+
|
||||
+ static final String PARAMETERIZED_NAME = "[{index}] {displayName}: {arguments}";
|
||||
+
|
||||
@ -5995,7 +5997,7 @@ index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a453
|
||||
+ JavaOps.INSTANCE,
|
||||
+ JsonOps.INSTANCE
|
||||
+ )
|
||||
+ .map(ops -> AbstractTestingBase.REGISTRY_CUSTOM.createSerializationContext(ops))
|
||||
+ .map(ops -> RegistryHelper.getRegistry().createSerializationContext(ops))
|
||||
+ .toList();
|
||||
+ }
|
||||
+
|
||||
@ -6192,20 +6194,22 @@ index 0000000000000000000000000000000000000000..69b3aa957161e75d6344e437a8b4a453
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/adventure/ComponentServicesTest.java b/src/test/java/io/papermc/paper/adventure/ComponentServicesTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..98114b8fdc441f2a1642abf230457c2b5208bb5c
|
||||
index 0000000000000000000000000000000000000000..6ec088c79e3d727bc7e89d1c14b001345feb1f39
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/adventure/ComponentServicesTest.java
|
||||
@@ -0,0 +1,23 @@
|
||||
@@ -0,0 +1,25 @@
|
||||
+package io.papermc.paper.adventure;
|
||||
+
|
||||
+import net.kyori.adventure.text.Component;
|
||||
+import net.kyori.adventure.text.format.NamedTextColor;
|
||||
+import net.kyori.adventure.text.serializer.legacy.LegacyComponentSerializer;
|
||||
+import net.kyori.adventure.text.serializer.plain.PlainTextComponentSerializer;
|
||||
+import org.bukkit.support.environment.AllFeatures;
|
||||
+import org.junit.jupiter.api.Test;
|
||||
+
|
||||
+import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
+
|
||||
+@AllFeatures
|
||||
+public class ComponentServicesTest {
|
||||
+
|
||||
+ @Test
|
||||
|
@ -25,7 +25,7 @@ Other changes:
|
||||
Co-Authored-By: Emilia Kond <emilia@rymiel.space>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 94dfc105b197c9eda481cbe90bb48b71c845e702..0a05e753ff5e7b1d741c7719524715d7364cac4f 100644
|
||||
index c4572c0a6d9695088613d158838f236fe64efb48..83daf789efc4ce90ff54420e040b783569eb5cab 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -5,9 +5,29 @@ plugins {
|
||||
@ -57,9 +57,9 @@ index 94dfc105b197c9eda481cbe90bb48b71c845e702..0a05e753ff5e7b1d741c7719524715d7
|
||||
+ alsoShade(log4jPlugins.output)
|
||||
+ // Paper end
|
||||
implementation("org.apache.logging.log4j:log4j-iostreams:2.22.1") // Paper - remove exclusion
|
||||
implementation("org.ow2.asm:asm-commons:9.7")
|
||||
implementation("org.ow2.asm:asm-commons:9.7.1")
|
||||
implementation("org.spongepowered:configurate-yaml:4.2.0-SNAPSHOT") // Paper - config files
|
||||
@@ -78,6 +98,19 @@ tasks.check {
|
||||
@@ -79,6 +99,19 @@ tasks.check {
|
||||
dependsOn(scanJar)
|
||||
}
|
||||
// Paper end
|
||||
@ -78,7 +78,7 @@ index 94dfc105b197c9eda481cbe90bb48b71c845e702..0a05e753ff5e7b1d741c7719524715d7
|
||||
+// Paper end - use TCA for console improvements
|
||||
|
||||
tasks.test {
|
||||
exclude("org/bukkit/craftbukkit/inventory/ItemStack*Test.class")
|
||||
include("**/**TestSuite.class")
|
||||
diff --git a/src/log4jPlugins/java/io/papermc/paper/console/StripANSIConverter.java b/src/log4jPlugins/java/io/papermc/paper/console/StripANSIConverter.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..91547f6e6fe90006713beb2818da634304bdd236
|
||||
@ -396,7 +396,7 @@ index e9109526880159e2341cc97b53939ba2bcfaeaf9..9dcfcea63f57f45a5584bb80c34fe445
|
||||
|
||||
this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index ee0fbba1ae29bb809303ccc09f64d48c54d426cb..c6cc48c955f052d8f98e3b28c80910b299467480 100644
|
||||
index 9f7634053ddfc4fc67f89cc99524e9ebd6096f46..752933ceabd7ebe7b1e9f7d41198128f6f2182a6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -43,7 +43,7 @@ import java.util.logging.Level;
|
||||
@ -408,7 +408,7 @@ index ee0fbba1ae29bb809303ccc09f64d48c54d426cb..c6cc48c955f052d8f98e3b28c80910b2
|
||||
import net.minecraft.advancements.AdvancementHolder;
|
||||
import net.minecraft.commands.CommandSourceStack;
|
||||
import net.minecraft.commands.Commands;
|
||||
@@ -1354,9 +1354,13 @@ public final class CraftServer implements Server {
|
||||
@@ -1356,9 +1356,13 @@ public final class CraftServer implements Server {
|
||||
return this.logger;
|
||||
}
|
||||
|
||||
@ -423,7 +423,7 @@ index ee0fbba1ae29bb809303ccc09f64d48c54d426cb..c6cc48c955f052d8f98e3b28c80910b2
|
||||
@Override
|
||||
public PluginCommand getPluginCommand(String name) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 9c1fab8db74757e1fb57d4f47099ba6e1536cd6d..3eecea2e6df217ccf2c432d02022c53443a37014 100644
|
||||
index 3b0370256b4d8c96053b340a657c6bcc6be6c9de..bdb8e882ec1efbe5afec9ec5a5df57bf38d4ba2b 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -13,7 +13,6 @@ import java.util.logging.Logger;
|
||||
|
@ -6,12 +6,12 @@ Subject: [PATCH] Deobfuscate stacktraces in log messages, crash reports, and
|
||||
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 3bd5c2a2add9b462523beb9dfaf2eb5a00d470b9..a2bb659ae3a502d4c181d1ccbd15eefc38e4823b 100644
|
||||
index 7c81605648c6ba1360936faae25ef5fc11f0bcb4..4838ca75b9536ce5fd30906b51bdab86789668ec 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -45,6 +45,7 @@ dependencies {
|
||||
testImplementation("org.mockito:mockito-core:5.11.0")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.7")
|
||||
@@ -46,6 +46,7 @@ dependencies {
|
||||
testImplementation("org.mockito:mockito-core:5.14.1")
|
||||
testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
||||
testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
|
||||
+ implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling
|
||||
}
|
||||
|
@ -617,10 +617,10 @@ index bb59986c211f7d6ea50b1ad4bd5565227bec8a6c..9c950fc1de15b5039e34a9fdf893e97a
|
||||
this.setPvpAllowed(dedicatedserverproperties.pvp);
|
||||
this.setFlightAllowed(dedicatedserverproperties.allowFlight);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c6cc48c955f052d8f98e3b28c80910b299467480..3ef43c8d39f6012e0b8e98fd216b34a20449cca0 100644
|
||||
index 752933ceabd7ebe7b1e9f7d41198128f6f2182a6..492af80bc4a252ad3b82aef0c46c3e6625ec9146 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -986,6 +986,7 @@ public final class CraftServer implements Server {
|
||||
@@ -988,6 +988,7 @@ public final class CraftServer implements Server {
|
||||
this.commandMap.clearCommands();
|
||||
this.reloadData();
|
||||
org.spigotmc.SpigotConfig.registerCommands(); // Spigot
|
||||
@ -628,7 +628,7 @@ index c6cc48c955f052d8f98e3b28c80910b299467480..3ef43c8d39f6012e0b8e98fd216b34a2
|
||||
this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
|
||||
this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
|
||||
|
||||
@@ -2708,6 +2709,34 @@ public final class CraftServer implements Server {
|
||||
@@ -2710,6 +2711,34 @@ public final class CraftServer implements Server {
|
||||
// Paper end
|
||||
|
||||
// Paper start
|
||||
|
@ -7257,7 +7257,7 @@ index 5b4ac7b4fd0077e900e9f788963f1613bbc9a5d0..6afede80c10503a261d0f735c351d943
|
||||
Bootstrap.validate();
|
||||
Util.startTimerHackThread();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9f9932416 100644
|
||||
index 492af80bc4a252ad3b82aef0c46c3e6625ec9146..3d98004af5c872f8a183476183d1cc89a2aac4b6 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -277,7 +277,8 @@ public final class CraftServer implements Server {
|
||||
@ -7270,7 +7270,7 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9
|
||||
private final StructureManager structureManager;
|
||||
protected final DedicatedServer console;
|
||||
protected final DedicatedPlayerList playerList;
|
||||
@@ -454,24 +455,7 @@ public final class CraftServer implements Server {
|
||||
@@ -455,24 +456,7 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
|
||||
public void loadPlugins() {
|
||||
@ -7296,7 +7296,7 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9
|
||||
}
|
||||
|
||||
public void enablePlugins(PluginLoadOrder type) {
|
||||
@@ -560,15 +544,17 @@ public final class CraftServer implements Server {
|
||||
@@ -561,15 +545,17 @@ public final class CraftServer implements Server {
|
||||
private void enablePlugin(Plugin plugin) {
|
||||
try {
|
||||
List<Permission> perms = plugin.getDescription().getPermissions();
|
||||
@ -7320,7 +7320,7 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9
|
||||
|
||||
this.pluginManager.enablePlugin(plugin);
|
||||
} catch (Throwable ex) {
|
||||
@@ -1010,6 +996,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1012,6 +998,7 @@ public final class CraftServer implements Server {
|
||||
"This plugin is not properly shutting down its async tasks when it is being reloaded. This may cause conflicts with the newly loaded version of the plugin"
|
||||
));
|
||||
}
|
||||
@ -7329,10 +7329,10 @@ index 29f94e574e39714caec95af5c176c9dba481728e..b532c72ec2c048554e496b4b63afa0e9
|
||||
this.enablePlugins(PluginLoadOrder.STARTUP);
|
||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 5a89b9ca6a62f0bfb5fe01ed4097870788cf5d83..a6de88625aeb2c5ababd476e804e9b45b1185efe 100644
|
||||
index 655ceaa92b9979fe29725f9812507731bb0bb484..a339a0aa6fd7cc7be810e93bc9eb192437519c75 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -395,6 +395,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -401,6 +401,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
|
||||
return nmsItemStack.getItem().getDescriptionId(nmsItemStack);
|
||||
}
|
||||
@ -7524,20 +7524,22 @@ index 0000000000000000000000000000000000000000..1d14f530ef888102e47eeeaf0d1a6076
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/plugin/PluginDependencyValidationTest.java b/src/test/java/io/papermc/paper/plugin/PluginDependencyValidationTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..83b1274ba56f03bec6cb69a35f33dc04f008cc1e
|
||||
index 0000000000000000000000000000000000000000..f4c6b799d80ea555b41396c4a8fd1e02f9197709
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/plugin/PluginDependencyValidationTest.java
|
||||
@@ -0,0 +1,60 @@
|
||||
@@ -0,0 +1,62 @@
|
||||
+package io.papermc.paper.plugin;
|
||||
+
|
||||
+import io.papermc.paper.plugin.entrypoint.dependency.MetaDependencyTree;
|
||||
+import io.papermc.paper.plugin.entrypoint.dependency.SimpleMetaDependencyTree;
|
||||
+import org.bukkit.support.environment.Normal;
|
||||
+import org.junit.jupiter.api.Test;
|
||||
+
|
||||
+import java.util.List;
|
||||
+
|
||||
+import static org.hamcrest.MatcherAssert.assertThat;
|
||||
+
|
||||
+@Normal
|
||||
+public class PluginDependencyValidationTest {
|
||||
+
|
||||
+ private static final TestPluginMeta MAIN;
|
||||
@ -7590,10 +7592,10 @@ index 0000000000000000000000000000000000000000..83b1274ba56f03bec6cb69a35f33dc04
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/plugin/PluginLoadOrderTest.java b/src/test/java/io/papermc/paper/plugin/PluginLoadOrderTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..c2c3c2f24ea802628bc4a36ef180fc08f4e5d288
|
||||
index 0000000000000000000000000000000000000000..caa6d514d2ffa2505e804878678d745b689e214d
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/plugin/PluginLoadOrderTest.java
|
||||
@@ -0,0 +1,148 @@
|
||||
@@ -0,0 +1,150 @@
|
||||
+package io.papermc.paper.plugin;
|
||||
+
|
||||
+import com.google.common.graph.GraphBuilder;
|
||||
@ -7602,6 +7604,7 @@ index 0000000000000000000000000000000000000000..c2c3c2f24ea802628bc4a36ef180fc08
|
||||
+import io.papermc.paper.plugin.entrypoint.strategy.modern.ModernPluginLoadingStrategy;
|
||||
+import io.papermc.paper.plugin.entrypoint.strategy.ProviderConfiguration;
|
||||
+import io.papermc.paper.plugin.provider.PluginProvider;
|
||||
+import org.bukkit.support.environment.Normal;
|
||||
+import org.junit.jupiter.api.Assertions;
|
||||
+import org.junit.jupiter.api.BeforeEach;
|
||||
+import org.junit.jupiter.api.Test;
|
||||
@ -7612,6 +7615,7 @@ index 0000000000000000000000000000000000000000..c2c3c2f24ea802628bc4a36ef180fc08
|
||||
+import java.util.Map;
|
||||
+import java.util.concurrent.atomic.AtomicInteger;
|
||||
+
|
||||
+@Normal
|
||||
+public class PluginLoadOrderTest {
|
||||
+
|
||||
+ private static List<PluginProvider<PaperTestPlugin>> REGISTERED_PROVIDERS = new ArrayList<>();
|
||||
@ -7744,24 +7748,27 @@ index 0000000000000000000000000000000000000000..c2c3c2f24ea802628bc4a36ef180fc08
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/plugin/PluginManagerTest.java b/src/test/java/io/papermc/paper/plugin/PluginManagerTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..b7d69dda2b88218221a3cca6db4445cb58aa0179
|
||||
index 0000000000000000000000000000000000000000..3052b32905c8102357b7b3a5ed2df103fea83ab8
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/plugin/PluginManagerTest.java
|
||||
@@ -0,0 +1,75 @@
|
||||
@@ -0,0 +1,78 @@
|
||||
+package io.papermc.paper.plugin;
|
||||
+
|
||||
+import org.bukkit.Bukkit;
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.permissions.Permission;
|
||||
+import org.bukkit.plugin.PluginManager;
|
||||
+import org.bukkit.support.AbstractTestingBase;
|
||||
+import org.bukkit.support.environment.Normal;
|
||||
+import org.junit.jupiter.api.AfterEach;
|
||||
+import org.junit.jupiter.api.Test;
|
||||
+
|
||||
+import static org.hamcrest.MatcherAssert.assertThat;
|
||||
+import static org.hamcrest.Matchers.*;
|
||||
+import static org.hamcrest.Matchers.empty;
|
||||
+import static org.hamcrest.Matchers.is;
|
||||
+import static org.hamcrest.Matchers.nullValue;
|
||||
+
|
||||
+public class PluginManagerTest extends AbstractTestingBase {
|
||||
+@Normal
|
||||
+public class PluginManagerTest {
|
||||
+
|
||||
+ private static final PluginManager pm = Bukkit.getPluginManager();
|
||||
+
|
||||
@ -7825,16 +7832,18 @@ index 0000000000000000000000000000000000000000..b7d69dda2b88218221a3cca6db4445cb
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/plugin/PluginNamingTest.java b/src/test/java/io/papermc/paper/plugin/PluginNamingTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..6c3be5b84ae245652261668a52ce49934ef200a9
|
||||
index 0000000000000000000000000000000000000000..9f4486f736bad41a6c8c9c86e57226a45ae29a61
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/plugin/PluginNamingTest.java
|
||||
@@ -0,0 +1,28 @@
|
||||
@@ -0,0 +1,30 @@
|
||||
+package io.papermc.paper.plugin;
|
||||
+
|
||||
+import io.papermc.paper.plugin.provider.configuration.PaperPluginMeta;
|
||||
+import org.bukkit.support.environment.Normal;
|
||||
+import org.junit.jupiter.api.Assertions;
|
||||
+import org.junit.jupiter.api.Test;
|
||||
+
|
||||
+@Normal
|
||||
+public class PluginNamingTest {
|
||||
+ private static final String TEST_NAME = "Test_Plugin";
|
||||
+ private static final String TEST_VERSION = "1.0";
|
||||
@ -7859,10 +7868,10 @@ index 0000000000000000000000000000000000000000..6c3be5b84ae245652261668a52ce4993
|
||||
+}
|
||||
diff --git a/src/test/java/io/papermc/paper/plugin/SyntheticEventTest.java b/src/test/java/io/papermc/paper/plugin/SyntheticEventTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..2a7408ed5d9a415333212cadd7fefcd03785afbf
|
||||
index 0000000000000000000000000000000000000000..0b7f1521f8bf4b18dfdf9403862b5dc6b394a4d9
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/plugin/SyntheticEventTest.java
|
||||
@@ -0,0 +1,42 @@
|
||||
@@ -0,0 +1,44 @@
|
||||
+package io.papermc.paper.plugin;
|
||||
+
|
||||
+import io.papermc.paper.plugin.manager.PaperPluginManagerImpl;
|
||||
@ -7870,9 +7879,11 @@ index 0000000000000000000000000000000000000000..2a7408ed5d9a415333212cadd7fefcd0
|
||||
+import org.bukkit.event.Event;
|
||||
+import org.bukkit.event.EventHandler;
|
||||
+import org.bukkit.event.Listener;
|
||||
+import org.bukkit.support.environment.Normal;
|
||||
+import org.junit.jupiter.api.Assertions;
|
||||
+import org.junit.jupiter.api.Test;
|
||||
+
|
||||
+@Normal
|
||||
+public class SyntheticEventTest {
|
||||
+
|
||||
+ @Test
|
||||
@ -8142,16 +8153,16 @@ index 0000000000000000000000000000000000000000..ba271c35eb2804f94cfc893bf94affb9
|
||||
+ return "null";
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/test/java/org/bukkit/support/DummyServer.java b/src/test/java/org/bukkit/support/DummyServer.java
|
||||
index 183d30e3d3d413b05c762f374a964498d6ffdec4..bfbd80b60ac5df500d03c80de57e38aa7548dd46 100644
|
||||
--- a/src/test/java/org/bukkit/support/DummyServer.java
|
||||
+++ b/src/test/java/org/bukkit/support/DummyServer.java
|
||||
@@ -103,7 +103,7 @@ public final class DummyServer {
|
||||
final Thread currentThread = Thread.currentThread();
|
||||
when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
|
||||
|
||||
- final org.bukkit.plugin.PluginManager pluginManager = new org.bukkit.plugin.SimplePluginManager(instance, new org.bukkit.command.SimpleCommandMap(instance));
|
||||
+ final org.bukkit.plugin.PluginManager pluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(instance, new org.bukkit.command.SimpleCommandMap(instance), null);
|
||||
when(instance.getPluginManager()).thenReturn(pluginManager);
|
||||
// paper end - testing additions
|
||||
diff --git a/src/test/java/org/bukkit/support/DummyServerHelper.java b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||
index ba0a2ab9de34fa40dd90cecaeec4a5e54fe3e2d8..5d24b95e3eec351ec1e9444533dd5f9d376ec4c6 100644
|
||||
--- a/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||
+++ b/src/test/java/org/bukkit/support/DummyServerHelper.java
|
||||
@@ -87,7 +87,7 @@ public final class DummyServerHelper {
|
||||
// Paper start - testing additions
|
||||
final Thread currentThread = Thread.currentThread();
|
||||
when(instance.isPrimaryThread()).thenAnswer(ignored -> Thread.currentThread().equals(currentThread));
|
||||
- final org.bukkit.plugin.PluginManager pluginManager = new org.bukkit.plugin.SimplePluginManager(instance, new org.bukkit.command.SimpleCommandMap(instance));
|
||||
+ final org.bukkit.plugin.PluginManager pluginManager = new io.papermc.paper.plugin.manager.PaperPluginManagerImpl(instance, new org.bukkit.command.SimpleCommandMap(instance), null);
|
||||
when(instance.getPluginManager()).thenReturn(pluginManager);
|
||||
// Paper end - testing additions
|
||||
|
||||
|
@ -6,18 +6,18 @@ Subject: [PATCH] Plugin remapping
|
||||
Co-authored-by: Nassim Jahnke <nassim@njahnke.dev>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index a2bb659ae3a502d4c181d1ccbd15eefc38e4823b..8350fc099b68918fb03a21b6a5047ceee72dcbb4 100644
|
||||
index 3c9a9d2c44a3b177408ddfb3cad1e09169bf148b..ccf6e24f016991ac5987b5872037bf44d17e698f 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -46,6 +46,7 @@ dependencies {
|
||||
testImplementation("org.ow2.asm:asm-tree:9.7")
|
||||
@@ -47,6 +47,7 @@ dependencies {
|
||||
testImplementation("org.ow2.asm:asm-tree:9.7.1")
|
||||
testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
|
||||
implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling
|
||||
+ implementation("net.neoforged:AutoRenamingTool:2.0.3") // Paper - remap plugins
|
||||
}
|
||||
|
||||
paperweight {
|
||||
@@ -164,20 +165,41 @@ val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatM
|
||||
@@ -169,20 +170,41 @@ val runtimeClasspathWithoutVanillaServer = configurations.runtimeClasspath.flatM
|
||||
runtime.filterNot { it.asFile.absolutePath == vanilla }
|
||||
}
|
||||
|
||||
@ -1904,10 +1904,10 @@ index 0000000000000000000000000000000000000000..73b20a92f330311e3fef8f03b51a0985
|
||||
+ }
|
||||
+}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 69175337d14e0b14ddbc2a01a1deb860ae488d36..25a03307a576368f417f1ec3f44213ed469dcd71 100644
|
||||
index 3d98004af5c872f8a183476183d1cc89a2aac4b6..cd6b6109ea3844f7d78ad7a1cbd6cf5dc3d90b5c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1000,6 +1000,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1002,6 +1002,7 @@ public final class CraftServer implements Server {
|
||||
this.loadPlugins();
|
||||
this.enablePlugins(PluginLoadOrder.STARTUP);
|
||||
this.enablePlugins(PluginLoadOrder.POSTWORLD);
|
||||
|
@ -8,10 +8,10 @@ our own relocation. Also lets us rewrite NMS calls for when we're
|
||||
debugging in an IDE pre-relocate.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4f83c6f87 100644
|
||||
index b60b715af8c3259aed8d386a5165653e0b6ed667..2a29f60c3e82239ab7acd85242fc3390cb9129cd 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -11,6 +11,7 @@ import java.util.Arrays;
|
||||
@@ -12,6 +12,7 @@ import java.util.Arrays;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.Enumeration;
|
||||
@ -19,7 +19,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
@@ -20,6 +21,7 @@ import java.util.jar.JarEntry;
|
||||
@@ -22,6 +23,7 @@ import java.util.jar.JarEntry;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.JarOutputStream;
|
||||
import java.util.zip.ZipEntry;
|
||||
@ -27,9 +27,9 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
|
||||
import joptsimple.OptionParser;
|
||||
import joptsimple.OptionSet;
|
||||
import joptsimple.OptionSpec;
|
||||
@@ -100,6 +102,40 @@ public class Commodore {
|
||||
private static final Map<String, RerouteMethodData> METHOD_REROUTE = Commodore.createReroutes(MethodRerouting.class);
|
||||
private static final Map<String, RerouteMethodData> ENUM_METHOD_REROUTE = Commodore.createReroutes(EnumEvil.class);
|
||||
@@ -123,6 +125,40 @@ public class Commodore {
|
||||
return this.reroutes;
|
||||
}
|
||||
|
||||
+ // Paper start - Plugin rewrites
|
||||
+ private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
|
||||
@ -68,7 +68,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
|
||||
public static void main(String[] args) {
|
||||
OptionParser parser = new OptionParser();
|
||||
OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required();
|
||||
@@ -253,9 +289,49 @@ public class Commodore {
|
||||
@@ -278,9 +314,49 @@ public class Commodore {
|
||||
}
|
||||
|
||||
return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) {
|
||||
@ -118,7 +118,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
|
||||
name = FieldRename.rename(pluginVersion, owner, name);
|
||||
|
||||
if (modern) {
|
||||
@@ -375,6 +451,13 @@ public class Commodore {
|
||||
@@ -393,6 +469,13 @@ public class Commodore {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -132,7 +132,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
|
||||
if (modern) {
|
||||
if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) {
|
||||
switch (name) {
|
||||
@@ -471,6 +554,13 @@ public class Commodore {
|
||||
@@ -489,6 +572,13 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public void visitLdcInsn(Object value) {
|
||||
@ -146,7 +146,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
|
||||
if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) {
|
||||
super.visitLdcInsn("com.mysql.cj.jdbc.Driver");
|
||||
return;
|
||||
@@ -481,6 +571,14 @@ public class Commodore {
|
||||
@@ -499,6 +589,14 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) {
|
||||
@ -161,7 +161,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
|
||||
if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory")
|
||||
&& bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) {
|
||||
Type samMethodType = (Type) bootstrapMethodArguments[0];
|
||||
@@ -497,7 +595,7 @@ public class Commodore {
|
||||
@@ -515,7 +613,7 @@ public class Commodore {
|
||||
methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf));
|
||||
methodArgs.add(newInstantiated);
|
||||
|
||||
@ -170,7 +170,7 @@ index f80625a2b1dc266131ba3bfda9a918c72a592d82..ebc160fd4c8aed95087130bb6fddc1d4
|
||||
}, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType);
|
||||
return;
|
||||
}
|
||||
@@ -548,6 +646,12 @@ public class Commodore {
|
||||
@@ -566,6 +664,12 @@ public class Commodore {
|
||||
|
||||
@Override
|
||||
public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Remap reflection calls in plugins using internals
|
||||
Co-authored-by: Jason Penilla <11360596+jpenilla@users.noreply.github.com>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 8350fc099b68918fb03a21b6a5047ceee72dcbb4..404c2eefa88319e0eaf7b0d1d2696c91dd0e0e0b 100644
|
||||
index 381a4885c4f52c1e094af350fcb7e04b590f849a..6d8f4c3b290609d60dbcabe3d2c8274b017246c8 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -47,6 +47,12 @@ dependencies {
|
||||
@@ -48,6 +48,12 @@ dependencies {
|
||||
testImplementation("org.junit-pioneer:junit-pioneer:2.2.0") // Paper - CartesianTest
|
||||
implementation("net.neoforged:srgutils:1.0.9") // Paper - mappings handling
|
||||
implementation("net.neoforged:AutoRenamingTool:2.0.3") // Paper - remap plugins
|
||||
@ -645,11 +645,11 @@ index 242811578a786e3807a1a7019d472d5a68f87116..0b65fdf53124f3dd042b2363b1b8df8e
|
||||
return traceElements;
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index ebc160fd4c8aed95087130bb6fddc1d4f83c6f87..65f64de05a88844e62b5a0dd1e2f53edfb4e0c1f 100644
|
||||
index 2a29f60c3e82239ab7acd85242fc3390cb9129cd..91c6721201b095eb32c5fd5a1aaf2cbcf3ee196d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -103,36 +103,26 @@ public class Commodore {
|
||||
private static final Map<String, RerouteMethodData> ENUM_METHOD_REROUTE = Commodore.createReroutes(EnumEvil.class);
|
||||
@@ -126,36 +126,26 @@ public class Commodore {
|
||||
}
|
||||
|
||||
// Paper start - Plugin rewrites
|
||||
- private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
|
||||
@ -696,7 +696,7 @@ index ebc160fd4c8aed95087130bb6fddc1d4f83c6f87..65f64de05a88844e62b5a0dd1e2f53ed
|
||||
}
|
||||
// Paper end - Plugin rewrites
|
||||
|
||||
@@ -215,6 +205,7 @@ public class Commodore {
|
||||
@@ -240,6 +230,7 @@ public class Commodore {
|
||||
visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES));
|
||||
}
|
||||
|
||||
@ -705,18 +705,18 @@ index ebc160fd4c8aed95087130bb6fddc1d4f83c6f87..65f64de05a88844e62b5a0dd1e2f53ed
|
||||
final Set<RerouteMethodData> rerouteMethodData = new HashSet<>();
|
||||
String className;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index a6de88625aeb2c5ababd476e804e9b45b1185efe..fa2e43020fafc283a9c063d10a82280158c7f93d 100644
|
||||
index a339a0aa6fd7cc7be810e93bc9eb192437519c75..33d3085d0d44d748fcb1fc203dfd14c9e1b4aff0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -74,6 +74,7 @@ import org.bukkit.potion.PotionType;
|
||||
@SuppressWarnings("deprecation")
|
||||
public final class CraftMagicNumbers implements UnsafeValues {
|
||||
public static final UnsafeValues INSTANCE = new CraftMagicNumbers();
|
||||
public static final CraftMagicNumbers INSTANCE = new CraftMagicNumbers();
|
||||
+ public static final boolean DISABLE_OLD_API_SUPPORT = Boolean.getBoolean("paper.disableOldApiSupport"); // Paper
|
||||
|
||||
private CraftMagicNumbers() {}
|
||||
private final Commodore commodore = new Commodore();
|
||||
|
||||
@@ -340,7 +341,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -346,7 +347,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
throw new InvalidPluginException("Plugin API version " + pdf.getAPIVersion() + " is lower than the minimum allowed version. Please update or replace it.");
|
||||
}
|
||||
|
||||
@ -725,7 +725,7 @@ index a6de88625aeb2c5ababd476e804e9b45b1185efe..fa2e43020fafc283a9c063d10a822801
|
||||
CraftLegacy.init();
|
||||
}
|
||||
|
||||
@@ -355,6 +356,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -361,6 +362,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
|
||||
@Override
|
||||
public byte[] processClass(PluginDescriptionFile pdf, String path, byte[] clazz) {
|
||||
@ -736,5 +736,5 @@ index a6de88625aeb2c5ababd476e804e9b45b1185efe..fa2e43020fafc283a9c063d10a822801
|
||||
+ }
|
||||
+ // Paper end
|
||||
try {
|
||||
clazz = Commodore.convert(clazz, pdf.getName(), ApiVersion.getOrCreateVersion(pdf.getAPIVersion()), ((CraftServer) Bukkit.getServer()).activeCompatibilities);
|
||||
clazz = this.commodore.convert(clazz, pdf.getName(), ApiVersion.getOrCreateVersion(pdf.getAPIVersion()), ((CraftServer) Bukkit.getServer()).activeCompatibilities);
|
||||
} catch (Exception ex) {
|
||||
|
@ -1590,7 +1590,7 @@ index 46a090123e205394791cdbde2af84c58ce55f7e1..47f5f3d58bb3bf85cf35f9baae77df7f
|
||||
};
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 25a03307a576368f417f1ec3f44213ed469dcd71..b3d4cb03f6d3951632fd15101aa68e130a43879b 100644
|
||||
index cd6b6109ea3844f7d78ad7a1cbd6cf5dc3d90b5c..0fda501dedcc1f3f7d35e3b66a4b40394c4b3cb5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -376,7 +376,7 @@ public final class CraftServer implements Server {
|
||||
@ -1602,7 +1602,7 @@ index 25a03307a576368f417f1ec3f44213ed469dcd71..b3d4cb03f6d3951632fd15101aa68e13
|
||||
this.overrideSpawnLimits();
|
||||
console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
|
||||
this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
|
||||
@@ -2617,12 +2617,31 @@ public final class CraftServer implements Server {
|
||||
@@ -2619,12 +2619,31 @@ public final class CraftServer implements Server {
|
||||
private final org.bukkit.Server.Spigot spigot = new org.bukkit.Server.Spigot()
|
||||
{
|
||||
|
||||
@ -1985,10 +1985,10 @@ index f97eccb6a17c7876e1e002d798eb67bbe80571a0..76effc345d362047e64d064eb64a5222
|
||||
+ } // Paper
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 6aa5b1e05893bcf61a91cb4de578d8996ca0a868..9383bf47404fca8d008d5c401ed37ddaa7bef4f7 100644
|
||||
index 33d3085d0d44d748fcb1fc203dfd14c9e1b4aff0..f7b80cf8c89ae5eb9d8f0893e05ffc753fdace19 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -197,6 +197,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -199,6 +199,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
return CraftNamespacedKey.toMinecraft(mat.getKey());
|
||||
}
|
||||
// ========================================================================
|
||||
@ -2001,7 +2001,7 @@ index 6aa5b1e05893bcf61a91cb4de578d8996ca0a868..9383bf47404fca8d008d5c401ed37dda
|
||||
|
||||
public static byte toLegacyData(BlockState data) {
|
||||
return CraftLegacy.toLegacyData(data);
|
||||
@@ -442,6 +448,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -448,6 +454,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
public DamageSource.Builder createDamageSourceBuilder(DamageType damageType) {
|
||||
return new CraftDamageSourceBuilder(damageType);
|
||||
}
|
||||
|
@ -146,10 +146,10 @@ index 49de4625c57689a3624ed421c0b03512507c97c3..46e03617bb32e4037d700c1b3698d397
|
||||
this.startMetricsRecordingTick();
|
||||
this.profiler.push("tick");
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b3d4cb03f6d3951632fd15101aa68e130a43879b..90da60f7cdfe809c2035c9cd242f748ec8bf5eb0 100644
|
||||
index 0fda501dedcc1f3f7d35e3b66a4b40394c4b3cb5..2c3efcf07f933278a8b897cf7b1f6f24b452a7c5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2670,7 +2670,11 @@ public final class CraftServer implements Server {
|
||||
@@ -2672,7 +2672,11 @@ public final class CraftServer implements Server {
|
||||
|
||||
@Override
|
||||
public double[] getTPS() {
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] Add command line option to load extra plugin jars not in the
|
||||
ex: java -jar paperclip.jar nogui -add-plugin=/path/to/plugin.jar -add-plugin=/path/to/another/plugin_jar.jar
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 1056badff06575ef13907afac60af734ffa2b863..acab477a4a026799319054c2eb4d0f2c99ab3d83 100644
|
||||
index 2c3efcf07f933278a8b897cf7b1f6f24b452a7c5..b8b2e582115cc42a913b03a35861fa810d774cbb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -458,6 +458,35 @@ public final class CraftServer implements Server {
|
||||
@@ -459,6 +459,35 @@ public final class CraftServer implements Server {
|
||||
io.papermc.paper.plugin.entrypoint.LaunchEntryPointHandler.INSTANCE.enter(io.papermc.paper.plugin.entrypoint.Entrypoint.PLUGIN); // Paper - replace implementation
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ index 1056badff06575ef13907afac60af734ffa2b863..acab477a4a026799319054c2eb4d0f2c
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
this.helpMap.clear();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 26dfb02286e836cad0242c71f743265d55d9d032..1c8049bbc08be77673d375205bd42a346ff951b8 100644
|
||||
index bdb8e882ec1efbe5afec9ec5a5df57bf38d4ba2b..034d68c2715b6a90f31e56f949ff3d27235a26eb 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -160,6 +160,12 @@ public class Main {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Support components in ItemMeta
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 568d6fab743039b20715d8181555f52baa05f0f3..7ae3cdb80335cbeb0ff695eb719a170651586722 100644
|
||||
index 0c73854243f7fa21d1ffdb3b4c85ee0a69c9c5e4..f6ac13f91f08498a8adda7d34518a5cfe34c15b2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -976,11 +976,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -978,11 +978,23 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return CraftChatMessage.fromComponent(this.displayName);
|
||||
}
|
||||
|
||||
@ -32,7 +32,7 @@ index 568d6fab743039b20715d8181555f52baa05f0f3..7ae3cdb80335cbeb0ff695eb719a1706
|
||||
@Override
|
||||
public boolean hasDisplayName() {
|
||||
return this.displayName != null;
|
||||
@@ -1154,6 +1166,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1156,6 +1168,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
return this.lore == null ? null : new ArrayList<String>(Lists.transform(this.lore, CraftChatMessage::fromComponent));
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ index 568d6fab743039b20715d8181555f52baa05f0f3..7ae3cdb80335cbeb0ff695eb719a1706
|
||||
@Override
|
||||
public void setLore(List<String> lore) {
|
||||
if (lore == null || lore.isEmpty()) {
|
||||
@@ -1168,6 +1188,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1170,6 +1190,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
}
|
||||
}
|
||||
|
||||
@ -69,7 +69,7 @@ index 568d6fab743039b20715d8181555f52baa05f0f3..7ae3cdb80335cbeb0ff695eb719a1706
|
||||
@Override
|
||||
public boolean hasCustomModelData() {
|
||||
return this.customModelData != null;
|
||||
@@ -1880,6 +1915,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1882,6 +1917,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
}
|
||||
|
||||
for (Object object : addFrom) {
|
||||
|
@ -11,7 +11,7 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Co-authored-by: masmc05 <masmc05@gmail.com>
|
||||
|
||||
diff --git a/build.gradle.kts b/build.gradle.kts
|
||||
index 404c2eefa88319e0eaf7b0d1d2696c91dd0e0e0b..e7c00486bd831578008c02fcda13f3a555e6a2f1 100644
|
||||
index 6d8f4c3b290609d60dbcabe3d2c8274b017246c8..0c349354ba76dfd2c5f16fb232263b18e77a9a40 100644
|
||||
--- a/build.gradle.kts
|
||||
+++ b/build.gradle.kts
|
||||
@@ -1,4 +1,5 @@
|
||||
@ -20,7 +20,7 @@ index 404c2eefa88319e0eaf7b0d1d2696c91dd0e0e0b..e7c00486bd831578008c02fcda13f3a5
|
||||
|
||||
plugins {
|
||||
java
|
||||
@@ -64,18 +65,24 @@ tasks.jar {
|
||||
@@ -65,18 +66,24 @@ tasks.jar {
|
||||
|
||||
manifest {
|
||||
val git = Git(rootProject.layout.projectDirectory.path)
|
||||
@ -590,7 +590,7 @@ index f077b8ff0bf0d96628db3569132696b68fd79921..5f11f5b16766f9d1d5640ae037e259be
|
||||
value.append("\n Plugins: {");
|
||||
for (Plugin plugin : Bukkit.getPluginManager().getPlugins()) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 7d6d817f951811aad0f2ccea567e558bad1242fa..19d2b38cd4397cb53fc2ed3f0e5df5c66223fd5f 100644
|
||||
index b8b2e582115cc42a913b03a35861fa810d774cbb..8f79d7611c3ee1c817d5671152e459ec4f413418 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -11,8 +11,6 @@ import com.google.common.collect.MapMaker;
|
||||
@ -644,7 +644,7 @@ index 7d6d817f951811aad0f2ccea567e558bad1242fa..19d2b38cd4397cb53fc2ed3f0e5df5c6
|
||||
this.structureManager = new CraftStructureManager(console.getStructureManager(), console.registryAccess());
|
||||
this.dataPackManager = new CraftDataPackManager(this.getServer().getPackRepository());
|
||||
this.serverTickManager = new CraftServerTickManager(console.tickRateManager());
|
||||
@@ -606,6 +601,13 @@ public final class CraftServer implements Server {
|
||||
@@ -607,6 +602,13 @@ public final class CraftServer implements Server {
|
||||
return this.bukkitVersion;
|
||||
}
|
||||
|
||||
@ -659,7 +659,7 @@ index 7d6d817f951811aad0f2ccea567e558bad1242fa..19d2b38cd4397cb53fc2ed3f0e5df5c6
|
||||
public List<CraftPlayer> getOnlinePlayers() {
|
||||
return this.playerView;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 8da38624b5867ce88bdb3036e1ed6d99fc626f31..2097be352dc585b805dc73194cec095627f311bc 100644
|
||||
index 034d68c2715b6a90f31e56f949ff3d27235a26eb..a7fbbe40f2382e7af185c4bfdd451fc1998b3636 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -15,6 +15,7 @@ import joptsimple.OptionSet;
|
||||
@ -671,7 +671,7 @@ index 8da38624b5867ce88bdb3036e1ed6d99fc626f31..2097be352dc585b805dc73194cec0956
|
||||
public static boolean useConsole = true;
|
||||
|
||||
@@ -241,15 +242,17 @@ public class Main {
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
System.err.println("*** Error, this build is outdated ***");
|
||||
- System.err.println("*** Please download a new build as per instructions from https://www.spigotmc.org/go/outdated-spigot ***");
|
||||
@ -692,10 +692,10 @@ index 8da38624b5867ce88bdb3036e1ed6d99fc626f31..2097be352dc585b805dc73194cec0956
|
||||
t.printStackTrace();
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
index 9383bf47404fca8d008d5c401ed37ddaa7bef4f7..d08b01fef9928f2239c8663cf90219dc7acad58c 100644
|
||||
index f7b80cf8c89ae5eb9d8f0893e05ffc753fdace19..432f019afff36aa6143c052f7387a6c275a09de8 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||
@@ -453,6 +453,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
@@ -459,6 +459,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||
public String getTimingsServerName() {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName;
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
Co-authored-by: SoSeDiK <mrsosedik@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
index 47e1640cafc8087d94d0b88b8b3117591f9f238e..64db7e017b41bffcaac202ee4ecfd7df46d69331 100644
|
||||
index 3a67b2b6a6d3204b2a7bbe8adbf2b0ecf7898551..02b9e1ed57f5d65698c461387ff7d48450e6a70f 100644
|
||||
--- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
+++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java
|
||||
@@ -2013,7 +2013,7 @@ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl
|
||||
@ -40,10 +40,10 @@ index 47e1640cafc8087d94d0b88b8b3117591f9f238e..64db7e017b41bffcaac202ee4ecfd7df
|
||||
if ( org.spigotmc.SpigotConfig.logCommands ) // Spigot
|
||||
this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2a36e562967ec6174efe456e489c50ca10ba47e5..b0371c51645da361b63dea02bf7633ae6191560f 100644
|
||||
index 8f79d7611c3ee1c817d5671152e459ec4f413418..441a8d3355e0db773a5da330bf9361234da1ca89 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -933,7 +933,7 @@ public final class CraftServer implements Server {
|
||||
@@ -934,7 +934,7 @@ public final class CraftServer implements Server {
|
||||
public boolean dispatchCommand(CommandSender sender, String commandLine) {
|
||||
Preconditions.checkArgument(sender != null, "sender cannot be null");
|
||||
Preconditions.checkArgument(commandLine != null, "commandLine cannot be null");
|
||||
@ -53,7 +53,7 @@ index 2a36e562967ec6174efe456e489c50ca10ba47e5..b0371c51645da361b63dea02bf7633ae
|
||||
if (this.commandMap.dispatch(sender, commandLine)) {
|
||||
return true;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
index fb5548b92a0fe7866cf98e25293c4b0702344c9b..52d48ad341c564f0f847e3aad09babee826ebf87 100644
|
||||
index 545da59af2436b9a4363ec459456c8f15650b79f..9751cace64d9ad2b8b55080b13834e8ccb056b42 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
|
||||
@@ -546,7 +546,20 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose server CommandMap
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index b0371c51645da361b63dea02bf7633ae6191560f..527b3a7ae93ab288b119fe6bfa76cb0ea3ab2561 100644
|
||||
index 441a8d3355e0db773a5da330bf9361234da1ca89..32d1e4bc8279a9adb83501c99fc7ff33d4c7f81c 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2177,6 +2177,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2179,6 +2179,7 @@ public final class CraftServer implements Server {
|
||||
return this.helpMap;
|
||||
}
|
||||
|
||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Be a bit more informative in maxHealth exception
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index adeb3b9a3d65d2ef71ea4fd6f0f4679a88d0ba87..e6c68fd9a5fcd374cd7feca081189c9ba9225743 100644
|
||||
index 5ce03fa25e0a03025501a7f86a8f3c64f3fd7c77..ff2118fb463168e061ca9152183e19d593b476e9 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -102,7 +102,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -103,7 +103,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@Override
|
||||
public void setHealth(double health) {
|
||||
health = (float) health;
|
||||
|
@ -7,10 +7,10 @@ Upstream added methods for this, original methods are now
|
||||
deprecated
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index 812a4db4a91b887ef61b3ead9fa781561e6039ce..238ec25cc3109659d524fcc1de48afcd5f59552b 100644
|
||||
index ff2118fb463168e061ca9152183e19d593b476e9..5ba4105356e4a4808293e86c679d08a3c4cdd245 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -283,10 +283,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -284,10 +284,29 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -41,7 +41,7 @@ index 812a4db4a91b887ef61b3ead9fa781561e6039ce..238ec25cc3109659d524fcc1de48afcd
|
||||
|
||||
@Override
|
||||
public void damage(double amount) {
|
||||
@@ -807,4 +826,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -813,4 +832,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
this.getHandle().persistentInvisibility = invisible;
|
||||
this.getHandle().setSharedFlag(5, invisible);
|
||||
}
|
||||
|
@ -16,10 +16,10 @@ modify that. Under the previous logic, plugins were unable (cleanly) override pe
|
||||
A config option has been added for those who depend on the previous behavior, but I don't expect that.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 2b665dafdfd002fbd87dca9d869ee8c2b945a4fb..da2e0bb591468e7940f057a583ce166abc79d399 100644
|
||||
index 3043ec179592606050deede2874b0e251b859892..dfd8776ff6cd8be750e77dc4c30f59c28ff1732a 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -487,6 +487,7 @@ public final class CraftServer implements Server {
|
||||
@@ -488,6 +488,7 @@ public final class CraftServer implements Server {
|
||||
if (type == PluginLoadOrder.STARTUP) {
|
||||
this.helpMap.clear();
|
||||
this.helpMap.initializeGeneralTopics();
|
||||
@ -27,7 +27,7 @@ index 2b665dafdfd002fbd87dca9d869ee8c2b945a4fb..da2e0bb591468e7940f057a583ce166a
|
||||
}
|
||||
|
||||
Plugin[] plugins = this.pluginManager.getPlugins();
|
||||
@@ -506,7 +507,7 @@ public final class CraftServer implements Server {
|
||||
@@ -507,7 +508,7 @@ public final class CraftServer implements Server {
|
||||
this.commandMap.registerServerAliases();
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Custom Permissions
|
||||
https://github.com/PaperMC/Paper/issues/49
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index c8d8161bc8558be20583ca9e68611ea26e61deb0..ca2a17db0713fdb332549a76bee7e56502f96e56 100644
|
||||
index dfd8776ff6cd8be750e77dc4c30f59c28ff1732a..2b0f69b89d69258a1e9a6a81db5c9d4497417cd7 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2790,5 +2790,23 @@ public final class CraftServer implements Server {
|
||||
@@ -2792,5 +2792,23 @@ public final class CraftServer implements Server {
|
||||
}
|
||||
return this.adventure$audiences;
|
||||
}
|
||||
|
@ -7,10 +7,10 @@ Metadata is not meant to persist reload as things break badly with non primitive
|
||||
This will remove metadata on reload so it does not crash everything if a plugin uses it.
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 99571e69aabbbfb0e439a42d113c206decb1377b..5461e0a1ef7f342cbd9fb6f291e33e645b414058 100644
|
||||
index 2b0f69b89d69258a1e9a6a81db5c9d4497417cd7..b7539a5f7bc20f20f3cd7fb30d87ab7ffc1133c3 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1001,8 +1001,16 @@ public final class CraftServer implements Server {
|
||||
@@ -1003,8 +1003,16 @@ public final class CraftServer implements Server {
|
||||
world.spigotConfig.init(); // Spigot
|
||||
}
|
||||
|
||||
|
@ -149,7 +149,7 @@ index 17fa2d3db112762bcb8b941b69b8ddcc53f47224..6c76aeddb34239a5acc204a17b2aa2d8
|
||||
|
||||
static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
index 7ae3cdb80335cbeb0ff695eb719a170651586722..97c40582bca095532fff9a81515f38ea4ac527e0 100644
|
||||
index f6ac13f91f08498a8adda7d34518a5cfe34c15b2..9ab1abd4414a0a40284e12dfebff37e21e7f150f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
|
||||
@@ -6,6 +6,7 @@ import com.google.common.collect.ImmutableList;
|
||||
@ -213,7 +213,7 @@ index 7ae3cdb80335cbeb0ff695eb719a170651586722..97c40582bca095532fff9a81515f38ea
|
||||
for (Map.Entry<?, ?> entry : ench.entrySet()) {
|
||||
Enchantment enchantment = CraftEnchantment.stringToBukkit(entry.getKey().toString());
|
||||
if ((enchantment != null) && (entry.getValue() instanceof Integer)) {
|
||||
@@ -1079,14 +1081,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1081,14 +1083,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
|
||||
@Override
|
||||
public Map<Enchantment, Integer> getEnchants() {
|
||||
@ -230,7 +230,7 @@ index 7ae3cdb80335cbeb0ff695eb719a170651586722..97c40582bca095532fff9a81515f38ea
|
||||
}
|
||||
|
||||
if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
|
||||
@@ -1686,7 +1688,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -1688,7 +1690,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
clone.customModelData = this.customModelData;
|
||||
clone.blockData = this.blockData;
|
||||
if (this.enchantments != null) {
|
||||
@ -239,7 +239,7 @@ index 7ae3cdb80335cbeb0ff695eb719a170651586722..97c40582bca095532fff9a81515f38ea
|
||||
}
|
||||
if (this.hasAttributeModifiers()) {
|
||||
clone.attributeModifiers = LinkedHashMultimap.create(this.attributeModifiers);
|
||||
@@ -2036,4 +2038,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
@@ -2038,4 +2040,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
|
||||
|
||||
return (result != null) ? result : Optional.empty();
|
||||
}
|
||||
|
@ -60,10 +60,10 @@ index a0b0614ac7d2009db5c6c10ab4a5f09dd447c635..653856d0b8dcf2baf4cc77a276f17c8c
|
||||
} else {
|
||||
String[] astring1 = astring;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5461e0a1ef7f342cbd9fb6f291e33e645b414058..ff807bfe89708d9c680b84eda902b49f3167f3a4 100644
|
||||
index b7539a5f7bc20f20f3cd7fb30d87ab7ffc1133c3..b125872e57e15081d6f5a7b3e108f7633046b228 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1886,7 +1886,7 @@ public final class CraftServer implements Server {
|
||||
@@ -1888,7 +1888,7 @@ public final class CraftServer implements Server {
|
||||
if (result == null) {
|
||||
GameProfile profile = null;
|
||||
// Only fetch an online UUID in online mode
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Allow Reloading of Command Aliases
|
||||
Reload the aliases stored in commands.yml
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 20076b59ed7433cc280e2574a09e8db1d58eb027..67805fe23d91961b036089674e4f6202fad3c505 100644
|
||||
index b125872e57e15081d6f5a7b3e108f7633046b228..8e951ed126453cf1ffa81e5c8aa6e6ea5db03089 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2816,5 +2816,24 @@ public final class CraftServer implements Server {
|
||||
@@ -2818,5 +2818,24 @@ public final class CraftServer implements Server {
|
||||
DefaultPermissions.registerCorePermissions();
|
||||
CraftDefaultPermissions.registerCorePermissions();
|
||||
}
|
||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add configuration option to prevent player names from being
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 67805fe23d91961b036089674e4f6202fad3c505..16110e41480ad4508e56c196c551debdf0e96811 100644
|
||||
index 8e951ed126453cf1ffa81e5c8aa6e6ea5db03089..cfc59f1fb52dffb13fb214dd7c9cf71d40354ef0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2835,5 +2835,10 @@ public final class CraftServer implements Server {
|
||||
@@ -2837,5 +2837,10 @@ public final class CraftServer implements Server {
|
||||
commandMap.registerServerAliases();
|
||||
return true;
|
||||
}
|
||||
|
@ -626,7 +626,7 @@ index 416b26c2ab62b29d640169166980e398d5824b14..774d81c702edb76a2f6184d4dc53687d
|
||||
String s1 = name.toLowerCase(Locale.ROOT);
|
||||
GameProfileCache.GameProfileInfo usercache_usercacheentry = (GameProfileCache.GameProfileInfo) this.profilesByName.get(s1);
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 16110e41480ad4508e56c196c551debdf0e96811..c5618c1a773442c9c016b67ea64d83f8efcb3b89 100644
|
||||
index cfc59f1fb52dffb13fb214dd7c9cf71d40354ef0..f2b2a352cdc0301601ffd4b4fb7a99304ba526e5 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -262,6 +262,9 @@ import org.yaml.snakeyaml.error.MarkedYAMLException;
|
||||
@ -647,7 +647,7 @@ index 16110e41480ad4508e56c196c551debdf0e96811..c5618c1a773442c9c016b67ea64d83f8
|
||||
CraftItemFactory.instance();
|
||||
CraftEntityFactory.instance();
|
||||
}
|
||||
@@ -2840,5 +2844,39 @@ public final class CraftServer implements Server {
|
||||
@@ -2842,5 +2846,39 @@ public final class CraftServer implements Server {
|
||||
public boolean suggestPlayerNamesWhenNullTabCompletions() {
|
||||
return io.papermc.paper.configuration.GlobalConfiguration.get().commands.suggestPlayerNamesWhenNullTabCompletions;
|
||||
}
|
||||
|
@ -78,10 +78,10 @@ index f94c0106b44d614483184e372c01c1504cb886b0..72756ef14b8ec8afd80313b9f6aaf767
|
||||
|
||||
return null;
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5ab2836f14e1a7482e7136004507d66c4abb4bdd..4280bd6288ce9522d041ec2dc2105d3908514a2f 100644
|
||||
index f2b2a352cdc0301601ffd4b4fb7a99304ba526e5..31f87ce0865dd7560cd9ba634855a1defdc80df2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -947,7 +947,13 @@ public final class CraftServer implements Server {
|
||||
@@ -948,7 +948,13 @@ public final class CraftServer implements Server {
|
||||
|
||||
// Spigot start
|
||||
if (!org.spigotmc.SpigotConfig.unknownCommandMessage.isEmpty()) {
|
||||
|
@ -31,12 +31,12 @@ index 8f1992188f7fd9e735569e099b36a7eafed47aae..061c89b985dafc79c808dd5f0e296b9f
|
||||
Bootstrap.isBootstrapped = true;
|
||||
Instant instant = Instant.now();
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/Main.java b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
index 837db57c19df3d5c986a52edf3d9d8105cc87cde..446403f73fb1b5687d587889e6f32dce464d05a6 100644
|
||||
index a41674e0965a13acd2ec2fcc431a2baa26fc4361..bcc9d3b1503b1be1841c9ab40e879a1cbb0549f2 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/Main.java
|
||||
@@ -249,10 +249,12 @@ public class Main {
|
||||
Calendar deadline = Calendar.getInstance();
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -14);
|
||||
deadline.add(Calendar.DAY_OF_YEAR, -28);
|
||||
if (buildDate.before(deadline.getTime())) {
|
||||
- System.err.println("*** Error, this build is outdated ***");
|
||||
+ // Paper start - This is some stupid bullshit
|
||||
|
@ -7,10 +7,10 @@ Subject: [PATCH] LivingEntity#setKiller
|
||||
public net.minecraft.world.entity.LivingEntity lastHurtByPlayerTime
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
index c36e4c1802e304853320576e0521dbc53cd25425..fe631496aa551a0029eff7b4d4a5daf16dddac50 100644
|
||||
index 5ba4105356e4a4808293e86c679d08a3c4cdd245..7a01569f62b3b27a9eb6def0e2ec72e1d392258d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
|
||||
@@ -406,6 +406,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
@@ -407,6 +407,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
|
||||
return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
|
||||
}
|
||||
|
||||
|
@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerArmorChangeEvent
|
||||
|
||||
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index f297b2227d0793f44cb5770aa24a474ec7283b15..21d00a73ad8287d61eda1ab91b88ea3264aff021 100644
|
||||
index 021c72410c7580d659bfaa1e327fae3727acabd2..7a7c404778757e6778305c9f8334a4fba1f466a6 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -3168,6 +3168,13 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@ -24,10 +24,10 @@ index f297b2227d0793f44cb5770aa24a474ec7283b15..21d00a73ad8287d61eda1ab91b88ea32
|
||||
}
|
||||
diff --git a/src/test/java/io/papermc/paper/inventory/item/ArmorSlotTypeMaterialTest.java b/src/test/java/io/papermc/paper/inventory/item/ArmorSlotTypeMaterialTest.java
|
||||
new file mode 100644
|
||||
index 0000000000000000000000000000000000000000..a706dcbabfe31bf54a552965fa5feb8be34213bf
|
||||
index 0000000000000000000000000000000000000000..8943cef5cdb8269080b9f0e2edbad5d5ea8b421d
|
||||
--- /dev/null
|
||||
+++ b/src/test/java/io/papermc/paper/inventory/item/ArmorSlotTypeMaterialTest.java
|
||||
@@ -0,0 +1,74 @@
|
||||
@@ -0,0 +1,75 @@
|
||||
+package io.papermc.paper.inventory.item;
|
||||
+
|
||||
+import com.destroystokyo.paper.event.player.PlayerArmorChangeEvent;
|
||||
@ -40,7 +40,7 @@ index 0000000000000000000000000000000000000000..a706dcbabfe31bf54a552965fa5feb8b
|
||||
+import net.minecraft.world.item.ItemStack;
|
||||
+import org.bukkit.Material;
|
||||
+import org.bukkit.craftbukkit.util.CraftMagicNumbers;
|
||||
+import org.bukkit.support.AbstractTestingBase;
|
||||
+import org.bukkit.support.environment.AllFeatures;
|
||||
+import org.junit.jupiter.params.ParameterizedTest;
|
||||
+import org.junit.jupiter.params.provider.MethodSource;
|
||||
+
|
||||
@ -48,7 +48,8 @@ index 0000000000000000000000000000000000000000..a706dcbabfe31bf54a552965fa5feb8b
|
||||
+import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
+import static org.junit.jupiter.api.Assertions.assertTrue;
|
||||
+
|
||||
+public class ArmorSlotTypeMaterialTest extends AbstractTestingBase {
|
||||
+@AllFeatures
|
||||
+public class ArmorSlotTypeMaterialTest {
|
||||
+
|
||||
+ public static Stream<Object[]> slotTypeParams() {
|
||||
+ final List<Object[]> parameters = new ArrayList<>();
|
||||
|
@ -69,7 +69,7 @@ index a1c1a101aa424e74309f6f4c0a53a6a8db5df441..013298c424025cd88f15d61e50d196f7
|
||||
public Biome getBiome() {
|
||||
return this.getWorld().getBiome(this.getX(), this.getY(), this.getZ());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||
index 9df2da091082071e3461b8900af4879e80cd4d93..1ca25dfdb9ec5c3a4d26b71484e1326e1f50b40d 100644
|
||||
index 483a89ba477506ae108f680e586b37c142119696..80418a05d53516d2c539383aa9994099c634b905 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
|
||||
@@ -24,15 +24,26 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
|
||||
@ -101,7 +101,7 @@ index 9df2da091082071e3461b8900af4879e80cd4d93..1ca25dfdb9ec5c3a4d26b71484e1326e
|
||||
}
|
||||
|
||||
protected CraftBlockEntityState(CraftBlockEntityState<T> state, Location location) {
|
||||
@@ -176,4 +187,11 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
|
||||
@@ -184,4 +195,11 @@ public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockStat
|
||||
public CraftBlockEntityState<T> copy(Location location) {
|
||||
return new CraftBlockEntityState<>(this, location);
|
||||
}
|
||||
|
@ -80,10 +80,10 @@ index 87f56f9c14e3a827d0afc03591bfce8cbf61e307..6cdbd0281e38d7107f239e6e052c08e4
|
||||
|
||||
this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 23e4bb2fe24fd9252df30fdaa3cd968d88ce71db..3db271261c02d2aa26a619f30775d505236955eb 100644
|
||||
index 31f87ce0865dd7560cd9ba634855a1defdc80df2..39e3730eae983c20522b97fcd547823cd192cb2d 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -2292,7 +2292,7 @@ public final class CraftServer implements Server {
|
||||
@@ -2294,7 +2294,7 @@ public final class CraftServer implements Server {
|
||||
offers = this.tabCompleteChat(player, message);
|
||||
}
|
||||
|
||||
|
@ -225,10 +225,10 @@ index c4f12f96e39cb6189799a796b4cb2cb4f0b92392..ecce5d0da946ca279c5608068442cc53
|
||||
+ // Paper end
|
||||
}
|
||||
diff --git a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
||||
index b46032190dbb0d47ee3c1a11959f6278ddf5eb5a..0715f43f3f8235d28a12b9d49d78c765a946c53f 100644
|
||||
index 46025e3ffdc21f14403186094f893dff6316ba5e..50faaaa48dffcaf53823caed1e3f7263cd5c441f 100644
|
||||
--- a/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
||||
+++ b/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
|
||||
@@ -364,6 +364,7 @@ public class ItemMetaTest extends AbstractTestingBase {
|
||||
@@ -365,6 +365,7 @@ public class ItemMetaTest {
|
||||
final CraftMetaArmorStand meta = (CraftMetaArmorStand) cleanStack.getItemMeta();
|
||||
meta.entityTag = new CompoundTag();
|
||||
meta.entityTag.putBoolean("Small", true);
|
||||
|
@ -40,7 +40,7 @@ index 30e55f693b963496b85afa32da9c15cacb738836..636b8aef2348fa4cfe63a9b7d77a64b1
|
||||
playerName = gameprofile.getName();
|
||||
uniqueId = gameprofile.getId();
|
||||
diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
index 768a5c6ebc4466aae4108a79e1564b2bfc93463a..26cee48ea3650aaf87fd2ba9c70d4ca9a88e2d87 100644
|
||||
index c08ffdbc9afb2fe7abbf5567dc1fb1e2bcb01b96..3ee00025eb9d936b9780b25fdc25d144acc496cd 100644
|
||||
--- a/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
+++ b/src/main/java/net/minecraft/server/players/PlayerList.java
|
||||
@@ -831,10 +831,16 @@ public abstract class PlayerList {
|
||||
@ -220,10 +220,10 @@ index 8521f728088d16ecbaa0119983a9f12a649ac847..9136feac48244dc68bff92b52643f2ad
|
||||
public void onEntityRemove(Entity entity) {
|
||||
this.invertedVisibilityEntities.remove(entity.getUUID());
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
index 65f64de05a88844e62b5a0dd1e2f53edfb4e0c1f..e1b86308f737b957b6d00bc902b91856694b7cbf 100644
|
||||
index 91c6721201b095eb32c5fd5a1aaf2cbcf3ee196d..b85223ebff4dbb8aa74b501663afc87ef11e2a96 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
|
||||
@@ -449,6 +449,13 @@ public class Commodore {
|
||||
@@ -467,6 +467,13 @@ public class Commodore {
|
||||
}
|
||||
// Paper end - Rewrite plugins
|
||||
|
||||
|
@ -9,10 +9,10 @@ In Offline Mode, will return an Offline UUID
|
||||
This is a more performant way to obtain a UUID for a name than loading an OfflinePlayer
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
index 5d8eb3b728359be5f92a255c9637d71713403cc8..745970d9f07ed7ca98a653bfff1b861dc4aaa177 100644
|
||||
index 39e3730eae983c20522b97fcd547823cd192cb2d..a94b972e328d2eff635de95847dc622c3a58fd9f 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java
|
||||
@@ -1886,6 +1886,25 @@ public final class CraftServer implements Server {
|
||||
@@ -1888,6 +1888,25 @@ public final class CraftServer implements Server {
|
||||
return recipients.size();
|
||||
}
|
||||
|
||||
|
Einige Dateien werden nicht angezeigt, da zu viele Dateien in diesem Diff geändert wurden Mehr anzeigen
In neuem Issue referenzieren
Einen Benutzer sperren