mirror of
https://github.com/TotalFreedomMC/PlayerParticles.git
synced 2024-12-31 20:02:12 +00:00
Fix "random" data not parsing in preset_groups.yml
This commit is contained in:
parent
c0c9ef48ce
commit
909e00ba70
3 changed files with 8 additions and 3 deletions
|
@ -219,7 +219,7 @@ public class SimplifiedChineseLocale implements Locale {
|
|||
this.put("fixed-invalid-command", "&c你输入了无效的子指令!");
|
||||
|
||||
this.put("#25", "Plugin Update Message");
|
||||
this.put("update-available", "&e有新版本更新:(&b%new%&e)!你使用的版本为&bv%current%&e。 https://songoda.com/marketplace/product/32");
|
||||
this.put("update-available", "&e有新版本更新:(&b%new%&e)!你使用的版本为&bv%current%&e。 https://www.spigotmc.org/resources/playerparticles.40261/");
|
||||
|
||||
this.put("#26", "GUI Messages");
|
||||
this.put("gui-disabled", "&c服务器管理员已关闭菜单!");
|
||||
|
|
|
@ -120,6 +120,8 @@ public class ParticleGroupPresetManager extends Manager {
|
|||
if (effect == ParticleEffect.NOTE) {
|
||||
if (args[0].equalsIgnoreCase("rainbow")) {
|
||||
noteColorData = new NoteColor(99);
|
||||
} else if (args[0].equalsIgnoreCase("random")) {
|
||||
noteColorData = new NoteColor(98);
|
||||
} else {
|
||||
int note;
|
||||
try {
|
||||
|
@ -139,6 +141,8 @@ public class ParticleGroupPresetManager extends Manager {
|
|||
} else {
|
||||
if (args[0].equalsIgnoreCase("rainbow")) {
|
||||
colorData = new OrdinaryColor(999, 999, 999);
|
||||
} else if (args[0].equalsIgnoreCase("random")) {
|
||||
colorData = new OrdinaryColor(998, 998, 998);
|
||||
} else {
|
||||
int r, g, b;
|
||||
|
||||
|
|
|
@ -16,8 +16,9 @@ public class ParticleStyleWings implements ParticleStyle {
|
|||
List<PParticle> particles = new ArrayList<>();
|
||||
if (spawnTimer == 0) {
|
||||
for (double t = 0; t < Math.PI * 2; t += Math.PI / 48) {
|
||||
double x = Math.sin(t) * (Math.pow(Math.E, Math.cos(t)) - 2 * Math.cos(t * 4) - Math.pow(Math.sin(t / 12), 5)) / 2;
|
||||
double y = Math.cos(t) * (Math.pow(Math.E, Math.cos(t)) - 2 * Math.cos(t * 4) - Math.pow(Math.sin(t / 12), 5)) / 2;
|
||||
double offset = (Math.pow(Math.E, Math.cos(t)) - 2 * Math.cos(t * 4) - Math.pow(Math.sin(t / 12), 5)) / 2;
|
||||
double x = Math.sin(t) * offset;
|
||||
double y = Math.cos(t) * offset;
|
||||
Vector v = VectorUtils.rotateAroundAxisY(new Vector(x, y, -0.3), -Math.toRadians(location.getYaw()));
|
||||
particles.add(new PParticle(location.clone().add(v.getX(), v.getY(), v.getZ())));
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue