SteamWar/BauSystem2.0
Archiviert
12
0

Add ObserverTracer direction particle for spawnParticle

Signed-off-by: yoyosource <yoyosource@nidido.de>
Dieser Commit ist enthalten in:
yoyosource 2021-06-20 08:48:24 +02:00
Ursprung d3249f8968
Commit 84aa02ebfe

Datei anzeigen

@ -110,6 +110,11 @@ public class ObserverTracer {
private void spawnParticle(Player player, Location location, Block block) {
player.spawnParticle(Particle.FLAME, location.clone().add(0.5, 0.5, 0.5), 1, 0, 0, 0, 0);
if (block.getType() == Material.OBSERVER) {
BlockFace blockFace = ((Observer) block.getBlockData()).getFacing();
blockFace = blockFace.getOppositeFace();
player.spawnParticle(Particle.FLAME, location.clone().add(0.5 + blockFace.getModX() / 5.0, 0.5 + blockFace.getModY() / 5.0, 0.5 + blockFace.getModZ() / 5.0), 1, 0, 0, 0, 0);
}
}
private void calculateObserver(Block block) {