Skip to content

Commit

Permalink
Fixed legacy particles test
Browse files Browse the repository at this point in the history
  • Loading branch information
fulminazzo committed Dec 23, 2024
1 parent 90fd034 commit 707c082
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,15 @@ private static Particle[] getTestLegacyParticles() {
particles.add(LegacyParticleType.TILE_BREAK.create(new MaterialDataOption(Material.STONE.name())));
particles.add(LegacyParticleType.TILE_DUST.create(new MaterialDataOption(Material.STONE.name(), 10)));
particles.add(LegacyParticleType.POTION_BREAK.create(new PotionParticleOption(new Potion(PotionType.JUMP.name()))));
// Remove effects not belonging to current Minecraft version
particles.removeIf(p -> {
try {
Effect.valueOf(p.getType());
return false;
} catch (IllegalArgumentException e) {
return true;
}
});
return particles.toArray(new Particle[0]);
}

Expand Down

0 comments on commit 707c082

Please sign in to comment.