Particle #4
@ -22,3 +22,18 @@ PARTICLE_ATTRIBUTE = §eAttribute§7:
|
||||
PARTICLE_UNLOCKED_BY = §eFreigeschaltet durch
|
||||
|
||||
PARTICLE_SELECT = §eKlicken zum auswählen
|
||||
YoyoNow markierte diese Unterhaltung als gelöst
Veraltet
|
||||
|
||||
PARTICLE_SNEEZE = §aSneeze
|
||||
PARTICLE_SMOKE = §7Smoke
|
||||
PARTICLE_FIRE = §cFeuer
|
||||
PARTICLE_WATER = §bWasser
|
||||
PARTICLE_HEART = §cHerzen
|
||||
PARTICLE_NOTES = §eNoten
|
||||
PARTICLE_NAUTILUS = §aNautilus
|
||||
PARTICLE_SNOWBALL = §fSnowball
|
||||
YoyoNow markierte diese Unterhaltung als gelöst
Veraltet
Lixfel
hat
Zum Auswählen klicken Zum Auswählen klicken
|
||||
PARTICLE_EFFECT = §5Effekt
|
||||
PARTICLE_CAMPFIRE = §7Rauch
|
||||
YoyoNow markierte diese Unterhaltung als gelöst
Lixfel
hat
Hier bei den Partikeln sind einige englisch benannt, obwohl es auch gute deutsche Begriffe dafür gibt. Da mal drüber schauen und Partikel (bei passenden deutschen Begriffen) eindeutschen Hier bei den Partikeln sind einige englisch benannt, obwohl es auch gute deutsche Begriffe dafür gibt. Da mal drüber schauen und Partikel (bei passenden deutschen Begriffen) eindeutschen
|
||||
PARTICLE_MAGIC = §5Magie
|
||||
YoyoNow markierte diese Unterhaltung als gelöst
Veraltet
Lixfel
hat
Rauch Rauch
|
||||
PARTICLE_ANGRY = §4Wut
|
||||
PARTICLE_SLIME = §aSchleim
|
||||
PARTICLE_MOB = §7Mob
|
53
src/de/steamwar/lobby/particle/DustSimpleParticle.java
Normale Datei
53
src/de/steamwar/lobby/particle/DustSimpleParticle.java
Normale Datei
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* This file is a part of the SteamWar software.
|
||||
*
|
||||
* Copyright (C) 2022 SteamWar.de-Serverteam
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.lobby.particle;
|
||||
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Particle;
|
||||
|
||||
public class DustSimpleParticle implements BaseParticle {
|
||||
|
||||
private final ParticleItem particleItem;
|
||||
private final Particle particle;
|
||||
private float vx;
|
||||
private float vy;
|
||||
private float vz;
|
||||
private double time = 1;
|
||||
|
||||
public DustSimpleParticle(ParticleItem particleItem, Particle particle, float vx, float vy, float vz, double time) {
|
||||
this.particleItem = particleItem;
|
||||
this.particle = particle;
|
||||
this.vx = vx;
|
||||
this.vy = vy;
|
||||
this.vz = vz;
|
||||
this.time = time;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ParticleItem getItem() {
|
||||
return particleItem;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void particle(ParticleData particleData) {
|
||||
Location location = particleData.getLocation().add(0.0, 0.2, 0.0);
|
||||
particleData.getWorld().spawnParticle(particle, location, 5, vx, vy, vz, time, getParticleDust());
|
||||
}
|
||||
}
|
48
src/de/steamwar/lobby/particle/PlayerParticle.java
Normale Datei
48
src/de/steamwar/lobby/particle/PlayerParticle.java
Normale Datei
@ -0,0 +1,48 @@
|
||||
/*
|
||||
* This file is a part of the SteamWar software.
|
||||
*
|
||||
* Copyright (C) 2022 SteamWar.de-Serverteam
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Affero General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Affero General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Affero General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
package de.steamwar.lobby.particle;
|
||||
|
||||
import de.steamwar.lobby.particle.mutator.LocationParticleMutator;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.bukkit.Material;
|
||||
import org.bukkit.Particle;
|
||||
|
||||
import static org.bukkit.Material.*;
|
||||
|
||||
@AllArgsConstructor
|
||||
public enum PlayerParticle {
|
||||
|
||||
SNEEZE(new SimpleParticle(new ParticleItem(SLIME_BLOCK, "PARTICLE_SNEEZE"), Particle.SNEEZE, 0.2F, 0.2F, 0.2F, 0.01)),
|
||||
SMOKE(new SimpleParticle(new ParticleItem(COBWEB, "PARTICLE_SMOKE"), Particle.SMOKE_NORMAL, 0.2F, 0.2F, 0.2F, 0.01)),
|
||||
FIRE(new SimpleParticle(new ParticleItem(LAVA_BUCKET, "PARTICLE_FIRE"), Particle.DRIP_LAVA)),
|
||||
WATER(new SimpleParticle(new ParticleItem(WATER_BUCKET, "PARTICLE_WATER"), Particle.DRIP_WATER)),
|
||||
HEART(new LocationParticleMutator(new SimpleParticle(new ParticleItem(RED_DYE, "PARTICLE_HEART"), Particle.HEART), location -> location.add(0, 2.2, 0))),
|
||||
NOTES(new LocationParticleMutator(new SimpleParticle(new ParticleItem(NOTE_BLOCK, "PARTICLE_NOTES"), Particle.NOTE), location -> location.add(0, 2.2, 0))),
|
||||
NAUTILUS(new SimpleParticle(new ParticleItem(NAUTILUS_SHELL, "PARTICLE_NAUTILUS"), Particle.NAUTILUS, 0.2F, 0.2F, 0.2F, 0.01)),
|
||||
SNOWBALL(new SimpleParticle(new ParticleItem(Material.SNOWBALL, "PARTICLE_SNOWBALL"), Particle.SNOWBALL, 0.2F, 0.2F, 0.2F, 0.01)),
|
||||
EFFECT(new DustSimpleParticle(new ParticleItem(GLASS_BOTTLE, "PARTICLE_EFFECT"), Particle.REDSTONE, 0F, 0.2F, 0F, 0.01)),
|
||||
CAMPFIRE(new SimpleParticle(new ParticleItem(Material.CAMPFIRE, "PARTICLE_CAMPFIRE"), Particle.CAMPFIRE_COSY_SMOKE, 0F, 0.2F, 0F, 0.01)),
|
||||
MAGIC(new SimpleParticle(new ParticleItem(CAULDRON, "PARTICLE_MAGIC"), Particle.CRIT_MAGIC, 0.2F, 0.2F, 0.2F, 0.01)),
|
||||
ANGRY(new SimpleParticle(new ParticleItem(REDSTONE_BLOCK, "PARTICLE_ANGRY"), Particle.VILLAGER_ANGRY, 0.2F, 0.2F, 0.2F, 0.01)),
|
||||
SLIME(new SimpleParticle(new ParticleItem(SLIME_BALL, "PARTICLE_SLIME"), Particle.SLIME)),
|
||||
MOB(new SimpleParticle(new ParticleItem(ZOMBIE_HEAD, "PARTICLE_MOB"), Particle.SPELL_MOB)),
|
||||
;
|
||||
private BaseParticle particle;
|
||||
}
|
@ -19,9 +19,6 @@
|
||||
|
||||
package de.steamwar.lobby.particle;
|
||||
|
||||
import de.steamwar.lobby.particle.BaseParticle;
|
||||
import de.steamwar.lobby.particle.ParticleData;
|
||||
import de.steamwar.lobby.particle.ParticleItem;
|
||||
import org.bukkit.Location;
|
||||
import org.bukkit.Particle;
|
||||
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Doppelring