Updated Upstream (Bukkit/CraftBukkit) (#9739)

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:
69c7ce23 PR-990: Use Mockito instead of InvocationHandler for test mocking
997de31d PR-893: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping
6a8ce581 Fix malformed javadoc in previous commit
26c74f6d PR-890: Add more Sculk API (bloom, shriek, bloom event)
aa067abf PR-895: Load GameEvent and MusicInstrument from registry

CraftBukkit Changes:
78796c9de Add support for Java 21
ddc9a2dad SPIGOT-7475: Don't fire SculkBloomEvent during world generation
caee2311a PR-1245: Add a stream method to Registry to make it easier to use and to avoid unnecessary wrapping
de421cf56 PR-1242: Add more Sculk API (bloom, shriek, bloom event)
00f5a80fb PR-1252: Fix error when generating a tree in water
10219df3a PR-1248: Load GameEvent and MusicInstrument from registry
This commit is contained in:
Jake Potrebic 2023-09-21 09:48:55 -07:00 committed by GitHub
parent 3fd1502717
commit 773dd72446
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
79 changed files with 306 additions and 602 deletions

View file

@ -185,27 +185,27 @@ index 7705fece7f58bd66f7d68da85f8f34e43b4bae12..6a89eab53f21bc4420e616cc299864fb
if (this.isItem()) {
return Bukkit.getUnsafe().getItemTranslationKey(this);
diff --git a/src/main/java/org/bukkit/MusicInstrument.java b/src/main/java/org/bukkit/MusicInstrument.java
index 614dc9f2ff5aa69659947c3fcedef98f9c9bab98..be5b47659d780ab5f97634fc44faa24456b6ebf0 100644
index a7573ce8c6dff9862c97ce74650284b4a42e7989..ee5368372e136541eafe1d7ffb395de670fe4843 100644
--- a/src/main/java/org/bukkit/MusicInstrument.java
+++ b/src/main/java/org/bukkit/MusicInstrument.java
@@ -8,7 +8,7 @@ import java.util.Map;
@@ -7,7 +7,7 @@ import java.util.Collections;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-public final class MusicInstrument implements Keyed {
+public final class MusicInstrument implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - translation keys
-public abstract class MusicInstrument implements Keyed {
+public abstract class MusicInstrument implements Keyed, net.kyori.adventure.translation.Translatable { // Paper - translation keys
private static final Map<NamespacedKey, MusicInstrument> INSTRUMENTS = new HashMap<>();
//
@@ -63,4 +63,11 @@ public final class MusicInstrument implements Keyed {
public static final MusicInstrument PONDER = getInstrument("ponder_goat_horn");
public static final MusicInstrument SING = getInstrument("sing_goat_horn");
@@ -52,4 +52,11 @@ public abstract class MusicInstrument implements Keyed {
return new MusicInstrument(NamespacedKey.minecraft(name));
return instrument;
}
+
+ // Paper start - translation key
+ @Override
+ public @NotNull String translationKey() {
+ return "instrument.minecraft." + this.key.value();
+ return "instrument.minecraft." + this.getKey().value();
+ }
+ // Paper end - translation key
}