Occultism

Occultism

19M Downloads

[1.21.1][Neoforge] Pentacle Preview crash game

ffuentesm opened this issue ยท 6 comments

commented

Describe the bug
The game crashes when I walk trying to position a Ritual circle preview model, or when I place an item on the circle preview.

To Reproduce
Steps to reproduce the behavior:

  1. Have a ritual circle Preview mod
  2. Walk around with the ritual preview activated
    or: Try to place an item on the circle preview (ie: Golden bowl, chalk marks)

Expected behavior
It shouldn't crash

System (please complete the following information):

  • Occultism Version: occultism-1.21.1-neoforge-1.169.0.jar
  • Neoforge: 21.1.89
  • Minecraft Version: 1.21.1

Additional context
CrasLog: https://pastebin.com/mAp6sTrd
Crashlog: https://pastebin.com/q41fkySW

at TRANSFORMER/[email protected]/com.klikli_dev.modonomicon.multiblock.AbstractMultiblock.lambda$validate$1(AbstractMultiblock.java:184) ~[modonomicon-1.21.1-neoforge-1.110.1.jar%23509!/:1.110.0] {re:classloading}
at java.base/java.util.stream.MatchOps$1MatchSink.accept(MatchOps.java:90) ~[?:?] {}
at java.base/java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1685) ~[?:?] {}
at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:129) ~[?:?] {}
at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:527) ~[?:?] {}
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:513) ~[?:?] {}
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] {}
at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:230) ~[?:?] {}
at java.base/java.util.stream.MatchOps$MatchOp.evaluateSequential(MatchOps.java:196) ~[?:?] {}
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] {}
at java.base/java.util.stream.ReferencePipeline.allMatch(ReferencePipeline.java:637) ~[?:?] {}
at TRANSFORMER/[email protected]/com.klikli_dev.modonomicon.multiblock.AbstractMultiblock.validate(AbstractMultiblock.java:181) ~[modonomicon-1.21.1-neoforge-1.110.1.jar%23509!/:1.110.0] {re:classloading}
at TRANSFORMER/[email protected]/com.klikli_dev.modonomicon.multiblock.AbstractMultiblock.validate(AbstractMultiblock.java:168) ~[modonomicon-1.21.1-neoforge-1.110.1.jar%23509!/:1.110.0] {re:classloading}
at TRANSFORMER/[email protected]/com.klikli_dev.occultism.client.render.GoldenSacrificialBowlHUD.lambda$render$0(GoldenSacrificialBowlHUD.java:63) ~[occultism-1.21.1-neoforge-1.169.0.jar%23519!/:1.169.0] {re:classloading}
at java.base/java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:178) ~[?:?] {}
at java.base/java.util.AbstractList$RandomAccessSpliterator.forEachRemaining(AbstractList.java:722) ~[?:?] {}
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?] {}
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?] {}
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:921) ~[?:?] {}
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?] {}
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?] {}
at TRANSFORMER/[email protected]/com.klikli_dev.occultism.client.render.GoldenSacrificialBowlHUD.render(GoldenSacrificialBowlHUD.java:65) ~[occultism-1.21.1-neoforge-1.169.0.jar%23519!/:1.169.0] {re:classloading}
at TRANSFORMER/[email protected]/net.neoforged.neoforge.client.gui.GuiLayerManager.renderInner(GuiLayerManager.java:69) ~[neoforge-21.1.89-universal.jar%23384!/:?] {re:classloading}
at TRANSFORMER/[email protected]/net.neoforged.neoforge.client.gui.GuiLayerManager.render(GuiLayerManager.java:59) ~[neoforge-21.1.89-universal.jar%23384!/:?] {re:classloading}
at TRANSFORMER/[email protected]/net.minecraft.client.gui.Gui.render(Gui.java:234) ~[client-1.21.1-20240808.144430-srg.jar%23383!/:?]

commented

Thank you for posting, will investigate!

commented

This seems to be a variant of a bug already fixed, (Will check if it somehow reverted!) but interesting is the inclusion of oritech:machine_extender

Do you happen to know if it happens in other scenarios too? @ffuentesm

commented

I tried to reproduce this with just occultism + dependencies but was unable to do it.

What I tried:

  • Walk around with the preview moving in front of me
  • Move the preview in a way so some of its blocks intersect with existing blocks (e.g. a furnace)
  • Place the preview
  • Place the preview in a way so some of its blocks intersect with existing blocks (e.g. a furnace)
  • Move the preview, switch to chalk, place chalk (this anchors the preview and places the chalk)
  • Move the preview, switch to candle, place candle (this anchors the preview and places the candle)

I tested with Ophyx Calling

commented

HUm...
It seems to be a compat problem with Oritech. I did what you did above, and nothing happened.
But once I placed Oritech blocks, it crashed the moment I activated the ritual preview.
Crash: https://api.mclo.gs/1/raw/WWhL1MO
[14:07:45] [Render thread/ERROR] [ne.ne.bu.EventBus/EVENTBUS]: Exception caught during firing event: Cannot get property DirectionProperty{name=facing, clazz=class net.minecraft.core.Direction, values=[north, south, west, east]} as it does not exist in Block{oritech:capacitor_addon_extender}

commented

Closing this, I suggested a fix Rearth/Oritech#206

It is technically possible to solve this in Modonomicon, but it is not a good solution because it would hide potential similar errors in other mods.

Simply put, Oritech fell victim to bad API design on Minecraft's side, and if I fix it in modonomicon with a try/catch before calling rotate I perpetuate that pattern.

commented

Good find! I will try to reproduce it in my dev environment to debug it, although I have to figure out if/how I can make the neo/fabric compat layer work there :D