GithubHelp home page GithubHelp logo

chloeprime / aaaparticles Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 1.0 4.1 MB

Effekseer loader on Minecraft 1.18+ Windows and Linux are supported

License: MIT License

Java 100.00%
effekseer minecraft-mod

aaaparticles's People

Contributors

chloeprime avatar

Stargazers

Kyber avatar  avatar Totobird avatar 1awless avatar MaydayMemory avatar

Watchers

 avatar  avatar

Forkers

zeff9801

aaaparticles's Issues

1.19.2

Will there ever be a 1.19.2 version?

Adding a new Effekseer Particle: Guide

Hello, Going to keep it short, this is a guide on how to use the AAA Particles library.

This Guide works similarly for both Forge and Fabric, I'll be using Fabric for this

As an example, we'll use a Modified Sample Effekseer particle made by Pierre01: Herald,

2024-03-14.16-18-00.mp4

Get the Modified Particle Here: ExampleParticle.zip

Going to the Guide now (Fabric 1.20.1 Specifically):

  1. We'll be going into build.gradle attaching AAA Particle and Architecture API as dependencies and while using the Modrinth Maven repository (You can also use the Curseforge Maven)
repositories {
    maven {
        url = "https://api.modrinth.com/maven"
    }
}
dependencies{
	modImplementation "maven.modrinth:aaa-particles:mIOu49Wn"
	modImplementation "maven.modrinth:architectury-api:9.2.14+fabric"
}

Then Load The Gradlew Changes and that's how you implement it

  1. Now we add in a new Resource into our mods assets file called effeks like below and extract the contents of ExampleParticle.zip in there.
    image_2024-03-14_163352207

  2. Now we go and create a ClientModInitializer, and Registering a ReloadListenerRegistry, making sure the Identifier looks somewhat like this, but passing in your own ModID (First Value)
    image_2024-03-14_164125498

That's how you add in the particles and such, but spawning them in isn't like adding in Vanilla particles, to add them I'll make an Example Spawn Item, that spawn the particle on top of any given block

  1. We're going to add new static final ParticleEmitterInfo called HERALD, making sure we pass in a new Identifier with the ModID and the particles path (herald), then using AAALevel on the useOnBlock method, we add a new particle to the world, not forcing it and calling for HERALD.clone(),
    It can have parameters like .position, .scale, .rotation, but we want to always call .clone before any of those.
    In the image it is centered to the very top of the Blocks Position.
    image_2024-03-14_164842556

  2. Then we register the Item itself into the Main class and you should have an item that spawns a particle like this!
    NOTE, the particle isn't perfect because it's an example one, you can scale it down using .scale(0.5F).

2024-03-14.16-55-48.mp4

Want to have it spawn like you do with Vanilla Particles? (Yes I figured it out)

  1. Create a Basic Particle like you usually would Here if you don't know how to, yes it still works with it's own class and registering them into the Client and Main.
Client
		ParticleFactoryRegistry.getInstance().register(AAAParticleExample.HERALD, HeraldParticle.Factory::new);

Main
	public static final DefaultParticleType HERALD = FabricParticleTypes.simple();
@Override
	public void onInitialize() {
		Registry.register(Registries.PARTICLE_TYPE, new Identifier("aaa-particle-example", "herald"), HERALD);
	}
  1. Inside of the Particle interduce a new Integer for example timer and inside of the tick() method, pass in
if (timer == 0){
            timer++;
            AAALevel.addParticle(world, false, HERALD.clone().position(this.x, this.y, this.z)); /// This is the same as for the Item
        }

Were doing it on the 0th tick so it only spawns in 1 time.

  1. if you did everything correctly, now the Particle should be inside of the /particle command and should summon without any issues! (Hopefully)
2024-03-14.22-04-39.mp4

Crash report

So I'm using AAA particles for a forge 1.20.1 for a mod pack of a Lore SMP that I'm working on, I'm currently doing a compatibility test to see if it works with Mac as some people who are interested play on mac, I tried and I continuously crashed, I removed AAA and it worked fine, here's the crash error I got. is the mod not compatible with Mac's graphic system?

[09:20:13] [modloading-worker-0/ERROR] [ne.mi.fm.ja.FMLModContainer/LOADING]: Failed to create mod instance. ModID: aaa_particles, class mod.chloeprime.aaaparticles.forge.AAAParticlesForge
java.lang.NullPointerException: null
at java.util.Objects.requireNonNull(Objects.java:208) ~[?:?] {re:mixin}
at mod.chloeprime.aaaparticles.client.installer.JarExtractor.extract(JarExtractor.java:15) ~[aaa_particles-1.20.1-1.0.7-forge.jar%23226!/:?] {re:classloading}
at mod.chloeprime.aaaparticles.client.AAAParticlesClient.installNativeLibrary(AAAParticlesClient.java:40) ~[aaa_particles-1.20.1-1.0.7-forge.jar%23226!/:?] {re:classloading}
at mod.chloeprime.aaaparticles.client.AAAParticlesClient.init(AAAParticlesClient.java:22) ~[aaa_particles-1.20.1-1.0.7-forge.jar%23226!/:?] {re:classloading}
at mod.chloeprime.aaaparticles.forge.AAAParticlesForge.(AAAParticlesForge.java:22) ~[aaa_particles-1.20.1-1.0.7-forge.jar%23226!/:?] {re:classloading}
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:?] {}
at jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:77) ~[?:?] {}
at jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:?] {}
at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:499) ~[?:?] {}
at java.lang.reflect.Constructor.newInstance(Constructor.java:480) ~[?:?] {}
at net.minecraftforge.fml.javafmlmod.FMLModContainer.constructMod(FMLModContainer.java:70) ~[javafmllanguage-1.20.1-47.2.17.jar%23302!/:?] {}
at net.minecraftforge.fml.ModContainer.lambda$buildTransitionHandler$10(ModContainer.java:123) ~[fmlcore-1.20.1-47.2.17.jar%23301!/:?] {re:mixin}
at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804) ~[?:?] {}
at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1796) ~[?:?] {}
at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] {}
at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] {}
at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] {re:mixin,re:computing_frames}
at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] {re:mixin,re:computing_frames}
at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] {re:mixin}

Cant run Datagen with aaa particles

when i try to run datagen (to generate recipes or such)
this error comes up

[21:59:27] [main/ERROR] (Minecraft) Failed to start the minecraft server
 java.lang.RuntimeException: Could not execute entrypoint stage 'main' due to errors, provided by 'aaa_particles'!
	at net.fabricmc.loader.impl.FabricLoaderImpl.lambda$invokeEntrypoints$2(FabricLoaderImpl.java:388) ~[fabric-loader-0.15.7.jar:?]
	at net.fabricmc.loader.impl.util.ExceptionUtil.gatherExceptions(ExceptionUtil.java:33) ~[fabric-loader-0.15.7.jar:?]
	at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:386) ~[fabric-loader-0.15.7.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.Hooks.startServer(Hooks.java:63) ~[fabric-loader-0.15.7.jar:?]
	at net.minecraft.server.Main.main(Main.java:112) ~[minecraft-merged-d6f9e55fab-1.20.1-net.fabricmc.yarn.1_20_1.1.20.1+build.2-v2.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.7.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.7.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotServer.main(KnotServer.java:23) ~[fabric-loader-0.15.7.jar:?]
	at net.fabricmc.devlaunchinjector.Main.main(Main.java:86) ~[dev-launch-injector-0.2.1+build.8.jar:?]
Caused by: java.lang.NoSuchMethodError: 'dev.architectury.networking.NetworkChannel dev.architectury.networking.NetworkChannel.create(net.minecraft.util.Identifier)'
	at mod.chloeprime.aaaparticles.common.network.ModNetwork.<clinit>(ModNetwork.java:7) ~[aaa-particles-mIOu49Wn.jar:?]
	at mod.chloeprime.aaaparticles.AAAParticles.init(AAAParticles.java:14) ~[aaa-particles-mIOu49Wn.jar:?]
	at mod.chloeprime.aaaparticles.fabric.AAAParticlesFabric.onInitialize(AAAParticlesFabric.java:9) ~[aaa-particles-mIOu49Wn.jar:?]
	at net.fabricmc.loader.impl.FabricLoaderImpl.invokeEntrypoints(FabricLoaderImpl.java:384) ~[fabric-loader-0.15.7.jar:?]
	... 6 more```

Crash

java.nio.file.InvalidPathException: Illegal char <:> at index 23: assets/epicora/effeks/D:/Epicora-1.20.1/MS-Epicora-Client/src/main/resources/assets/epicora/effeks/Texture/aurora01.png
	at sun.nio.fs.WindowsPathParser.normalize(WindowsPathParser.java:177) ~[?:?] {}
	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:153) ~[?:?] {}
	at sun.nio.fs.WindowsPathParser.parse(WindowsPathParser.java:77) ~[?:?] {}
	at sun.nio.fs.WindowsPath.parse(WindowsPath.java:92) ~[?:?] {}
	at sun.nio.fs.WindowsFileSystem.getPath(WindowsFileSystem.java:232) ~[?:?] {}
	at java.nio.file.Path.resolve(Path.java:515) ~[?:?] {re:computing_frames}
	at cpw.mods.niofs.union.UnionFileSystem.toRealPath(UnionFileSystem.java:332) ~[securejarhandler-2.1.10.jar:?] {}
	at cpw.mods.niofs.union.UnionFileSystem.findFirstFiltered(UnionFileSystem.java:259) ~[securejarhandler-2.1.10.jar:?] {}
	at cpw.mods.niofs.union.UnionFileSystem.checkAccess(UnionFileSystem.java:305) ~[securejarhandler-2.1.10.jar:?] {}
	at cpw.mods.niofs.union.UnionFileSystemProvider.checkAccess(UnionFileSystemProvider.java:200) ~[securejarhandler-2.1.10.jar:?] {}
	at java.nio.file.Files.exists(Files.java:2527) ~[?:?] {}
	at net.minecraftforge.resource.PathPackResources.getRootResource(PathPackResources.java:87) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:classloading}
	at net.minecraftforge.resource.PathPackResources.getResource(PathPackResources.java:140) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:classloading}
	at net.minecraftforge.resource.DelegatingPackResources.getResource(DelegatingPackResources.java:106) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:classloading}
	at net.minecraft.server.packs.resources.FallbackResourceManager.getResource(FallbackResourceManager.java:67) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.packs.resources.MultiPackResourceManager.getResource(MultiPackResourceManager.java:78) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:classloading}
	at mod.chloeprime.aaaparticles.client.loader.EffekAssetLoader.getResourceOrUseFallbackPath(EffekAssetLoader.java:126) ~[aaa_particles-1.20.1-1.0.8-forge_mapped_official_1.20.1.jar:?] {re:classloading}
	at mod.chloeprime.aaaparticles.client.loader.EffekAssetLoader.load(EffekAssetLoader.java:107) ~[aaa_particles-1.20.1-1.0.8-forge_mapped_official_1.20.1.jar:?] {re:classloading}
	at mod.chloeprime.aaaparticles.client.loader.EffekAssetLoader.loadEffect(EffekAssetLoader.java:64) ~[aaa_particles-1.20.1-1.0.8-forge_mapped_official_1.20.1.jar:?] {re:classloading}
	at mod.chloeprime.aaaparticles.client.loader.EffekAssetLoader.lambda$apply$7(EffekAssetLoader.java:162) ~[aaa_particles-1.20.1-1.0.8-forge_mapped_official_1.20.1.jar:?] {re:classloading}
	at java.util.TreeMap.forEach(TreeMap.java:1282) ~[?:?] {}
	at mod.chloeprime.aaaparticles.client.loader.EffekAssetLoader.apply(EffekAssetLoader.java:160) ~[aaa_particles-1.20.1-1.0.8-forge_mapped_official_1.20.1.jar:?] {re:classloading}
	at mod.chloeprime.aaaparticles.client.loader.EffekAssetLoader.apply(EffekAssetLoader.java:33) ~[aaa_particles-1.20.1-1.0.8-forge_mapped_official_1.20.1.jar:?] {re:classloading}
	at net.minecraft.server.packs.resources.SimplePreparableReloadListener.lambda$reload$1(SimplePreparableReloadListener.java:12) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:classloading,re:mixin}
	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:718) ~[?:?] {}
	at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:482) ~[?:?] {}
	at net.minecraft.server.packs.resources.SimpleReloadInstance.lambda$new$3(SimpleReloadInstance.java:65) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:classloading}
	at net.minecraft.util.thread.BlockableEventLoop.doRunTask(BlockableEventLoop.java:143) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.doRunTask(ReentrantBlockableEventLoop.java:22) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:mixin,re:computing_frames,re:classloading}
	at net.minecraft.util.thread.BlockableEventLoop.pollTask(BlockableEventLoop.java:116) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.util.thread.BlockableEventLoop.runAllTasks(BlockableEventLoop.java:104) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1106) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.hammerlib.json:client.MinecraftMixin,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.run(Minecraft.java:718) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:mixins.hammerlib.json:client.MinecraftMixin,pl:mixin:APP:architectury.mixins.json:MixinMinecraft,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:218) ~[forge-1.20.1-47.2.20_mapped_official_1.20.1-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?] {}
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?] {}
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?] {}
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?] {}
	at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.2.20.jar:?] {}
	at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.2.20.jar:?] {}
	at net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.devService(ForgeClientUserdevLaunchHandler.java:19) ~[fmlloader-1.20.1-47.2.20.jar:?] {}
	at net.minecraftforge.fml.loading.targets.CommonDevLaunchHandler.lambda$makeService$7(CommonDevLaunchHandler.java:135) ~[fmlloader-1.20.1-47.2.20.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?] {}
public static void init() {
        ReloadListenerRegistry.register(PackType.CLIENT_RESOURCES, new EffekAssetLoader(), new ResourceLocation("epicora",  "effeks"));
    }

help ;D

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.