diff options
Diffstat (limited to 'patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch')
-rw-r--r-- | patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch index 04e8bc9ac2..0b9d1fdb76 100644 --- a/patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/api/0101-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -10,10 +10,10 @@ This adds a new Builder API which is much friendlier to use. diff --git a/src/main/java/com/destroystokyo/paper/ParticleBuilder.java b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java new file mode 100644 -index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b529629192cea6900 +index 0000000000000000000000000000000000000000..52f639b838e8b49952c560f20bacbad0337f279c --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/ParticleBuilder.java -@@ -0,0 +1,579 @@ +@@ -0,0 +1,583 @@ +package com.destroystokyo.paper; + +import com.google.common.base.Preconditions; @@ -454,7 +454,8 @@ index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b52962919 + } + + /** -+ * Sets the particle Color. Only valid for REDSTONE. ++ * Sets the particle Color. ++ * Only valid for {@link Particle#DUST}. + * + * @param color the new particle color + * @return a reference to this object. @@ -465,7 +466,8 @@ index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b52962919 + } + + /** -+ * Sets the particle Color and size. Only valid for REDSTONE. ++ * Sets the particle Color and size. ++ * Only valid for {@link Particle#DUST}. + * + * @param color the new particle color + * @param size the size of the particle @@ -474,7 +476,7 @@ index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b52962919 + @NotNull + public ParticleBuilder color(@Nullable Color color, float size) { + if (particle != Particle.DUST && color != null) { -+ throw new IllegalStateException("Color may only be set on REDSTONE"); ++ throw new IllegalStateException("Color may only be set on particle DUST."); + } + + // We don't officially support reusing these objects, but here we go @@ -491,7 +493,8 @@ index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b52962919 + + /** + * Sets the particle Color. -+ * Only valid for REDSTONE. ++ * Only valid for {@link Particle#DUST}. ++ * + * @param r red color component + * @param g green color component + * @param b blue color component @@ -504,11 +507,10 @@ index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b52962919 + + /** + * Sets the particle Color. -+ * Only valid for REDSTONE. ++ * Only valid for {@link Particle#DUST}. + * + * @param rgb an integer representing the red, green, and blue color components + * @return a reference to this object. -+ * @throws IllegalArgumentException if called on a particle builder that does not have + */ + @NotNull + public ParticleBuilder color(final int rgb) { @@ -516,7 +518,8 @@ index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b52962919 + } + + /** -+ * Sets the particle Color Transition. Only valid for DUST_COLOR_TRANSITION. ++ * Sets the particle Color Transition. ++ * Only valid for {@link Particle#DUST_COLOR_TRANSITION}. + * + * @param fromColor the new particle from color + * @param toColor the new particle to color @@ -530,7 +533,7 @@ index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b52962919 + + /** + * Sets the particle Color Transition. -+ * Only valid for DUST_COLOR_TRANSITION. ++ * Only valid for {@link Particle#DUST_COLOR_TRANSITION}. + * + * @param fromRed red color component for the from color + * @param fromGreen green color component for the from color @@ -549,7 +552,7 @@ index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b52962919 + + /** + * Sets the particle Color Transition. -+ * Only valid for DUST_COLOR_TRANSITION. ++ * Only valid for {@link Particle#DUST_COLOR_TRANSITION}. + * + * @param fromRgb an integer representing the red, green, and blue color components for the from color + * @param toRgb an integer representing the red, green, and blue color components for the to color @@ -562,7 +565,8 @@ index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b52962919 + } + + /** -+ * Sets the particle Color Transition and size. Only valid for DUST_COLOR_TRANSITION. ++ * Sets the particle Color Transition and size. ++ * Only valid for {@link Particle#DUST_COLOR_TRANSITION}. + * + * @param fromColor the new particle color for the from color. + * @param toColor the new particle color for the to color. @@ -594,7 +598,7 @@ index 0000000000000000000000000000000000000000..e63aabacac12a153ee8f413b52962919 + } +} diff --git a/src/main/java/org/bukkit/Particle.java b/src/main/java/org/bukkit/Particle.java -index 3d636cb7f275df053d202356c5e9fad5b1112867..b0ccd263cabe911d43cc13261011b64cacaeb7bb 100644 +index 4a06ed9c769acb2eb4c6f4b76c84dc2e63176010..c5e3a8143a166d426d87fa3d0f0b3d4f3d4bff1a 100644 --- a/src/main/java/org/bukkit/Particle.java +++ b/src/main/java/org/bukkit/Particle.java @@ -208,6 +208,18 @@ public enum Particle implements Keyed { @@ -614,7 +618,7 @@ index 3d636cb7f275df053d202356c5e9fad5b1112867..b0ccd263cabe911d43cc13261011b64c + // Paper end + /** - * Options which can be applied to redstone dust particles - a particle + * Options which can be applied to dust particles - a particle * color and size. diff --git a/src/main/java/org/bukkit/World.java b/src/main/java/org/bukkit/World.java index c489140bffdfdfa1e34e71489d308ed10cf10b21..b6d08d50c26aa0e69d2479d188fc3c690e8ed357 100644 |