Jump to content

[1.10.2] Custom Particles?


Draco18s
 Share

Recommended Posts

Anyone tried this yet?

 

Looks like vanilla's particles are all registered with a particle registry (

ParticleManager

and associated

EnumParticleTypes

), but I don't see any Forge hooks to register custom particles.

 

On top of that, the last time I played with particles, using a custom sprite (animated or otherwise) required binding a texture sheet and making sure that afterwards, you rebound vanilla's or things would break (vanilla particles would now be using the new texture sheet).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I have a working 1.10.2 Custom particle effect up and running, nothing much that I changed from 1.9.

 

Got a github?  The last time I did particles was 1.7 :P

 

Edit/Update:

Basically what I'm trying to do is recreate an effect I did several years ago:

https://github.com/Draco18s/Artifacts/blob/master/main/java/com/draco18s/artifacts/client/RadarParticle.java

The particle spawns at a block location, but renders over everything (due to using

GL11.glDepthFunc(GL11.GL_ALWAYS);

).

 

The problem I'm having now is that it doesn't seem to matter what I do with the VertexBuffer, I either crash the game because it's already drawing (ParticleLargeExplosion doesn't have this problem, I can't figure out why) or I get an Index Out of Range error when setting the first vertex position.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Sorry no github.

 

But I put it in a pastebin.

 

My first particle ever so.. ;)

Dont take the code to seriously because its an iteration of trial and error and much of the junk code are still there.

And a lot of stitching together what I could read about it.

 

http://pastebin.com/R6aFectz

 

And in my proxy:

 

ConsumeParticles particle = new ConsumeParticles(

    		entity.worldObj, 
    		entity.posX + entity.worldObj.rand.nextFloat() * entity.width 

                * 2.0F - entity.width, 
                entity.posY + 0.5D + entity.worldObj.rand.nextFloat() 

                * entity.height, 
                entity.posZ + entity.worldObj.rand.nextFloat() * entity.width 

                * 2.0F - entity.width, 

                targetX + 0.5, 

                targetY + 1, 

                targetZ + 0.5,10, col.toInt(),1F);
    
    
    Minecraft.getMinecraft().effectRenderer.addEffect(particle);

Not all things in the world are red, there are round objects too!

Link to comment
Share on other sites

Ah, you let the Particle class handle rendering.

Yeah, I need to set GL flags so that my particle renders on top of all other world objects (think vanilla's Glow effect for those new arrows).

 

Managing to make some progress on my own, extending

ParticleExplosionLarge

rather than

Particle

solved the inability to use the world renderer.  No idea why, as it doesn't do anything special, except that if I use its renderer and extend

Particle

things don't work.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Ah, you let the Particle class handle rendering.

Yeah, I need to set GL flags so that my particle renders on top of all other world objects (think vanilla's Glow effect for those new arrows).

 

Managing to make some progress on my own, extending

ParticleExplosionLarge

rather than

Particle

solved the inability to use the world renderer.  No idea why, as it doesn't do anything special, except that if I use its renderer and extend

Particle

things don't work.

Particles have had 3+ layers since they appeared in minecraft:

Layer 0: Uses own particle sprites to render

Layer 1: Uses the item/block sprites.

  (There were separate sprites for items and blocks, so there was one more layer. This information might not be accurate)

Layer 3: Uses custom rendering. No sprites got bound on the render method.

 

It seems that default layer got changed from 3 to 0.

I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP)

II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium.

Link to comment
Share on other sites

Nevermind, I get it. I was missing something that hadn't been spelled out well.

When I went looking at the Explosion particle class, there it was.

 

    public int getFXLayer()
    {
        return 3;
    }

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hey, I am hosting a project ozone 3 Minecraft server with one of my friends. I have port forwarded the server on my wifi (originally we were using hamachi tunneling). He doesn't live very far (only a few states) away from me so his ping really shouldn't be too bad. However his ping is often in the hundred-thousands. I am unsure of what is causing this and it really shouldn't be happening considering that both of our internet providers are decent. Anyone know of anything that would cause this or of a fix?  
    • https://gist.github.com/Phoenix-warrior9/d2ac353246276d557d002bffa99e2031
    • ---- Minecraft Crash Report ---- // Don't be sad, have a hug! ❤️ Time: 12/4/22, 6:07 PM Description: Mod loading error has occurred java.lang.Exception: Mod Loading has failed     at net.minecraftforge.logging.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:55) ~[forge-1.18.2-40.1.0-universal.jar%2358!/:?] {re:classloading}     at net.minecraftforge.client.loading.ClientModLoader.completeModLoading(ClientModLoader.java:169) ~[forge-1.18.2-40.1.0-universal.jar%2358!/:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.lambda$new$1(Minecraft.java:555) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.Util.m_137521_(Util.java:397) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:classloading}     at net.minecraft.client.Minecraft.lambda$new$2(Minecraft.java:549) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.gui.screens.LoadingOverlay.m_6305_(LoadingOverlay.java:135) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:877) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:create.mixins.json:GameRendererMixin,pl:mixin:APP:create.mixins.json:accessor.GameRendererAccessor,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1044) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:663) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:205) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {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.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:31) ~[fmlloader-1.18.2-40.1.0.jar%2316!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] {} A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Thread: Render thread Stacktrace:     at net.minecraftforge.logging.CrashReportExtender.lambda$dumpModLoadingCrashReport$7(CrashReportExtender.java:58) ~[forge-1.18.2-40.1.0-universal.jar%2358!/:?] {re:classloading} -- MOD create -- Details:     Mod File: create-1.18.2-0.5.0.e.jar     Failure message: Mod create requires forge 40.1.60 or above         Currently, forge is 40.1.0     Mod Version: 0.5.0.e     Mod Issue URL: https://github.com/Creators-of-Create/Create/issues     Exception message: MISSING EXCEPTION MESSAGE Stacktrace:     at net.minecraftforge.logging.CrashReportExtender.lambda$dumpModLoadingCrashReport$7(CrashReportExtender.java:58) ~[forge-1.18.2-40.1.0-universal.jar%2358!/:?] {re:classloading}     at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?] {}     at net.minecraftforge.logging.CrashReportExtender.dumpModLoadingCrashReport(CrashReportExtender.java:56) ~[forge-1.18.2-40.1.0-universal.jar%2358!/:?] {re:classloading}     at net.minecraftforge.client.loading.ClientModLoader.completeModLoading(ClientModLoader.java:169) ~[forge-1.18.2-40.1.0-universal.jar%2358!/:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.lambda$new$1(Minecraft.java:555) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.Util.m_137521_(Util.java:397) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:classloading}     at net.minecraft.client.Minecraft.lambda$new$2(Minecraft.java:549) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.gui.screens.LoadingOverlay.m_6305_(LoadingOverlay.java:135) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:classloading,pl:runtimedistcleaner:A}     at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:877) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:create.mixins.json:GameRendererMixin,pl:mixin:APP:create.mixins.json:accessor.GameRendererAccessor,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1044) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:663) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}     at net.minecraft.client.main.Main.main(Main.java:205) ~[client-1.18.2-20220404.173914-srg.jar%2354!/:?] {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.CommonClientLaunchHandler.lambda$launchService$0(CommonClientLaunchHandler.java:31) ~[fmlloader-1.18.2-40.1.0.jar%2316!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.3.jar%235!/:?] {}     at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] {} -- MOD create -- Details:     Mod File: create-1.18.2-0.5.0.e.jar     Failure message: Mod create requires flywheel 0.6.5 or above, and below 0.6.7         Currently, flywheel is not installed     Mod Version: 0.5.0.e     Mod Issue URL: https://github.com/Creators-of-Create/Create/issues     Exception message: MISSING EXCEPTION MESSAGE -- MOD chipped -- Details:     Mod File: chipped-2.0.0-forge.jar     Failure message: Mod chipped requires ctm 0 or above         Currently, ctm is not installed     Mod Version: 2.0.0     Mod Issue URL: NOT PROVIDED     Exception message: MISSING EXCEPTION MESSAGE -- System Details -- Details:     Minecraft Version: 1.18.2     Minecraft Version ID: 1.18.2     Operating System: Windows 10 (amd64) version 10.0     Java Version: 17.0.1, Microsoft     Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Microsoft     Memory: 1033808624 bytes (985 MiB) / 1778384896 bytes (1696 MiB) up to 2147483648 bytes (2048 MiB)     CPUs: 16     Processor Vendor: AuthenticAMD     Processor Name: AMD Ryzen 7 5800X 8-Core Processor                  Identifier: AuthenticAMD Family 25 Model 33 Stepping 2     Microarchitecture: Zen 3     Frequency (GHz): 3.80     Number of physical packages: 1     Number of physical CPUs: 8     Number of logical CPUs: 16     Graphics card #0 name: NVIDIA GeForce RTX 3070     Graphics card #0 vendor: NVIDIA (0x10de)     Graphics card #0 VRAM (MB): 4095.00     Graphics card #0 deviceId: 0x2484     Graphics card #0 versionInfo: DriverVersion=31.0.15.2686     Memory slot #0 capacity (MB): 8192.00     Memory slot #0 clockSpeed (GHz): 2.13     Memory slot #0 type: DDR4     Memory slot #1 capacity (MB): 32768.00     Memory slot #1 clockSpeed (GHz): 2.13     Memory slot #1 type: DDR4     Memory slot #2 capacity (MB): 8192.00     Memory slot #2 clockSpeed (GHz): 2.13     Memory slot #2 type: DDR4     Memory slot #3 capacity (MB): 32768.00     Memory slot #3 clockSpeed (GHz): 2.13     Memory slot #3 type: DDR4     Virtual memory max (MB): 86966.09     Virtual memory used (MB): 26648.90     Swap memory total (MB): 5120.00     Swap memory used (MB): 24.13     JVM Flags: 9 total; -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump -Xss1M -Xmx2G -XX:+UnlockExperimentalVMOptions -XX:+UseG1GC -XX:G1NewSizePercent=20 -XX:G1ReservePercent=20 -XX:MaxGCPauseMillis=50 -XX:G1HeapRegionSize=32M     ModLauncher: 9.1.3+9.1.3+main.9b69c82a     ModLauncher launch target: forgeclient     ModLauncher naming: srg     ModLauncher services:           mixin PLUGINSERVICE           eventbus PLUGINSERVICE           slf4jfixer PLUGINSERVICE           object_holder_definalize PLUGINSERVICE           runtime_enum_extender PLUGINSERVICE           capability_token_subclass PLUGINSERVICE           accesstransformer PLUGINSERVICE           runtimedistcleaner PLUGINSERVICE           mixin TRANSFORMATIONSERVICE           fml TRANSFORMATIONSERVICE      FML Language Providers:          minecraft@1.0         javafml@null     Mod List:          client-1.18.2-20220404.173914-srg.jar             |Minecraft                     |minecraft                     |1.18.2              |NONE      |Manifest: a1:d4:5e:04:4f:d3:d6:e0:7b:37:97:cf:77:b0:de:ad:4a:47:ce:8c:96:49:5f:0a:cf:8c:ae:b2:6d:4b:8a:3f         forge-1.18.2-40.1.0-universal.jar                 |Forge                         |forge                         |40.1.0              |NONE      |Manifest: 84:ce:76:e8:45:35:e4:0e:63:86:df:47:59:80:0f:67:6c:c1:5f:6e:5f:4d:b3:54:47:1a:9f:7f:ed:5e:f2:90
    • Besides all my mods are working because I use the same mods for the forge version 43.1.6.5 and it works very well (1.9.2) but with the new forge it does not
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.