Hopeful fix for rare errors where location world somehow changes in the middle of trying to show a smoke effect
This commit is contained in:
parent
02fa6ab2c1
commit
3ff3e61dd9
@ -34,7 +34,7 @@ public class SmokeUtil
|
|||||||
public static void spawnSingle(Location location, int direction)
|
public static void spawnSingle(Location location, int direction)
|
||||||
{
|
{
|
||||||
if (location == null) return;
|
if (location == null) return;
|
||||||
location.getWorld().playEffect(location, Effect.SMOKE, direction);
|
location.getWorld().playEffect(location.clone(), Effect.SMOKE, direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void spawnSingle(Location location)
|
public static void spawnSingle(Location location)
|
||||||
@ -70,7 +70,7 @@ public class SmokeUtil
|
|||||||
int singles = (int) Math.floor(thickness*9);
|
int singles = (int) Math.floor(thickness*9);
|
||||||
for (int i = 0; i < singles; i++)
|
for (int i = 0; i < singles; i++)
|
||||||
{
|
{
|
||||||
spawnSingleRandom(location);
|
spawnSingleRandom(location.clone());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user