想要创建诸如圆锥体、立方体、球体和漩涡等酷炫的粒子特效,却不知从何下手?那么这款模组正是为你准备的! 它主要是一个开发工具,但作为玩家,你也可以通过命令来体验各种效果,特别是在用代码实现之前先进行预览。该模组完全在服务端运行,因此你无需在客户端安装。正如你所猜到的那样,它灵感来源于 EffectLib 插件。
当前可用的特效:
- [3D] 动画球体、球体、长方体、漩涡、圆锥体、圆环
- [2D] 弧线、直线、动画圆形、彩色及黑白图像、文字
目前该模组处于测试阶段(Beta),这意味着某些功能可能仍会崩溃或发生变化,且部分特效尚未添加。 未来可能会推出 Forge/NeoForge 版本,但我希望先在 Fabric/Quilt 上完成所有工作后再开始移植。抱歉!(在此期间,它很可能可以通过 Syntra 连接器使用)
与他人一起在服务器上游玩是体验这款模组的最佳方式,因此你可以在 Nodecraft 上使用优惠码 EMALIGHTDEV 享受折扣!
如何使用此模组
仅就模组本身而言,它是专为开发者设计的。但别担心,如果你是一名玩家并希望尝试所有这些令人惊叹的效果(尽管目前存在一些限制),你可以安装 ParticleAnimationLibCommands 来实现。
是的,我知道这些命令有点长且令人困惑,这就是为什么我还开始编写一份维基文档,你可以在此处找到:这里!
如何创建特效?
所有特效都位于 effects 包中,你可以通过创建新的特效对象来新建一个特效,也可以使用其构建器方法,类似于 Block 属性的用法。
然后,你可以使用你喜欢的 #run() 方法来激活特效:
//Constructor pseudocode with runFor example
Effect effect = new Effect(ServerWorld world, ParticleEffect effect, Vec3d originPos, int particles, Other stuff...)
effect.runFor(5);
//Builder pseudocode with run and setIterations example (20 ticks = 1 second)
Effect effect = Effect.builder(ServerWorld world, ParticleEffect effect, Vec3d originPos).particles(10).anotherOption(true).build;
effect.setIterations(5*20);
effect.run();
注意: 当使用构建器时,你必须始终向方法提供世界、粒子效果和原点位置,因为每个动画特效都需要它们,并且假设它们不为空。如果需要,你以后可以更改它们。 TLDR; 你必须提供这些信息才能使特效正常工作,否则会导致崩溃!
0.0.1 版本中部分特效的演示
如何操控动画特效?
每个特效都有各自的 getter 和 setter,因此你可以在调用运行方法之前使用它们来更改设置。你还可以为 run/runFor 方法提供一个 Lambda 表达式,以便在特效活跃的每一刻执行操作。有关每个设置的具体作用,请参阅该特效构造函数的 Javadoc。
如何使用命令?
首先,你必须安装配套模组 ParticleAnimationLibCommands。
你可以使用 pal 或 particleanimationlib,然后使用 Tab 补全来创建你的特效。甚至可以使用 /pal <effect> demo <particle> <pos> 来预览每个特效!
请查阅 维基 以获取更多信息!
对于开发者:
将此库作为依赖项添加到你的 build.gradle 中
repositories {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
}
dependencies {
modImplementation "maven.modrinth:particleanimationlib:<version>"
}
你可以从 Modrinth 的版本页面获取版本号。
致谢
本模组基于 elBukkit 团队开发的 Bukkit 插件 EffectLib,也值得你去看看!其中的特效源自该插件,并经过调整以兼容模组开发,偶尔还会增加额外的功能。
许可证
本库采用 MIT 许可证
Do you want to create cool particle effects such as cones, cubes, spheres, and vortices but don't know how? Well, then this mod is for you! It is mainly a developer utility, but as a player you can play around with the commands, especially to try out the effects before implementing them with code. It is also fully serverside, meaning you won't need it on the client. It is inspirerd by the EffectLib plugin as you may have guessed.
Currently available effects:
- [3D] Animated Sphere, Sphere, Cuboid, Vortex, Cone, Donut
- [2D] Arc, Line, Animated Circle, Colored and BW Images, Text
At present time this mod is in beta, meaning that stuff could still break or change a bit. And some effects are still missing A forge/neoforge version may come in the future, but I first want to get the fabric/quilt all done before starting the port. Sorry! (It most likely will work with Syntra connector for the time being)
The best way to enjoy this mod is with other people on a server, so you can use the code EMALIGHTDEV on Nodecraft for discount!
How to use this mod
This mod on its own, is only intended for developers. But don't worry, if you are a player and still want to try out all of the amazing effects (albeit with some limitations currently) you can do so by install ParticleAnimationLibCommands.
Yes, I know, the commands are a bit long and confusing, that's why I've also started working on a wiki, that you can find right here!
How to create the effects?
All of the effects are in the effects package and you can create a new effect simply by creating a new effect object or you can use their builder method, kinda like the Block properties.
Then you can use your preferred flavour of #run() method to activate the effect:
//Constructor pseudocode with runFor example
Effect effect = new Effect(ServerWorld world, ParticleEffect effect, Vec3d originPos, int particles, Other stuff...)
effect.runFor(5);
//Builder pseudocode with run and setIterations example (20 ticks = 1 second)
Effect effect = Effect.builder(ServerWorld world, ParticleEffect effect, Vec3d originPos).particles(10).anotherOption(true).build;
effect.setIterations(5*20);
effect.run();
Note: when using the builder you will need to always supply the world particle effect and origin pos to the method, beacuse every animation effect uses them and it is assumed they are not null. You can change them later if you need to. TLDR; you are forced to supply them in order to make the effect work instead of crashing!
Demo of some of the effects from version 0.0.1
How to manipulate the animation effect?
Every effect has its own getters and setters, so you can use those to change the settings before calling the run method. You can also provide a lamda that will execute each tickt that the effect is active to the run/runFor method. For more information about what each setting does please refer to the javadoc of the constructor for that effect.
How do I use the commands?
First of all, you must install the companion mod ParticleAnimationLibCommands.
You can use either pal or particleanimationlib and then use tab-completition to create your effects. You can even have a preview of each effect by using /pal <effect> demo <particle> <pos>!
Please refer to the wiki for more information!
For developers:
Add this library into your build.gradle as a dependency
repositories {
maven {
name = "Modrinth"
url = "https://api.modrinth.com/maven"
content {
includeGroup "maven.modrinth"
}
}
}
dependencies {
modImplementation "maven.modrinth:particleanimationlib:<version>"
}
You can get the version number from the modrinth versions page.
Credit
This mod is based on the bukkit plugin EffectLib by elBukkit team, check it out too! The effects are taken from there and tweaked to be compatible with modding, occasionally adding extra functionality.
License
This library is available under MIT license
下载 ParticleAnimationLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ParticleAnimationLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ParticleAnimationLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ParticleAnimationLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ParticleAnimationLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ParticleAnimationLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ParticleAnimationLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ParticleAnimationLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ParticleAnimationLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
下载 ParticleAnimationLib
需要联机服务器吗?
稳定流畅、一键部署,几分钟即可和朋友联机开服
最低仅需 8 元/月 即可畅快联机
修复版本范围
NeoForge 26.1+
更新至 26.3
已更新至 26.1.2!
关于这个资源的讨论、问题反馈与使用心得
还没有讨论,来发第一帖吧
你是这个资源的作者?登录后可认领此资源。
相似资源
模组
可定制的鞘翅模组,支持装饰纹饰、旗帜图案等更多功能!
模组
一个用于收集生物掉落物的多区块模组。
模组
显示你正在注视的方块的信息。(适用于 Minecraft 1.16+ 的 Hwyla/Waila 分支)
模组
使用 JavaScript 编辑配方、添加自定义物品、编写世界事件!
模组
查看物品与配方
模组
在游戏画面角落显示附近世界地形、玩家、生物和实体的地图。可创建路径点,帮助你找到标记过的位置。
评论 0
登录后参与评分
还没有评论,来抢沙发吧