(已解决)4.0.0B13轨道和站台门有概率完全不可见的问题
本帖最后由 abRoy 于 2025-1-12 18:37 编辑从mtr4.0.0B8就一直困扰我到现在的问题终于解决了,分享一下防止其他和我相同问题的人踩坑
原mc(1.20.1)在3.2.2版本的mtr下运行一切正常。升级到4.0.0B13后概率出现部分车站/线路的铁轨,站台门不可见的情况,但是又有一些车站是完全正常的。所有的列车都不可见。
↑这里应该有张图片但是我不知道插入成功没有 看不到
原本以为是mtr的问题但是等了很久都没有修复,遂自己看一下日志,发现以下报错频繁出现
:
java.lang.ClassCastException: class org.mtr.mapping.render.vertex.CapturingVertexConsumer cannot be cast to class me.jellysquid.mods.sodium.client.render.vertex.VertexBufferWriter (org.mtr.mapping.render.vertex.CapturingVertexConsumer is in module mtr@4.0.0-beta.13 of loader 'TRANSFORMER' @62c46e53; me.jellysquid.mods.sodium.client.render.vertex.VertexBufferWriter is in module rubidium@0.6.5 of loader 'TRANSFORMER' @62c46e53)
at me.jellysquid.mods.sodium.client.render.vertex.VertexBufferWriter.of(VertexBufferWriter.java:8) ~[%5B�%5D%20rubidium-0.6.5.jar%23246!/:?]
at net.minecraft.client.model.geom.ModelPart.m_104290_(ModelPart.java:563) ~
at net.minecraft.client.model.geom.ModelPart.m_104306_(ModelPart.java:124) ~
at net.minecraft.client.model.geom.ModelPart.m_104301_(ModelPart.java:109) ~
at org.mtr.mapping.mapper.OptimizedModel$MaterialGroup.lambda$addCube$0(OptimizedModel.java:99) ~
at org.mtr.mapping.mapper.OptimizedModel.lambda$fromMaterialGroups$0(OptimizedModel.java:47) ~
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at org.mtr.mapping.mapper.OptimizedModel.lambda$fromMaterialGroups$1(OptimizedModel.java:47) ~
at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
at org.mtr.mapping.mapper.OptimizedModel.fromMaterialGroups(OptimizedModel.java:45) ~
at org.mtr.mod.resource.OptimizedModelWrapper.fromMaterialGroups(OptimizedModelWrapper.java:20) ~
at org.mtr.mod.resource.ModelPropertiesPart.writeCache(ModelPropertiesPart.java:135) ~
at org.mtr.mod.render.DynamicVehicleModel.lambda$new$3(DynamicVehicleModel.java:68) ~
at org.mtr.libraries.it.unimi.dsi.fastutil.objects.ObjectArrayList.forEach(ObjectArrayList.java:749) ~
at org.mtr.mod.resource.ModelProperties.iterateParts(ModelProperties.java:135) ~
at org.mtr.mod.render.DynamicVehicleModel.<init>(DynamicVehicleModel.java:68) ~
at org.mtr.mod.resource.VehicleModel.createModel(VehicleModel.java:121) ~
at org.mtr.mod.resource.VehicleModel.lambda$new$0(VehicleModel.java:30) ~
at org.mtr.mod.resource.CachedResource.getData(CachedResource.java:31) ~
at org.mtr.mod.resource.VehicleResource.lambda$forEachNonNull$20(VehicleResource.java:503) ~
at org.mtr.libraries.it.unimi.dsi.fastutil.objects.ObjectArrayList.forEach(ObjectArrayList.java:749) ~
at org.mtr.mod.resource.VehicleResource.forEachNonNull(VehicleResource.java:502) ~
at org.mtr.mod.resource.VehicleResource.lambda$cachedVehicleResourceInitializer$15(VehicleResource.java:390) ~
at org.mtr.mod.resource.CachedResource.getData(CachedResource.java:31) ~
at org.mtr.mod.resource.VehicleResource.queueBogie(VehicleResource.java:206) ~
at org.mtr.mod.render.RenderVehicles.lambda$render$3(RenderVehicles.java:81) ~
at org.mtr.mod.render.RenderVehicleHelper.renderModel(RenderVehicleHelper.java:92) ~
at org.mtr.mod.render.RenderVehicles.lambda$render$6(RenderVehicles.java:81) ~
at org.mtr.mod.render.RenderVehicles.iterateWithIndex(RenderVehicles.java:330) ~
at org.mtr.mod.render.RenderVehicles.lambda$render$12(RenderVehicles.java:78) ~
at org.mtr.mod.client.CustomResourceLoader.getVehicleById(CustomResourceLoader.java:161) ~
at org.mtr.mod.render.RenderVehicles.lambda$render$13(RenderVehicles.java:72) ~
at org.mtr.mod.render.RenderVehicles.iterateWithIndex(RenderVehicles.java:330) ~
at org.mtr.mod.render.RenderVehicles.lambda$render$14(RenderVehicles.java:53) ~
at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
at org.mtr.mod.render.RenderVehicles.render(RenderVehicles.java:42) ~
at org.mtr.mod.render.MainRenderer.render(MainRenderer.java:102) ~
at org.mtr.mod.render.MainRenderer.render(MainRenderer.java:60) ~
at org.mtr.mod.render.MainRenderer.render(MainRenderer.java:26) ~
at org.mtr.mapping.mapper.EntityRenderer.lambda$render$0(EntityRenderer.java:21) ~
at org.mtr.mapping.mapper.GraphicsHolder.createInstanceSafe(GraphicsHolder.java:50) ~
at org.mtr.mapping.mapper.GraphicsHolder.createInstanceSafe(GraphicsHolder.java:40) ~
at org.mtr.mapping.mapper.EntityRenderer.render(EntityRenderer.java:21) ~
at org.mtr.mapping.mapper.EntityRenderer.m_7392_(EntityRenderer.java:11) ~
at net.minecraft.client.renderer.entity.EntityRenderDispatcher.m_114384_(EntityRenderDispatcher.java:140) ~
at net.minecraft.client.renderer.LevelRenderer.m_109517_(LevelRenderer.java:1440) ~
at net.minecraft.client.renderer.LevelRenderer.invokeRenderEntity(LevelRenderer.java) ~
at net.coderbot.iris.pipeline.ShadowRenderer.renderEntities(ShadowRenderer.java:606) ~
at net.coderbot.iris.pipeline.ShadowRenderer.renderShadows(ShadowRenderer.java:483) ~
at net.coderbot.iris.pipeline.newshader.NewWorldRenderingPipeline.renderShadows(NewWorldRenderingPipeline.java:1033) ~
at net.minecraft.client.renderer.LevelRenderer.handler$zob000$iris$renderTerrainShadows(LevelRenderer.java:11680) ~
at net.minecraft.client.renderer.LevelRenderer.m_109599_(LevelRenderer.java:1155) ~
at net.minecraft.client.renderer.GameRenderer.m_109089_(GameRenderer.java:1126) ~
at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:909) ~
at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1146) ~
at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:718) ~
at net.minecraft.client.main.Main.main(Main.java:218) ~
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.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~
at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~
at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~
at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~
at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~
at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~
at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~
at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~
at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~
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 oolloo.jlw.Wrapper.invokeMain(Wrapper.java:112) ~[?:?]
at oolloo.jlw.Wrapper.main(Wrapper.java:105) ~[?:?]简单说就是MTR尝试将一个 CapturingVertexConsumer 对象强制转换为Rubidium的类 VertexBufferWriter,但这两个类不兼容。
Rubidium和oculus这两个模组是整合包原有的,支持性能优化和光影的模组。但是Rubidium自 2023 年12月起已经停止更新,不再维护。
经过研究,我将 Rubidium 替换为 Embeddium 。Embeddium是 Rubidium 的非官方分支,仍在活跃维护中,并包含更多兼容性补丁和新功能。
当 Embeddium 配合 oculus使用时,所有功能都可以正常运行,且日志中未出现任何报错。
此问题也已提交至mtr的GitHub(https://github.com/Minecraft-Tra ... Railway/issues/1028) ,考虑到Rubidium已经停止维护,mtr是否可以主动兼容Rubidium?
页:
[1]