Jump to content

Recommended Posts

Posted

I'm trying to make a particle that behaves identically to the PortalParticle, but with the ability to have different colours.  For now I'm just trying clone the PortalParticle as a BasicParticleType.

I've looked over examples, can't see what I'm missing.

 

Error

Spoiler

[20:17:13] [Render thread/FATAL] [ne.mi.co.ForgeMod/]: Preparing crash report with UUID b25ca0a7-7b1b-4565-804d-d6e95f704ac8
[20:17:13] [Render thread/INFO] [STDOUT/]: [net.minecraft.crash.CrashReport:addCategory:196]: Negative index in crash report handler (8/15)
[20:17:14] [Render thread/FATAL] [minecraft/Minecraft]: Reported exception thrown!
net.minecraft.crash.ReportedException: Rendering overlay
        at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:488) ~[forge-1.16.5-36.2.33_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at net.minecraft.client.Minecraft.runTick(Minecraft.java:977) ~[forge-1.16.5-36.2.33_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at net.minecraft.client.Minecraft.run(Minecraft.java:607) ~[forge-1.16.5-36.2.33_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.5-36.2.33_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_322] {}
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_322] {}
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_322] {}
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_322] {}
        at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.5-36.2.33_mapped_official_1.16.5-recomp.jar:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {}
        at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {}
        at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {}
        at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:108) [forge-1.16.5-36.2.33_mapped_official_1.16.5-recomp.jar:?] {}
Caused by: java.lang.IllegalStateException: Redundant texture list for particle melsportals:colored_portal
        at net.minecraft.client.particle.ParticleManager.loadParticleDescription(ParticleManager.java:217) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at net.minecraft.client.particle.ParticleManager.lambda$null$0(ParticleManager.java:169) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640) ~[?:1.8.0_322] {}
        at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1632) ~[?:1.8.0_322] {}
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_322] {}
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_322] {}
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[?:1.8.0_322] {}
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175) ~[?:1.8.0_322] {}
[20:17:14] [Render thread/INFO] [STDOUT/]: [net.minecraft.util.registry.Bootstrap:realStdoutPrintln:123]: ---- Minecraft Crash Report ----
// Hi. I'm Minecraft, and I'm a crashaholic.

Time: 10/04/22 20:17
Description: Rendering overlay

java.lang.IllegalStateException: Redundant texture list for particle melsportals:colored_portal
        at net.minecraft.client.particle.ParticleManager.loadParticleDescription(ParticleManager.java:217) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at net.minecraft.client.particle.ParticleManager.lambda$null$0(ParticleManager.java:169) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1640) ~[?:1.8.0_322] {}
        at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1632) ~[?:1.8.0_322] {}
        at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_322] {}
        at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_322] {}
        at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[?:1.8.0_322] {}
        at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:175) ~[?:1.8.0_322] {}


A detailed walkthrough of the error, its code path and all known details is as follows:
---------------------------------------------------------------------------------------

-- Head --
Thread: Render thread
Stacktrace:
        at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:484) ~[forge:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
-- Overlay render details --
Details:
        Overlay name: net.minecraft.client.gui.ResourceLoadProgressGui
Stacktrace:
        at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:484) ~[forge-1.16.5-36.2.33_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at net.minecraft.client.Minecraft.runTick(Minecraft.java:977) ~[forge-1.16.5-36.2.33_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at net.minecraft.client.Minecraft.run(Minecraft.java:607) ~[forge-1.16.5-36.2.33_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
        at net.minecraft.client.main.Main.main(Main.java:184) ~[forge-1.16.5-36.2.33_mapped_official_1.16.5-recomp.jar:?] {re:classloading,pl:runtimedistcleaner:A}
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_322] {}
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_322] {}
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_322] {}
        at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_322] {}
        at net.minecraftforge.userdev.FMLUserdevClientLaunchProvider.lambda$launchService$0(FMLUserdevClientLaunchProvider.java:52) ~[forge-1.16.5-36.2.33_mapped_official_1.16.5-recomp.jar:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-8.1.3.jar:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:54) [modlauncher-8.1.3.jar:?] {}
        at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:72) [modlauncher-8.1.3.jar:?] {}
        at cpw.mods.modlauncher.Launcher.run(Launcher.java:82) [modlauncher-8.1.3.jar:?] {}
        at cpw.mods.modlauncher.Launcher.main(Launcher.java:66) [modlauncher-8.1.3.jar:?] {}
        at net.minecraftforge.userdev.LaunchTesting.main(LaunchTesting.java:108) [forge-1.16.5-36.2.33_mapped_official_1.16.5-recomp.jar:?] {}


-- System Details --
Details:
        Minecraft Version: 1.16.5
        Minecraft Version ID: 1.16.5
        Operating System: Windows 10 (amd64) version 10.0
        Java Version: 1.8.0_322, Temurin
        Java VM Version: OpenJDK 64-Bit Server VM (mixed mode), Temurin
        Memory: 283590552 bytes (270 MB) / 1726480384 bytes (1646 MB) up to 3801088000 bytes (3625 MB)
        CPUs: 24
        JVM Flags: 2 total; -XX:+IgnoreUnrecognizedVMOptions -XX:HeapDumpPath=MojangTricksIntelDriversForPerformance_javaw.exe_minecraft.exe.heapdump
        ModLauncher: 8.1.3+8.1.3+main-8.1.x.c94d18ec
        ModLauncher launch target: fmluserdevclient
        ModLauncher naming: mcp
        ModLauncher services:
                /mixin-0.8.4.jar mixin PLUGINSERVICE
                /eventbus-4.0.0.jar eventbus PLUGINSERVICE
                /forge-1.16.5-36.2.33_mapped_official_1.16.5-launcher.jar object_holder_definalize PLUGINSERVICE
                /forge-1.16.5-36.2.33_mapped_official_1.16.5-launcher.jar runtime_enum_extender PLUGINSERVICE
                /accesstransformers-3.0.1.jar accesstransformer PLUGINSERVICE
                /forge-1.16.5-36.2.33_mapped_official_1.16.5-launcher.jar capability_inject_definalize PLUGINSERVICE
                /forge-1.16.5-36.2.33_mapped_official_1.16.5-launcher.jar runtimedistcleaner PLUGINSERVICE
                /mixin-0.8.4.jar mixin TRANSFORMATIONSERVICE
                /forge-1.16.5-36.2.33_mapped_official_1.16.5-launcher.jar fml TRANSFORMATIONSERVICE
        FML: 36.2
        Forge: net.minecraftforge:36.2.33
        FML Language Providers:
                [email protected]
                minecraft@1
        Mod List:
                client-extra.jar                                  |Minecraft                     |minecraft                     |1.16.5              |SIDED_SETU|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.16.5-36.2.33_mapped_official_1.16.5-recomp|Forge                         |forge                         |36.2.33             |SIDED_SETU|Manifest: NOSIGNATURE
                main                                              |Mel's Portals                 |melsportals                   |NONE                |SIDED_SETU|Manifest: NOSIGNATURE
        Crash Report UUID: b25ca0a7-7b1b-4565-804d-d6e95f704ac8
        Launched Version: MOD_DEV
        Backend library: LWJGL version 3.2.2 build 10
        Backend API: NVIDIA GeForce RTX 3090/PCIe/SSE2 GL version 4.6.0 NVIDIA 511.79, NVIDIA Corporation
        GL Caps: Using framebuffer using OpenGL 3.0
        Using VBOs: Yes
        Is Modded: Definitely; Client brand changed to 'forge'
        Type: Client (map_client.txt)
        Graphics mode: fancy
        Resource Packs:
        Current Language: English (US)
        CPU: 24x AMD Ryzen 9 3900X 12-Core Processor

 

ColoredParticle.java

Spoiler
@OnlyIn(Dist.CLIENT)
public class ColoredPortal extends PortalParticle {
    protected ColoredPortal(ClientWorld worldIn, double x, double y, double z,
            double xSpeed, double ySpeed, double zSpeed) {
        super(worldIn, x, y, z, xSpeed, ySpeed, zSpeed);
    }

    @OnlyIn(Dist.CLIENT)
    public static class Factory implements IParticleFactory<BasicParticleType> {
        private final IAnimatedSprite sprite;

        public Factory(IAnimatedSprite spriteIn) {
            this.sprite = spriteIn;
        }

        public Particle createParticle(BasicParticleType p_199234_1_, ClientWorld world, double x,
                double y, double z, double xSpeed, double ySpeed, double zSpeed) {
            ColoredPortal particle = new ColoredPortal(world, x, y, z,
                    xSpeed, ySpeed, zSpeed);
            particle.pickSprite(this.sprite);
            return particle;
        }
    }
}

 

DeferredRegister

Spoiler
public class ModParticles {
    public static final DeferredRegister<ParticleType<?>> PARTICLES = DeferredRegister.create(
            ForgeRegistries.PARTICLE_TYPES, ModGlobals.MOD_ID);

    public static final RegistryObject<BasicParticleType> COLORED_PORTAL = PARTICLES.register("colored_portal",
            () -> new BasicParticleType(true));
}

 

Register Event

Spoiler
@EventBusSubscriber(bus = EventBusSubscriber.Bus.MOD, value = Dist.CLIENT)
public class ClientRegistryHandler {
    public static void onParticlesRegistry(ParticleFactoryRegisterEvent e) {
        Minecraft.getInstance().particleEngine.register(ModParticles.COLORED_PORTAL.get(), ColoredPortal.Factory::new);
    }
}

 

colored_particles.json

Spoiler
{
  "textures": [
    "minecraft:generic_0",
    "minecraft:generic_1",
    "minecraft:generic_2",
    "minecraft:generic_3",
    "minecraft:generic_4",
    "minecraft:generic_5",
    "minecraft:generic_6",
    "minecraft:generic_7"
  ]
}

 

Thanks

Posted

Oh man that was stupid.  I noticed it when adding another register event.  I'd missed the "@SubscribeEvent" for ParticleFactoryRegisterEvent.

I need to remember to check that my register events are being called as part of my troubleshooting.

 

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Forge only supports Java Edition, you'll need to ask elsewhere for Pocket Edition support. Also, don't post in unrelated topics. I've split your post into its own topic.
    • How do I download mods for minecraft pe
    • I've tried multiple ways to get the chunk coordinates and none of them have worked, so I'm guessing it may be getChunk().  Is there another way to forcibly load a chunk on that same tick? If all else fails I guess I can just delay my action by a tick, but that's a pain in the butt and makes it more complex to provide appropriate feedback... Also welcome, Zander.  If you're searching for a similar solution, I hope this (eventually) helps you too 😅
    • My guess would be that you are not getting the chunk coordinates right, or getChunk dosnt work.
    • Hello, Recently I have been hosting an RLcraft server on Minecraft Forge Version 1.12.2 - 14.23.5.2860 I originally had lag issues and I chalked it up to playing on less than perfect hardware so I moved the server to better hardware(i9-9900k with 64GB of RAM for 1 player.) After lots of troubleshooting I discovered a couple of things. World saving was causing the MSPT to spike to over 2000Miliseconds and was happening every minute. This kind of makes sense as the world was pre-generated and is over 100GB. I learned that I could turn off world saving and just schedule that and that resolved that issue. After that issue was resolved I discovered another issue. It appears that when exploring chunks, any chunks explored stay loaded. They persist. I was originally thinking that this had to be a mod issue, but it didn't seem like anyone was talking about it. This isn't really a problem on packs with few worldgen mods or just few mods in general, but on beefier packs it becomes a problem. I went through forge changelogs and found this line. Build: 1.12.2-14.23.5.2841 - Thu Aug 29 01:58:50 GMT 2019 bs2609: Improve performance of persistent chunk checks (#5706) Is this a related item to what I am dealing with or just something else?   I went ahead and created a new dedicated server with Just Forge 14.23.5.2860, spark reforged, and it's core mods. I was able to replicate the issue and log it with spark. Hopefully you're able to see this spark profile. It basically shows that as I explored the chunk loading persisted(2000 chunks loaded over 10 minutes with one player)The view distance is set to 10 so that should be 200 chunks per player. If I don't move the loaded chunks are 200. I was however able to fix the persistent chunk issue if I save the world more frequently. My question is, is this intended function of the game or is this a bug? Everywhere I read seems to indicate Minecraft servers save every 5 minutes and not every minute. Can chunks not unload if the world does not autosave. Additionally. Autosave specifically appears to fix this issue. Manually running save-all does not resolve the issue.   I realize this is kind of a log one, sorry. Please let me know if you require further information. Thanks in advance for your time. https://spark.lucko.me/NvlMtC39Yt https://imgur.com/a/K0oyukx https://pastebin.com/z0qGu1Vh  
  • Topics

×
×
  • Create New...

Important Information

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