2021-04-12 19:45:58 +02:00
|
|
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
|
From: KennyTV <jahnke.nassim@gmail.com>
|
|
|
|
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
|
2021-05-12 13:12:28 +02:00
|
|
|
index de6a9d795ebaf9c608944415c7dc18c6aee23245..697949abbe662a55fc31ad811863717e35b9d1b6 100644
|
2021-04-12 19:45:58 +02:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
2021-05-12 13:12:28 +02:00
|
|
|
@@ -486,6 +486,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
|
|
|
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(org.bukkit.inventory.ItemStack itemStack) {
|
2021-04-12 19:45:58 +02:00
|
|
|
return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getItemStackRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()];
|
|
|
|
}
|
2021-05-12 13:12:28 +02:00
|
|
|
+
|
2021-04-12 19:45:58 +02:00
|
|
|
+ @Override
|
|
|
|
+ public int getProtocolVersion() {
|
|
|
|
+ return net.minecraft.SharedConstants.getGameVersion().getProtocolVersion();
|
|
|
|
+ }
|
|
|
|
// Paper end
|
|
|
|
|
|
|
|
/**
|