Minecraft ParticleNativeAPI [1.7+] mod 2026 download
logo
minecraft mod ParticleNativeAPI [1.7+]

ParticleNativeAPI [1.7+]

Game Version: 1.19.3
Total Downloads: 901
Updated: Dec 29, 2022
Created: Mar 24, 2020
Download ParticleNativeAPI [1.7+]Download Earlier Versions

Earlier Versions

Name Size Uploaded Game Version Downloads
ParticleNativeAPI 4.0.0 +3 More+3 Others release 304.41 KB Dec 29, 2022 1.19.3 7 download ParticleNativeAPI [1.7+] ParticleNativeAPI 4.0.0
+3 More+3 Others releaseDownload
ParticleNativeAPI 3.3.2 +3 More+3 Others release 262.96 KB Dec 28, 2022 1.19.3 3 download ParticleNativeAPI [1.7+] ParticleNativeAPI 3.3.2
+3 More+3 Others releaseDownload
ParticleNativeAPI 3.3.1 +3 More+3 Others release 254.89 KB Jul 3, 2022 1.19 52 download ParticleNativeAPI [1.7+] ParticleNativeAPI 3.3.1
+3 More+3 Others releaseDownload
ParticleNativeAPI 3.3.0 +3 More+3 Others release 244.29 KB Jun 19, 2022 1.19 14 download ParticleNativeAPI [1.7+] ParticleNativeAPI 3.3.0
+3 More+3 Others releaseDownload
ParticleNativeAPI 3.2.1 +3 More+3 Others release 235.45 KB May 10, 2022 1.18 21 download ParticleNativeAPI [1.7+] ParticleNativeAPI 3.2.1
+3 More+3 Others releaseDownload
ParticleNativeAPI 3.2.0 +3 More+3 Others release 235.39 KB Dec 26, 2021 1.18 45 download ParticleNativeAPI [1.7+] ParticleNativeAPI 3.2.0
+3 More+3 Others releaseDownload
ParticleNativeAPI 3.1.0 +3 More+3 Others release 231.39 KB Jun 20, 2021 1.17 60 download ParticleNativeAPI [1.7+] ParticleNativeAPI 3.1.0
+3 More+3 Others releaseDownload
ParticleNativeAPI 3.0.0 +3 More+3 Others release 177.77 KB Sep 4, 2020 1.16 92 download ParticleNativeAPI [1.7+] ParticleNativeAPI 3.0.0
+3 More+3 Others releaseDownload
ParticleNativeAPI 2.0.3 release 211.50 KB Jul 20, 2020 1.16 40 download ParticleNativeAPI [1.7+] ParticleNativeAPI 2.0.3 releaseDownload
ParticleNativeAPI 2.0.2 release 214.93 KB Jun 26, 2020 1.16 48 download ParticleNativeAPI [1.7+] ParticleNativeAPI 2.0.2 releaseDownload
ParticleNativeAPI 2.0.1 release 215.59 KB Jun 16, 2020 1.15 32 download ParticleNativeAPI [1.7+] ParticleNativeAPI 2.0.1 releaseDownload
ParticleNativeAPI 2.0.0 release 207.58 KB May 24, 2020 1.15 37 download ParticleNativeAPI [1.7+] ParticleNativeAPI 2.0.0 releaseDownload
ParticleNativeAPI 1.3.1 release 205.08 KB May 23, 2020 1.15 37 download ParticleNativeAPI [1.7+] ParticleNativeAPI 1.3.1 releaseDownload
ParticleNativeAPI 1.3.0 release 202.07 KB May 22, 2020 1.15 33 download ParticleNativeAPI [1.7+] ParticleNativeAPI 1.3.0 releaseDownload
ParticleNativeAPI 1.2.0 release 200.25 KB May 17, 2020 1.15 38 download ParticleNativeAPI [1.7+] ParticleNativeAPI 1.2.0 releaseDownload
ParticleNariveAPI 1.1.1 release 198.44 KB May 11, 2020 1.15 36 download ParticleNativeAPI [1.7+] ParticleNariveAPI 1.1.1 releaseDownload
ParticleNativeAPI 1.1.0.0 release 195.70 KB Mar 27, 2020 1.14 39 download ParticleNativeAPI [1.7+] ParticleNativeAPI 1.1.0.0 releaseDownload
ParticleNativeAPI-1.0.0.0 release 192.47 KB Mar 24, 2020 1.14 33 download ParticleNativeAPI [1.7+] ParticleNativeAPI-1.0.0.0 releaseDownload

Description

Share this:

ParticleNativeAPI

ParticleNativeAPI is a particle spawning API for Spigot and Bukkit server designed to be:

  • fast (comparable to native Java written code!),
  • cross-version compatible down to MC 1.7 (includes removed particles!),
  • flexible in use,
  • relatively easy and convenient to use.

On top of that, this particle API supports spawning certain particles:

  • of blocks,
  • of items,
  • with color (only 1 particle per packet),
  • with color and size,
  • with transition color and size,
  • with certain motion (only 1 particle per packet)

… and still be fast and cross version compatible between Minecraft updates.

colors

Entire API structure targets to reflect how Minecraft handles sending packets, however it uses no Reflection to do so!

How to use

Spawning particle is made in 2 easy steps:

  • create particle packet, using particles lists,
  • send it, using particles lists.

That's it.

// get API from plugin instance
ParticleNativeAPI api = ParticleNativePlugin.getAPI();

// ... or generate it using core module ("this" is Your plugin instance)
api = ParticleNativeCore.loadAPI(this);

// use particles list (cache it for easier use)
// as an example, Particles_1_8 will be used
Particles_1_8 particles = api.getParticles_1_8();

Player player = ...;
Location loc = player.getLocation();

// create a particle packet
Object packet = particles.FLAME().packet(true, loc);

// send this packet to a player
particles.sendPacket(player, packet);

To whoever you want to send this packet or on what conditions is up to You. To read more about particle lists above, I encourage you to read detailed tutorial on my github repository here.

Why is it fast

It internally uses ObjectWeb's ASM library to generate version-dependent Java code instead of using Reflection.
Reflection is only used to recognize on which Minecraft version should API be generated, at server start-up phase.

Simple benchmark

I've made 3 tests on localhost (MC 1.14.3) to measure execution time of 100 000 particles in random locations around my character.

All tests were made after an extensive warmup of executing them several times to allow JVM to optimize frequently used code.

All code used to test is found on my repository here.

Tests consist of 4 methods to send particle:

  • Version specific – uses directly NMS and OBC to send packet,
  • ParticleNativeAPI – uses this api to send particle with simple method,
  • SpigotAPI – uses Spigot API's spawnParticle method (to player) to send effect,
  • Reflection – uses NMS and OBC reflected classes (with accessibility set to true) to send particle. Those classes/methods/fields are cached for multiple use.

Test 1Test 2Test 3

As you can see, at least on my machine, ParticleNativeAPI is even faster than Spigot API and very close in speed to version specific implementation.

Minimal usage example overview 

public class PluginName extends JavaPlugin {

   // cache particles list for later use
   private Particles_1_8 particles;

   @Override
   public void onEnable() {
       // check if everything is fine
       if (!ParticleNativePlugin.isValid()) {
           getLogger().log(Level.SEVERE, "Error occurred while loading dependency.");
           this.setEnabled(false);
           return;
       }
       
       // get API
       ParticleNativeAPI api = ParticleNativePlugin.getAPI();

       // choose particles lists you want to use
       particles = api.getParticles_1_8();
   }

   // example usage
   @Override
   public boolean onCommand(CommandSender sender, Command command, String label, String[] args) {
       if (!command.getName().equalsIgnoreCase("somecmd")) return true;

       if (!(sender instanceof Player)) {
           sender.sendMessage(ChatColor.RED + "You must be player to use this command!");
           return true;
       }

       Player pSender = (Player) sender;
       Location loc = pSender.getLocation();

       // create a particle packet
       Object packet = particles.FLAME().packet(true, loc);

       // send this packet to all players within 30 blocks
       particles.sendPacket(loc, 30D, packet);

       return true;
   }
}

For server owners

If you were redirected here by other plugin, just include plugin's jar in plugins folder.
This library doesn't do anything on it's own besides startup phase. It may be used as a dependency by other plugins.

For plugin developers
A detailed tutorial with various examples can be found on my github repository here.

 

Maven for core API with example setup (official repository):

   <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>3.2.3</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>

                        <configuration>
                            <!-- replace shaded version with main artifact -->
                            <shadedArtifactAttached>false</shadedArtifactAttached>

                            <!-- relocate API classes to avoid same-classpath-conflicts -->
                            <!-- with other plugins using this core API -->
                            <relocations>
                                <relocation>
                                    <pattern>com.github.fierioziy.particlenativeapi</pattern>
                                    <shadedPattern>me.yourpluginpackage.particleapi</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
          
            <!--  other plugins ... -->
        </plugins>
      
        <!-- other build config ... -->
    </build>
    <dependencies>
        <dependency>
            <groupId>com.github.fierioziy.particlenativeapi</groupId>
            <artifactId>ParticleNativeAPI-core</artifactId>
            <version>3.1.0</version>
            <scope>compile</scope>
        </dependency>

        <!-- other dependencies -->
    </dependencies>

Maven for plugin reference setup (official repository):

    <dependencies>
        <dependency>
            <groupId>com.github.fierioziy.particlenativeapi</groupId>
            <artifactId>ParticleNativeAPI-plugin</artifactId>
            <version>3.1.0</version>
            <scope>provided</scope>
        </dependency>

        <!-- other dependencies -->
    </dependencies>

 

Request feature or report an issue

If you found a bug or just want to request a feature, use an issue tracker on my github here.

Source code

All plugin's source code is present on my github repository here.

Compatibility
Tested Spigot versions: 1.7.10, 1.8.8, 1.12, 1.14.3, 1.15.2, 1.16.1, 1.17.

Plugin should be compatible at least between MC 1.7 and MC 1.17 for now.

It should work on Bukkit (CraftBukkit) as well.

It will only needs update if new feature/bugfix were added or there were Minecraft changes in packet handling in future versions.

Keep in mind, that this API will favor backward compatibility
with supported MC versions range instead of forward compatibility of itself.

It means, that future API updates might break forward compatibility with older versions
of itself just to remain backward compatibility with supported MC versions.

That said, next API updates might sometimes force some changes
in Your code to again be compatible with newer API version.

Comments

Add a comment