GregTechCEu Modern

GregTechCEu Modern

6M Downloads

Unable to open multiblock GUI with max EU/t tier greater than MAX

TheLMiffy1111 opened this issue ยท 0 comments

commented

Checked for existing issues

  • I have checked for existing issues, and have found none.

Tested latest version

  • I have checked that this occurs on the latest version.

GregTech CEu Version

1.5.4

Minecraft Version

1.20.1

Recipe Viewer Installed

JEI

Environment

Singleplayer

Cross-Mod Interaction

No

Other Installed Mods

None

Expected Behavior

The multiblock GUI should be able to be opened regardless of max EU/t.

Actual Behavior

If the multiblock accepts a tier of EU/t greater than MAX, the multiblock GUI cannot be opened and an AIOOBE is logged in the server console.

See following:

[19:04:44] [Server thread/ERROR] [minecraft/PacketUtils]: Failed to handle packet net.minecraft.network.protocol.game.ServerboundUseItemOnPacket@1303ef37, suppressing error
java.lang.ArrayIndexOutOfBoundsException: Index 15 out of bounds for length 15
	at com.gregtechceu.gtceu.api.machine.multiblock.MultiblockDisplayText$Builder.addEnergyUsageLine(MultiblockDisplayText.java:110) ~[gtceu-1.20.1-1.5.4.jar%23158!/:1.5.4] {re:classloading}
	at com.gregtechceu.gtceu.api.machine.multiblock.WorkableElectricMultiblockMachine.addDisplayText(WorkableElectricMultiblockMachine.java:96) ~[gtceu-1.20.1-1.5.4.jar%23158!/:1.5.4] {re:classloading}
	at com.lowdragmc.lowdraglib.gui.widget.ComponentPanelWidget.<init>(ComponentPanelWidget.java:53) ~[ldlib-forge-1.20.1-1.0.31.jar%23174!/:?] {re:classloading}
	at com.gregtechceu.gtceu.api.machine.multiblock.WorkableElectricMultiblockMachine.createUIWidget(WorkableElectricMultiblockMachine.java:112) ~[gtceu-1.20.1-1.5.4.jar%23158!/:1.5.4] {re:classloading}
	at com.gregtechceu.gtceu.api.machine.feature.IFancyUIMachine.createMainPage(IFancyUIMachine.java:60) ~[gtceu-1.20.1-1.5.4.jar%23158!/:1.5.4] {re:classloading}
	at com.gregtechceu.gtceu.api.gui.fancy.FancyMachineUIWidget.setupFancyUI(FancyMachineUIWidget.java:196) ~[gtceu-1.20.1-1.5.4.jar%23158!/:1.5.4] {re:classloading}
	at com.gregtechceu.gtceu.api.gui.fancy.FancyMachineUIWidget.performNavigation(FancyMachineUIWidget.java:137) ~[gtceu-1.20.1-1.5.4.jar%23158!/:1.5.4] {re:classloading}
	at com.gregtechceu.gtceu.api.gui.fancy.FancyMachineUIWidget.initWidget(FancyMachineUIWidget.java:92) ~[gtceu-1.20.1-1.5.4.jar%23158!/:1.5.4] {re:classloading}
	at com.lowdragmc.lowdraglib.gui.widget.WidgetGroup.initWidget(WidgetGroup.java:449) ~[ldlib-forge-1.20.1-1.0.31.jar%23174!/:?] {re:classloading}
	at com.lowdragmc.lowdraglib.gui.modular.ModularUI.initWidgets(ModularUI.java:205) ~[ldlib-forge-1.20.1-1.0.31.jar%23174!/:?] {re:classloading}
	at com.lowdragmc.lowdraglib.gui.factory.UIFactory.openUI(UIFactory.java:41) ~[ldlib-forge-1.20.1-1.0.31.jar%23174!/:?] {re:classloading}
	at com.gregtechceu.gtceu.api.machine.feature.IUIMachine.tryToOpenUI(IUIMachine.java:28) ~[gtceu-1.20.1-1.5.4.jar%23158!/:1.5.4] {re:classloading}
	at com.gregtechceu.gtceu.api.block.MetaMachineBlock.m_6227_(MetaMachineBlock.java:324) ~[gtceu-1.20.1-1.5.4.jar%23158!/:1.5.4] {re:mixin,re:classloading}
	at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.m_60664_(BlockBehaviour.java:778) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:classloading,re:mixin}
	at net.minecraft.server.level.ServerPlayerGameMode.m_7179_(ServerPlayerGameMode.java:343) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:classloading}
	at net.minecraft.server.network.ServerGamePacketListenerImpl.m_6371_(ServerGamePacketListenerImpl.java:1055) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B,pl:mixin:APP:gtceu.mixins.json:ServerGamePacketListenerImplAccessor,pl:mixin:A}
	at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.m_5797_(ServerboundUseItemOnPacket.java:34) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:classloading}
	at net.minecraft.network.protocol.game.ServerboundUseItemOnPacket.m_5797_(ServerboundUseItemOnPacket.java:8) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:classloading}
	at net.minecraft.network.protocol.PacketUtils.m_263899_(PacketUtils.java:22) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:classloading}
	at net.minecraft.server.TickTask.run(TickTask.java:18) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:classloading}
	at net.minecraft.util.thread.BlockableEventLoop.m_6367_(BlockableEventLoop.java:156) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.util.thread.ReentrantBlockableEventLoop.m_6367_(ReentrantBlockableEventLoop.java:23) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:mixin,re:computing_frames,re:classloading}
	at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:770) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.m_6367_(MinecraftServer.java:161) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.util.thread.BlockableEventLoop.m_7245_(BlockableEventLoop.java:130) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.m_129961_(MinecraftServer.java:753) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.m_7245_(MinecraftServer.java:747) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.util.thread.BlockableEventLoop.m_18701_(BlockableEventLoop.java:139) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:mixin,pl:accesstransformer:B,re:computing_frames,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.m_130012_(MinecraftServer.java:733) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.m_130011_(MinecraftServer.java:665) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at net.minecraft.server.MinecraftServer.m_206580_(MinecraftServer.java:251) ~[client-1.20.1-20230612.114412-srg.jar%23160!/:?] {re:mixin,pl:accesstransformer:B,re:classloading,pl:accesstransformer:B}
	at java.lang.Thread.run(Thread.java:840) ~[?:?] {re:mixin}

Steps to Reproduce

  1. Enable high tier content
  2. Build a multiblock using either an OpV 16A Energy Hatch, MAX 4A Energy Hatch, or MAX 16A Energy Hatch
  3. Try opening the GUI of the multiblock

Additional Information

This is caused by GTUtils.getFloorTierByVoltage returning voltage tiers according to GTValues.VEX, which may exceed the range of voltage tiers supported by GTValues.VN and GTValues.VNF used to name the voltage tiers.
This is may be a problem inevitably encountered in modpacks with high tier content enabled.