mirror of
https://github.com/PurpurMC/Purpur.git
synced 2026-02-17 16:37:43 +01:00
Updated Upstream (Paper)
Upstream has released updates that appear to apply and compile correctly Paper Changes: PaperMC/Paper@5100822 Re-enable multi-release plugin JARs (#9001) PaperMC/Paper@662b85e Use random UUIDs instead of incrementing long for click callback ids (#9007) PaperMC/Paper@eb09502 Fix entity damage event triggers (#8995) PaperMC/Paper@83948f6 Fire reload event after everything has been reloaded (#9003) PaperMC/Paper@7929540 update paperclip to 3.0.3 PaperMC/Paper@ff603cb adventure: make calls with generic component lists more usable (#9008) PaperMC/Paper@c7520ec Use class loggers without the fqn for non-debug logging (#9012) PaperMC/Paper@7af4cd3 Updated Upstream (Bukkit/CraftBukkit) (#9013) PaperMC/Paper@e8b8259 [ci skip] Properly document firing of Entity/BlockExplodeEvent (#9014)
This commit is contained in:
@@ -5,7 +5,7 @@ Subject: [PATCH] Potion NamespacedKey
|
||||
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/potion/PotionEffect.java b/src/main/java/org/bukkit/potion/PotionEffect.java
|
||||
index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908e9dbc2fc 100644
|
||||
index ccdca0d75868135dc7b96daeff2236b225c4add1..cad9f4ddc6be23c595e79419872f8f026703cb80 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;
|
||||
@@ -16,7 +16,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
|
||||
import org.bukkit.configuration.serialization.ConfigurationSerializable;
|
||||
import org.bukkit.configuration.serialization.SerializableAs;
|
||||
import org.bukkit.entity.LivingEntity;
|
||||
@@ -26,12 +27,14 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
@@ -31,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";
|
||||
@@ -31,7 +31,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
|
||||
|
||||
/**
|
||||
* Creates a potion effect.
|
||||
@@ -44,6 +47,36 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
@@ -49,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) {
|
||||
@@ -68,7 +68,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
|
||||
Preconditions.checkArgument(type != null, "effect type cannot be null");
|
||||
this.type = type;
|
||||
this.duration = duration;
|
||||
@@ -51,6 +84,7 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
@@ -56,6 +89,7 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
this.ambient = ambient;
|
||||
this.particles = particles;
|
||||
this.icon = icon;
|
||||
@@ -76,7 +76,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -98,36 +132,43 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
@@ -103,36 +137,43 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
* @param map the map to deserialize from
|
||||
*/
|
||||
public PotionEffect(@NotNull Map<String, Object> map) {
|
||||
@@ -127,7 +127,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
|
||||
@NotNull
|
||||
private static PotionEffectType getEffectType(@NotNull Map<?, ?> map) {
|
||||
int type = getInt(map, TYPE);
|
||||
@@ -154,17 +195,33 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
@@ -159,17 +200,33 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
return def;
|
||||
}
|
||||
|
||||
@@ -169,7 +169,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -188,7 +245,7 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
@@ -193,7 +250,7 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
return false;
|
||||
}
|
||||
PotionEffect that = (PotionEffect) obj;
|
||||
@@ -178,7 +178,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -256,6 +313,24 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
@@ -289,6 +346,24 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@@ -203,7 +203,7 @@ index 24e36cdf580da885ac64002673a786b9c5a3f787..d20cc4d4f5b37a3de9cb3cf47af7a908
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int hash = 1;
|
||||
@@ -270,6 +345,6 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
@@ -303,6 +378,6 @@ public class PotionEffect implements ConfigurationSerializable {
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
|
||||
@@ -22,7 +22,7 @@ index b37e0ff164a894d2033fb94bbbc2f630a0e66bcd..ac335ec4f70830c7687ac4e0aa2a6cba
|
||||
super(x, y, z);
|
||||
}
|
||||
diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
index ac0693f439f063d19ea68d8b216d4ecf10441b15..9fb7e742b91311bf542f533e2a411e9847be7038 100644
|
||||
index 4cd9c56b3aea40996e249db163ffed0625d99b16..a5ed221909bd267711fdfb29c4557220c0998b4b 100644
|
||||
--- a/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
+++ b/src/main/java/net/minecraft/server/MinecraftServer.java
|
||||
@@ -1526,6 +1526,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa
|
||||
@@ -191,7 +191,7 @@ index c1e9b40a4a0f9cdc650caa88b5ea132e06ee2496..7b1ca8fd2908b8a02ec2cd1966a31e06
|
||||
protected ParticleOptions getInkParticle() {
|
||||
return ParticleTypes.GLOW_SQUID_INK;
|
||||
diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
index e9d3e34520b706627205e0d5b17b25e09f198e7e..ff1bccf8c6a3b9adda11981b5d59bdfa82c1367a 100644
|
||||
index dcfb71b5a53df789e366fea2080921d677549a2e..e8798de526e2836308eca8e5f4a4388aa7e9d3c0 100644
|
||||
--- a/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
+++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java
|
||||
@@ -217,9 +217,9 @@ public abstract class LivingEntity extends Entity implements Attackable {
|
||||
@@ -5151,7 +5151,7 @@ index 57a0dbb23a32123d30c3b3572f4d129be9d97847..fa6938626c64ed17a2f56739d5801494
|
||||
+ // Purpur end
|
||||
}
|
||||
diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
index 7131cdb839df47bf3d2c2bf8476fd7a2ecebb3ba..e973f48e21a3c4544683806421a3316ac4991efa 100644
|
||||
index cdb8ec04f4a19ec3dbedbd5b17a7d1f3afaa238e..16261aa799c34d7134f4c1489e2ab0a5db7992f0 100644
|
||||
--- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
+++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
|
||||
@@ -544,6 +544,15 @@ public class CraftEventFactory {
|
||||
@@ -5178,7 +5178,7 @@ index 7131cdb839df47bf3d2c2bf8476fd7a2ecebb3ba..e973f48e21a3c4544683806421a3316a
|
||||
}
|
||||
event.setCancelled(cancelled);
|
||||
|
||||
@@ -1087,6 +1097,7 @@ public class CraftEventFactory {
|
||||
@@ -1090,6 +1100,7 @@ public class CraftEventFactory {
|
||||
} else {
|
||||
entity.lastDamageCancelled = true; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled
|
||||
}
|
||||
@@ -5186,7 +5186,7 @@ index 7131cdb839df47bf3d2c2bf8476fd7a2ecebb3ba..e973f48e21a3c4544683806421a3316a
|
||||
return event;
|
||||
}
|
||||
|
||||
@@ -1146,6 +1157,7 @@ public class CraftEventFactory {
|
||||
@@ -1149,6 +1160,7 @@ public class CraftEventFactory {
|
||||
EntityDamageEvent event;
|
||||
if (damager != null) {
|
||||
event = new EntityDamageByEntityEvent(damager.getBukkitEntity(), damagee.getBukkitEntity(), cause, modifiers, modifierFunctions, critical); // Paper - add critical damage API
|
||||
|
||||
Reference in New Issue
Block a user