Bassebombecraft

Bassebombecraft

18.5k Downloads

Mod fails to start due to error: IllegalStateException: Redundant texture list for particle bassebombecraft:lightningparticle

athrane opened this issue ยท 3 comments

commented

Stack trace:

[23Aug2020 23:05:44.337] [Render thread/INFO] [net.minecraft.client.Minecraft/]: Caught error loading resourcepacks, removing all selected resourcepacks
java.util.concurrent.CompletionException: java.lang.IllegalStateException: Redundant texture list for particle bassebombecraft:lightningparticle
	at java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:273) ~[?:1.8.0_211]
	at java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:280) ~[?:1.8.0_211]
	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1629) ~[?:1.8.0_211]
	at java.util.concurrent.CompletableFuture$AsyncRun.exec(CompletableFuture.java:1618) ~[?:1.8.0_211]
	at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:289) ~[?:1.8.0_211]
	at java.util.concurrent.ForkJoinPool$WorkQueue.runTask(ForkJoinPool.java:1056) ~[?:1.8.0_211]
	at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1692) ~[?:1.8.0_211]
	at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:157) ~[?:1.8.0_211]
Caused by: java.lang.IllegalStateException: Redundant texture list for particle bassebombecraft:lightningparticle
	at net.minecraft.client.particle.ParticleManager.loadTextureLists(ParticleManager.java:207) ~[?:?]
	at net.minecraft.client.particle.ParticleManager.lambda$null$0(ParticleManager.java:159) ~[?:?]
	at java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1626) ~[?:1.8.0_211]
	... 5 more

Links:
https://forums.minecraftforge.net/topic/76872-solved-1144-redundant-texture-list-for-particle/
https://forums.minecraftforge.net/topic/75984-1144-particle-registry-confusion/
itsmeow/whisperwoods#1

The issue was introduced with #912.

commented

Resolved with commit: 27902f3

commented

Inspiration:
http://greyminecraftcoder.blogspot.com/2020/02/how-forge-starts-up-your-code-1144.html

Solution:
The ParticleFactoryRegisterEvent event is triggered by the mod event bus, hence the annotation must be defined as: @Mod.EventBusSubscriber(value = Dist.CLIENT, bus = Mod.EventBusSubscriber.Bus.MOD)
because if there is no bus argument the annotation defaults to the forge bus and the event is triggered and the particle factories aren't registered.

The "solution" to #912:
@Mod.EventBusSubscriber(Dist.CLIENT)
Defaults the mod id to the Forge bus.
Doesn't work.

@Mod.EventBusSubscriber(value=Dist.CLIENT, bus=Mod.EventBusSubscriber.Bus.MOD)
Works.

@Mod.EventBusSubscriber(modid = ModConstants.MODID, value = Dist.CLIENT)
Doesn't work.

@Mod.EventBusSubscriber(modid = ModConstants.MODID, value=Dist.CLIENT, bus=Mod.EventBusSubscriber.Bus.MOD)
Works.

commented

To resolve this issue; register particle in class ParticleFactoryRegistryEventHandler