remove no longer needed patches and fix tests
This commit is contained in:
parent
1bc278b125
commit
19ac9d43ce
21 changed files with 259 additions and 415 deletions
|
@ -6,7 +6,7 @@ Subject: [PATCH] Add missing effects
|
|||
Co-authored-by: Jake Potrebic <jake.m.potrebic@gmail.com>
|
||||
|
||||
diff --git a/src/main/java/org/bukkit/Effect.java b/src/main/java/org/bukkit/Effect.java
|
||||
index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..326c99d91ae125b28054b5730b9576b214e4595e 100644
|
||||
index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..88e93da6021b90a3351df17d95adc4d9277578f8 100644
|
||||
--- a/src/main/java/org/bukkit/Effect.java
|
||||
+++ b/src/main/java/org/bukkit/Effect.java
|
||||
@@ -131,9 +131,9 @@ public enum Effect {
|
||||
|
@ -31,7 +31,7 @@ index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..326c99d91ae125b28054b5730b9576b2
|
|||
VILLAGER_PLANT_GROW(2005, Type.VISUAL, Integer.class),
|
||||
/**
|
||||
* The sound/particles used by the enderdragon's breath
|
||||
@@ -336,21 +338,152 @@ public enum Effect {
|
||||
@@ -336,21 +338,197 @@ public enum Effect {
|
||||
* block.
|
||||
*/
|
||||
OXIDISED_COPPER_SCRAPE(3005, Type.VISUAL),
|
||||
|
@ -143,6 +143,16 @@ index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..326c99d91ae125b28054b5730b9576b2
|
|||
+ */
|
||||
+ BEE_GROWTH(2011, Type.VISUAL, Integer.class),
|
||||
+
|
||||
+ /**
|
||||
+ * {@link Integer} param is the number of particles
|
||||
+ */
|
||||
+ TURTLE_EGG_PLACEMENT(2012, Type.VISUAL, Integer.class),
|
||||
+
|
||||
+ /**
|
||||
+ * {@link Integer} param is relative to the number of particles
|
||||
+ */
|
||||
+ SMASH_ATTACK(2013, Type.VISUAL, Integer.class),
|
||||
+
|
||||
+ PARTICLES_SCULK_CHARGE(3006, Type.VISUAL, Integer.class),
|
||||
+
|
||||
+ PARTICLES_SCULK_SHRIEK(3007, Type.SOUND),
|
||||
|
@ -154,9 +164,15 @@ index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..326c99d91ae125b28054b5730b9576b2
|
|||
+ @Deprecated(forRemoval = true, since = "1.20.5")
|
||||
+ GUST_DUST(3010, Type.VISUAL),
|
||||
+
|
||||
+ TRIAL_SPAWNER_SPAWN(3011, Type.VISUAL),
|
||||
+ /**
|
||||
+ * {@link Boolean} param is true for "ominous" vaults
|
||||
+ */
|
||||
+ TRIAL_SPAWNER_SPAWN(3011, Type.VISUAL, Boolean.class),
|
||||
+
|
||||
+ TRIAL_SPAWNER_SPAWN_MOB_AT(3012, Type.VISUAL),
|
||||
+ /**
|
||||
+ * {@link Boolean} param is true for "ominous" vaults
|
||||
+ */
|
||||
+ TRIAL_SPAWNER_SPAWN_MOB_AT(3012, Type.VISUAL, Boolean.class),
|
||||
+
|
||||
+ /**
|
||||
+ * {@link Integer} param is the number of players
|
||||
|
@ -164,6 +180,35 @@ index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..326c99d91ae125b28054b5730b9576b2
|
|||
+ TRIAL_SPAWNER_DETECT_PLAYER(3013, Type.VISUAL, Integer.class),
|
||||
+
|
||||
+ TRIAL_SPAWNER_EJECT_ITEM(3014, Type.VISUAL),
|
||||
+
|
||||
+ /**
|
||||
+ * {@link Boolean} param is true for "ominous" vaults
|
||||
+ */
|
||||
+ VAULT_ACTIVATE(3015, Type.VISUAL, Boolean.class),
|
||||
+
|
||||
+ /**
|
||||
+ * {@link Boolean} param is true for "ominous" vaults
|
||||
+ */
|
||||
+ VAULT_DEACTIVATE(3016, Type.VISUAL, Boolean.class),
|
||||
+
|
||||
+ VAULT_EJECT_ITEM(3017, Type.VISUAL),
|
||||
+
|
||||
+ SPAWN_COBWEB(3018, Type.VISUAL),
|
||||
+
|
||||
+ /**
|
||||
+ * {@link Integer} param is the number of players
|
||||
+ */
|
||||
+ TRIAL_SPAWNER_DETECT_PLAYER_OMINOUS(3019, Type.VISUAL, Integer.class),
|
||||
+
|
||||
+ /**
|
||||
+ * {@link Boolean} param is true for changing to "ominous"
|
||||
+ */
|
||||
+ TRIAL_SPAWNER_BECOME_OMINOUS(3020, Type.VISUAL, Boolean.class),
|
||||
+
|
||||
+ /**
|
||||
+ * {@link Boolean} param is true for "ominous" vaults
|
||||
+ */
|
||||
+ TRIAL_SPAWNER_SPAWN_ITEM(3021, Type.VISUAL, Boolean.class)
|
||||
;
|
||||
+ private static final org.apache.logging.log4j.Logger LOGGER = org.apache.logging.log4j.LogManager.getLogger();
|
||||
+ // Paper end
|
||||
|
@ -188,7 +233,7 @@ index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..326c99d91ae125b28054b5730b9576b2
|
|||
}
|
||||
|
||||
/**
|
||||
@@ -366,8 +499,10 @@ public enum Effect {
|
||||
@@ -366,8 +544,10 @@ public enum Effect {
|
||||
|
||||
/**
|
||||
* @return The type of the effect.
|
||||
|
@ -199,24 +244,25 @@ index fd9cf25f2fdef5ee3b7143f27e5f43dfe3f21a38..326c99d91ae125b28054b5730b9576b2
|
|||
public Type getType() {
|
||||
return this.type;
|
||||
}
|
||||
@@ -378,8 +513,15 @@ public enum Effect {
|
||||
@@ -378,9 +558,16 @@ public enum Effect {
|
||||
*/
|
||||
@Nullable
|
||||
public Class<?> getData() {
|
||||
- return this.data;
|
||||
+ return this.data == null ? null : this.data.get(0); // Paper
|
||||
+ }
|
||||
+
|
||||
}
|
||||
|
||||
+ // Paper start - support deprecated data types
|
||||
+ @org.jetbrains.annotations.ApiStatus.Internal
|
||||
+ public boolean isApplicable(Object obj) {
|
||||
+ return this.data != null && com.google.common.collect.Iterables.any(this.data, aClass -> aClass.isAssignableFrom(obj.getClass()));
|
||||
}
|
||||
+ }
|
||||
+ // Paper end - support deprecated data types
|
||||
|
||||
+
|
||||
/**
|
||||
* Gets the Effect associated with the given ID.
|
||||
@@ -396,12 +538,26 @@ public enum Effect {
|
||||
*
|
||||
@@ -396,12 +583,26 @@ public enum Effect {
|
||||
|
||||
static {
|
||||
for (Effect effect : values()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue