@@ -1612,20 +1612,33 @@ public String docs() {
16121612 + " array defining the characteristics of the particle to be spawned. The array requires the"
16131613 + " particle name under the key \" particle\" . ----"
16141614 + " Possible particle types: " + StringUtils .Join (MCParticle .types (), ", " , ", or " , " or " ) + "."
1615- + " <br><br>Some particles have more specific keys and/or special behavior, but the common keys for"
1616- + " the particle array are \" count\" (usually the number of particles to be spawned), \" speed\" "
1617- + " (usually the velocity of the particle), \" xoffset\" , \" yoffset\" , and \" zoffset\" "
1618- + " (usually the ranges from center within which the particle may be offset on that axis)."
1619- + " <br><br>BLOCK_DUST, BLOCK_CRACK, BLOCK_CRUMBLE, BLOCK_MARKER, DUST_PILLAR, and FALLING_DUST"
1615+ + "<br>"
1616+ + "<br>Some particles have more specific keys and/or special behavior, but the common keys for"
1617+ + " the particle array are:"
1618+ + "<br>"
1619+ + "<br>'''count''' : (int) Usually the number of particles to be spawned. A value of 0 (default)"
1620+ + " can create different particle data behavior than larger numbers."
1621+ + "<br>'''speed''' : (double) Usually the velocity of the particle. Can be other things (size for"
1622+ + " EXPLOSION_LARGE) depending on other values, like the particle type and count."
1623+ + "<br>'''xoffset''' : (double) Usually the random offset width on the x-axis. An offset can also"
1624+ + " be other things (velocity vector's x component for SMOKE_NORMAL) depending on other values,"
1625+ + " like the particle type and count."
1626+ + "<br>'''yoffset''' : (double) Usually the random offset width on the y-axis."
1627+ + "<br>'''zoffset''' : (double) Usually the random offset width on the z-axis."
1628+ + "<br>'''force''' : (boolean) Extends visibility range from 32 to 512 meters and encourages"
1629+ + " clients to render it despite client settings."
1630+ + "<br>"
1631+ + "<br>BLOCK_DUST, BLOCK_CRACK, BLOCK_CRUMBLE, BLOCK_MARKER, DUST_PILLAR, and FALLING_DUST"
16201632 + " particles can take a block type name parameter under the key \" block\" (default: STONE)."
1621- + " <br>ITEM_CRACK particles can take an item array or name under the key \" item\" (default: STONE)."
1622- + " <br>REDSTONE and SPELL_MOB particles take an RGB color array (each 0 - 255) or name under the key \" color\" "
1623- + " (defaults to RED for REDSTONE, WHITE for SPELL_MOB)."
1624- + " <br>DUST_COLOR_TRANSITION particles take a \" tocolor\" in addition \" color\" ."
1625- + " <br>VIBRATION particles take a \" destination\" location array or entity UUID."
1626- + " <br>SCULK_CHARGE particles take an \" angle\" in radians. (defaults to 0.0)"
1627- + " <br>SHRIEK particles take an integer \" delay\" in ticks before playing. (defaults to 0)"
1628- + " <br>TRAIL particles take a \" target\" location array, a \" color\" , and a \" duration\" integer in ticks." ;
1633+ + "<br>ITEM_CRACK particles can take an item array or name under the key \" item\" (default: STONE)."
1634+ + "<br>REDSTONE and SPELL_MOB particles take an RGB color array (each 0 - 255) or name under the key"
1635+ + " \" color\" (defaults to RED for REDSTONE, WHITE for SPELL_MOB)."
1636+ + "<br>DUST_COLOR_TRANSITION particles take a \" tocolor\" in addition \" color\" ."
1637+ + "<br>VIBRATION particles take a \" destination\" location array or entity UUID."
1638+ + "<br>SCULK_CHARGE particles take an \" angle\" in radians. (defaults to 0.0)"
1639+ + "<br>SHRIEK particles take an integer \" delay\" in ticks before playing. (defaults to 0)"
1640+ + "<br>TRAIL particles take a \" target\" location array, a \" color\" as an RGB array or name, and a"
1641+ + " \" duration\" integer in ticks." ;
16291642 }
16301643
16311644 @ Override
@@ -1653,6 +1666,7 @@ public Mixed exec(Target t, com.laytonsmith.core.environments.Environment enviro
16531666 double offsetY = 0.0 ;
16541667 double offsetZ = 0.0 ;
16551668 double speed = 0.0 ;
1669+ boolean force = false ;
16561670 Object data = null ;
16571671
16581672 if (args [1 ].isInstanceOf (CArray .TYPE )) {
@@ -1679,6 +1693,9 @@ public Mixed exec(Target t, com.laytonsmith.core.environments.Environment enviro
16791693 if (pa .containsKey ("speed" )) {
16801694 speed = ArgumentValidation .getDouble (pa .get ("speed" , t ), t );
16811695 }
1696+ if (pa .containsKey ("force" )) {
1697+ force = ArgumentValidation .getBooleanObject (pa .get ("force" , t ), t );
1698+ }
16821699
16831700 data = ObjectGenerator .GetGenerator ().particleData (p , l , pa , t );
16841701
@@ -1699,14 +1716,14 @@ public Mixed exec(Target t, com.laytonsmith.core.environments.Environment enviro
16991716 }
17001717 for (Mixed playerName : players .asList ()) {
17011718 player = Static .GetPlayer (playerName , t );
1702- player .spawnParticle (l , p , count , offsetX , offsetY , offsetZ , speed , data );
1719+ player .spawnParticle (l , p , count , offsetX , offsetY , offsetZ , speed , force , data );
17031720 }
17041721 } else {
17051722 player = Static .GetPlayer (args [2 ], t );
1706- player .spawnParticle (l , p , count , offsetX , offsetY , offsetZ , speed , data );
1723+ player .spawnParticle (l , p , count , offsetX , offsetY , offsetZ , speed , force , data );
17071724 }
17081725 } else {
1709- l .getWorld ().spawnParticle (l , p , count , offsetX , offsetY , offsetZ , speed , data );
1726+ l .getWorld ().spawnParticle (l , p , count , offsetX , offsetY , offsetZ , speed , force , data );
17101727 }
17111728 } catch (IllegalArgumentException ex ) {
17121729 throw new CREIllegalArgumentException ("Given unsupported data for particle type " + p .name (), t );
0 commit comments