Just Enough Items (JEI)

Just Enough Items (JEI)

391M Downloads

ClassCastException in IngredientBatchRenderer

shartte opened this issue ยท 2 comments

commented

return (List<IngredientListElementRenderer<T>>) (Object) map.get(ingredientType);

This crashes for me with:

java.lang.ClassCastException: class java.util.Collections$UnmodifiableCollection cannot be cast to class java.util.List (java.util.Collections$UnmodifiableCollection and java.util.List are in module java.base of loader 'bootstrap')
	at mezz.jei.render.IngredientListBatches.get(IngredientListBatches.java:22) ~[jei-1.18.1-9.2.3.83_mapped_official_1.18.1.jar%2386!/:9.2.3.83] {re:classloading}
	at mezz.jei.render.IngredientListBatchRenderer.renderIngredientType(IngredientListBatchRenderer.java:281) ~[jei-1.18.1-9.2.3.83_mapped_official_1.18.1.jar%2386!/:9.2.3.83] {re:classloading}
	at mezz.jei.render.IngredientListBatchRenderer.render(IngredientListBatchRenderer.java:185) ~[jei-1.18.1-9.2.3.83_mapped_official_1.18.1.jar%2386!/:9.2.3.83] {re:classloading}
	at mezz.jei.gui.overlay.IngredientGrid.draw(IngredientGrid.java:151) ~[jei-1.18.1-9.2.3.83_mapped_official_1.18.1.jar%2386!/:9.2.3.83] {re:classloading}
	at mezz.jei.gui.overlay.IngredientGridWithNavigation.draw(IngredientGridWithNavigation.java:126) ~[jei-1.18.1-9.2.3.83_mapped_official_1.18.1.jar%2386!/:9.2.3.83] {re:classloading}
	at mezz.jei.gui.overlay.IngredientListOverlay.drawScreen(IngredientListOverlay.java:177) ~[jei-1.18.1-9.2.3.83_mapped_official_1.18.1.jar%2386!/:9.2.3.83] {re:classloading}
	at mezz.jei.gui.GuiEventHandler.onDrawBackgroundEventPost(GuiEventHandler.java:78) ~[jei-1.18.1-9.2.3.83_mapped_official_1.18.1.jar%2386!/:9.2.3.83] {re:classloading}
	at mezz.jei.events.EventBusHelper.lambda$registerWeakListener$2(EventBusHelper.java:116) ~[jei-1.18.1-9.2.3.83_mapped_official_1.18.1.jar%2386!/:9.2.3.83] {re:classloading}
	at net.minecraftforge.eventbus.EventBus.doCastFilter(EventBus.java:247) ~[eventbus-5.0.7.jar%2316!/:?] {}
	at net.minecraftforge.eventbus.EventBus.lambda$addListener$11(EventBus.java:239) ~[eventbus-5.0.7.jar%2316!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:302) ~[eventbus-5.0.7.jar%2316!/:?] {}
	at net.minecraftforge.eventbus.EventBus.post(EventBus.java:283) ~[eventbus-5.0.7.jar%2316!/:?] {}
	at net.minecraft.client.gui.screens.Screen.renderBackground(Screen.java:449) ~[forge-1.18.1-39.0.63_mapped_official_1.18.1-recomp.jar%2380!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:computing_frames,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:ae2.mixins.json:WrappedGenericStackTooltipModIdMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.gui.screens.Screen.renderBackground(Screen.java:443) ~[forge-1.18.1-39.0.63_mapped_official_1.18.1-recomp.jar%2380!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:computing_frames,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:ae2.mixins.json:WrappedGenericStackTooltipModIdMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at appeng.client.gui.AEBaseScreen.render(AEBaseScreen.java:211) ~[%2384!/:?] {re:mixin,re:classloading}
	at net.minecraftforge.client.ForgeHooksClient.drawScreenInternal(ForgeHooksClient.java:395) ~[forge-1.18.1-39.0.63_mapped_official_1.18.1-recomp.jar%2379%2385!/:?] {re:classloading}
	at net.minecraftforge.client.ForgeHooksClient.drawScreen(ForgeHooksClient.java:388) ~[forge-1.18.1-39.0.63_mapped_official_1.18.1-recomp.jar%2379%2385!/:?] {re:classloading}
	at net.minecraft.client.renderer.GameRenderer.render(GameRenderer.java:886) ~[forge-1.18.1-39.0.63_mapped_official_1.18.1-recomp.jar%2380!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.runTick(Minecraft.java:1040) ~[forge-1.18.1-39.0.63_mapped_official_1.18.1-recomp.jar%2380!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:ae2.mixins.json:PickColorMixin,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.Minecraft.run(Minecraft.java:660) ~[forge-1.18.1-39.0.63_mapped_official_1.18.1-recomp.jar%2380!/:?] {re:mixin,pl:accesstransformer:B,pl:runtimedistcleaner:A,re:classloading,pl:accesstransformer:B,pl:mixin:APP:ae2.mixins.json:PickColorMixin,pl:mixin:APP:flywheel.mixins.json:PausedPartialTickAccessor,pl:mixin:APP:flywheel.mixins.json:ShaderCloseMixin,pl:mixin:APP:immersiveengineering.mixins.json:accessors.client.MinecraftAccess,pl:mixin:APP:create.mixins.json:WindowResizeMixin,pl:mixin:A,pl:runtimedistcleaner:A}
	at net.minecraft.client.main.Main.main(Main.java:205) ~[forge-1.18.1-39.0.63_mapped_official_1.18.1-recomp.jar%2380!/:?] {re:classloading,pl:runtimedistcleaner:A}
	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 net.minecraftforge.fml.loading.targets.ForgeClientUserdevLaunchHandler.lambda$launchService$0(ForgeClientUserdevLaunchHandler.java:38) ~[fmlloader-1.18.1-39.0.63.jar%230!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:37) [modlauncher-9.1.0.jar%2317!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) [modlauncher-9.1.0.jar%2317!/:?] {}
	at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) [modlauncher-9.1.0.jar%2317!/:?] {}
	at cpw.mods.modlauncher.Launcher.run(Launcher.java:106) [modlauncher-9.1.0.jar%2317!/:?] {}
	at cpw.mods.modlauncher.Launcher.main(Launcher.java:77) [modlauncher-9.1.0.jar%2317!/:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) [modlauncher-9.1.0.jar%2317!/:?] {}
	at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) [modlauncher-9.1.0.jar%2317!/:?] {}
	at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:149) [bootstraplauncher-1.0.0.jar:?] {}

Happens because of this change:
895a09d#diff-5ceb0f3352cb95c2f6fda24414e635665751d5178ad44bf366a468e52ae27870R30

commented

Thanks for the report!
Sorry, this commit was part of a larger refactor that isn't complete yet, and wasn't intended to be pushed as-is. I'll revert this commit.

commented

The commit has been reverted now