Updated Upstream (Paper)

Upstream has released updates that appear to apply and compile correctly

Paper Changes:
PaperMC/Paper@d33cdcf Updated Upstream (Bukkit/CraftBukkit)
This commit is contained in:
BillyGalbreath
2022-03-03 14:03:26 -06:00
parent ea1631c20d
commit 3de31d2e35
6 changed files with 46 additions and 17 deletions

View File

@@ -3,6 +3,21 @@ From: Kevin Raneri <kevin.raneri@gmail.com>
Date: Tue, 9 Nov 2021 14:01:56 -0500
Subject: [PATCH] Pufferfish API Changes
Pufferfish
Copyright (C) 2022 Pufferfish Studios LLC
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
diff --git a/build.gradle.kts b/build.gradle.kts
index b71c38473c3a9fddbb26dcc06df0c1adcdc871f6..20df1ad509f2b5d6204d3ff550af0078a7268537 100644

View File

@@ -5,14 +5,13 @@ Subject: [PATCH] ItemStack convenience methods
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java
index 56e5ab93096801277ec5162981ddf5275d2c7669..bfcd5b17898ae97340d813bb46506234bc03e229 100644
index ef7054fec75d91082be27fdd2a06469f37a6c174..d410cc574c941a348d7130bf1709859c2f1f4505 100644
--- a/src/main/java/org/bukkit/Material.java
+++ b/src/main/java/org/bukkit/Material.java
@@ -9857,4 +9857,40 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
return Bukkit.getUnsafe().getDefaultAttributeModifiers(this, slot);
@@ -9869,4 +9869,39 @@ public enum Material implements Keyed, net.kyori.adventure.translation.Translata
return Bukkit.getUnsafe().getCreativeCategory(this);
}
+
+ // Purpur start
+ public boolean isArmor() {
+ switch (this) {

View File

@@ -503,10 +503,10 @@ index b423fca93820e48de1318c3c18b2f7669ff5b57b..0aa9f5f92fccb2e9e87cbdaabca64ea0
@NotNull
diff --git a/src/main/java/org/bukkit/UnsafeValues.java b/src/main/java/org/bukkit/UnsafeValues.java
index f59030893eba2bf653207b040a5f54fdf7b7b50f..430525a74bd727c6c831aaa86784430bf7b221a8 100644
index ec8328ecd1d4d555d1f411c70f15347cd7aacf67..02f56f3fe9f8e8026586578242b962fc06d176ed 100644
--- a/src/main/java/org/bukkit/UnsafeValues.java
+++ b/src/main/java/org/bukkit/UnsafeValues.java
@@ -94,6 +94,8 @@ public interface UnsafeValues {
@@ -97,6 +97,8 @@ public interface UnsafeValues {
/**
* Called once by the version command on first use, then cached.
@@ -515,7 +515,7 @@ index f59030893eba2bf653207b040a5f54fdf7b7b50f..430525a74bd727c6c831aaa86784430b
*/
default com.destroystokyo.paper.util.VersionFetcher getVersionFetcher() {
return new com.destroystokyo.paper.util.VersionFetcher.DummyVersionFetcher();
@@ -120,6 +122,8 @@ public interface UnsafeValues {
@@ -123,6 +125,8 @@ public interface UnsafeValues {
/**
* Return the translation key for the Material, so the client can translate it into the active
* locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.
@@ -524,7 +524,7 @@ index f59030893eba2bf653207b040a5f54fdf7b7b50f..430525a74bd727c6c831aaa86784430b
* @return the translation key
*/
String getTranslationKey(Material mat);
@@ -127,6 +131,8 @@ public interface UnsafeValues {
@@ -130,6 +134,8 @@ public interface UnsafeValues {
/**
* Return the translation key for the Block, so the client can translate it into the active
* locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.
@@ -533,7 +533,7 @@ index f59030893eba2bf653207b040a5f54fdf7b7b50f..430525a74bd727c6c831aaa86784430b
* @return the translation key
*/
String getTranslationKey(org.bukkit.block.Block block);
@@ -135,6 +141,8 @@ public interface UnsafeValues {
@@ -138,6 +144,8 @@ public interface UnsafeValues {
* Return the translation key for the EntityType, so the client can translate it into the active
* locale when using a {@link net.kyori.adventure.text.TranslatableComponent}.<br>
* This is <code>null</code>, when the EntityType isn't known to NMS (custom entities)
@@ -542,7 +542,7 @@ index f59030893eba2bf653207b040a5f54fdf7b7b50f..430525a74bd727c6c831aaa86784430b
* @return the translation key
*/
String getTranslationKey(org.bukkit.entity.EntityType type);
@@ -150,6 +158,8 @@ public interface UnsafeValues {
@@ -153,6 +161,8 @@ public interface UnsafeValues {
* Creates and returns the next EntityId available.
* <p>
* Use this when sending custom packets, so that there are no collisions on the client or server.