2021-06-11 12:02:28 +00:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
2022-08-01 14:01:20 +00:00
|
|
|
From: Nassim Jahnke <nassim@njahnke.dev>
|
2021-06-11 12:02:28 +00:00
|
|
|
Date: Fri, 26 Mar 2021 11:23:17 +0100
|
|
|
|
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
|
2022-08-08 15:25:41 +00:00
|
|
|
index 9e27257265dab677175b9b3d921e1fc3f3cb7817..7f747fbaa1da49ab930d2a9ff60200a445ca477c 100644
|
2021-06-11 12:02:28 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
2022-05-27 15:42:36 +00:00
|
|
|
@@ -536,6 +536,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
2021-06-11 12:02:28 +00:00
|
|
|
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(org.bukkit.inventory.ItemStack itemStack) {
|
2021-06-15 02:59:31 +00:00
|
|
|
return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()];
|
2021-06-11 12:02:28 +00:00
|
|
|
}
|
|
|
|
+
|
|
|
|
+ @Override
|
|
|
|
+ public int getProtocolVersion() {
|
|
|
|
+ return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
|
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
|
|
|
|
/**
|