JoeFoxe / Hexerei-1.19

0.2.1 update (the book)
12 stars 21 forks source link

Persistent crash after lighting a strength candle #77

Open j0-1 opened 12 months ago

j0-1 commented 12 months ago

Crashes every login for all players. Minecraft 1.19.2, Hexerei 0.3.3.1 (using enigmatica 9 expert modpack version 1.15.1).

Here's the crash report, it's a bad cast causing the crash:

---- Minecraft Crash Report ----
// I let you down. Sorry :(

Time: 2023-10-23 20:04:04
Description: Ticking block entity

java.lang.ClassCastException: class net.minecraft.core.particles.ParticleTypes$1
 cannot be cast to class net.minecraft.core.particles.ParticleOptions (net.minec
raft.core.particles.ParticleTypes$1 and net.minecraft.core.particles.ParticleOpt
ions are in module minecraft@1.19.2 of loader 'TRANSFORMER' @786a3477)
    at net.joefoxe.hexerei.data.candle.PotionCandleEffect.tick(PotionCandleE
ffect.java:59) ~[hexerei-0.3.3.1.jar%23464!/:0.3.3.1] {re:classloading}
    at net.joefoxe.hexerei.tileentity.CandleTile.tick(CandleTile.java:395) ~
[hexerei-0.3.3.1.jar%23464!/:0.3.3.1] {re:mixin,re:computing_frames,re:classload
ing}

And yeah, in the code you see the offending cast: https://github.com/JoeFoxe/Hexerei-1.19/blob/5fe64668c3194e91e04fa6c2a503c2aa69776d1d/src/main/java/net/joefoxe/hexerei/data/candle/PotionCandleEffect.java#L59C14-L59C14

Probably just need to wrap it in an instanceof check or the getValue(get()) combo is returning something unexpected... (or possibly rand returned something out of range due to a fencepost error?) Just guessing as I don't know your code :)