-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
78531a5
commit ecb834e
Showing
38 changed files
with
1,638 additions
and
2,059 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,26 @@ | ||
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 | ||
From: Github Actions <[email protected]> | ||
Date: Fri, 16 Jun 2023 05:21:52 +0000 | ||
Date: Mon, 25 Sep 2023 03:15:07 +0000 | ||
Subject: [PATCH] Purpur API Changes | ||
|
||
Commit: f6fd5f6ba6e672bfdbc79def7e8598d984ec8b3c | ||
Original license: MIT | ||
Original project: https://github.com/PurpurMC/Purpur | ||
|
||
Commit: e068628a9f2c66ba9dca5875ce8604db01e82bdb | ||
|
||
Patches below are removed in this patch: | ||
Pufferfish-API-Changes.patch | ||
Fix-pufferfish-issues.patch | ||
Build-System-Changes.patch | ||
Remove-Timings.patch | ||
|
||
Original license: MIT | ||
Original project: https://github.com/PurpurMC/Purpur | ||
Add-log-suppression-for-LibraryLoader.patch | ||
Fire-Immunity-API.patch | ||
|
||
diff --git a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java | ||
index b7a2cecb334ce39fa09d8ab949a29eedbdc44c36..b1f35c68373edfe666ca05b50f0ec022a1859ce9 100644 | ||
index 0c4dbb9ef63fa8575b5546239443cb2bd91ba847..b347224c223569297ee67ac630a710fdf28748ea 100644 | ||
--- a/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java | ||
+++ b/src/main/java/com/destroystokyo/paper/entity/ai/VanillaGoal.java | ||
@@ -201,6 +201,18 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> { | ||
@@ -198,6 +198,18 @@ public interface VanillaGoal<T extends Mob> extends Goal<T> { | ||
GoalKey<Mob> CLIMB_ON_TOP_OF_POWDER_SNOW = GoalKey.of(Mob.class, NamespacedKey.minecraft("climb_on_top_of_powder_snow")); | ||
GoalKey<Wolf> WOLF_PANIC = GoalKey.of(Wolf.class, NamespacedKey.minecraft("wolf_panic")); | ||
|
||
|
@@ -33,7 +37,7 @@ index b7a2cecb334ce39fa09d8ab949a29eedbdc44c36..b1f35c68373edfe666ca05b50f0ec022 | |
+ // Purpur end | ||
+ | ||
/** | ||
* @deprecated removed in 1.16 | ||
* @deprecated removed in 1.20.2 | ||
*/ | ||
diff --git a/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java b/src/main/java/com/destroystokyo/paper/util/VersionFetcher.java | ||
index a736d7bcdc5861a01b66ba36158db1c716339346..22fc165fd9c95f0f3ae1be7a0857e48cc50fad5b 100644 | ||
|
@@ -275,10 +279,10 @@ index 918a045165cdcde264bc24082b7afebb407271de..687d11619379aead7f665d4a5f8f8bcc | |
+ // Purpur end | ||
} | ||
diff --git a/src/main/java/org/bukkit/Material.java b/src/main/java/org/bukkit/Material.java | ||
index 03b47012447430a350e152920f754d993d4023db..3ad843d519e239430c5f4f5754a8da3026ed0f8e 100644 | ||
index 8a948a61d0bdb06b0b9a6eac8a27baeb35a7d36c..f6e0b39ba9ea34613ecb22c55d5c38d5dcad9a82 100644 | ||
--- a/src/main/java/org/bukkit/Material.java | ||
+++ b/src/main/java/org/bukkit/Material.java | ||
@@ -11047,4 +11047,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla | ||
@@ -11050,4 +11050,40 @@ public enum Material implements Keyed, Translatable, net.kyori.adventure.transla | ||
public boolean isEnabledByFeature(@NotNull World world) { | ||
return Bukkit.getDataPackManager().isEnabledByFeature(this, world); | ||
} | ||
|
@@ -439,12 +443,12 @@ index bce07d84cafca677bb6fad78c21b82097f06430c..4ef0fa4f1ef72bb784674671473c6a32 | |
+ // Purpur end - OfflinePlayer API | ||
} | ||
diff --git a/src/main/java/org/bukkit/Server.java b/src/main/java/org/bukkit/Server.java | ||
index a5938b0a960121bd77a13e4c8fc8a053bea481c5..43a57c9e32e5a51140e784a4a5a44c0b0b752133 100644 | ||
index a5938b0a960121bd77a13e4c8fc8a053bea481c5..c55819f56b4a3850496feef6900c1ec8a0bb1a9d 100644 | ||
--- a/src/main/java/org/bukkit/Server.java | ||
+++ b/src/main/java/org/bukkit/Server.java | ||
@@ -2182,6 +2182,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi | ||
} | ||
// Leaf end | ||
@@ -2174,6 +2174,18 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi | ||
|
||
// Paper end | ||
|
||
+ // Purpur start | ||
+ @NotNull | ||
|
@@ -458,9 +462,9 @@ index a5938b0a960121bd77a13e4c8fc8a053bea481c5..43a57c9e32e5a51140e784a4a5a44c0b | |
+ } | ||
+ // Purpur end | ||
+ | ||
/** | ||
* Sends the component to the player | ||
* | ||
// Leaf start | ||
@NotNull | ||
public org.bukkit.configuration.file.YamlConfiguration getLeafConfig() | ||
@@ -2491,4 +2503,111 @@ public interface Server extends PluginMessageRecipient, net.kyori.adventure.audi | ||
long getLastTickOversleepTime(); | ||
// Gale end - YAPFA - last tick time - API | ||
|
@@ -574,7 +578,7 @@ index a5938b0a960121bd77a13e4c8fc8a053bea481c5..43a57c9e32e5a51140e784a4a5a44c0b | |
+ // Purpur end | ||
} | ||
diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java | ||
index b8b97df069b28fa3cf32f1ad1f01f586a0cfbc78..63bf1d70cce9176f47a158a4a767b1bf38d60dbd 100644 | ||
index da524a71af74b02515b037f7fe09ba6988e2c8bf..3679c3b8d31ab8de08ecabd56bf92ffc062f971c 100644 | ||
--- a/src/main/java/org/bukkit/World.java | ||
+++ b/src/main/java/org/bukkit/World.java | ||
@@ -4008,6 +4008,86 @@ public interface World extends RegionAccessor, WorldInfo, PluginMessageRecipient | ||
|
@@ -813,10 +817,10 @@ index 138d2530de2410f4a9424dabd3e5ce0cd1c1dcd2..10a8d64ad2da0be2c14f34c3e7d1957c | |
// Paper start | ||
/** | ||
diff --git a/src/main/java/org/bukkit/entity/Entity.java b/src/main/java/org/bukkit/entity/Entity.java | ||
index 762cb07861ca8ff058ce8d57ea6c15df1e588bf3..98de85d1382fe84cdc2e2c9db04bf1b4f157291c 100644 | ||
index 762cb07861ca8ff058ce8d57ea6c15df1e588bf3..52867495d0f746ff40e802c4f1018511e58fd03e 100644 | ||
--- a/src/main/java/org/bukkit/entity/Entity.java | ||
+++ b/src/main/java/org/bukkit/entity/Entity.java | ||
@@ -1049,4 +1049,55 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent | ||
@@ -1049,4 +1049,42 @@ public interface Entity extends Metadatable, CommandSender, Nameable, Persistent | ||
*/ | ||
@NotNull String getScoreboardEntryName(); | ||
// Paper end - entity scoreboard name | ||
|
@@ -857,19 +861,6 @@ index 762cb07861ca8ff058ce8d57ea6c15df1e588bf3..98de85d1382fe84cdc2e2c9db04bf1b4 | |
+ * @return True if in daylight | ||
+ */ | ||
+ boolean isInDaylight(); | ||
+ | ||
+ /** | ||
+ * Checks if the entity is fire immune | ||
+ * | ||
+ * @return True if fire immune | ||
+ */ | ||
+ boolean isImmuneToFire(); | ||
+ | ||
+ /** | ||
+ * Sets if the entity is fire immune | ||
+ * Set this to null to restore the entity type default | ||
+ */ | ||
+ void setImmuneToFire(@Nullable Boolean fireImmune); | ||
+ // Purpur end | ||
} | ||
diff --git a/src/main/java/org/bukkit/entity/IronGolem.java b/src/main/java/org/bukkit/entity/IronGolem.java | ||
|
@@ -1036,10 +1027,10 @@ index bc84b892cae5fe7019a3ad481e9da79956efa1fe..48eb5b00c460cccde29d327cef1d63fc | |
+ // Purpur end | ||
} | ||
diff --git a/src/main/java/org/bukkit/entity/Player.java b/src/main/java/org/bukkit/entity/Player.java | ||
index 2672072ccddaacfebeaea45de472c7420345cde7..877ed7bea937e0be1c404d5ab5cef8fce5e6ac17 100644 | ||
index 4c33eac096619af16d571dca28411c4fff6f00f4..2156418958fb25eb9de08e39e42b90a5337bf92e 100644 | ||
--- a/src/main/java/org/bukkit/entity/Player.java | ||
+++ b/src/main/java/org/bukkit/entity/Player.java | ||
@@ -3285,4 +3285,143 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM | ||
@@ -3290,4 +3290,122 @@ public interface Player extends HumanEntity, Conversable, OfflinePlayer, PluginM | ||
@Override | ||
Spigot spigot(); | ||
// Spigot end | ||
|
@@ -1072,27 +1063,6 @@ index 2672072ccddaacfebeaea45de472c7420345cde7..877ed7bea937e0be1c404d5ab5cef8fc | |
+ void resetIdleTimer(); | ||
+ | ||
+ /** | ||
+ * Check if player is invulnerable from recently spawning or accepting a resource pack | ||
+ * | ||
+ * @return True if invulnerable | ||
+ */ | ||
+ boolean isSpawnInvulnerable(); | ||
+ | ||
+ /** | ||
+ * Get invulnerable ticks remaining | ||
+ * | ||
+ * @return Invulnerable ticks | ||
+ */ | ||
+ int getSpawnInvulnerableTicks(); | ||
+ | ||
+ /** | ||
+ * Set invulnerable ticks remaining | ||
+ * | ||
+ * @param invulnerableTicks Invulnerable ticks remaining | ||
+ */ | ||
+ void setSpawnInvulnerableTicks(int invulnerableTicks); | ||
+ | ||
+ /** | ||
+ * Creates debug block highlight on specified block location and show it to this player. | ||
+ * <p> | ||
+ * Clients may be inconsistent in displaying it. | ||
|
@@ -2062,18 +2032,10 @@ index cd3296fea01648592d2af89b3d80135acb6d0958..45797a6fbae1d8edc4211cb30def24ad | |
|
||
permissions.put(lname, new PermissionAttachmentInfo(parent, lname, attachment, value)); | ||
diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java | ||
index ccdca0d75868135dc7b96daeff2236b225c4add1..cad9f4ddc6be23c595e79419872f8f026703cb80 100644 | ||
index 037af5fd6d71a526c0e6620f2db0cd6df9625261..939ed1931492854c5854cab06730cf235eba7e89 100644 | ||
--- a/src/main/java/org/bukkit/potion/PotionEffect.java | ||
+++ b/src/main/java/org/bukkit/potion/PotionEffect.java | ||
@@ -5,6 +5,7 @@ import com.google.common.collect.ImmutableMap; | ||
import java.util.Map; | ||
import java.util.NoSuchElementException; | ||
import org.bukkit.Color; | ||
+import org.bukkit.NamespacedKey; | ||
import org.bukkit.configuration.serialization.ConfigurationSerializable; | ||
import org.bukkit.configuration.serialization.SerializableAs; | ||
import org.bukkit.entity.LivingEntity; | ||
@@ -31,12 +32,14 @@ public class PotionEffect implements ConfigurationSerializable { | ||
@@ -32,12 +32,14 @@ public class PotionEffect implements ConfigurationSerializable { | ||
private static final String AMBIENT = "ambient"; | ||
private static final String PARTICLES = "has-particles"; | ||
private static final String ICON = "has-icon"; | ||
|
@@ -2088,7 +2050,7 @@ index ccdca0d75868135dc7b96daeff2236b225c4add1..cad9f4ddc6be23c595e79419872f8f02 | |
|
||
/** | ||
* Creates a potion effect. | ||
@@ -49,6 +52,36 @@ public class PotionEffect implements ConfigurationSerializable { | ||
@@ -50,6 +52,36 @@ public class PotionEffect implements ConfigurationSerializable { | ||
* @param icon the icon status, see {@link PotionEffect#hasIcon()} | ||
*/ | ||
public PotionEffect(@NotNull PotionEffectType type, int duration, int amplifier, boolean ambient, boolean particles, boolean icon) { | ||
|
@@ -2125,15 +2087,15 @@ index ccdca0d75868135dc7b96daeff2236b225c4add1..cad9f4ddc6be23c595e79419872f8f02 | |
Preconditions.checkArgument(type != null, "effect type cannot be null"); | ||
this.type = type; | ||
this.duration = duration; | ||
@@ -56,6 +89,7 @@ public class PotionEffect implements ConfigurationSerializable { | ||
@@ -57,6 +89,7 @@ public class PotionEffect implements ConfigurationSerializable { | ||
this.ambient = ambient; | ||
this.particles = particles; | ||
this.icon = icon; | ||
+ this.key = key; // Purpur - add key | ||
} | ||
|
||
/** | ||
@@ -103,36 +137,43 @@ public class PotionEffect implements ConfigurationSerializable { | ||
@@ -104,36 +137,43 @@ public class PotionEffect implements ConfigurationSerializable { | ||
* @param map the map to deserialize from | ||
*/ | ||
public PotionEffect(@NotNull Map<String, Object> map) { | ||
|
@@ -2183,8 +2145,8 @@ index ccdca0d75868135dc7b96daeff2236b225c4add1..cad9f4ddc6be23c595e79419872f8f02 | |
+ | ||
@NotNull | ||
private static PotionEffectType getEffectType(@NotNull Map<?, ?> map) { | ||
int type = getInt(map, TYPE); | ||
@@ -159,17 +200,33 @@ public class PotionEffect implements ConfigurationSerializable { | ||
PotionEffectType effect; | ||
@@ -166,17 +206,33 @@ public class PotionEffect implements ConfigurationSerializable { | ||
return def; | ||
} | ||
|
||
|
@@ -2203,21 +2165,16 @@ index ccdca0d75868135dc7b96daeff2236b225c4add1..cad9f4ddc6be23c595e79419872f8f02 | |
@NotNull | ||
public Map<String, Object> serialize() { | ||
- return ImmutableMap.<String, Object>builder() | ||
- .put(TYPE, type.getId()) | ||
- .put(DURATION, duration) | ||
- .put(AMPLIFIER, amplifier) | ||
- .put(AMBIENT, ambient) | ||
- .put(PARTICLES, particles) | ||
- .put(ICON, icon) | ||
- .build(); | ||
+ // Purpur start - add key, don't serialize if null. | ||
+ ImmutableMap.Builder<String, Object> builder = ImmutableMap.<String, Object>builder() | ||
+ .put(TYPE, type.getId()) | ||
+ .put(DURATION, duration) | ||
+ .put(AMPLIFIER, amplifier) | ||
+ .put(AMBIENT, ambient) | ||
+ .put(PARTICLES, particles) | ||
+ .put(ICON, icon); | ||
.put(TYPE, type.getKey().toString()) | ||
.put(DURATION, duration) | ||
.put(AMPLIFIER, amplifier) | ||
.put(AMBIENT, ambient) | ||
.put(PARTICLES, particles) | ||
- .put(ICON, icon) | ||
- .build(); | ||
+ .put(ICON, icon); | ||
+ if(key != null) { | ||
+ builder.put(KEY, key.toString()); | ||
+ } | ||
|
@@ -2226,7 +2183,7 @@ index ccdca0d75868135dc7b96daeff2236b225c4add1..cad9f4ddc6be23c595e79419872f8f02 | |
} | ||
|
||
/** | ||
@@ -193,7 +250,7 @@ public class PotionEffect implements ConfigurationSerializable { | ||
@@ -200,7 +256,7 @@ public class PotionEffect implements ConfigurationSerializable { | ||
return false; | ||
} | ||
PotionEffect that = (PotionEffect) obj; | ||
|
@@ -2235,7 +2192,7 @@ index ccdca0d75868135dc7b96daeff2236b225c4add1..cad9f4ddc6be23c595e79419872f8f02 | |
} | ||
|
||
/** | ||
@@ -289,6 +346,24 @@ public class PotionEffect implements ConfigurationSerializable { | ||
@@ -296,6 +352,24 @@ public class PotionEffect implements ConfigurationSerializable { | ||
return icon; | ||
} | ||
|
||
|
@@ -2260,7 +2217,7 @@ index ccdca0d75868135dc7b96daeff2236b225c4add1..cad9f4ddc6be23c595e79419872f8f02 | |
@Override | ||
public int hashCode() { | ||
int hash = 1; | ||
@@ -303,6 +378,6 @@ public class PotionEffect implements ConfigurationSerializable { | ||
@@ -310,6 +384,6 @@ public class PotionEffect implements ConfigurationSerializable { | ||
|
||
@Override | ||
public String toString() { | ||
|
@@ -3910,18 +3867,3 @@ index 0000000000000000000000000000000000000000..38483d908ed830e97883733bee2370f8 | |
+ return getOrDefault(key.translationKey()); | ||
+ } | ||
+} | ||
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java | ||
index 06e96e5c98f1a7a68c8b4b5e527314c1aa774e38..49bba9a7a02b9cf3a552583315eff2b7dbe060c0 100644 | ||
--- a/src/test/java/org/bukkit/AnnotationTest.java | ||
+++ b/src/test/java/org/bukkit/AnnotationTest.java | ||
@@ -47,6 +47,10 @@ public class AnnotationTest { | ||
"org/bukkit/plugin/java/PluginClassLoader", | ||
// Generic functional interface | ||
"org/bukkit/util/Consumer", | ||
+ // Purpur start | ||
+ "gg/pufferfish/pufferfish/sentry/SentryContext", | ||
+ "gg/pufferfish/pufferfish/sentry/SentryContext$State", | ||
+ // Purpur end | ||
// Paper start | ||
"io/papermc/paper/util/TransformingRandomAccessList", | ||
"io/papermc/paper/util/TransformingRandomAccessList$TransformedListIterator", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.