How would i go about creating the particles in the video? like making them go up and down and up again?
public static List<Location> getHollowCube(final Location corner1, final Location corner2) {
final List<Location> result = new ArrayList<Location>();
final World world = corner1.getWorld();
final double minX = Math.min(corner1.getX(), corner2.getX());
final double minY = Math.min(corner1.getY(), corner2.getY());
final double minZ = Math.min(corner1.getZ(), corner2.getZ());
final double maxX = Math.max(corner1.getX(), corner2.getX());
final double maxZ = Math.max(corner1.getZ(), corner2.getZ());
for (double x = minX; x <= maxX; x += 0.1) {
result.add(new Location(world, x, minY, minZ));
result.add(new Location(world, x, minY, maxZ));
}
for (double z = minZ; z <= maxZ; z += 0.1) {
result.add(new Location(world, minX, minY, z));
result.add(new Location(world, maxX, minY, z));
}
return result;
}```
```java
for (final Location location : GenUtils.getHollowCube(genBlock.getLocation().clone().add(-0.1, 0, -0.1), genBlock.getLocation().clone().add(1.1, 1.1, 1.1))) {
genBlock.getWorld().spawnParticle(Particle.REDSTONE, location, 2, (Object) new Particle.DustOptions(Color.PURPLE, 1.0f));
}
for (final Location location : GenUtils.getHollowCube(genBlock.getLocation().clone().add(-0.1, 1, -0.1), genBlock.getLocation().clone().add(1.1, 1.1 + 1, 1.1))) {
genBlock.getWorld().spawnParticle(Particle.REDSTONE, location, 2, (Object) new Particle.DustOptions(Color.PURPLE, 1.0f));
}```
https: