Skip to content

Commit c339963

Browse files
committed
fix: particle examples
1 parent c0cea99 commit c339963

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/content/docs/paper/dev/api/particles.mdx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ As the name implies, this type of particle converges to a single point (location
409409
Offset arguments are used to determine the relative spawn location of the particle.
410410
The particle will then travel from this relative location to the supplied location.
411411

412-
An example where an enchantment particle will spawn at `someLocation.clone().add(-2,0,2)` and travel to `someLocation`:
412+
An example where an enchantment particle will spawn at `someLocation.clone().add(-2, 0, 2)` and travel to `someLocation`:
413413
<Tabs syncKey="spawn-type">
414414
<TabItem label="ParticleBuilder">
415415
```java
@@ -541,7 +541,7 @@ Example of spawning a sculk charge particle at 45° that doesn't move:
541541
</TabItem>
542542
<TabItem label="spawnParticle">
543543
```java
544-
someWorld.spawnParticle(Particle.SCULK_CHARGE, someLocation, 1, (float) Math.toRadians(45));
544+
someWorld.spawnParticle(Particle.SCULK_CHARGE, someLocation, 1, 0, 0, 0, 0, (float) Math.toRadians(45));
545545
```
546546
</TabItem>
547547
</Tabs>
@@ -670,21 +670,21 @@ one with a scale of `2.0` right after:
670670
<Tabs syncKey="spawn-type">
671671
<TabItem label="ParticleBuilder">
672672
```java
673-
ParticleBuilder sweepAttackParticleBuilder = Particle.EXPLOSION.builder()
673+
ParticleBuilder sweepAttackParticleBuilder = Particle.SWEEP_ATTACK.builder()
674674
.location(someLocation)
675675
.count(0)
676676
.receivers(32, true)
677677
.spawn();
678678

679-
Bukkit.getScheduler().runTaskLater(ParticlePlugin.getPlugin(ParticlePlugin.class),
679+
Bukkit.getScheduler().runTaskLater(plugin,
680680
() -> sweepAttackParticleBuilder.offset(-2.0, 0, 0).spawn(), 10);
681681
```
682682
</TabItem>
683683
<TabItem label="spawnParticle">
684684
```java
685685
someWorld.spawnParticle(Particle.SWEEP_ATTACK, someLocation, 0);
686686

687-
Bukkit.getScheduler().runTaskLater(ParticlePlugin.getPlugin(ParticlePlugin.class),
687+
Bukkit.getScheduler().runTaskLater(plugin,
688688
() -> someWorld.spawnParticle(Particle.SWEEP_ATTACK, someLocation, 0, -2.0, 0, 0), 10);
689689
```
690690
</TabItem>
@@ -695,7 +695,7 @@ one with a scale of `2.0` right after:
695695
### Explosion particles
696696
The `EXPLOSION` particle's scale is calculated as `2.0 * (1.0 - offsetX * 0.5)`.
697697

698-
An example where two sweep attack particles will spawn at `someLocation`. First one with a scale of `1.0` and the second
698+
An example where two explosion particles will spawn at `someLocation`. First one with a scale of `1.0` and the second
699699
one with a scale of `4.0` right after:
700700
<Tabs syncKey="spawn-type">
701701
<TabItem label="ParticleBuilder">
@@ -707,15 +707,15 @@ one with a scale of `4.0` right after:
707707
.receivers(32, true)
708708
.spawn();
709709

710-
Bukkit.getScheduler().runTaskLater(ParticlePlugin.getPlugin(ParticlePlugin.class),
710+
Bukkit.getScheduler().runTaskLater(plugin,
711711
() -> explosionParticleBuilder.offset(-2.0, 0, 0).spawn(), 10);
712712
```
713713
</TabItem>
714714
<TabItem label="spawnParticle">
715715
```java
716716
someWorld.spawnParticle(Particle.EXPLOSION, someLocation, 0, 1, 0, 0);
717717

718-
Bukkit.getScheduler().runTaskLater(ParticlePlugin.getPlugin(ParticlePlugin.class),
718+
Bukkit.getScheduler().runTaskLater(plugin,
719719
() -> someWorld.spawnParticle(Particle.EXPLOSION, someLocation, 0, -2.0, 0, 0), 10);
720720
```
721721
</TabItem>

0 commit comments

Comments
 (0)