13
0

EasterHuntReward #29

Zusammengeführt
YoyoNow hat 6 Commits von EasterHuntReward nach master 2023-04-08 00:53:10 +02:00 zusammengeführt
6 geänderte Dateien mit 54 neuen und 4 gelöschten Zeilen
Nur Änderungen aus Commit 4641a0936f werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -96,6 +96,7 @@ PARTICLE_TEAM_PULSE_AURA_1 = §fPulse Aura §cFlame
PARTICLE_TEAM_PULSE_AURA_2 = §fPulse Aura §7End Rod PARTICLE_TEAM_PULSE_AURA_2 = §fPulse Aura §7End Rod
PARTICLE_TEAM_PULSE_AURA_3 = §fPulse Aura §fEnchanted PARTICLE_TEAM_PULSE_AURA_3 = §fPulse Aura §fEnchanted
PARTICLE_TEAM_PULSE_LOGO = §fPulse Logo PARTICLE_TEAM_PULSE_LOGO = §fPulse Logo
PARTICLE_TEAM_PULSE_HEART_BEAT = §cHeart Beat
PARTICLE_RAINCLOUD_NORMAL = §fRaincloud PARTICLE_RAINCLOUD_NORMAL = §fRaincloud
PARTICLE_RAINCLOUD_RED = §fLava cloud PARTICLE_RAINCLOUD_RED = §fLava cloud

Datei anzeigen

@ -90,6 +90,8 @@ PARTICLE_WINGS_EVIL = §5Lila Flügel
PARTICLE_PLAYER_RONGAMER99091_AURA = §7Rauchgranate PARTICLE_PLAYER_RONGAMER99091_AURA = §7Rauchgranate
PARTICLE_TEAM_PULSE_HEART_BEAT = §cHerzschlag
PARTICLE_RAINCLOUD_NORMAL = §fRegenwolke PARTICLE_RAINCLOUD_NORMAL = §fRegenwolke
PARTICLE_RAINCLOUD_RED = §fLavawolke PARTICLE_RAINCLOUD_RED = §fLavawolke
PARTICLE_RAINCLOUD_YELLOW = §fNektarwolke PARTICLE_RAINCLOUD_YELLOW = §fNektarwolke

Datei anzeigen

@ -25,7 +25,7 @@ public class Wing extends DelegatingParticleElement {
@Override @Override
public void tick(ParticleTickData particleTickData) { public void tick(ParticleTickData particleTickData) {
for (Vector dVector : wingDesign.getVectors()) { for (Vector dVector : wingDesign.getVectors()) {
Vector vector = new Vector(dVector.getX() * size, 0.6 + dVector.getY() * size - (particleTickData.getPlayer().isSneaking() ? 0.5 : 0) , 0.5); Vector vector = new Vector(dVector.getX() * size, 0.6 + dVector.getY() * size - (particleTickData.getPlayer().isSneaking() ? 0.5 : 0), 0.5);
vector.rotateAroundY(Math.toRadians(particleTickData.getPlayer().getLocation().getYaw() * -1)); vector.rotateAroundY(Math.toRadians(particleTickData.getPlayer().getLocation().getYaw() * -1));
vector.setX(-vector.getX()); vector.setX(-vector.getX());
vector.setZ(-vector.getZ()); vector.setZ(-vector.getZ());

Datei anzeigen

@ -0,0 +1,44 @@
package de.steamwar.lobby.particle.elements.custom;
import de.steamwar.lobby.particle.ParticleElement;
import de.steamwar.lobby.particle.ParticleTickData;
import de.steamwar.lobby.particle.elements.DelegatingParticleElement;
import org.bukkit.Location;
import org.bukkit.util.Vector;
public class HearthBeat extends DelegatingParticleElement {
private double speed;
private double y(double time) {
double d1 = Math.pow(2, -Math.pow(time * 17 - 7.5, 2));
double d2 = Math.pow(2, -Math.pow(time * 20 - 11, 2)) * 0.5;
double d3 = Math.pow(2, -Math.pow(time * 25 - 17, 2)) * 0.1;
return (d1 - d2 + d3) * 0.5;
}
public HearthBeat(ParticleElement particleElement, double speed) {
super(particleElement);
this.speed = speed;
}
@Override
public String attribute() {
return null;
}
@Override
public void tick(ParticleTickData particleTickData) {
double time = ((particleTickData.getDeg() * speed) % 360) / 360.0;
double y = y(time) * 2;
double x = (time - 0.5) * 2;
Vector vector = new Vector(x, 1.1 + y - (particleTickData.getPlayer().isSneaking() ? 0.5 : 0), 0.7);
vector.rotateAroundY(Math.toRadians(particleTickData.getPlayer().getLocation().getYaw() * -1));
vector.setX(-vector.getX());
vector.setZ(-vector.getZ());
Location location = particleTickData.getPlayer().getLocation().clone().add(vector);
ParticleTickData current = particleTickData.withLocation(location);
particleElement.tick(current);
}
}

Datei anzeigen

@ -3,8 +3,8 @@ package de.steamwar.lobby.particle.particles.custom;
import de.steamwar.lobby.particle.ParticleData; import de.steamwar.lobby.particle.ParticleData;
import de.steamwar.lobby.particle.ParticleEnum; import de.steamwar.lobby.particle.ParticleEnum;
import de.steamwar.lobby.particle.ParticleRequirement; import de.steamwar.lobby.particle.ParticleRequirement;
import de.steamwar.lobby.particle.WingDesign;
import de.steamwar.lobby.particle.elements.*; import de.steamwar.lobby.particle.elements.*;
import de.steamwar.lobby.particle.elements.custom.HearthBeat;
import de.steamwar.lobby.particle.elements.custom.NonMoving; import de.steamwar.lobby.particle.elements.custom.NonMoving;
import de.steamwar.lobby.particle.elements.custom.PulseShimmer; import de.steamwar.lobby.particle.elements.custom.PulseShimmer;
import lombok.AllArgsConstructor; import lombok.AllArgsConstructor;
@ -33,8 +33,8 @@ public enum CustomEasterParticle implements ParticleEnum {
Pulse_EASTER_1(new ParticleData(Material.RED_CANDLE, "PARTICLE_TEAM_PULSE_AURA_1", ParticleRequirement.easterEventSpecificTeam(210), Pulse_EASTER_1(new ParticleData(Material.RED_CANDLE, "PARTICLE_TEAM_PULSE_AURA_1", ParticleRequirement.easterEventSpecificTeam(210),
new Always(new NonMoving(new PulseShimmer(new SimpleParticle(Particle.FLAME, 0, 0, 0, 0, 1), 80, 2)))) new Always(new NonMoving(new PulseShimmer(new SimpleParticle(Particle.FLAME, 0, 0, 0, 0, 1), 80, 2))))
), ),
Pulse_Logo(new ParticleData(Material.ENDER_CHEST, "PARTICLE_TEAM_PULSE_LOGO", ParticleRequirement.easterEventSpecificTeam(210), Pulse_EASTER_3(new ParticleData(Material.APPLE, "PARTICLE_TEAM_PULSE_HEART_BEAT", ParticleRequirement.easterEventSpecificTeam(210),
new Always(new Delayed(new NonFlying(new Wing(new SimpleParticle(Particle.END_ROD, 0, 0, 0, 0, 1), 0.15, WingDesign.PL)), 80))) new Always(new NonFlying(new HearthBeat(new SimpleParticle(Particle.FLAME, 0, 0, 0, 0, 1), 80))))
), ),
; ;
public static ParticleEnum[] particles = values(); public static ParticleEnum[] particles = values();

Datei anzeigen

@ -24,6 +24,9 @@ public enum CustomTeamParticle implements ParticleEnum {
Pulse_2(new ParticleData(Material.WHITE_CANDLE, "PARTICLE_TEAM_PULSE_AURA_3", ParticleRequirement.specificTeam(210), Pulse_2(new ParticleData(Material.WHITE_CANDLE, "PARTICLE_TEAM_PULSE_AURA_3", ParticleRequirement.specificTeam(210),
new Always(new NonMoving(new PulseShimmer(new SimpleParticle(Particle.ENCHANTMENT_TABLE, 0, 0, 0, 0, 5), 80, 2)))) new Always(new NonMoving(new PulseShimmer(new SimpleParticle(Particle.ENCHANTMENT_TABLE, 0, 0, 0, 0, 5), 80, 2))))
), ),
Pulse_Logo(new ParticleData(Material.ENDER_CHEST, "PARTICLE_TEAM_PULSE_LOGO", ParticleRequirement.easterEventSpecificTeam(210),
new Always(new Delayed(new NonFlying(new Wing(new SimpleParticle(Particle.END_ROD, 0, 0, 0, 0, 1), 0.15, WingDesign.PL)), 80)))
),
; ;
public static ParticleEnum[] particles = values(); public static ParticleEnum[] particles = values();