mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-25 03:55:14 +01:00
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: e25c6a75 PR-638: Add CreativeCategory API for Materials CraftBukkit Changes: 86292d3e0 PR-876: Add CreativeCategory API for Materials
This commit is contained in:
parent
90788a556c
commit
d33cdcf2e6
@ -2825,10 +2825,10 @@ index 96819d13fa837c7374c5a13bdcad864c6744f0b5..7cc8f68205f7c0ec2ebada5030f94467
|
|||||||
* Sends the component to the player
|
* Sends the component to the player
|
||||||
*
|
*
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 9ccef14c8afcb3072bf19ebce8849f9acf84be73..93345eaf4bd987490d32f9e60ab54140dbeda5c4 100644
|
index 01e11f882abb6c631f810584aa23646042688435..dca2d5045eb52d3d654d5673732761b0575871b4 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -22,6 +22,7 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
@@ -23,6 +23,7 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface UnsafeValues {
|
public interface UnsafeValues {
|
||||||
|
|
||||||
@ -2836,10 +2836,10 @@ index 9ccef14c8afcb3072bf19ebce8849f9acf84be73..93345eaf4bd987490d32f9e60ab54140
|
|||||||
Material toLegacy(Material material);
|
Material toLegacy(Material material);
|
||||||
|
|
||||||
Material fromLegacy(Material material);
|
Material fromLegacy(Material material);
|
||||||
@@ -75,4 +76,12 @@ public interface UnsafeValues {
|
@@ -78,4 +79,12 @@ public interface UnsafeValues {
|
||||||
boolean removeAdvancement(NamespacedKey key);
|
|
||||||
|
|
||||||
Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(Material material, EquipmentSlot slot);
|
Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(Material material, EquipmentSlot slot);
|
||||||
|
|
||||||
|
CreativeCategory getCreativeCategory(Material material);
|
||||||
+
|
+
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
+ /**
|
+ /**
|
||||||
|
@ -1124,10 +1124,10 @@ index ac5e263d737973af077e3406a84a84baca4370db..2d91924b7f5ef16a91d40cdc1bfc3d68
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 93345eaf4bd987490d32f9e60ab54140dbeda5c4..ac2d2a5c0a631fda62819714c572217e0f219735 100644
|
index dca2d5045eb52d3d654d5673732761b0575871b4..ce5794d684a1126ec9acbf4af17f5d6fa783f551 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -21,6 +21,14 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
@@ -22,6 +22,14 @@ import org.bukkit.plugin.PluginDescriptionFile;
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public interface UnsafeValues {
|
public interface UnsafeValues {
|
||||||
|
@ -56,10 +56,10 @@ index 0000000000000000000000000000000000000000..a736d7bcdc5861a01b66ba36158db1c7
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index e9306f581b733b717efa932408cf9d74da4d911d..10028a178b415135d9ea7694e2db8c8c6972c389 100644
|
index ce5794d684a1126ec9acbf4af17f5d6fa783f551..5ba6c7a69937badd64256248560268fb695d5f74 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -91,5 +91,12 @@ public interface UnsafeValues {
|
@@ -94,5 +94,12 @@ public interface UnsafeValues {
|
||||||
* @return name
|
* @return name
|
||||||
*/
|
*/
|
||||||
String getTimingsServerName();
|
String getTimingsServerName();
|
||||||
|
@ -7,10 +7,10 @@ Not here to name and shame, only so server admins can be aware of which
|
|||||||
plugins have and haven't been updated.
|
plugins have and haven't been updated.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 10028a178b415135d9ea7694e2db8c8c6972c389..2b123aa748d6ba6c1367f376fedb0b9f019ef7fb 100644
|
index 5ba6c7a69937badd64256248560268fb695d5f74..db272568d7dee924083e37c55bdbf90f05fafc69 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -98,5 +98,11 @@ public interface UnsafeValues {
|
@@ -101,5 +101,11 @@ public interface UnsafeValues {
|
||||||
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||||
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
|
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Material API additions
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index 89f593cd3299672c9384cfe15d4085b93c28e462..57af1ab7223d7f949706625118ccc451b82435db 100644
|
index df3f24066022e2381a87d27338dec173199388c7..53d1609e2a75c007cb7e5e8f963b0deb53bae5f7 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -102,6 +102,7 @@ import org.jetbrains.annotations.Nullable;
|
@@ -103,6 +103,7 @@ import org.jetbrains.annotations.Nullable;
|
||||||
/**
|
/**
|
||||||
* An enum of all material IDs accepted by the official server and client
|
* An enum of all material IDs accepted by the official server and client
|
||||||
*/
|
*/
|
||||||
@ -16,7 +16,7 @@ index 89f593cd3299672c9384cfe15d4085b93c28e462..57af1ab7223d7f949706625118ccc451
|
|||||||
public enum Material implements Keyed {
|
public enum Material implements Keyed {
|
||||||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||||
AIR(9648, 0),
|
AIR(9648, 0),
|
||||||
@@ -3972,6 +3973,22 @@ public enum Material implements Keyed {
|
@@ -3973,6 +3974,22 @@ public enum Material implements Keyed {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
|
|||||||
Serializes using NBT which is safer for server data migrations than bukkits format.
|
Serializes using NBT which is safer for server data migrations than bukkits format.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 2b123aa748d6ba6c1367f376fedb0b9f019ef7fb..ed5835985df93e87e2eb834c501fae2f1d1ad0d5 100644
|
index db272568d7dee924083e37c55bdbf90f05fafc69..f9434c19c1bf355a734b3a1ddf32c81fb7abf9eb 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -104,5 +104,9 @@ public interface UnsafeValues {
|
@@ -107,5 +107,9 @@ public interface UnsafeValues {
|
||||||
static boolean isLegacyPlugin(org.bukkit.plugin.Plugin plugin) {
|
static boolean isLegacyPlugin(org.bukkit.plugin.Plugin plugin) {
|
||||||
return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion());
|
return !Bukkit.getUnsafe().isSupportedApiVersion(plugin.getDescription().getAPIVersion());
|
||||||
}
|
}
|
||||||
|
@ -112,10 +112,10 @@ index 442db40bc6ea2cfd2f724807544a080bb62bd8c5..d3365e44e64c2e72416d3a50be20ada7
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index 57af1ab7223d7f949706625118ccc451b82435db..0f8712cef078c11e49bcd73d556d9edce5057952 100644
|
index 53d1609e2a75c007cb7e5e8f963b0deb53bae5f7..82bd673f43f26d62f1f4bea3638fd89d9eef3887 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -103,7 +103,7 @@ import org.jetbrains.annotations.Nullable;
|
@@ -104,7 +104,7 @@ import org.jetbrains.annotations.Nullable;
|
||||||
* An enum of all material IDs accepted by the official server and client
|
* An enum of all material IDs accepted by the official server and client
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
|
@SuppressWarnings({"DeprecatedIsStillUsed", "deprecation"}) // Paper
|
||||||
@ -124,7 +124,7 @@ index 57af1ab7223d7f949706625118ccc451b82435db..0f8712cef078c11e49bcd73d556d9edc
|
|||||||
//<editor-fold desc="Materials" defaultstate="collapsed">
|
//<editor-fold desc="Materials" defaultstate="collapsed">
|
||||||
AIR(9648, 0),
|
AIR(9648, 0),
|
||||||
STONE(22948),
|
STONE(22948),
|
||||||
@@ -3987,6 +3987,23 @@ public enum Material implements Keyed {
|
@@ -3988,6 +3988,23 @@ public enum Material implements Keyed {
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -149,10 +149,10 @@ index 57af1ab7223d7f949706625118ccc451b82435db..0f8712cef078c11e49bcd73d556d9edc
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index ed5835985df93e87e2eb834c501fae2f1d1ad0d5..92ab4481e9ec09595911e9df3d666cf46d5a743c 100644
|
index f9434c19c1bf355a734b3a1ddf32c81fb7abf9eb..580e73c3fc0e647ad128ab7d845c15fbe80484a3 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -108,5 +108,34 @@ public interface UnsafeValues {
|
@@ -111,5 +111,34 @@ public interface UnsafeValues {
|
||||||
byte[] serializeItem(ItemStack item);
|
byte[] serializeItem(ItemStack item);
|
||||||
|
|
||||||
ItemStack deserializeItem(byte[] data);
|
ItemStack deserializeItem(byte[] data);
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Expose the Entity Counter to allow plugins to use valid and
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 92ab4481e9ec09595911e9df3d666cf46d5a743c..a7a5eada1302dac046619d8a01c887965f22dd09 100644
|
index 580e73c3fc0e647ad128ab7d845c15fbe80484a3..b24439b379be1a90dde4e6f4dbe5ca3fdd8face4 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -137,5 +137,12 @@ public interface UnsafeValues {
|
@@ -140,5 +140,12 @@ public interface UnsafeValues {
|
||||||
* @return the translation key
|
* @return the translation key
|
||||||
*/
|
*/
|
||||||
String getTranslationKey(ItemStack itemStack);
|
String getTranslationKey(ItemStack itemStack);
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Cache the result of Material#isBlock
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index 0f8712cef078c11e49bcd73d556d9edce5057952..5764944121a0e47a8f6decb75fbc6331a15e3d9d 100644
|
index 82bd673f43f26d62f1f4bea3638fd89d9eef3887..9f0048888a2fe40316154613a722d1c709fd3856 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -3931,6 +3931,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -3932,6 +3932,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
||||||
public final Class<?> data;
|
public final Class<?> data;
|
||||||
private final boolean legacy;
|
private final boolean legacy;
|
||||||
private final NamespacedKey key;
|
private final NamespacedKey key;
|
||||||
@ -16,7 +16,7 @@ index 0f8712cef078c11e49bcd73d556d9edce5057952..5764944121a0e47a8f6decb75fbc6331
|
|||||||
|
|
||||||
private Material(final int id) {
|
private Material(final int id) {
|
||||||
this(id, 64);
|
this(id, 64);
|
||||||
@@ -4135,6 +4136,11 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -4136,6 +4137,11 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
||||||
* @return true if this material is a block
|
* @return true if this material is a block
|
||||||
*/
|
*/
|
||||||
public boolean isBlock() {
|
public boolean isBlock() {
|
||||||
@ -28,7 +28,7 @@ index 0f8712cef078c11e49bcd73d556d9edce5057952..5764944121a0e47a8f6decb75fbc6331
|
|||||||
switch (this) {
|
switch (this) {
|
||||||
//<editor-fold defaultstate="collapsed" desc="isBlock">
|
//<editor-fold defaultstate="collapsed" desc="isBlock">
|
||||||
case ACACIA_BUTTON:
|
case ACACIA_BUTTON:
|
||||||
@@ -5216,6 +5222,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -5217,6 +5223,7 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
||||||
static {
|
static {
|
||||||
for (Material material : values()) {
|
for (Material material : values()) {
|
||||||
BY_NAME.put(material.name(), material);
|
BY_NAME.put(material.name(), material);
|
||||||
|
@ -39,10 +39,10 @@ index 0000000000000000000000000000000000000000..74ef8395cc040ce488c2acaa416db202
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index 5764944121a0e47a8f6decb75fbc6331a15e3d9d..d187038a0ad2f4c73484c0b494ba58373adfe743 100644
|
index 9f0048888a2fe40316154613a722d1c709fd3856..709ae1eaabd81ee712d7d6f353c4983f20f6dc4f 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -4005,6 +4005,17 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -4006,6 +4006,17 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
||||||
public @NotNull String translationKey() {
|
public @NotNull String translationKey() {
|
||||||
return Bukkit.getUnsafe().getTranslationKey(this);
|
return Bukkit.getUnsafe().getTranslationKey(this);
|
||||||
}
|
}
|
||||||
@ -61,10 +61,10 @@ index 5764944121a0e47a8f6decb75fbc6331a15e3d9d..d187038a0ad2f4c73484c0b494ba5837
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index a7a5eada1302dac046619d8a01c887965f22dd09..2392efea1b514671014c39d75407f59fdea842ef 100644
|
index b24439b379be1a90dde4e6f4dbe5ca3fdd8face4..4b01c6f82d172b55268fe670c1106b5038ff6eee 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -144,5 +144,22 @@ public interface UnsafeValues {
|
@@ -147,5 +147,22 @@ public interface UnsafeValues {
|
||||||
* Use this when sending custom packets, so that there are no collisions on the client or server.
|
* Use this when sending custom packets, so that there are no collisions on the client or server.
|
||||||
*/
|
*/
|
||||||
public int nextEntityId();
|
public int nextEntityId();
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Expose protocol version
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 2392efea1b514671014c39d75407f59fdea842ef..8f85c41be166ea720a0bf5b6b58bc51a6d2c71cc 100644
|
index 4b01c6f82d172b55268fe670c1106b5038ff6eee..2708718e0391960f9e784f38e5753d95e71de2fc 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -161,5 +161,12 @@ public interface UnsafeValues {
|
@@ -164,5 +164,12 @@ public interface UnsafeValues {
|
||||||
* @return the itemstack rarity
|
* @return the itemstack rarity
|
||||||
*/
|
*/
|
||||||
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
|
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] ItemStack repair check API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 8f85c41be166ea720a0bf5b6b58bc51a6d2c71cc..c1bda4dba319999261613d4aa45a280ed1af0d8c 100644
|
index 2708718e0391960f9e784f38e5753d95e71de2fc..93d139cd498d0c9f616c077ce1c25e3f8e9f55b5 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -162,6 +162,16 @@ public interface UnsafeValues {
|
@@ -165,6 +165,16 @@ public interface UnsafeValues {
|
||||||
*/
|
*/
|
||||||
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
|
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(ItemStack itemStack);
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Attributes API for item defaults
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index d187038a0ad2f4c73484c0b494ba58373adfe743..663d2ce14030a54b83c7e9aebad48f8fd6c41b69 100644
|
index 709ae1eaabd81ee712d7d6f353c4983f20f6dc4f..fb8758970a76ee263fc85aaccbafb0bf1745afb8 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -4016,6 +4016,21 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -4017,6 +4017,21 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
||||||
public io.papermc.paper.inventory.ItemRarity getItemRarity() {
|
public io.papermc.paper.inventory.ItemRarity getItemRarity() {
|
||||||
return Bukkit.getUnsafe().getItemRarity(this);
|
return Bukkit.getUnsafe().getItemRarity(this);
|
||||||
}
|
}
|
||||||
@ -31,10 +31,10 @@ index d187038a0ad2f4c73484c0b494ba58373adfe743..663d2ce14030a54b83c7e9aebad48f8f
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index c1bda4dba319999261613d4aa45a280ed1af0d8c..153ceeb45fc331ca27e0646bc63626e2ea779624 100644
|
index 93d139cd498d0c9f616c077ce1c25e3f8e9f55b5..eeac5e445dba5e1eace52e908d5146c079269c17 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -172,6 +172,18 @@ public interface UnsafeValues {
|
@@ -175,6 +175,18 @@ public interface UnsafeValues {
|
||||||
*/
|
*/
|
||||||
public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial);
|
public boolean isValidRepairItemStack(@org.jetbrains.annotations.NotNull ItemStack itemToBeRepaired, @org.jetbrains.annotations.NotNull ItemStack repairMaterial);
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Get entity default attributes
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 153ceeb45fc331ca27e0646bc63626e2ea779624..ae55b9e3560ba63bc95f90ceadccc6492be9de56 100644
|
index eeac5e445dba5e1eace52e908d5146c079269c17..2e1ec0aa44836ab5be944cf2dbd4601dfb43aed6 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -190,5 +190,22 @@ public interface UnsafeValues {
|
@@ -193,5 +193,22 @@ public interface UnsafeValues {
|
||||||
* @return the server's protocol version
|
* @return the server's protocol version
|
||||||
*/
|
*/
|
||||||
int getProtocolVersion();
|
int getProtocolVersion();
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add isCollidable methods to various places
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
|
||||||
index 663d2ce14030a54b83c7e9aebad48f8fd6c41b69..56e5ab93096801277ec5162981ddf5275d2c7669 100644
|
index fb8758970a76ee263fc85aaccbafb0bf1745afb8..ef7054fec75d91082be27fdd2a06469f37a6c174 100644
|
||||||
--- a/src/main/java/org/bukkit/Material.java
|
--- a/src/main/java/org/bukkit/Material.java
|
||||||
+++ b/src/main/java/org/bukkit/Material.java
|
+++ b/src/main/java/org/bukkit/Material.java
|
||||||
@@ -4031,6 +4031,16 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
@@ -4032,6 +4032,16 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
|
||||||
public Multimap<Attribute, AttributeModifier> getItemAttributes(@NotNull EquipmentSlot equipmentSlot) {
|
public Multimap<Attribute, AttributeModifier> getItemAttributes(@NotNull EquipmentSlot equipmentSlot) {
|
||||||
return Bukkit.getUnsafe().getItemAttributes(this, equipmentSlot);
|
return Bukkit.getUnsafe().getItemAttributes(this, equipmentSlot);
|
||||||
}
|
}
|
||||||
@ -26,10 +26,10 @@ index 663d2ce14030a54b83c7e9aebad48f8fd6c41b69..56e5ab93096801277ec5162981ddf527
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index ae55b9e3560ba63bc95f90ceadccc6492be9de56..7406c413f2988f2aadac95a85801df30deb6ae43 100644
|
index 2e1ec0aa44836ab5be944cf2dbd4601dfb43aed6..329612597a2cdf556f5ca970f5409e1c77a5d911 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -207,5 +207,14 @@ public interface UnsafeValues {
|
@@ -210,5 +210,14 @@ public interface UnsafeValues {
|
||||||
* @throws IllegalArgumentException if the entity does not exist of have default attributes (use {@link #hasDefaultEntityAttributes(NamespacedKey)} first)
|
* @throws IllegalArgumentException if the entity does not exist of have default attributes (use {@link #hasDefaultEntityAttributes(NamespacedKey)} first)
|
||||||
*/
|
*/
|
||||||
@org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey);
|
@org.jetbrains.annotations.NotNull org.bukkit.attribute.Attributable getDefaultEntityAttributes(@org.jetbrains.annotations.NotNull NamespacedKey entityKey);
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add Raw Byte Entity Serialization
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
index 7406c413f2988f2aadac95a85801df30deb6ae43..f59030893eba2bf653207b040a5f54fdf7b7b50f 100644
|
index 329612597a2cdf556f5ca970f5409e1c77a5d911..ec8328ecd1d4d555d1f411c70f15347cd7aacf67 100644
|
||||||
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
--- a/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
+++ b/src/main/java/org/bukkit/UnsafeValues.java
|
||||||
@@ -109,6 +109,14 @@ public interface UnsafeValues {
|
@@ -112,6 +112,14 @@ public interface UnsafeValues {
|
||||||
|
|
||||||
ItemStack deserializeItem(byte[] data);
|
ItemStack deserializeItem(byte[] data);
|
||||||
|
|
||||||
|
@ -6975,10 +6975,10 @@ index 0000000000000000000000000000000000000000..909b2c98e7a9117d2f737245e4661792
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 950a6238f31d2c76a93831eb025092ecd8ab3a9b..bc89c976e763ec137066f8517dbcc1a3d43303bd 100644
|
index c7b636889cef5c4b3bf0abc3cbf9873baa4f60ad..6e990ab85b1510a952de931a0ae4f5b6356da13f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -97,8 +97,17 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -100,8 +100,17 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
private static final Map<Material, Item> MATERIAL_ITEM = new HashMap<>();
|
private static final Map<Material, Item> MATERIAL_ITEM = new HashMap<>();
|
||||||
private static final Map<Material, Block> MATERIAL_BLOCK = new HashMap<>();
|
private static final Map<Material, Block> MATERIAL_BLOCK = new HashMap<>();
|
||||||
private static final Map<Material, net.minecraft.world.level.material.Fluid> MATERIAL_FLUID = new HashMap<>();
|
private static final Map<Material, net.minecraft.world.level.material.Fluid> MATERIAL_FLUID = new HashMap<>();
|
||||||
@ -6996,7 +6996,7 @@ index 950a6238f31d2c76a93831eb025092ecd8ab3a9b..bc89c976e763ec137066f8517dbcc1a3
|
|||||||
for (Block block : net.minecraft.core.Registry.BLOCK) {
|
for (Block block : net.minecraft.core.Registry.BLOCK) {
|
||||||
BLOCK_MATERIAL.put(block, Material.getMaterial(net.minecraft.core.Registry.BLOCK.getKey(block).getPath().toUpperCase(Locale.ROOT)));
|
BLOCK_MATERIAL.put(block, Material.getMaterial(net.minecraft.core.Registry.BLOCK.getKey(block).getPath().toUpperCase(Locale.ROOT)));
|
||||||
}
|
}
|
||||||
@@ -164,6 +173,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -167,6 +176,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public static ResourceLocation key(Material mat) {
|
public static ResourceLocation key(Material mat) {
|
||||||
return CraftNamespacedKey.toMinecraft(mat.getKey());
|
return CraftNamespacedKey.toMinecraft(mat.getKey());
|
||||||
}
|
}
|
||||||
|
@ -2101,10 +2101,10 @@ index e52ef47b783785dc214746b678e7b549aea9a274..3d90b3426873a3528af14f7f1ab0adae
|
|||||||
this.value = value;
|
this.value = value;
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index bc89c976e763ec137066f8517dbcc1a3d43303bd..c7a8e3b4ff46727d7f186497ff0288284eaa6d3b 100644
|
index 6e990ab85b1510a952de931a0ae4f5b6356da13f..4e2ee277fc79bae46549861f7af3a0b0a02626b0 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -182,6 +182,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -185,6 +185,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
}
|
}
|
||||||
// Paper end
|
// Paper end
|
||||||
// ========================================================================
|
// ========================================================================
|
||||||
@ -2117,8 +2117,8 @@ index bc89c976e763ec137066f8517dbcc1a3d43303bd..c7a8e3b4ff46727d7f186497ff028828
|
|||||||
|
|
||||||
public static byte toLegacyData(BlockState data) {
|
public static byte toLegacyData(BlockState data) {
|
||||||
return CraftLegacy.toLegacyData(data);
|
return CraftLegacy.toLegacyData(data);
|
||||||
@@ -369,6 +375,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -378,6 +384,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
return defaultAttributes.build();
|
return CraftCreativeCategory.fromNMS(category);
|
||||||
}
|
}
|
||||||
|
|
||||||
+ // Paper start
|
+ // Paper start
|
||||||
|
@ -3457,10 +3457,10 @@ index f9b7b8f7ccc95b73967a51420fd6ce88d80d75fe..0de5a46423ae0403dcbfca630dfd7c5a
|
|||||||
|
|
||||||
boolean hadFormat = false;
|
boolean hadFormat = false;
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index c7a8e3b4ff46727d7f186497ff0288284eaa6d3b..964d15cd3b61a33868e5a9e38d21d97ec144bcad 100644
|
index 4e2ee277fc79bae46549861f7af3a0b0a02626b0..d8a0b596e9abef83c9ffc851f45cce4fe6e50b2f 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -66,6 +66,38 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -69,6 +69,38 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
|
|
||||||
private CraftMagicNumbers() {}
|
private CraftMagicNumbers() {}
|
||||||
|
|
||||||
|
@ -140,10 +140,10 @@ index 0000000000000000000000000000000000000000..91d7afc710a2d52b4f429e0381cf6417
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 964d15cd3b61a33868e5a9e38d21d97ec144bcad..286615b74c7e4ea3d162502c94884b46550eccee 100644
|
index d8a0b596e9abef83c9ffc851f45cce4fe6e50b2f..0bfbb84004381940af6cfade3eb95c292d51d398 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -412,6 +412,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -421,6 +421,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public String getTimingsServerName() {
|
public String getTimingsServerName() {
|
||||||
return com.destroystokyo.paper.PaperConfig.timingsServerName;
|
return com.destroystokyo.paper.PaperConfig.timingsServerName;
|
||||||
}
|
}
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Add CraftMagicNumbers.isSupportedApiVersion()
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 286615b74c7e4ea3d162502c94884b46550eccee..7739b98398ee08b10c545cee6f9bd2c698a38fe2 100644
|
index 0bfbb84004381940af6cfade3eb95c292d51d398..6888548989e6b841d2389011f05c5eadb754e532 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -417,6 +417,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -426,6 +426,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
public com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
|
||||||
return new com.destroystokyo.paper.PaperVersionFetcher();
|
return new com.destroystokyo.paper.PaperVersionFetcher();
|
||||||
}
|
}
|
||||||
|
@ -6,10 +6,10 @@ Subject: [PATCH] Add Raw Byte ItemStack Serialization
|
|||||||
Serializes using NBT which is safer for server data migrations than bukkits format.
|
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
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 7739b98398ee08b10c545cee6f9bd2c698a38fe2..6c2d35ab30285ffdd0e2ceda8af1293cb140f4d0 100644
|
index 6888548989e6b841d2389011f05c5eadb754e532..3b4764986302194882e009fe20a9d6406cf2be8e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -422,6 +422,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -431,6 +431,53 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public boolean isSupportedApiVersion(String apiVersion) {
|
public boolean isSupportedApiVersion(String apiVersion) {
|
||||||
return apiVersion != null && SUPPORTED_API.contains(apiVersion);
|
return apiVersion != null && SUPPORTED_API.contains(apiVersion);
|
||||||
}
|
}
|
||||||
|
@ -42,10 +42,10 @@ index eb99e0c2462a2d1ab4508a5c3f1580b6e31d7465..c536eceef3365a7b726cd970df345ba1
|
|||||||
|
|
||||||
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
|
public net.minecraft.world.item.enchantment.Enchantment getHandle() {
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 6c2d35ab30285ffdd0e2ceda8af1293cb140f4d0..b8169a643cd15200f3a46d5a5af3542b6464ec22 100644
|
index 3b4764986302194882e009fe20a9d6406cf2be8e..008c15164a7affb785964f604f8fea93d28344ac 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -469,6 +469,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -478,6 +478,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!");
|
Preconditions.checkArgument(dataVersion <= getDataVersion(), "Newer version! Server downgrades are not supported!");
|
||||||
return compound;
|
return compound;
|
||||||
}
|
}
|
||||||
|
@ -21,10 +21,10 @@ index bd285a7d84c934ec094099810eac1f03c09118e3..35825b598778e6b8aef613263abab1a8
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index b8169a643cd15200f3a46d5a5af3542b6464ec22..d379b14dfe18650b8c7077a3018238565853d17e 100644
|
index 008c15164a7affb785964f604f8fea93d28344ac..26936cb655aec0453c094e0993d43d65393a5579 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -493,6 +493,10 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -502,6 +502,10 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
|
net.minecraft.world.item.ItemStack nmsItemStack = CraftItemStack.asNMSCopy(itemStack);
|
||||||
return nmsItemStack.getItem().getDescriptionId(nmsItemStack);
|
return nmsItemStack.getItem().getDescriptionId(nmsItemStack);
|
||||||
}
|
}
|
||||||
|
@ -15,10 +15,10 @@ manually reload the advancement data for all players, which
|
|||||||
normally takes place as a part of the datapack reloading.
|
normally takes place as a part of the datapack reloading.
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index d379b14dfe18650b8c7077a3018238565853d17e..8e9b35d3012ab0bafe5e2194d8723d892402de39 100644
|
index 26936cb655aec0453c094e0993d43d65393a5579..7a4ae640aaaf2017ad4f95ca1393b554b0b30302 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -337,7 +337,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -340,7 +340,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
Bukkit.getLogger().log(Level.SEVERE, "Error saving advancement " + key, ex);
|
Bukkit.getLogger().log(Level.SEVERE, "Error saving advancement " + key, ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Item Rarity API
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 8e9b35d3012ab0bafe5e2194d8723d892402de39..b719718f826fb6827ed586b8171a8775c3120803 100644
|
index 7a4ae640aaaf2017ad4f95ca1393b554b0b30302..a4d5990101aeb0bd08a0ec2bd7b7ff704dfedfc0 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -503,6 +503,20 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -512,6 +512,20 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public int nextEntityId() {
|
public int nextEntityId() {
|
||||||
return net.minecraft.world.entity.Entity.nextEntityId();
|
return net.minecraft.world.entity.Entity.nextEntityId();
|
||||||
}
|
}
|
||||||
|
@ -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
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index b719718f826fb6827ed586b8171a8775c3120803..f330a0b109a4a82b4f97b9321841bbe60f0c8202 100644
|
index a4d5990101aeb0bd08a0ec2bd7b7ff704dfedfc0..3f7aa98158cd79f80cee74a72c92a5f50efc5cdf 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -517,6 +517,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -526,6 +526,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(org.bukkit.inventory.ItemStack itemStack) {
|
public io.papermc.paper.inventory.ItemRarity getItemStackRarity(org.bukkit.inventory.ItemStack itemStack) {
|
||||||
return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()];
|
return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()];
|
||||||
}
|
}
|
||||||
|
@ -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
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index f330a0b109a4a82b4f97b9321841bbe60f0c8202..a4cdebfddb8b3eb71a1ab20f5f503ebfe576b778 100644
|
index 3f7aa98158cd79f80cee74a72c92a5f50efc5cdf..d338050613775d5f7593308e5419bba8b577a189 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -518,6 +518,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -527,6 +527,14 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()];
|
return io.papermc.paper.inventory.ItemRarity.values()[getItem(itemStack.getType()).getRarity(CraftItemStack.asNMSCopy(itemStack)).ordinal()];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@ Subject: [PATCH] Attributes API for item defaults
|
|||||||
|
|
||||||
|
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index a4cdebfddb8b3eb71a1ab20f5f503ebfe576b778..3441344d11756411acd9e4d6fdc8463fd1c5e6dd 100644
|
index d338050613775d5f7593308e5419bba8b577a189..b5b8a97ca2fc7fdbc30ecb7991c2dc6320f094d1 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -526,6 +526,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -535,6 +535,19 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
return CraftMagicNumbers.getItem(itemToBeRepaired.getType()).isValidRepairItem(CraftItemStack.asNMSCopy(itemToBeRepaired), CraftItemStack.asNMSCopy(repairMaterial));
|
return CraftMagicNumbers.getItem(itemToBeRepaired.getType()).isValidRepairItem(CraftItemStack.asNMSCopy(itemToBeRepaired), CraftItemStack.asNMSCopy(repairMaterial));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,10 +90,10 @@ index 0000000000000000000000000000000000000000..4ecba0b02c2813a890aecc5586987879
|
|||||||
+ }
|
+ }
|
||||||
+}
|
+}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 3441344d11756411acd9e4d6fdc8463fd1c5e6dd..11a269b7384432d919fcd14cec3cf1d94c5d7fa2 100644
|
index b5b8a97ca2fc7fdbc30ecb7991c2dc6320f094d1..879d8fa743deac17a7788c3f979ad7a791af8d83 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -543,6 +543,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -552,6 +552,18 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
public int getProtocolVersion() {
|
public int getProtocolVersion() {
|
||||||
return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
|
return net.minecraft.SharedConstants.getCurrentVersion().getProtocolVersion();
|
||||||
}
|
}
|
||||||
|
@ -37,10 +37,10 @@ index 7b9e943b391c061782fccd2b8d705ceec8db50fe..966ac60daebb7bb211ab8096fc0c5f33
|
|||||||
+ // Paper end
|
+ // Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index 11a269b7384432d919fcd14cec3cf1d94c5d7fa2..c9c701208ce11aa413642221ca0dd08196adea80 100644
|
index 879d8fa743deac17a7788c3f979ad7a791af8d83..a451cbbff84b8f156ba4de807f4927f7645c3363 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -555,6 +555,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -564,6 +564,12 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
var supplier = net.minecraft.world.entity.ai.attributes.DefaultAttributes.getSupplier((net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.LivingEntity>) net.minecraft.core.Registry.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(bukkitEntityKey)));
|
var supplier = net.minecraft.world.entity.ai.attributes.DefaultAttributes.getSupplier((net.minecraft.world.entity.EntityType<? extends net.minecraft.world.entity.LivingEntity>) net.minecraft.core.Registry.ENTITY_TYPE.get(CraftNamespacedKey.toMinecraft(bukkitEntityKey)));
|
||||||
return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier);
|
return new io.papermc.paper.attribute.UnmodifiableAttributeMap(supplier);
|
||||||
}
|
}
|
||||||
|
@ -45,10 +45,10 @@ index 23f3acdc37968ec76ffb57e022755c97ff02ff67..9e5f338d0bb64ac47a99cd08a2ab083d
|
|||||||
// Paper end
|
// Paper end
|
||||||
}
|
}
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index c9c701208ce11aa413642221ca0dd08196adea80..d8f4d351a66c6d1e60e1a470ce64f538c7718232 100644
|
index a451cbbff84b8f156ba4de807f4927f7645c3363..e504554e606788b66725edb0ce98d3d6246e4fac 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -448,6 +448,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -457,6 +457,30 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.of((CompoundTag) converted.getValue()));
|
return CraftItemStack.asCraftMirror(net.minecraft.world.item.ItemStack.of((CompoundTag) converted.getValue()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,10 +18,10 @@ index f0fa928a66140293166dddc37eee50a2041560ed..eb29131934370ea2865f8feee93ec3cb
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
index d8f4d351a66c6d1e60e1a470ce64f538c7718232..88c58676e6d2eb618596cd118257cbf7973396a9 100644
|
index e504554e606788b66725edb0ce98d3d6246e4fac..d50661d29608e2e805c24a9eb3dd5ce72134a14e 100644
|
||||||
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
--- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
|
||||||
@@ -198,7 +198,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
@@ -201,7 +201,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
|
||||||
return CraftMagicNumbers.MATERIAL_BLOCK.get(material);
|
return CraftMagicNumbers.MATERIAL_BLOCK.get(material);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1 +1 @@
|
|||||||
Subproject commit d8a3c3b55674a931391e2905cad4d54acfd15d11
|
Subproject commit e25c6a75523b5122f539a5a59dcf0275c3213a5a
|
@ -1 +1 @@
|
|||||||
Subproject commit 6e755020abbd73dabf2593060b7641fda9b80e71
|
Subproject commit 86292d3e084729f53ce77af17b7b20d91754b7a5
|
Loading…
Reference in New Issue
Block a user