Updated Upstream (Bukkit/CraftBukkit)

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:
69fa4695 Add some missing deprecation annotations
f850da2e Update Maven plugins/versions
8d8400db Use regular compiler seeing as ECJ doesn't support Java 21 JRE
c29e1688 Revert "BUILDTOOLS-676: Downgrade Maven compiler version"
07bce714 SPIGOT-7355: More field renames and fixes
6a8ea764 Fix bad merge in penultimate commit
50a7920c Fix imports in previous commit
83640dd1 PR-995: Add required feature to MinecraftExperimental for easy lookups
fc1f96cf BUILDTOOLS-676: Downgrade Maven compiler version

CraftBukkit Changes:
90f1059ba Fix item placement
661afb43c SPIGOT-7633: Clearer error message for missing particle data
807b465b3 SPIGOT-7634: Armadillo updates infrequently
590cf09a8 Fix unit tests always seeing Mojang server as unavailable
7c7ac5eb2 SPIGOT-7636: Fix clearing ItemMeta
4a72905cf SPIGOT-7635: Fix Player#transfer and cookie methods
ebb50e136 Fix incorrect Vault implementation
b33fed8b7 Update Maven plugins/versions
6f00f0608 SPIGOT-7632: Control middle clicking chest does not copy contents
db821f405 Use regular compiler seeing as ECJ doesn't support Java 21 JRE
8a2976737 Revert "BUILDTOOLS-676: Downgrade Maven compiler version"
0297f87bb SPIGOT-7355: More field renames and fixes
2d03bdf6a SPIGOT-7629: Fix loading banner patterns
e77951fac Fix equality of deserialized display names
c66f3e4fd SPIGOT-7631: Fix deserialisation of BlockStateMeta
9c2c7be8d SPIGOT-7630: Fix crash saving unticked leashed entities
8c1e7c841 PR-1384: Disable certain PlayerProfile tests, if Mojang's services or internet are not available
ced93d572 SPIGOT-7626: sendSignChange() has no effect
c77362cae SPIGOT-7625: ItemStack with lore cannot be serialized in 1.20.5
ff2004387 SPIGOT-7620: Fix server crash when hoppers transfer items to double chests
8b4abeb03 BUILDTOOLS-676: Downgrade Maven compiler version
This commit is contained in:
Nassim Jahnke 2024-04-25 23:21:18 +02:00
parent ed790385ed
commit 2641c02193
No known key found for this signature in database
GPG key ID: EF6771C01F6EF02F
247 changed files with 947 additions and 970 deletions

View file

@ -8,7 +8,7 @@ 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 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb085e3636 100644
index 2b0cf967e382e982200d73857b08c0f01a4e409c..8420a53672cfb0f060d9c85c445d200b6701f521 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -7,6 +7,7 @@ import java.io.InputStream;
@ -27,9 +27,9 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
import joptsimple.OptionParser;
import joptsimple.OptionSet;
import joptsimple.OptionSpec;
@@ -62,6 +64,40 @@ public class Commodore {
"org/spigotmc/event/entity/EntityDismountEvent", "org/bukkit/event/entity/EntityDismountEvent"
);
@@ -73,6 +75,40 @@ public class Commodore {
public static final List<Map<String, RerouteMethodData>> REROUTES = new ArrayList<>(); // Only used for testing
private static final Map<String, RerouteMethodData> FIELD_RENAME_METHOD_REROUTE = Commodore.createReroutes(FieldRename.class);
+ // Paper start - Plugin rewrites
+ private static final Map<String, String> SEARCH_AND_REMOVE = initReplacementsMap();
@ -65,10 +65,10 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
+ }
+ // Paper end - Plugin rewrites
+
private static final Map<String, RerouteMethodData> FIELD_RENAME_METHOD_REROUTE = RerouteBuilder.buildFromClass(FieldRename.class);
public static void main(String[] args) {
@@ -190,9 +226,49 @@ public class Commodore {
OptionParser parser = new OptionParser();
OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required();
@@ -199,9 +235,49 @@ public class Commodore {
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) {
@ -118,7 +118,7 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
name = FieldRename.rename(pluginVersion, owner, name);
if (modern) {
@@ -296,6 +372,13 @@ public class Commodore {
@@ -305,6 +381,13 @@ public class Commodore {
return;
}
@ -132,7 +132,7 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
if (modern) {
if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) {
switch (name) {
@@ -399,6 +482,13 @@ public class Commodore {
@@ -408,6 +491,13 @@ public class Commodore {
@Override
public void visitLdcInsn(Object value) {
@ -146,7 +146,7 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) {
super.visitLdcInsn("com.mysql.cj.jdbc.Driver");
return;
@@ -409,6 +499,14 @@ public class Commodore {
@@ -418,6 +508,14 @@ public class Commodore {
@Override
public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) {
@ -161,7 +161,7 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory")
&& bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) {
Type samMethodType = (Type) bootstrapMethodArguments[0];
@@ -425,7 +523,7 @@ public class Commodore {
@@ -434,7 +532,7 @@ public class Commodore {
methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf));
methodArgs.add(newInstantiated);
@ -170,7 +170,7 @@ index 0ecd298fead1a75bfc9ef535b550f5178fc3d3c8..072153a601eb257bd36bba24f356d4eb
}, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType);
return;
}
@@ -476,6 +574,12 @@ public class Commodore {
@@ -485,6 +583,12 @@ public class Commodore {
@Override
public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {