5555 */
5656public class TickRunnable extends BukkitRunnable {
5757
58+ private static Particle DUST ;
59+
60+ static {
61+ try {
62+ DUST = Particle .valueOf ("REDSTONE" );
63+ } catch (Exception ex ) {
64+ DUST = Particle .valueOf ("DUST" );
65+ }
66+ }
67+
5868 private static final int PLAYER_RANGE = 15 ;
5969 private static final int PARTICLE_RANGE = 10 ;
6070 private static final int PARTICLE_LIMIT = 800 ;
@@ -231,26 +241,26 @@ public static void spawnParticlesOnBlock(@NotNull Player player, @NotNull Block
231241 double x = block .getX (), y = block .getY (), z = block .getZ (), a = 1D ;
232242 if (V_1_13 .isSupported ()) {
233243 var dust = new DustOptions (color , 1 );
234- player .spawnParticle (Particle . REDSTONE , x , y , z , 0 , 0 , 0 , 0 , dust );
235- player .spawnParticle (Particle . REDSTONE , x + a , y , z , 0 , 0 , 0 , 0 , dust );
236- player .spawnParticle (Particle . REDSTONE , x + a , y , z + a , 0 , 0 , 0 , 0 , dust );
237- player .spawnParticle (Particle . REDSTONE , x , y , z + a , 0 , 0 , 0 , 0 , dust );
238- player .spawnParticle (Particle . REDSTONE , x , y + a , z , 0 , 0 , 0 , 0 , dust );
239- player .spawnParticle (Particle . REDSTONE , x + a , y + a , z , 0 , 0 , 0 , 0 , dust );
240- player .spawnParticle (Particle . REDSTONE , x + a , y + a , z + a , 0 , 0 , 0 , 0 , dust );
241- player .spawnParticle (Particle . REDSTONE , x , y + a , z + a , 0 , 0 , 0 , 0 , dust );
244+ player .spawnParticle (DUST , x , y , z , 0 , 0 , 0 , 0 , dust );
245+ player .spawnParticle (DUST , x + a , y , z , 0 , 0 , 0 , 0 , dust );
246+ player .spawnParticle (DUST , x + a , y , z + a , 0 , 0 , 0 , 0 , dust );
247+ player .spawnParticle (DUST , x , y , z + a , 0 , 0 , 0 , 0 , dust );
248+ player .spawnParticle (DUST , x , y + a , z , 0 , 0 , 0 , 0 , dust );
249+ player .spawnParticle (DUST , x + a , y + a , z , 0 , 0 , 0 , 0 , dust );
250+ player .spawnParticle (DUST , x + a , y + a , z + a , 0 , 0 , 0 , 0 , dust );
251+ player .spawnParticle (DUST , x , y + a , z + a , 0 , 0 , 0 , 0 , dust );
242252 } else {
243253 double r = (color .getRed () - 0.0001 ) / 255D ;
244254 double g = (color .getGreen () - 0.0001 ) / 255D ;
245255 double b = (color .getBlue () - 0.0001 ) / 255D ;
246- player .spawnParticle (Particle . REDSTONE , x , y , z , 0 , r , g , b , 1 );
247- player .spawnParticle (Particle . REDSTONE , x + a , y , z , 0 , r , g , b , 1 );
248- player .spawnParticle (Particle . REDSTONE , x + a , y , z + a , 0 , r , g , b , 1 );
249- player .spawnParticle (Particle . REDSTONE , x , y , z + a , 0 , r , g , b , 1 );
250- player .spawnParticle (Particle . REDSTONE , x , y + a , z , 0 , r , g , b , 1 );
251- player .spawnParticle (Particle . REDSTONE , x + a , y + a , z , 0 , r , g , b , 1 );
252- player .spawnParticle (Particle . REDSTONE , x + a , y + a , z + a , 0 , r , g , b , 1 );
253- player .spawnParticle (Particle . REDSTONE , x , y + a , z + a , 0 , r , g , b , 1 );
256+ player .spawnParticle (DUST , x , y , z , 0 , r , g , b , 1 );
257+ player .spawnParticle (DUST , x + a , y , z , 0 , r , g , b , 1 );
258+ player .spawnParticle (DUST , x + a , y , z + a , 0 , r , g , b , 1 );
259+ player .spawnParticle (DUST , x , y , z + a , 0 , r , g , b , 1 );
260+ player .spawnParticle (DUST , x , y + a , z , 0 , r , g , b , 1 );
261+ player .spawnParticle (DUST , x + a , y + a , z , 0 , r , g , b , 1 );
262+ player .spawnParticle (DUST , x + a , y + a , z + a , 0 , r , g , b , 1 );
263+ player .spawnParticle (DUST , x , y + a , z + a , 0 , r , g , b , 1 );
254264 }
255265 }
256266}
0 commit comments