Skip to content

Commit

Permalink
Still run reflection remapping if old api support is disabled
Browse files Browse the repository at this point in the history
  • Loading branch information
kennytv committed Jul 19, 2024
1 parent a020fbd commit 3db01e5
Show file tree
Hide file tree
Showing 24 changed files with 81 additions and 85 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -237,26 +237,15 @@ index 0000000000000000000000000000000000000000..1240c061c121e8d5eb9add4e5e21955e
+ }
+}
diff --git a/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperClassloaderBytecodeModifier.java b/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperClassloaderBytecodeModifier.java
index f9a2c55a354c877749db3f92956de802ae575788..39182cdd17473da0123dc7172dce507eab29fedc 100644
index f9a2c55a354c877749db3f92956de802ae575788..0e734c07dbe82ba4c319a237f9e79b08b57b997f 100644
--- a/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperClassloaderBytecodeModifier.java
+++ b/src/main/java/io/papermc/paper/plugin/entrypoint/classloader/PaperClassloaderBytecodeModifier.java
@@ -1,12 +1,17 @@
package io.papermc.paper.plugin.entrypoint.classloader;

import io.papermc.paper.plugin.configuration.PluginMeta;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassWriter;

// Stub, implement in future.
public class PaperClassloaderBytecodeModifier implements ClassloaderBytecodeModifier {
@@ -7,6 +7,6 @@ public class PaperClassloaderBytecodeModifier implements ClassloaderBytecodeModi

@Override
public byte[] modify(PluginMeta configuration, byte[] bytecode) {
- return bytecode;
+ ClassReader classReader = new ClassReader(bytecode);
+ ClassWriter classWriter = new ClassWriter(classReader, 0);
+ classReader.accept(io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(classWriter), 0);
+ return classWriter.toByteArray();
+ return io.papermc.paper.pluginremap.reflect.ReflectionRemapper.processClass(bytecode);
}
}
diff --git a/src/main/java/io/papermc/paper/plugin/loader/PaperClasspathBuilder.java b/src/main/java/io/papermc/paper/plugin/loader/PaperClasspathBuilder.java
Expand Down Expand Up @@ -331,10 +320,10 @@ index bdd9bc8a414719b9f1d6f01f90539ddb8603a878..1bf0fa1530b8e5f94d726d0313b7a00f
// Copied from SimplePluginManager#loadPlugins
diff --git a/src/main/java/io/papermc/paper/pluginremap/reflect/PaperReflection.java b/src/main/java/io/papermc/paper/pluginremap/reflect/PaperReflection.java
new file mode 100644
index 0000000000000000000000000000000000000000..795d79bcfc4177edfcb12cf9db392780c3f04aa7
index 0000000000000000000000000000000000000000..92bc8e4933ff13764fa2ac7f3729216332e202c9
--- /dev/null
+++ b/src/main/java/io/papermc/paper/pluginremap/reflect/PaperReflection.java
@@ -0,0 +1,216 @@
@@ -0,0 +1,211 @@
+package io.papermc.paper.pluginremap.reflect;
+
+import com.mojang.logging.LogUtils;
Expand All @@ -352,8 +341,6 @@ index 0000000000000000000000000000000000000000..795d79bcfc4177edfcb12cf9db392780
+import org.checkerframework.checker.nullness.qual.NonNull;
+import org.checkerframework.checker.nullness.qual.Nullable;
+import org.checkerframework.framework.qual.DefaultQualifier;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassWriter;
+import org.slf4j.Logger;
+
+// todo proper inheritance handling
Expand Down Expand Up @@ -541,10 +528,7 @@ index 0000000000000000000000000000000000000000..795d79bcfc4177edfcb12cf9db392780
+ // todo apply bytecode remap here as well
+ private static byte[] processClass(final byte[] bytes) {
+ try {
+ final ClassReader reader = new ClassReader(bytes);
+ final ClassWriter writer = new ClassWriter(reader, 0);
+ reader.accept(ReflectionRemapper.visitor(writer), 0);
+ return writer.toByteArray();
+ return ReflectionRemapper.processClass(bytes);
+ } catch (final Exception ex) {
+ LOGGER.warn("Failed to process class bytes", ex);
+ return bytes;
Expand All @@ -553,10 +537,10 @@ index 0000000000000000000000000000000000000000..795d79bcfc4177edfcb12cf9db392780
+}
diff --git a/src/main/java/io/papermc/paper/pluginremap/reflect/ReflectionRemapper.java b/src/main/java/io/papermc/paper/pluginremap/reflect/ReflectionRemapper.java
new file mode 100644
index 0000000000000000000000000000000000000000..5fa5868e82d1f00498d0c5771369e1718b2df4ee
index 0000000000000000000000000000000000000000..a3045afbc0cc057e99189b909367b21cf6a9e03f
--- /dev/null
+++ b/src/main/java/io/papermc/paper/pluginremap/reflect/ReflectionRemapper.java
@@ -0,0 +1,54 @@
@@ -0,0 +1,66 @@
+package io.papermc.paper.pluginremap.reflect;
+
+import io.papermc.asm.ClassInfoProvider;
Expand All @@ -569,7 +553,9 @@ index 0000000000000000000000000000000000000000..5fa5868e82d1f00498d0c5771369e171
+import java.lang.reflect.Method;
+import org.checkerframework.checker.nullness.qual.NonNull;
+import org.checkerframework.framework.qual.DefaultQualifier;
+import org.objectweb.asm.ClassReader;
+import org.objectweb.asm.ClassVisitor;
+import org.objectweb.asm.ClassWriter;
+import org.objectweb.asm.Opcodes;
+
+@DefaultQualifier(NonNull.class)
Expand All @@ -593,12 +579,22 @@ index 0000000000000000000000000000000000000000..5fa5868e82d1f00498d0c5771369e171
+ }
+
+ public static ClassVisitor visitor(final ClassVisitor parent) {
+ if (MappingEnvironment.reobf()) {
+ if (MappingEnvironment.reobf() || MappingEnvironment.DISABLE_PLUGIN_REMAPPING) {
+ return parent;
+ }
+ return VISITOR_FACTORY.createVisitor(parent);
+ }
+
+ public static byte[] processClass(final byte[] bytes) {
+ if (MappingEnvironment.DISABLE_PLUGIN_REMAPPING) {
+ return bytes;
+ }
+ final ClassReader classReader = new ClassReader(bytes);
+ final ClassWriter classWriter = new ClassWriter(classReader, 0);
+ classReader.accept(ReflectionRemapper.visitor(classWriter), 0);
+ return classWriter.toByteArray();
+ }
+
+ private static void setupProxy() {
+ try {
+ final byte[] bytes = ProxyGenerator.generateProxy(PaperReflection.class, PAPER_REFLECTION_HOLDER_DESC);
Expand Down Expand Up @@ -649,7 +645,7 @@ 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 421ddf6ca955215dff77655a7eda62eb9d90aa92..5dafd7765e82a110803affebc9d7d1905b13d0c9 100644
index 421ddf6ca955215dff77655a7eda62eb9d90aa92..8a1570ceb4755a1872911751943c84b8f06eb4c2 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -102,36 +102,26 @@ public class Commodore {
Expand Down Expand Up @@ -700,21 +696,16 @@ index 421ddf6ca955215dff77655a7eda62eb9d90aa92..5dafd7765e82a110803affebc9d7d190
}
// Paper end - Plugin rewrites

@@ -214,7 +204,12 @@ public class Commodore {
@@ -214,6 +204,7 @@ public class Commodore {
visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES));
}

+ // Paper start
+ if (!io.papermc.paper.util.MappingEnvironment.DISABLE_PLUGIN_REMAPPING) {
+ visitor = io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(visitor);
+ }
+ visitor = io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(visitor); // Paper
cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, visitor) {
+ // Paper end
final Set<RerouteMethodData> rerouteMethodData = new HashSet<>();
String className;
boolean isInterface;
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index a6de88625aeb2c5ababd476e804e9b45b1185efe..37f3a9f939a947d2b5e1e81d83e74555a636e1eb 100644
index a6de88625aeb2c5ababd476e804e9b45b1185efe..fa2e43020fafc283a9c063d10a82280158c7f93d 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;
Expand All @@ -734,11 +725,16 @@ index a6de88625aeb2c5ababd476e804e9b45b1185efe..37f3a9f939a947d2b5e1e81d83e74555
CraftLegacy.init();
}

@@ -355,6 +356,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -355,6 +356,12 @@ public final class CraftMagicNumbers implements UnsafeValues {

@Override
public byte[] processClass(PluginDescriptionFile pdf, String path, byte[] clazz) {
+ if (DISABLE_OLD_API_SUPPORT) return clazz; // Paper
+ // Paper start
+ if (DISABLE_OLD_API_SUPPORT) {
+ // Make sure we still go through our reflection rewriting if needed
+ return io.papermc.paper.pluginremap.reflect.ReflectionRemapper.processClass(clazz);
+ }
+ // Paper end
try {
clazz = Commodore.convert(clazz, pdf.getName(), ApiVersion.getOrCreateVersion(pdf.getAPIVersion()), ((CraftServer) Bukkit.getServer()).activeCompatibilities);
} catch (Exception ex) {
4 changes: 2 additions & 2 deletions patches/server/0023-Timings-v2.patch
Original file line number Diff line number Diff line change
Expand Up @@ -1985,7 +1985,7 @@ 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 37f3a9f939a947d2b5e1e81d83e74555a636e1eb..c7728af06e03699212cb6b28027d17dfc3391613 100644
index fa2e43020fafc283a9c063d10a82280158c7f93d..9576cabff99d154ef77595b074082adf9212698d 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 {
Expand All @@ -2001,7 +2001,7 @@ index 37f3a9f939a947d2b5e1e81d83e74555a636e1eb..c7728af06e03699212cb6b28027d17df

public static byte toLegacyData(BlockState data) {
return CraftLegacy.toLegacyData(data);
@@ -437,6 +443,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -442,6 +448,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
public DamageSource.Builder createDamageSourceBuilder(DamageType damageType) {
return new CraftDamageSourceBuilder(damageType);
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0033-Expose-server-build-information.patch
Original file line number Diff line number Diff line change
Expand Up @@ -638,10 +638,10 @@ index 1c8049bbc08be77673d375205bd42a346ff951b8..e37a7aceae6c69083ecf81af4f750c01
net.minecraft.server.Main.main(options);
} catch (Throwable t) {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index c7728af06e03699212cb6b28027d17dfc3391613..ae4c3925d7e686ad53788e827093ecd5938a9519 100644
index 9576cabff99d154ef77595b074082adf9212698d..e091356ee1fa3ec09839de6ef5c450824ea40844 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -448,6 +448,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -453,6 +453,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public String getTimingsServerName() {
return io.papermc.paper.configuration.GlobalConfiguration.get().timings.serverName;
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0176-Player.setPlayerProfile-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -220,10 +220,10 @@ index 4602c3d0be94f0146a2b205268f70aaf85410f20..422c25577a0d95b31b5528fad8fc9b3a
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 14f63e70cb73c2061bcf232f567f9c12ac9ec99d..d9c2fe01d4e7c73a614b393bbd525b395b4cc5e4 100644
index 8a1570ceb4755a1872911751943c84b8f06eb4c2..38339b8b1b3b70bbbf0259d7095b02ee8c22b609 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -452,6 +452,13 @@ public class Commodore {
@@ -448,6 +448,13 @@ public class Commodore {
}
// Paper end - Rewrite plugins

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
Serializes using NBT which is safer for server data migrations than bukkits format.

diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index ae4c3925d7e686ad53788e827093ecd5938a9519..e2ada58f99d0c52158a66d604fddb635907c807f 100644
index e091356ee1fa3ec09839de6ef5c450824ea40844..e6bca66597b9b5a15d911760b44641e17e42e521 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -453,6 +453,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -458,6 +458,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
return new com.destroystokyo.paper.PaperVersionFetcher();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ index 08dd2b77df5162a3b4b6941663efaa1eb0e42746..f7cfce209dde71e61009f3678c667062
+ // Paper end - Expose entity id counter
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index e2ada58f99d0c52158a66d604fddb635907c807f..22fc5bf2024f70f85cc278ddd374bff0a6d626fa 100644
index e6bca66597b9b5a15d911760b44641e17e42e521..2979277847635c0bef54d06be30e5051557cc5e9 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -500,6 +500,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -505,6 +505,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!");
return compound;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -893,7 +893,7 @@ index 1f58b92c17d28e14621e8dc28042a5368f1f4a1f..ef80e6b4dff557daaab1b9fde4d8d401
// PatternType
private static final FieldRenameData PATTERN_TYPE_DATA = FieldRenameData.Builder.newBuilder()
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
index d9c2fe01d4e7c73a614b393bbd525b395b4cc5e4..49830bf42c6f567fb71b9ddc8d0640dd6e846adb 100644
index 38339b8b1b3b70bbbf0259d7095b02ee8c22b609..9fffb9c9161caad8eb62a99b37d0f31862b568a5 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -189,20 +189,10 @@ public class Commodore {
Expand All @@ -915,9 +915,9 @@ index d9c2fe01d4e7c73a614b393bbd525b395b4cc5e4..49830bf42c6f567fb71b9ddc8d0640dd
- visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES));
- }

// Paper start
if (!io.papermc.paper.util.MappingEnvironment.DISABLE_PLUGIN_REMAPPING) {
@@ -273,15 +263,6 @@ public class Commodore {
visitor = io.papermc.paper.pluginremap.reflect.ReflectionRemapper.visitor(visitor); // Paper
cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, visitor) {
@@ -269,15 +259,6 @@ public class Commodore {

@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0504-Expand-world-key-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,10 @@ index a29f4992f7927d0f241962f972dd13ce77094d97..f83eb7fd5c9b368ba0bf9e07a568d69c
// Check if a World already exists with the UID.
if (this.getWorld(world.getUID()) != null) {
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 12c4f68623119427a30c1eec28b4aff0400aa8c0..9c95d223f10bdecb824952d2f02cef3dbc6ef1a3 100644
index 5fe9b94c342a91d6fb3bc582ac7e84cb25b90a9e..e44bcf61c09245a63d50dd1be3c5b1fca7225ff9 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -511,6 +511,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -516,6 +516,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public int nextEntityId() {
return net.minecraft.world.entity.Entity.nextEntityId();
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0509-Expose-protocol-version.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version


diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 9c95d223f10bdecb824952d2f02cef3dbc6ef1a3..710b7ad1af3191954b2807d94519ed41b4f84c1b 100644
index e44bcf61c09245a63d50dd1be3c5b1fca7225ff9..fd36c8c62503e4ce035d51b0cc4e8dd55e66cc5d 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -516,6 +516,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -521,6 +521,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
public String getMainLevelName() {
return ((net.minecraft.server.dedicated.DedicatedServer) net.minecraft.server.MinecraftServer.getServer()).getProperties().levelName;
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0536-ItemStack-repair-check-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API


diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 710b7ad1af3191954b2807d94519ed41b4f84c1b..b055323acde8577e4254ea64e36756c5298a4e9d 100644
index fd36c8c62503e4ce035d51b0cc4e8dd55e66cc5d..dec695198708838fd77285ba818e82861da49a98 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -521,6 +521,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -526,6 +526,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
public int getProtocolVersion() {
return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
}
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0543-Improve-item-default-attribute-API.patch
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ index 66d773cadb74f9176e6cf68a565568034f52ec63..a1f2b9d40d374e8cdbaf916b25fa74b6
return defaultAttributes.build();
}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index b055323acde8577e4254ea64e36756c5298a4e9d..29704bcb5305baf3234d9cabe0b01c7afc1d9e0a 100644
index dec695198708838fd77285ba818e82861da49a98..17fc3d78f1f5002d8f9cb2113706a2cc6a6c821f 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -380,7 +380,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -385,7 +385,11 @@ public final class CraftMagicNumbers implements UnsafeValues {

@Override
public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(Material material, EquipmentSlot slot) {
Expand Down
4 changes: 2 additions & 2 deletions patches/server/0588-Get-entity-default-attributes.patch
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@ index 0000000000000000000000000000000000000000..ec9ebd2d539333293c51b7edfa18f18b
+ }
+}
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 29704bcb5305baf3234d9cabe0b01c7afc1d9e0a..42e84070f3fd5ba45914040e4014b07fa85c30de 100644
index 17fc3d78f1f5002d8f9cb2113706a2cc6a6c821f..98f60520ced0a68dc1e35999b9eaea405a9799ed 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -533,6 +533,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
@@ -538,6 +538,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
}
return CraftMagicNumbers.getItem(itemToBeRepaired.getType()).isValidRepairItem(CraftItemStack.asNMSCopy(itemToBeRepaired), CraftItemStack.asNMSCopy(repairMaterial));
}
Expand Down
Loading

0 comments on commit 3db01e5

Please sign in to comment.