GithubHelp home page GithubHelp logo

bytez1337 / particlelib Goto Github PK

View Code? Open in Web Editor NEW
274.0 274.0 27.0 380 KB

Multiversion spigot library supporting all particles and their data (1.8-1.19.3)

License: MIT License

Java 100.00%
bukkit minecraft minecraft-api minecraft-library minecraft-particleeffect minecraft-particles particle particle-api particleapi particleeffect particles spigot spigot-particle-api spigot-particles

particlelib's Introduction

GPG: BFB48287233CEFF3

particlelib's People

Contributors

bytez1337 avatar codacy-badger avatar cubbossa avatar dependabot[bot] avatar nichtstudiocode avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

particlelib's Issues

1.19 particles not displayed

Hello,

I am currently updating my plugin for 1.19 and seems like particles are not rendered
I'm running the latest spigot version and latest version of your dependency
image

My code:

            new ParticleBuilder(ParticleEffect.EXPLOSION_HUGE, player.getLocation())
                    .setOffsetY(1f)
                    .setSpeed(0.1f)
                    .setAmount(10)
                    .display();
            player.sendMessage("particle");

More info:

image
The particle section in f3 mode is always to 0

NullPointerException (Client) when using BlockTexture

Hello,

nice plugin! I'm using it for my own server on 1.16.3 and have now faced complications with Spigots internal legacy support. Plugins not using the api-version settings in plugin.yml (introduced in 1.13) may lead to load the old legacy support.
More information about this is provided by Spigot on https://www.spigotmc.org/wiki/plugin-yml/#optional-attributes under api-version section.
You mind adding the api-version to your plugin.yml in the next update?

api-version: 1.14

I used this code in a event listener method:

new ParticleBuilder(particle, location).setParticleData(new BlockTexture(Material.GLASS)).display();

It seems that getBlockData() in BlockTexture is causing this, because the call on material.name() goes to class CraftLegacy in the OBC. If edited the plugin.yml and it worked out of box. The call above is working and resolving to OBC Material.name() instead.

Thanks for this nice plugin and your work
~Kaonashi

Error on startup

After updating to v1.6.4, I started getting this error on startup:

[22:00:38] [Server thread/ERROR]: Could not load 'plugins/ParticleLib.jar' in folder 'plugins'
org.bukkit.plugin.InvalidDescriptionException: Invalid plugin.yml
	at org.bukkit.plugin.java.JavaPluginLoader.getPluginDescription(JavaPluginLoader.java:178) ~[patched_1.16.5.jar:git-Paper-783]
	at org.bukkit.plugin.SimplePluginManager.loadPlugins(SimplePluginManager.java:160) ~[patched_1.16.5.jar:git-Paper-783]
	at org.bukkit.craftbukkit.v1_16_R3.CraftServer.loadPlugins(CraftServer.java:393) ~[patched_1.16.5.jar:git-Paper-783]
	at net.minecraft.server.v1_16_R3.DedicatedServer.init(DedicatedServer.java:269) ~[patched_1.16.5.jar:git-Paper-783]
	at net.minecraft.server.v1_16_R3.MinecraftServer.w(MinecraftServer.java:1069) ~[patched_1.16.5.jar:git-Paper-783]
	at net.minecraft.server.v1_16_R3.MinecraftServer.lambda$a$0(MinecraftServer.java:291) ~[patched_1.16.5.jar:git-Paper-783]
	at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.io.FileNotFoundException: Jar does not contain plugin.yml
	... 7 more

The above error occurs every time I start up the server.
I am running Paper 1.16.5.

Particles duplicate in every world

Spigot Version: 1.8.8 Spigot
ParticleLib Version: 1.6.3

Description:
Using the method ParticleEffect#display(Location, float, float, float, float, int, ParticleData), the particles seem to duplicate to multiple worlds as seen in the pictures below. Worlds "world" and "world_nether" are shown. Each of the methods are called with "world" as the world set in the location parameter.
2021-07-09_15 29 43
2021-07-09_15 30 01

Stop Task uses Index instead of Integer object

Hey there. I just called the stopTask(taskId) Method in the Taskmanager. It removes the taskId from the running tasks arraylist but as its an int it will be interpreted as index and not as the id. I think casting it to Integer will fix the problem. Whats the idea of the running tasks arraylist? If its not important I would just call getScheduler().cancelTask(id) for now.

    public void stopTask(int taskId) {
        if (this.runningTasks.contains(taskId)) {
            Bukkit.getScheduler().cancelTask(taskId);
            this.runningTasks.remove(taskId);
        }
    }```

FIREWORKS_SPARK color

Hello! i want to ask a question
how should I customize the color of FIREWORKS_SPARK?
can it be defined color?
i tried notecolor and RegularColor it doesn't work
may I ask how it should be custom color?
thanks a lot!

Error when using particles in Paper 1.19.3

Hi, yesterday I updated my plugin (https://github.com/I2000C/NewAmazingLuckyBlocks) to support Paper 1.19.3 (https://api.papermc.io/v2/projects/paper/versions/1.19.3/builds/384/downloads/paper-1.19.3-384.jar).
However, when I try to use the VILLAGER_HAPPY particle, the next error happens:

error enderman soup

And this is the line 35 of my class EndermanSoup:
image

This error didn't happen in Paper 1.19.2.
Do you know what could be causing this error?

NOTE: I'm using the latest version (1.8.3) of ParticleLib (with is shaded in my plugin using Gradle).

Problem with ParticleMappings class

Hello. I have the code from particle library in my code, but since the last update it stopped working and doesn't cooperate at all, please help.

error:

19:45:41[WARN] [RotatingHeadsPRO] Plugin RotatingHeadsPRO v1.0.1 generated an exception while executing task 1762
java.lang.ExceptionInInitializerError: null
at xyz.xenondevs.particle.ParticleConstants.<clinit>(ParticleConstants.java:246) ~[RotatingHeadsPRO.jar:?]
at xyz.xenondevs.particle.ParticleEffect.getNMSObject(ParticleEffect.java:1328) ~[RotatingHeadsPRO.jar:?]
at java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Unknown Source) ~[?:?]
at java.util.stream.ReduceOps$3ReducingSink.accept(Unknown Source) ~[?:?]
at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[?:?]
at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[?:?]
at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[?:?]
at xyz.xenondevs.particle.ParticleEffect.<clinit>(ParticleEffect.java:1235) ~[RotatingHeadsPRO.jar:?]
at cz.gennario.rotatingheads.particles.ParticleLoader.loadFromString(ParticleLoader.java:22) ~[RotatingHeadsPRO.jar:?]
at cz.gennario.rotatingheads.system.Head.loadParticles(Head.java:194) ~[RotatingHeadsPRO.jar:?]
at cz.gennario.rotatingheads.system.Head.<init>(Head.java:130) ~[RotatingHeadsPRO.jar:?]
at cz.gennario.rotatingheads.Main.loadHeads(Main.java:165) ~[RotatingHeadsPRO.jar:?]
at cz.gennario.rotatingheads.Main$1.run(Main.java:118) ~[RotatingHeadsPRO.jar:?]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftTask.run(CraftTask.java:101) ~[server.jar:git-Purpur-1428]
at org.bukkit.craftbukkit.v1_17_R1.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:57) ~[server.jar:git-Purpur-1428]
at com.destroystokyo.paper.ServerSchedulerReportingWrapper.run(ServerSchedulerReportingWrapper.java:22) ~[server.jar:git-Purpur-1428]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[?:?]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[?:?]
at java.lang.Thread.run(Unknown Source) ~[?:?]
Caused by: java.lang.RuntimeException: Could not load mappings
at xyz.xenondevs.particle.ParticleMappings.<clinit>(ParticleMappings.java:62) ~[RotatingHeadsPRO.jar:?]
... 23 more
Caused by: java.lang.NullPointerException
at java.util.Objects.requireNonNull(Unknown Source) ~[?:?]
at xyz.xenondevs.particle.ParticleMappings.<clinit>(ParticleMappings.java:53) ~[RotatingHeadsPRO.jar:?]
... 23 more

Add ParticleEffect#getProperties()

Hello, it would be interesting to make the "PropertyType[] properties" variable accessible from a method. I'm currently accessing it from reflection.

Support

Hello, is there a installation guide? Its very helpful is there is.

Please reply :)

Issue for Spigot version 1.8.8!

Hello! I'm a developer over at mc.renatusnetwork.com and are working on a sequel for one of our top games! Due to the restrictions of combat on minecraft versions past 1.8, we have to run our gamemode off this version because of this, it makes us run spigot on 1.8 as well. As you may know spigot 1.8 simply has little to no particle control and in order to make this game as big as we want, we definitely need to get more particles in the library and running. With that, we found this plugin but got errors when trying to actually use the particles. I would appreciate any help with solving this issue and allowing us to get more particles. Thank you!

image_2022-05-13_214703263

P.S, it should be noted that we are installing the project through maven.

Particles are displaying in all worlds

Hello, i trying to display a Helix with particles in one world and one location, but my code with your library is displaying the helix in all worlds in the same X , Y and Z. (Video https://www.youtube.com/watch?v=jr_dwEfkwiU)

Can you help me?

private int createNPCHelix(Entity npc) {
		if(npc == null) return 0;
		final int radius = 1;
		Location npcLocation = npc.getLocation();
		List<Object> packets = new ArrayList<>();
		ParticleBuilder particleBuilder = new ParticleBuilder(particle);
		for(int t = 0; t < 20; t++) {
			double x = radius * Math.cos(t);
			double z = radius * Math.sin(t);
			packets.add(particleBuilder.setLocation(npcLocation.clone().add(x, 0.5, z)).toPacket());
		}
		ParticleTask task = new GlobalTask(packets, 3);
		return TaskManager.getTaskManager().startTask(task);
	}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.