Added Minecraft 1.15 effects

This commit is contained in:
Esophose 2019-10-19 15:11:20 -06:00
parent da86916d32
commit eacb110068
3 changed files with 43 additions and 32 deletions

View file

@ -1,13 +1,21 @@
=== v7.0 === === v7.0 ===
* Huge changes
* The config will no longer reset for each and every update * The config will no longer reset for each and every update
+ Added settings for each effect located in the /effects folder + Added settings for each effect located in the /effects folder
+ Added settings for each style located in the /styles folder + Added settings for each style located in the /styles folder
+ All command and parameter names can now be edited in the new commands.yml file + All command and parameter names can now be edited in the new commands.yml file
+ Added support for what I'm calling language packs + Added support for what I'm calling language packs
- Language packs have the ability to overwrite any message in the plugin - Language packs have the ability to overwrite any message in the plugin
+ Added de_DE language pack
+ Added language settings for all material names which can be changed in a languge pack + Added language settings for all material names which can be changed in a languge pack
* The command '/pp fixed clear <radius>' now accepts an optional location/world as '/pp fixed clear <radius> [<x> <y> <z> [world]]' * The command '/pp fixed clear <radius>' now accepts an optional location/world as '/pp fixed clear <radius> [<x> <y> <z> [world]]'
+ Added support for 1.15 particles, the future is now + Added setting 'allow-duplicate-styles' which, when false, will not allow 2 particles with the same style to display at the same time.
- For example, doing '/pp add flame spiral' then '/pp add witchmagic spiral' will only keep the effect of 'witchmagic'
* Effect/Style permissions are no longer required for a player to have particles applied to them
- This mainly changes '/ppo' to allow any command to execute successfully
+ Added a developer API for editing particles, groups, and fixed effects for players
+ Added support for Minecraft 1.15 particles, the future is now
- 'falling_honey', 'falling_nectar', 'landing_honey'
+ Added support for 1.8.8 for those who refuse to accept the future (this is the only version of 1.8.x that will be supported, I will eventually drop support for it again in the future) + Added support for 1.8.8 for those who refuse to accept the future (this is the only version of 1.8.x that will be supported, I will eventually drop support for it again in the future)
=== v6.4 === === v6.4 ===
+ Added support for Minecraft 1.14 + Added support for Minecraft 1.14

View file

@ -54,7 +54,9 @@ public enum ParticleEffect {
EXPLOSION("EXPLOSION_LARGE", "EXPLOSION_LARGE"), EXPLOSION("EXPLOSION_LARGE", "EXPLOSION_LARGE"),
EXPLOSION_EMITTER("EXPLOSION_HUGE", "EXPLOSION_HUGE"), EXPLOSION_EMITTER("EXPLOSION_HUGE", "EXPLOSION_HUGE"),
FALLING_DUST("FALLING_DUST", "FALLING_DUST", ParticleProperty.REQUIRES_MATERIAL_DATA), FALLING_DUST("FALLING_DUST", "FALLING_DUST", ParticleProperty.REQUIRES_MATERIAL_DATA),
FALLING_HONEY("FALLING_HONEY", null),
FALLING_LAVA("FALLING_LAVA", null), FALLING_LAVA("FALLING_LAVA", null),
FALLING_NECTAR("FALLING_NECTAR", null),
FALLING_WATER("FALLING_WATER", null), FALLING_WATER("FALLING_WATER", null),
FIREWORK("FIREWORKS_SPARK", "FIREWORKS_SPARK"), FIREWORK("FIREWORKS_SPARK", "FIREWORKS_SPARK"),
FISHING("WATER_WAKE", "WATER_WAKE"), FISHING("WATER_WAKE", "WATER_WAKE"),
@ -67,6 +69,7 @@ public enum ParticleEffect {
ITEM("ITEM_CRACK", "ITEM_CRACK", ParticleProperty.REQUIRES_MATERIAL_DATA), ITEM("ITEM_CRACK", "ITEM_CRACK", ParticleProperty.REQUIRES_MATERIAL_DATA),
ITEM_SLIME("SLIME", "SLIME"), ITEM_SLIME("SLIME", "SLIME"),
ITEM_SNOWBALL("SNOWBALL", "SNOWBALL"), ITEM_SNOWBALL("SNOWBALL", "SNOWBALL"),
LANDING_HONEY("LANDING_HONEY", null),
LANDING_LAVA("LANDING_LAVA", null), LANDING_LAVA("LANDING_LAVA", null),
LARGE_SMOKE("SMOKE_LARGE", "SMOKE_LARGE"), LARGE_SMOKE("SMOKE_LARGE", "SMOKE_LARGE"),
LAVA("LAVA", "LAVA"), LAVA("LAVA", "LAVA"),

View file

@ -20,48 +20,48 @@ public class ParticleStylePulse implements ParticleStyle {
public List<PParticle> getParticles(ParticlePair particle, Location location) { public List<PParticle> getParticles(ParticlePair particle, Location location) {
List<PParticle> particles = new ArrayList<PParticle>(); List<PParticle> particles = new ArrayList<PParticle>();
double speed = getSpeedByEffect(particle.getEffect()); double speed = getSpeedByEffect(particle.getEffect());
if (step == 0) { if (step == 0) {
for (int i = 0; i < points; i++) { for (int i = 0; i < points; i++) {
double dx = Math.cos(Math.PI * 2 * ((double)i / points)) * radius; double dx = Math.cos(Math.PI * 2 * ((double) i / points)) * radius;
double dy = -0.9; double dy = -0.9;
double dz = Math.sin(Math.PI * 2 * ((double)i / points)) * radius; double dz = Math.sin(Math.PI * 2 * ((double) i / points)) * radius;
double angle = Math.atan2(dz, dx); double angle = Math.atan2(dz, dx);
double xAng = Math.cos(angle); double xAng = Math.cos(angle);
double zAng = Math.sin(angle); double zAng = Math.sin(angle);
particles.add(new PParticle(location.clone().add(dx, dy, dz), xAng, 0, zAng, speed, true)); particles.add(new PParticle(location.clone().add(dx, dy, dz), xAng, 0, zAng, speed, true));
} }
} }
return particles; return particles;
} }
private double getSpeedByEffect(ParticleEffect effect) { private double getSpeedByEffect(ParticleEffect effect) {
switch (effect) { switch (effect) {
case CRIT: case CRIT:
case DAMAGE_INDICATOR: case DAMAGE_INDICATOR:
case ENCHANTED_HIT: case ENCHANTED_HIT:
return 1; return 1;
case DRAGON_BREATH: case DRAGON_BREATH:
return 0.01; return 0.01;
case ENCHANT: case ENCHANT:
case NAUTILUS: case NAUTILUS:
case PORTAL: case PORTAL:
return radius; return radius;
case END_ROD: case END_ROD:
case SMOKE: case SMOKE:
case SQUID_INK: case SQUID_INK:
return 0.15; return 0.15;
case FIREWORK: case FIREWORK:
case SPIT: case SPIT:
case SPLASH: case SPLASH:
return 0.25; return 0.25;
case POOF: case POOF:
return 0.2; return 0.2;
case TOTEM_OF_UNDYING: case TOTEM_OF_UNDYING:
return 0.75; return 0.75;
default: default:
return 0.1; // Flame return 0.1; // Flame
} }
} }
@ -76,11 +76,11 @@ public class ParticleStylePulse implements ParticleStyle {
public boolean canBeFixed() { public boolean canBeFixed() {
return true; return true;
} }
public boolean canToggleWithMovement() { public boolean canToggleWithMovement() {
return true; return true;
} }
public double getFixedEffectOffset() { public double getFixedEffectOffset() {
return 0.5; return 0.5;
} }