#[ 1.21.5 ] Particle Error

73 messages · Page 1 of 1 (latest)

cerulean moon
#

guys to register particles dont you have to write in the main modinitializer the path of the particle and the name, and then in the client initialiazer to register it there too
I am getting this Render Error
[15:01:06] [Render thread/WARN] (Minecraft) Could not spawn particle effect net.fabricmc.fabric.api.particle.v1.FabricParticleTypes$1@114e051a
Can someone help me

rustic orchid
cerulean moon
#

1.21.5

#

[ 1.21.5 ] Particle Error

rustic orchid
cerulean moon
#

would you liek me to copy paste my code here so you can see because I dont have a repo fo my mod

rustic orchid
#

If the code segments are small enough, you can use a Discord code block:

YourCodeHere
EndOfCode```
See screenshot on how to format a Java Discord code block
cerulean moon
rustic orchid
#

Will review in just a moment

cerulean moon
#

ok

rustic orchid
#

I'll copy the code over to a 1.21.5 Fabric mod template and investigate the errors myself

cerulean moon
#

ok thanks

rustic orchid
cerulean moon
#

yeah but not for the particle

rustic orchid
#

So no other of your files contain code about BLOOD_BUBBLE_PARTICLE

rustic orchid
#

Alright

crystal lantern
#

that's incorrect

#

a particle also requires a json file

cerulean moon
#

I have it dont worry

crystal lantern
#

well it's impossible to help when we don't have the full code...

cerulean moon
#

ok wait I will try and upload it to github

rustic orchid
#

Just copying the lines of code to see if I could get the same warn, I couldn't replicate

rustic orchid
#

To be specific, I copied over the three lines of code:

public static final SimpleParticleType BLOOD_BUBBLE_PARTICLE = FabricParticleTypes.simple();```

```java
Registry.register(Registries.PARTICLE_TYPE, Identifier.of("strike", "blood_bubble_particle"), BLOOD_BUBBLE_PARTICLE);```

and

```ParticleFactoryRegistry.getInstance().register(Burnableblockmod.BLOOD_BUBBLE_PARTICLE, EndRodParticle.Factory::new);```
#

But either way, couldn't reproduce the warn [Render thread/WARN] (Minecraft) Could not spawn particle effect net.fabricmc.fabric.api.particle.v1.FabricParticleTypes$1@114e051a

crystal lantern
#

why are you getting opengl errors? concern

#

are you on windows?

rustic orchid
#

Yes

cerulean moon
cerulean moon
rustic orchid
#

Well no main menu at all certainly isn't a great start

cerulean moon
#

it is a feature I made and its still in progress

rustic orchid
#

I see

#

Alright, using a cloned repo, the Warn line you originally reported was found again

#

Now to try and figure out what is causing the issue

cerulean moon
#

ok'

crystal lantern
#

did you find the issue?

rustic orchid
crystal lantern
#
- main/src/main/resources/assets/strike/particle
+ main/src/main/resources/assets/strike/particles
cerulean moon
#

I contacted a "friend" and he says its about rendering the paricle in the client and register in the main

crystal lantern
#

i pointed out what the error is

rustic orchid
#

Yup that fixed it @cerulean moon

cerulean moon
rustic orchid
#

In the assets folder, go to the strike folder, and rename the particle folder to particles

#

That's it really

cerulean moon
#

wait

#

lets gooooooooooooo

#

ok now that I have somone to talk in this conv. can you help me with another error

#
Note: Recompile with -Xlint:deprecation for details.```
rustic orchid
#

Basically

crystal lantern
#

you're using HudRenderCallback which is deprecated

cerulean moon
#

ok

rustic orchid
#
HudRenderCallback.EVENT.register(DashOverlay::renderOverlay);```
In this line in your Client Class, there's deprecated stuff
#

Meaning it's no longer maintained or actively supported, causing potential instabilities

cerulean moon
#

ok is there anyway to replace it or something like this

crystal lantern
#

hover over the warning, it says what to use

rustic orchid
cerulean moon
#

ok

rustic orchid
#

Due to them not being 1:1, you may need to change parts of your code to adapt to the non-deprecated alternative

cerulean moon
#

ok I used HudLayerRegistrationCallback but now the renderOverlay is an error

crystal lantern
#

Due to them not being 1:1, you may need to change parts of your code to adapt to the non-deprecated alternative

#

it's not a direct replacement

cerulean moon
#

ohhhhh

rustic orchid
#

Technically if the deprecated version works for your specific purposes it's not necessarily an issue but it is absolutely not recommended, and especially if you plan to update over time it will become more and more prone to bugs and issues.

#

So I'd absolutely advise reading up on the replacement and how to implement it into your systems

#

Feel free to open up a new thread if you need help implementing the replacement

cerulean moon
#

ok guys thank you so much