AlmostReliable / summoningrituals

A Minecraft mod to create custom summoning rituals for items and mobs.
https://www.curseforge.com/minecraft/mc-mods/summoningrituals
GNU Lesser General Public License v3.0
10 stars 5 forks source link

Crash #9

Closed Sunekaer closed 2 years ago

Sunekaer commented 2 years ago

Version

summoningrituals-1.18.2-1.1.6

Describe the bug!

Player was trying summon

07Nov2022 09:18:40.307] [Server thread/ERROR] [net.minecraft.server.MinecraftServer/]: Encountered an unexpected exception
net.minecraft.ReportedException: Ticking block entity
    at net.minecraft.server.MinecraftServer.m_5703_(MinecraftServer.java:906) ~[server-1.18.2-20220404.173914-srg.jar%23245!/:?]
    at net.minecraft.server.dedicated.DedicatedServer.m_5703_(DedicatedServer.java:326) ~[server-1.18.2-20220404.173914-srg.jar%23245!/:?]
    at net.minecraft.server.MinecraftServer.m_5705_(MinecraftServer.java:842) ~[server-1.18.2-20220404.173914-srg.jar%23245!/:?]
    at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:685) ~[server-1.18.2-20220404.173914-srg.jar%23245!/:?]
    at net.minecraft.server.MinecraftServer.m_177918_(MinecraftServer.java:261) ~[server-1.18.2-20220404.173914-srg.jar%23245!/:?]
    at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.NoSuchMethodError: 'double java.util.Random.nextDouble(double, double)'
    at com.almostreliable.summoningrituals.recipe.component.RecipeOutputs$RecipeOutput.getRandomPos(RecipeOutputs.java:201) ~[summoningrituals-1.18.2-1.1.6.jar%23221!/:1.18.2-1.1.6]
    at com.almostreliable.summoningrituals.recipe.component.RecipeOutputs$MobOutput.spawn(RecipeOutputs.java:324) ~[summoningrituals-1.18.2-1.1.6.jar%23221!/:1.18.2-1.1.6]
    at com.almostreliable.summoningrituals.recipe.component.RecipeOutputs.handleRecipe(RecipeOutputs.java:83) ~[summoningrituals-1.18.2-1.1.6.jar%23221!/:1.18.2-1.1.6]
    at com.almostreliable.summoningrituals.altar.AltarEntity.tick(AltarEntity.java:160) ~[summoningrituals-1.18.2-1.1.6.jar%23221!/:1.18.2-1.1.6]
    at com.almostreliable.summoningrituals.altar.AltarBlock.lambda$getTicker$1(AltarBlock.java:86) ~[summoningrituals-1.18.2-1.1.6.jar%23221!/:1.18.2-1.1.6]
    ... 5 more

Crash Report

No response

Log

No response

Additional Context

Yes

Modifications

SB3 modpack

Did the issue happen in singleplayer or on a server?

Singleplayer

rlnt commented 2 years ago

This looks like a faulty java installation to me. It mentions that it's missing a method on Random which is shipped natively inside the java.utils package. There is no way this can be missing if it's a correct java installation.

I'd need the full log. I can't reproduce this and I know plenty of SB3 players that summoned successfully.

Sunekaer commented 2 years ago

User just updated to say it happened on server, idk if that changes anything for you?

rlnt commented 2 years ago

Not really. The issue remains that they are missing an internal java package. I need the full log.

Neolyum commented 2 years ago

Hi, server owner here xD This is the full crash report: https://gist.github.com/Neolyum/c56085652a8453b7011d21c8c8227196

The server is running in a docker container, using openjdk:17-jdk-alpine as image.

Gist
Minecraft Crash Report
Minecraft Crash Report. GitHub Gist: instantly share code, notes, and snippets.

bash-5.1# java -version
openjdk version "17-ea" 2021-09-14
OpenJDK Runtime Environment (build 17-ea+14)
OpenJDK 64-Bit Server VM (build 17-ea+14, mixed mode, sharing)
rlnt commented 2 years ago

All issues I found that are related to that topic are from around the time Java 8 was released when people still used older versions.

The Random.nextDouble(double, double) method comes from the RandomGenerator interface that was introduced in Java 17 so your Java installation is maybe missing that.

Would it be possible for you to try it with another image that runs on a different java 17 version? The project was compiled against the Jetbrains runtime but I previously used Zulu Java 17 which also worked fine.

Edit because I forgot: I am assuming your client uses another java version since it is working there.

Neolyum commented 2 years ago

Tested now on openjdk:17-jdk-slim-buster

root@3c774100625a:/server# java -version
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment (build 17.0.2+8-86)
OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)

and it worked! Probably the problem was indeed the old version in 17-jdk-alpine. Sorry for the fuzz and thank you for the solution! :)

rlnt commented 2 years ago

No worries, glad it is solved :)