Zenith

Zenith

3M Downloads

Zenith causes Simple Voice Chat mod to not work on first log in to server

armokfine opened this issue ยท 3 comments

commented

I know this is a bit of a weird issue, but it so happens that I did my own SMP modpack and discovered that:

[18:47:23] [Render thread/ERROR]: Exception thrown while invoking ClientPlayConnectionEvents.JOIN
java.lang.IndexOutOfBoundsException: Index -1 out of bounds for length 0
	at jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64) ~[?:?]
	at jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70) ~[?:?]
	at jdk.internal.util.Preconditions.checkIndex(Preconditions.java:266) ~[?:?]
	at java.util.Objects.checkIndex(Objects.java:359) ~[?:?]
	at java.util.ArrayList.get(ArrayList.java:427) ~[?:?]
	at dev.shadowsoffire.apotheosis.adventure.loot.RarityRegistry.getMaxRarity(RarityRegistry.java:73) ~[zenith-1.1.9-1.20.1.jar:?]
	at dev.shadowsoffire.apotheosis.adventure.affix.reforging.ReforgingTableBlock.method_9568(ReforgingTableBlock.java:94) ~[zenith-1.1.9-1.20.1.jar:?]
	at net.minecraft.class_1747.method_7851(class_1747.java:203) ~[client-intermediary.jar:?]
	at net.minecraft.class_1799.method_7950(class_1799.java:647) ~[client-intermediary.jar:?]
	at net.minecraft.class_310.method_1485(class_310.java:839) ~[client-intermediary.jar:?]
	at net.minecraft.class_7454.method_43796(class_7454.java:20) ~[client-intermediary.jar:?]
	at net.minecraft.class_1126.method_4799(class_1126.java:26) ~[client-intermediary.jar:?]
	at net.minecraft.class_1124$class_7457.method_43807(class_1124.java:61) ~[client-intermediary.jar:?]
	at net.minecraft.class_1124.method_43804(class_1124.java:42) ~[client-intermediary.jar:?]
	at net.minecraft.class_310.method_43759(class_310.java:2653) ~[client-intermediary.jar:?]
	at net.minecraft.class_310.method_46740(class_310.java:857) ~[client-intermediary.jar:?]
	at net.minecraft.class_1761.method_47314(class_1761.java:128) ~[client-intermediary.jar:?]
	at net.minecraft.class_1761.method_47306(class_1761.java:107) ~[client-intermediary.jar:?]
	at net.minecraft.class_7706.method_47331(class_7706.java:2054) ~[client-intermediary.jar:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:183) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
	at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
	at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1845) ~[?:?]
	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:509) ~[?:?]
	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:499) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:150) ~[?:?]
	at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:173) ~[?:?]
	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
	at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:596) ~[?:?]
	at net.minecraft.class_7706.method_47337(class_7706.java:2054) ~[client-intermediary.jar:?]
	at net.minecraft.class_7706.method_47330(class_7706.java:2063) ~[client-intermediary.jar:?]
	at de.siphalor.mousewheelie.client.util.CreativeSearchOrder.refreshItemSearchPositionLookup(CreativeSearchOrder.java:66) ~[mousewheelie-1.11.1+mc1.20-pre2.jar:?]
	at de.siphalor.mousewheelie.client.MWClient.lambda$onInitializeClient$1(MWClient.java:106) ~[mousewheelie-1.11.1+mc1.20-pre2.jar:?]
	at net.fabricmc.fabric.api.client.networking.v1.ClientPlayConnectionEvents.lambda$static$2(ClientPlayConnectionEvents.java:50) ~[fabric-networking-api-v1-1.3.11+1802ada577-cf20906c7ecece00.jar:?]
	at net.fabricmc.fabric.impl.networking.client.ClientPlayNetworkAddon.onServerReady(ClientPlayNetworkAddon.java:70) ~[fabric-networking-api-v1-1.3.11+1802ada577-cf20906c7ecece00.jar:?]
	at net.minecraft.class_634.handler$cbk000$fabric-networking-api-v1$handleServerPlayReady(class_634.java:3263) ~[client-intermediary.jar:?]
	at net.minecraft.class_634.method_11120(class_634.java:465) ~[client-intermediary.jar:?]
	at net.minecraft.class_2678.method_11567(class_2678.java:95) ~[client-intermediary.jar:?]
	at net.minecraft.class_2678.method_11054(class_2678.java:25) ~[client-intermediary.jar:?]
	at net.minecraft.class_2600.method_11072(class_2600.java:22) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[client-intermediary.jar:?]
	at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_5383(class_1255.java:115) ~[client-intermediary.jar:?]
	at net.minecraft.class_310.method_1523(class_310.java:1175) ~[client-intermediary.jar:?]
	at net.minecraft.class_310.method_1514(class_310.java:802) ~[client-intermediary.jar:?]
	at net.minecraft.client.main.Main.main(Main.java:250) ~[fabric-loader-0.15.11-1.20.1.jar:?]
	at net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:470) ~[fabric-loader-0.15.11.jar:?]
	at net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74) ~[fabric-loader-0.15.11.jar:?]
	at net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23) ~[fabric-loader-0.15.11.jar:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]
	at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
	at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]
	at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
	at crystallauncher.MinecraftConstructor.run(MinecraftConstructor.java:29) ~[proxyserver.jar:?]
	at crystallauncher.MineClient.start(MineClient.java:201) ~[proxyserver.jar:?]
	at crystallauncher.MineClient.main(MineClient.java:42) ~[proxyserver.jar:?]

it happens everytime when it's your FIRST connection to that server. After you disconnect and connect again voip is working just fine.

Things i ruled out:

  • it is not a server / firewall / connection problem, everything works just fine without Zenith
  • it is the newest version of Zenith, Zenith Attributes, FakerLib and Fabric API for 1.20.1 so no old version issues
  • it is not any other compatibility issues

Mods versions:
zenith_attributes-0.2.4
zenith-1.1.9-1.20.1
fabric-api-0.92.1+1.20.1
fakerlib-0.1.3
voicechat-fabric-1.20.1-2.5.14

As I understand correctly from the log it is this piece of code that's caussing this issue:

    /**
     * Returns the maximum rarity based on the ordinals.
     * <p>
     * Guaranteed to be {@linkplain DynamicHolder#isBound() bound}.
     */
    public static DynamicHolder<LootRarity> getMaxRarity() {
        return INSTANCE.ordered.get(INSTANCE.ordered.size() - 1);
    }

Maybe it causes Simple Voice Chat to not load properly on first try? Dunno.

I am willing to try and dig further to repair this issue and do a PR, but sadly gradlew build on this repo gives me (i know some programming but i'm totally noob to gradle and stuff):

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'Zenith-1.20'.
> Could not resolve all files for configuration ':modImplementation'.
   > Could not find dev.bagel.fakerlib:FakerLib:0.1.3.
     Searched in the following locations:
       - file:/C:/Users/Armok/Desktop/Zenith-1.20/.gradle/loom-cache/remapped_mods/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - file:/C:/Users/Armok/.gradle/caches/fabric-loom/minecraftMaven/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - file:/C:/Users/Armok/Desktop/Zenith-1.20/.gradle/loom-cache/minecraftMaven/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://maven.fabricmc.net/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://libraries.minecraft.net/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://libraries.minecraft.net/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.jar
       - https://repo.maven.apache.org/maven2/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.jar
       - https://repo.maven.apache.org/maven2/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://maven.parchmentmc.org/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://mvn.devos.one/snapshots/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://mvn.devos.one/releases/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://maven.ladysnake.org/releases/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://api.modrinth.com/maven/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://jitpack.io/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://maven.jamieswhiteshirt.com/libs-release/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://maven.blamejared.com/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://maven.shedaniel.me/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://maven.terraformersmc.com/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://cursemaven.com/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - https://maven.bai.lol/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
       - file:/C:/Users/Armok/.m2/repository/dev/bagel/fakerlib/FakerLib/0.1.3/FakerLib-0.1.3.pom
     Required by:
         project :

If someone can help me with building this project and exporting to .jar it would be great.
Or if someone just knows a quick fix to this problem (if that's deleting the "-1" it would be funny) and release a small patch it would be even better.

commented

Sometimes it be like that... thorough issue report though!

commented

I've managed to edit and compile mousewheelie mod to make it work with Zenith by disabling one function that runs on world load (server join). That function iterates through all ItemGroups with RegistryManager and the moment it hits Zenith it breaks... It seems like something is not yet loaded/initialized in Zenith, but mousewheelie wants to access it.
So on first log in it is not loaded, but on second one it is, error doesn't occur and voip connects properly.

Without this function it works just fine, which is good but a makeshift solution.

As I said I'm very interested in trying to repair this issue (by not removing functions from other mods haha) but I'm unable to get Zenith to compile. @TheWinABagel could you help me with that?

commented

Haha ok, after i read my own Issues it is kinda obvious that it is problem caused by client-side mousewheelie mod.
Closing the issue, goodnight. ๐Ÿ˜„