Browse Source

1.2

tags/1.4.1
Nazar Kalinowski 1 year ago
parent
commit
726acef5dc
8 changed files with 152 additions and 90 deletions
  1. +7
    -0
      CHANGELOG
  2. +2
    -2
      pom.xml
  3. +2
    -2
      src/main/java/dev/gwm/spongeplugin/cosmetics/Cosmetics.java
  4. +35
    -17
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/BlockHighlightCosmeticEffect.java
  5. +41
    -31
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/CircleCosmeticEffect.java
  6. +29
    -19
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/GlobeCosmeticEffect.java
  7. +30
    -19
      src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/HelixCosmeticEffect.java
  8. +6
    -0
      src/main/java/dev/gwm/spongeplugin/cosmetics/utils/CosmeticsUtils.java

+ 7
- 0
CHANGELOG View File

@@ -1,3 +1,10 @@
VERSION 1.2
1. Update to GWMLibrary 2.3
2. Remove 'COLOR' parameter from HELIX', 'GLOBE', 'CIRCLE' and 'BLOCK-HIGHLIGHT' Cosmetic Effects
3. Add 'PARTICLE_EFFECT' parameter to HELIX', 'GLOBE', 'CIRCLE' and 'BLOCK-HIGHLIGHT' Cosmetic Effects
4. Add 'PER_ANIMATION_COLOR' parameter to HELIX', 'GLOBE', 'CIRCLE' and 'BLOCK-HIGHLIGHT'
5. Rename 'STEPS_PER_ANIMATION' parameter in 'CIRCLE' Cosmetic Effect to 'PARTICLES_PER_ANIMATION'

VERSION 1.1
1. Update to GWMLibrary 2.2
2. Add 'PER_PARTICLE_COLOR' parameter to 'HELIX', 'GLOBE', 'CIRCLE' and 'BLOCK-HIGHLIGHT' Cosmetic Effects


+ 2
- 2
pom.xml View File

@@ -6,7 +6,7 @@

<groupId>dev.gwm.spongeplugin</groupId>
<artifactId>cosmetics</artifactId>
<version>1.1</version>
<version>1.2</version>
<name>Cosmetics</name>
<packaging>jar</packaging>

@@ -33,7 +33,7 @@
<dependency>
<groupId>dev.gwm.spongeplugin</groupId>
<artifactId>library</artifactId>
<version>2.2</version>
<version>2.3</version>
<scope>provided</scope>
</dependency>
</dependencies>


+ 2
- 2
src/main/java/dev/gwm/spongeplugin/cosmetics/Cosmetics.java View File

@@ -35,7 +35,7 @@ import java.util.concurrent.atomic.AtomicInteger;
@Plugin(id = "cosmetics",
name = "Cosmetics",
version = "1.1",
version = "1.2",
description = "Fancy cosmetic effects",
authors = {"GWM"/* My contacts:
* E-Mail(nazark@tutanota.com),
@@ -46,7 +46,7 @@ import java.util.concurrent.atomic.AtomicInteger;
})
public class Cosmetics extends SpongePlugin {
public static final Version VERSION = new Version(null, 1, 1);
public static final Version VERSION = new Version(null, 1, 2);
private static Cosmetics instance = null;


+ 35
- 17
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/BlockHighlightCosmeticEffect.java View File

@@ -1,16 +1,14 @@
package dev.gwm.spongeplugin.cosmetics.superobject.effect;

import com.flowpowered.math.vector.Vector3d;
import com.google.common.reflect.TypeToken;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.AbstractCosmeticEffect;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsUtils;
import dev.gwm.spongeplugin.library.exception.SuperObjectConstructionException;
import dev.gwm.spongeplugin.library.utils.GWMLibraryUtils;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.Viewer;
import org.spongepowered.api.effect.particle.ParticleEffect;
import org.spongepowered.api.effect.particle.ParticleOptions;
import org.spongepowered.api.effect.particle.ParticleTypes;
import org.spongepowered.api.util.Color;
import org.spongepowered.api.world.Locatable;

import java.util.Optional;
@@ -19,19 +17,22 @@ public class BlockHighlightCosmeticEffect extends AbstractCosmeticEffect {

public static final String TYPE = "BLOCK-HIGHLIGHT";

private final Optional<Color> color;
private final ParticleEffect particleEffect;
private final boolean perAnimationColor;
private final boolean perParticleColor;

public BlockHighlightCosmeticEffect(ConfigurationNode node) {
super(node);
try {
ConfigurationNode colorNode = node.getNode("COLOR");
ConfigurationNode particleEffectNode = node.getNode("PARTICLE_EFFECT");
ConfigurationNode perAnimationColorNode = node.getNode("PER_ANIMATION_COLOR");
ConfigurationNode perParticleColorNode = node.getNode("PER_PARTICLE_COLOR");
if (colorNode.isVirtual()) {
color = Optional.empty();
if (!particleEffectNode.isVirtual()) {
particleEffect = GWMLibraryUtils.parseParticleEffect(particleEffectNode);
} else {
color = Optional.of(colorNode.getValue(TypeToken.of(Color.class)));
particleEffect = CosmeticsUtils.DEFAULT_PARTICLE_EFFECT;
}
perAnimationColor = perAnimationColorNode.getBoolean(false);
perParticleColor = perParticleColorNode.getBoolean(false);
} catch (Exception e) {
throw new SuperObjectConstructionException(category(), type(), e);
@@ -40,9 +41,10 @@ public class BlockHighlightCosmeticEffect extends AbstractCosmeticEffect {

public BlockHighlightCosmeticEffect(String id,
Optional<Long> delay, Optional<Vector3d> defaultOffset,
Optional<Color> color, boolean perParticleColor) {
ParticleEffect particleEffect, boolean perAnimationColor, boolean perParticleColor) {
super(id, delay, defaultOffset);
this.color = color;
this.particleEffect = particleEffect;
this.perAnimationColor = perAnimationColor;
this.perParticleColor = perParticleColor;
}

@@ -56,6 +58,18 @@ public class BlockHighlightCosmeticEffect extends AbstractCosmeticEffect {
return new EffectRunnable(viewer, locatable, offset);
}

public ParticleEffect getParticleEffect() {
return particleEffect;
}

public boolean isPerAnimationColor() {
return perAnimationColor;
}

public boolean isPerParticleColor() {
return perParticleColor;
}

private final class EffectRunnable extends AbstractEffectRunnable {

private EffectRunnable(Viewer viewer, Locatable locatable, Vector3d offset) {
@@ -65,19 +79,23 @@ public class BlockHighlightCosmeticEffect extends AbstractCosmeticEffect {
@Override
public void run() {
Vector3d position = getPosition();
Color particleColor = color.orElse(CosmeticsUtils.getRandomColor());
ParticleEffect effect = perAnimationColor ?
ParticleEffect.builder().
from(particleEffect).
option(ParticleOptions.COLOR, CosmeticsUtils.getRandomColor()).
build() :
particleEffect;
for (double x = 0; x <= 1; x += 0.2) {
for (double z = 0; z <= 1; z += 0.2) {
for (double y = 1; y >= 0; y -= 0.2) {
if (x == 0 || x == 1 || z == 0 || z == 1 || y == 1 || y == 0) { //Only borders, not insides
if (perParticleColor) {
particleColor = CosmeticsUtils.getRandomColor();
effect = ParticleEffect.builder().
from(particleEffect).
option(ParticleOptions.COLOR, CosmeticsUtils.getRandomColor()).
build();
}
getViewer().spawnParticles(
ParticleEffect.builder().type(ParticleTypes.REDSTONE_DUST).
option(ParticleOptions.COLOR, particleColor).
build(),
position.add(x, y, z));
getViewer().spawnParticles(effect, position.add(x, y, z));
}
}
}


+ 41
- 31
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/CircleCosmeticEffect.java View File

@@ -1,16 +1,14 @@
package dev.gwm.spongeplugin.cosmetics.superobject.effect;

import com.flowpowered.math.vector.Vector3d;
import com.google.common.reflect.TypeToken;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.AbstractCosmeticEffect;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsUtils;
import dev.gwm.spongeplugin.library.exception.SuperObjectConstructionException;
import dev.gwm.spongeplugin.library.utils.GWMLibraryUtils;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.Viewer;
import org.spongepowered.api.effect.particle.ParticleEffect;
import org.spongepowered.api.effect.particle.ParticleOptions;
import org.spongepowered.api.effect.particle.ParticleTypes;
import org.spongepowered.api.util.Color;
import org.spongepowered.api.world.Locatable;

import java.util.Optional;
@@ -19,25 +17,28 @@ public class CircleCosmeticEffect extends AbstractCosmeticEffect {

public static final String TYPE = "CIRCLE";

private final Optional<Color> color;
private final ParticleEffect particleEffect;
private final boolean perAnimationColor;
private final boolean perParticleColor;
private final double radius;
private final double step;
private final int stepsPerAnimation;
private final int particlesPerAnimation;

public CircleCosmeticEffect(ConfigurationNode node) {
super(node);
try {
ConfigurationNode colorNode = node.getNode("COLOR");
ConfigurationNode particleEffectNode = node.getNode("PARTICLE_EFFECT");
ConfigurationNode perAnimationColorNode = node.getNode("PER_ANIMATION_COLOR");
ConfigurationNode perParticleColorNode = node.getNode("PER_PARTICLE_COLOR");
ConfigurationNode radiusNode = node.getNode("RADIUS");
ConfigurationNode stepNode = node.getNode("STEP");
ConfigurationNode stepsPerAnimationNode = node.getNode("STEPS_PER_ANIMATION");
if (colorNode.isVirtual()) {
color = Optional.empty();
ConfigurationNode particlesPerAnimationNode = node.getNode("PARTICLES_PER_ANIMATION");
if (!particleEffectNode.isVirtual()) {
particleEffect = GWMLibraryUtils.parseParticleEffect(particleEffectNode);
} else {
color = Optional.of(colorNode.getValue(TypeToken.of(Color.class)));
particleEffect = CosmeticsUtils.DEFAULT_PARTICLE_EFFECT;
}
perAnimationColor = perAnimationColorNode.getBoolean(false);
perParticleColor = perParticleColorNode.getBoolean(false);
if (!radiusNode.isVirtual()) {
radius = radiusNode.getDouble();
@@ -55,12 +56,12 @@ public class CircleCosmeticEffect extends AbstractCosmeticEffect {
if (step <= 0) {
throw new IllegalArgumentException("Step is equal to or less than 0!");
}
if (!stepsPerAnimationNode.isVirtual()) {
stepsPerAnimation = stepsPerAnimationNode.getInt();
if (!particlesPerAnimationNode.isVirtual()) {
particlesPerAnimation = particlesPerAnimationNode.getInt();
} else {
stepsPerAnimation = 1;
particlesPerAnimation = 1;
}
if (stepsPerAnimation <= 0) {
if (particlesPerAnimation <= 0) {
throw new IllegalArgumentException("Steps Per Animation is equal to or less than 0!");
}
} catch (Exception e) {
@@ -70,10 +71,11 @@ public class CircleCosmeticEffect extends AbstractCosmeticEffect {

public CircleCosmeticEffect(String id,
Optional<Long> delay, Optional<Vector3d> defaultOffset,
Optional<Color> color, boolean perParticleColor,
double radius, double step, int stepsPerAnimation) {
ParticleEffect particleEffect, boolean perAnimationColor, boolean perParticleColor,
double radius, double step, int particlesPerAnimation) {
super(id, delay, defaultOffset);
this.color = color;
this.particleEffect = particleEffect;
this.perAnimationColor = perAnimationColor;
this.perParticleColor = perParticleColor;
if (radius <= 0) {
throw new IllegalArgumentException("Radius is equal to or less than 0!");
@@ -83,10 +85,10 @@ public class CircleCosmeticEffect extends AbstractCosmeticEffect {
throw new IllegalArgumentException("Step is equal to or less than 0!");
}
this.step = step;
if (stepsPerAnimation <= 0) {
if (particlesPerAnimation <= 0) {
throw new IllegalArgumentException("Steps Per Animation is equal to or less than 0!");
}
this.stepsPerAnimation = stepsPerAnimation;
this.particlesPerAnimation = particlesPerAnimation;
}

@Override
@@ -99,8 +101,12 @@ public class CircleCosmeticEffect extends AbstractCosmeticEffect {
return new EffectRunnable(viewer, locatable, offset);
}

public Optional<Color> getColor() {
return color;
public ParticleEffect getParticleEffect() {
return particleEffect;
}

public boolean isPerAnimationColor() {
return perAnimationColor;
}

public boolean isPerParticleColor() {
@@ -115,8 +121,8 @@ public class CircleCosmeticEffect extends AbstractCosmeticEffect {
return step;
}

public int getStepsPerAnimation() {
return stepsPerAnimation;
public int getParticlesPerAnimation() {
return particlesPerAnimation;
}

private final class EffectRunnable extends AbstractEffectRunnable {
@@ -132,10 +138,18 @@ public class CircleCosmeticEffect extends AbstractCosmeticEffect {
@Override
public void run() {
Vector3d position = getPosition();
Color particleColor = color.orElse(CosmeticsUtils.getRandomColor());
for (int j = 0; j < stepsPerAnimation; j++) {
ParticleEffect effect = perAnimationColor ?
ParticleEffect.builder().
from(particleEffect).
option(ParticleOptions.COLOR, CosmeticsUtils.getRandomColor()).
build() :
particleEffect;
for (int j = 0; j < particlesPerAnimation; j++) {
if (perParticleColor) {
particleColor = CosmeticsUtils.getRandomColor();
effect = ParticleEffect.builder().
from(particleEffect).
option(ParticleOptions.COLOR, CosmeticsUtils.getRandomColor()).
build();
}
if (i > l) {
i = 0;
@@ -144,11 +158,7 @@ public class CircleCosmeticEffect extends AbstractCosmeticEffect {
final double z = position.getZ();
double xOffset = radius * Math.cos(i * d);
double zOffset = radius * Math.sin(i * d);
getViewer().spawnParticles(
ParticleEffect.builder().type(ParticleTypes.REDSTONE_DUST).
option(ParticleOptions.COLOR, particleColor).
build(),
position.add(new Vector3d(xOffset, 0, zOffset)));
getViewer().spawnParticles(effect, position.add(new Vector3d(xOffset, 0, zOffset)));
i++;
}
}


+ 29
- 19
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/GlobeCosmeticEffect.java View File

@@ -1,16 +1,14 @@
package dev.gwm.spongeplugin.cosmetics.superobject.effect;

import com.flowpowered.math.vector.Vector3d;
import com.google.common.reflect.TypeToken;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.AbstractCosmeticEffect;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsUtils;
import dev.gwm.spongeplugin.library.exception.SuperObjectConstructionException;
import dev.gwm.spongeplugin.library.utils.GWMLibraryUtils;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.Viewer;
import org.spongepowered.api.effect.particle.ParticleEffect;
import org.spongepowered.api.effect.particle.ParticleOptions;
import org.spongepowered.api.effect.particle.ParticleTypes;
import org.spongepowered.api.util.Color;
import org.spongepowered.api.world.Locatable;

import java.util.Optional;
@@ -19,19 +17,22 @@ public final class GlobeCosmeticEffect extends AbstractCosmeticEffect {

public static final String TYPE = "GLOBE";

private final Optional<Color> color;
private final ParticleEffect particleEffect;
private final boolean perAnimationColor;
private final boolean perParticleColor;

public GlobeCosmeticEffect(ConfigurationNode node) {
super(node);
try {
ConfigurationNode colorNode = node.getNode("COLOR");
ConfigurationNode particleEffectNode = node.getNode("PARTICLE_EFFECT");
ConfigurationNode perAnimationColorNode = node.getNode("PER_ANIMATION_COLOR");
ConfigurationNode perParticleColorNode = node.getNode("PER_PARTICLE_COLOR");
if (colorNode.isVirtual()) {
color = Optional.empty();
if (!particleEffectNode.isVirtual()) {
particleEffect = GWMLibraryUtils.parseParticleEffect(particleEffectNode);
} else {
color = Optional.of(colorNode.getValue(TypeToken.of(Color.class)));
particleEffect = CosmeticsUtils.DEFAULT_PARTICLE_EFFECT;
}
perAnimationColor = perAnimationColorNode.getBoolean(false);
perParticleColor = perParticleColorNode.getBoolean(false);
} catch (Exception e) {
throw new SuperObjectConstructionException(category(), type(), e);
@@ -40,9 +41,10 @@ public final class GlobeCosmeticEffect extends AbstractCosmeticEffect {

public GlobeCosmeticEffect(String id,
Optional<Long> delay, Optional<Vector3d> defaultOffset,
Optional<Color> color, boolean perParticleColor) {
ParticleEffect particleEffect, boolean perAnimationColor, boolean perParticleColor) {
super(id, delay, defaultOffset);
this.color = color;
this.particleEffect = particleEffect;
this.perAnimationColor = perAnimationColor;
this.perParticleColor = perParticleColor;
}

@@ -56,8 +58,12 @@ public final class GlobeCosmeticEffect extends AbstractCosmeticEffect {
return new EffectRunnable(viewer, locatable, offset);
}

public Optional<Color> getColor() {
return color;
public ParticleEffect getParticleEffect() {
return particleEffect;
}

public boolean isPerAnimationColor() {
return perAnimationColor;
}

public boolean isPerParticleColor() {
@@ -80,20 +86,24 @@ public final class GlobeCosmeticEffect extends AbstractCosmeticEffect {
phi = 0;
}
Vector3d position = getPosition();
Color particleColor = color.orElse(CosmeticsUtils.getRandomColor());
ParticleEffect effect = perAnimationColor ?
ParticleEffect.builder().
from(particleEffect).
option(ParticleOptions.COLOR, CosmeticsUtils.getRandomColor()).
build() :
particleEffect;
for (double theta = 0; theta <= 2 * Math.PI; theta += Math.PI / 40) {
if (perParticleColor) {
particleColor = CosmeticsUtils.getRandomColor();
effect = ParticleEffect.builder().
from(particleEffect).
option(ParticleOptions.COLOR, CosmeticsUtils.getRandomColor()).
build();
}
double r = 1.5;
double x = r * Math.cos(theta) * Math.sin(phi);
double y = r * Math.cos(phi) + 1.5;
double z = r * Math.sin(theta) * Math.sin(phi);
getViewer().spawnParticles(
ParticleEffect.builder().type(ParticleTypes.REDSTONE_DUST).
option(ParticleOptions.COLOR, particleColor).
build(),
position.add(x, y, z));
getViewer().spawnParticles(effect, position.add(x, y, z));
}
}
}


+ 30
- 19
src/main/java/dev/gwm/spongeplugin/cosmetics/superobject/effect/HelixCosmeticEffect.java View File

@@ -1,16 +1,14 @@
package dev.gwm.spongeplugin.cosmetics.superobject.effect;

import com.flowpowered.math.vector.Vector3d;
import com.google.common.reflect.TypeToken;
import dev.gwm.spongeplugin.cosmetics.superobject.effect.base.AbstractCosmeticEffect;
import dev.gwm.spongeplugin.cosmetics.utils.CosmeticsUtils;
import dev.gwm.spongeplugin.library.exception.SuperObjectConstructionException;
import dev.gwm.spongeplugin.library.utils.GWMLibraryUtils;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.effect.Viewer;
import org.spongepowered.api.effect.particle.ParticleEffect;
import org.spongepowered.api.effect.particle.ParticleOptions;
import org.spongepowered.api.effect.particle.ParticleTypes;
import org.spongepowered.api.util.Color;
import org.spongepowered.api.world.Locatable;

import java.util.Optional;
@@ -19,19 +17,22 @@ public class HelixCosmeticEffect extends AbstractCosmeticEffect {

public static final String TYPE = "HELIX";

private final Optional<Color> color;
private final ParticleEffect particleEffect;
private final boolean perAnimationColor;
private final boolean perParticleColor;

public HelixCosmeticEffect(ConfigurationNode node) {
super(node);
try {
ConfigurationNode colorNode = node.getNode("COLOR");
ConfigurationNode particleEffectNode = node.getNode("PARTICLE_EFFECT");
ConfigurationNode perAnimationColorNode = node.getNode("PER_ANIMATION_COLOR");
ConfigurationNode perParticleColorNode = node.getNode("PER_PARTICLE_COLOR");
if (colorNode.isVirtual()) {
color = Optional.empty();
if (!particleEffectNode.isVirtual()) {
particleEffect = GWMLibraryUtils.parseParticleEffect(particleEffectNode);
} else {
color = Optional.of(colorNode.getValue(TypeToken.of(Color.class)));
particleEffect = CosmeticsUtils.DEFAULT_PARTICLE_EFFECT;
}
perAnimationColor = perAnimationColorNode.getBoolean(false);
perParticleColor = perParticleColorNode.getBoolean(false);
} catch (Exception e) {
throw new SuperObjectConstructionException(category(), type(), e);
@@ -40,9 +41,10 @@ public class HelixCosmeticEffect extends AbstractCosmeticEffect {

public HelixCosmeticEffect(String id,
Optional<Long> delay, Optional<Vector3d> defaultOffset,
Optional<Color> color, boolean perParticleColor) {
ParticleEffect particleEffect, boolean perAnimationColor, boolean perParticleColor) {
super(id, delay, defaultOffset);
this.color = color;
this.particleEffect = particleEffect;
this.perAnimationColor = perAnimationColor;
this.perParticleColor = perParticleColor;
}

@@ -56,8 +58,12 @@ public class HelixCosmeticEffect extends AbstractCosmeticEffect {
return new EffectRunnable(viewer, locatable, offset);
}

public Optional<Color> getColor() {
return color;
public ParticleEffect getParticleEffect() {
return particleEffect;
}

public boolean isPerAnimationColor() {
return perAnimationColor;
}

public boolean isPerParticleColor() {
@@ -72,6 +78,7 @@ public class HelixCosmeticEffect extends AbstractCosmeticEffect {
super(viewer, locatable, offset);
}

/* Original code have been copied from "CrazyFeet-Sponge" developed by runescapejon */
@Override
public void run() {
phi = phi + Math.PI / 16;
@@ -80,20 +87,24 @@ public class HelixCosmeticEffect extends AbstractCosmeticEffect {
}
Vector3d position = getPosition();
double x, y, z;
Color particleColor = color.orElse(CosmeticsUtils.getRandomColor());
ParticleEffect effect = perAnimationColor ?
ParticleEffect.builder().
from(particleEffect).
option(ParticleOptions.COLOR, CosmeticsUtils.getRandomColor()).
build() :
particleEffect;
for (double t = 0; t <= 2 * Math.PI; t = t + Math.PI / 16) {
for (double i = 0; i <= 1; i = i + 1) {
if (perParticleColor) {
particleColor = CosmeticsUtils.getRandomColor();
effect = ParticleEffect.builder().
from(particleEffect).
option(ParticleOptions.COLOR, CosmeticsUtils.getRandomColor()).
build();
}
x = 0.15 * (2 * Math.PI - t) * Math.cos(t + phi + i * Math.PI);
y = 0.5 * t;
z = 0.15 * (2 * Math.PI - t) * Math.sin(t + phi + i * Math.PI);
getViewer().spawnParticles(
ParticleEffect.builder().type(ParticleTypes.REDSTONE_DUST).
option(ParticleOptions.COLOR, particleColor).
build(),
position.add(x, y, z));
getViewer().spawnParticles(effect, position.add(x, y, z));
}
}
}


+ 6
- 0
src/main/java/dev/gwm/spongeplugin/cosmetics/utils/CosmeticsUtils.java View File

@@ -6,6 +6,8 @@ import dev.gwm.spongeplugin.library.utils.Config;
import dev.gwm.spongeplugin.library.utils.SuperObjectsService;
import ninja.leaping.configurate.ConfigurationNode;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.effect.particle.ParticleEffect;
import org.spongepowered.api.effect.particle.ParticleTypes;
import org.spongepowered.api.util.Color;

import java.io.File;
@@ -14,6 +16,10 @@ import java.util.concurrent.ThreadLocalRandom;

public class CosmeticsUtils {

public static final ParticleEffect DEFAULT_PARTICLE_EFFECT = ParticleEffect.builder().
type(ParticleTypes.REDSTONE_DUST).
build();

public static boolean loadCosmeticEffect(File file, boolean force) {
try {
Config cosmeticEffectConfig = new Config(Cosmetics.getInstance(), file);


Loading…
Cancel
Save