本帖最后由 abRoy 于 2025-1-12 18:37 编辑
" I3 I& C' h+ X. o8 m, D3 E% n/ u; ]
从mtr4.0.0B8就一直困扰我到现在的问题终于解决了,分享一下防止其他和我相同问题的人踩坑6 r1 U0 |% }. g+ H5 G1 p, q! H3 D
% x% M" i% E2 b' C$ w# F9 z
1 D6 t" k' M( y$ T: q
原mc(1.20.1)在3.2.2版本的mtr下运行一切正常。升级到4.0.0B13后概率出现部分车站/线路的铁轨,站台门不可见的情况,但是又有一些车站是完全正常的。所有的列车都不可见。4 A( f" |) e+ E. q$ E
0 c* i+ j! a& s2 v( d: _8 o
4 p4 j: g+ l: y0 a. N↑这里应该有张图片但是我不知道插入成功没有 看不到
" R, w- @' T$ e/ v: C4 T
0 l% O6 F4 s, l. c$ @) X& H; L, X) P/ @+ Z* _( T n& @( t) E4 [
原本以为是mtr的问题但是等了很久都没有修复,遂自己看一下日志,发现以下报错频繁出现
' H1 }1 N0 N b3 B! |- [121��2025 16:54:18.818] [Render thread/ERROR] [MinecraftMappings/]:
/ }7 O7 E1 o, q" A - 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)
4 f6 d) x/ j' Q8 \ - at me.jellysquid.mods.sodium.client.render.vertex.VertexBufferWriter.of(VertexBufferWriter.java:8) ~[%5B�%5D%20rubidium-0.6.5.jar%23246!/:?]8 m; s3 d% y6 U9 Q0 z7 l
- at net.minecraft.client.model.geom.ModelPart.m_104290_(ModelPart.java:563) ~[client-1.20.1-20230612.114412-srg.jar%23300!/:?], u8 k# A; w% J1 I* x% j
- at net.minecraft.client.model.geom.ModelPart.m_104306_(ModelPart.java:124) ~[client-1.20.1-20230612.114412-srg.jar%23300!/:?]
+ d N7 B, r! g" i3 [8 Q0 ] - at net.minecraft.client.model.geom.ModelPart.m_104301_(ModelPart.java:109) ~[client-1.20.1-20230612.114412-srg.jar%23300!/:?]! v8 j' P7 V8 j1 R
- at org.mtr.mapping.mapper.OptimizedModel$MaterialGroup.lambda$addCube$0(OptimizedModel.java:99) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
1 S' v0 g+ Y. T/ I& }8 h - at org.mtr.mapping.mapper.OptimizedModel.lambda$fromMaterialGroups$0(OptimizedModel.java:47) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]# P0 j5 D5 z, m/ r
- at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]
+ _ ?& _8 u# K+ L" p# w - at org.mtr.mapping.mapper.OptimizedModel.lambda$fromMaterialGroups$1(OptimizedModel.java:47) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
4 k( D) @) M" }' ` - at java.util.ArrayList.forEach(ArrayList.java:1511) ~[?:?]* j7 j+ C; b+ }. n7 q7 J
- at org.mtr.mapping.mapper.OptimizedModel.fromMaterialGroups(OptimizedModel.java:45) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
" V, C* ], C# I( p6 K7 s - at org.mtr.mod.resource.OptimizedModelWrapper.fromMaterialGroups(OptimizedModelWrapper.java:20) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]" W% n8 t3 s \/ U) r- G$ T! W
- at org.mtr.mod.resource.ModelPropertiesPart.writeCache(ModelPropertiesPart.java:135) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
6 f. ^- p+ [. f7 @7 f8 s - at org.mtr.mod.render.DynamicVehicleModel.lambda$new$3(DynamicVehicleModel.java:68) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
( I# y2 N/ f/ X* g) Z! R+ j - at org.mtr.libraries.it.unimi.dsi.fastutil.objects.ObjectArrayList.forEach(ObjectArrayList.java:749) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
, E: T }4 m4 o7 ^: j" B - at org.mtr.mod.resource.ModelProperties.iterateParts(ModelProperties.java:135) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]4 a8 c; n; u) w+ @
- at org.mtr.mod.render.DynamicVehicleModel.<init>(DynamicVehicleModel.java:68) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?] x7 O" a, q3 ^, Z& }% y( I3 Y& Q
- at org.mtr.mod.resource.VehicleModel.createModel(VehicleModel.java:121) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
* q0 _% e+ i5 r - at org.mtr.mod.resource.VehicleModel.lambda$new$0(VehicleModel.java:30) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
- ?: W( A* G0 z, z5 s - at org.mtr.mod.resource.CachedResource.getData(CachedResource.java:31) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]4 X- E) o. d1 R2 d3 d
- at org.mtr.mod.resource.VehicleResource.lambda$forEachNonNull$20(VehicleResource.java:503) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?], L: D6 _( i' f- Z7 E
- at org.mtr.libraries.it.unimi.dsi.fastutil.objects.ObjectArrayList.forEach(ObjectArrayList.java:749) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]1 ]5 z1 l& D; k% ]# ], W4 e$ Q
- at org.mtr.mod.resource.VehicleResource.forEachNonNull(VehicleResource.java:502) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
J) Z/ F4 _ }3 m8 v - at org.mtr.mod.resource.VehicleResource.lambda$cachedVehicleResourceInitializer$15(VehicleResource.java:390) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]( ^( U! P! P: M% A" W9 ]
- at org.mtr.mod.resource.CachedResource.getData(CachedResource.java:31) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]4 R0 a- S$ P% n0 C4 e4 K( s
- at org.mtr.mod.resource.VehicleResource.queueBogie(VehicleResource.java:206) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
' x. e2 U1 v$ w( E9 h8 ] - at org.mtr.mod.render.RenderVehicles.lambda$render$3(RenderVehicles.java:81) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
) Q, n8 y4 n& y# z - at org.mtr.mod.render.RenderVehicleHelper.renderModel(RenderVehicleHelper.java:92) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?], t; \1 P7 E4 ~% k& Y/ O
- at org.mtr.mod.render.RenderVehicles.lambda$render$6(RenderVehicles.java:81) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]' U$ O8 ?* a6 F1 H$ f* ~
- at org.mtr.mod.render.RenderVehicles.iterateWithIndex(RenderVehicles.java:330) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]% @9 E' H; w0 j9 w1 o* q1 z
- at org.mtr.mod.render.RenderVehicles.lambda$render$12(RenderVehicles.java:78) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]* R4 _5 b( O. u, y! A3 ]
- at org.mtr.mod.client.CustomResourceLoader.getVehicleById(CustomResourceLoader.java:161) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]: E2 J% }0 C% ]
- at org.mtr.mod.render.RenderVehicles.lambda$render$13(RenderVehicles.java:72) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
( _& M, L6 H" \ - at org.mtr.mod.render.RenderVehicles.iterateWithIndex(RenderVehicles.java:330) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]- S9 E8 z \1 g! q3 r
- at org.mtr.mod.render.RenderVehicles.lambda$render$14(RenderVehicles.java:53) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
: [% j) h: {! F# {! f$ } - at java.lang.Iterable.forEach(Iterable.java:75) ~[?:?]
* J3 L+ }( s4 f2 V. e9 t - at org.mtr.mod.render.RenderVehicles.render(RenderVehicles.java:42) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
3 H4 \3 G6 c+ v - at org.mtr.mod.render.MainRenderer.render(MainRenderer.java:102) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
# X2 b6 F( z' M2 F/ P2 _ - at org.mtr.mod.render.MainRenderer.render(MainRenderer.java:60) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]/ W B; y6 a) b
- at org.mtr.mod.render.MainRenderer.render(MainRenderer.java:26) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
. a) \) i; W$ L - at org.mtr.mapping.mapper.EntityRenderer.lambda$render$0(EntityRenderer.java:21) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]9 k, l# T" E" c) @
- at org.mtr.mapping.mapper.GraphicsHolder.createInstanceSafe(GraphicsHolder.java:50) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]0 g" H# P* p4 d% _% _% g
- at org.mtr.mapping.mapper.GraphicsHolder.createInstanceSafe(GraphicsHolder.java:40) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
& ~1 P# B* L" M+ Q8 r - at org.mtr.mapping.mapper.EntityRenderer.render(EntityRenderer.java:21) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]6 Z6 z" h+ q: _3 b7 O: c1 a1 [
- at org.mtr.mapping.mapper.EntityRenderer.m_7392_(EntityRenderer.java:11) ~[MTR-forge-4.0.0-beta.13+1.20.1.jar%23287!/:?]
* f% R6 y8 p' t3 x - at net.minecraft.client.renderer.entity.EntityRenderDispatcher.m_114384_(EntityRenderDispatcher.java:140) ~[client-1.20.1-20230612.114412-srg.jar%23300!/:?]+ u6 x, w: d3 V% _8 J' U5 c' M% R
- at net.minecraft.client.renderer.LevelRenderer.m_109517_(LevelRenderer.java:1440) ~[client-1.20.1-20230612.114412-srg.jar%23300!/:?]
; ?% V1 r- s/ d, F - at net.minecraft.client.renderer.LevelRenderer.invokeRenderEntity(LevelRenderer.java) ~[client-1.20.1-20230612.114412-srg.jar%23300!/:?]7 X% n6 n4 L2 @
- at net.coderbot.iris.pipeline.ShadowRenderer.renderEntities(ShadowRenderer.java:606) ~[oculus-mc1.20-1.6.4.jar%23288!/:?]; I* j% U" ]" R6 a4 Y: c
- at net.coderbot.iris.pipeline.ShadowRenderer.renderShadows(ShadowRenderer.java:483) ~[oculus-mc1.20-1.6.4.jar%23288!/:?]$ P2 K2 p/ y0 T; A$ R) x% N- s& O
- at net.coderbot.iris.pipeline.newshader.NewWorldRenderingPipeline.renderShadows(NewWorldRenderingPipeline.java:1033) ~[oculus-mc1.20-1.6.4.jar%23288!/:?]: p/ \ [' _3 \4 k/ Z9 c. z# r9 s
- at net.minecraft.client.renderer.LevelRenderer.handler$zob000$iris$renderTerrainShadows(LevelRenderer.java:11680) ~[client-1.20.1-20230612.114412-srg.jar%23300!/:?]' D+ A9 C: H) |% H6 y
- at net.minecraft.client.renderer.LevelRenderer.m_109599_(LevelRenderer.java:1155) ~[client-1.20.1-20230612.114412-srg.jar%23300!/:?]; l' S$ x- c) q, j7 b
- at net.minecraft.client.renderer.GameRenderer.m_109089_(GameRenderer.java:1126) ~[client-1.20.1-20230612.114412-srg.jar%23300!/:?]
5 j: Z4 {2 N" z& F- q - at net.minecraft.client.renderer.GameRenderer.m_109093_(GameRenderer.java:909) ~[client-1.20.1-20230612.114412-srg.jar%23300!/:?]
' m9 L; z2 s: G+ s2 a - at net.minecraft.client.Minecraft.m_91383_(Minecraft.java:1146) ~[client-1.20.1-20230612.114412-srg.jar%23300!/:?]
4 u- S7 e5 V% o - at net.minecraft.client.Minecraft.m_91374_(Minecraft.java:718) ~[client-1.20.1-20230612.114412-srg.jar%23300!/:?]
6 {7 u; @, s3 |9 \4 U' `- _ - at net.minecraft.client.main.Main.main(Main.java:218) ~[Harvista%201.24.jar:?]8 i& w* o6 C8 p: I, E+ U+ Q2 I
- at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]/ I; J& m% |) s; F* Z
- at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
" x+ m' Q. W4 e. |* i" }& q - at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]4 F! `. b7 V! B$ C
- at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]2 @$ p* n7 e4 ^8 z- s+ @! H# k
- at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.runTarget(CommonLaunchHandler.java:111) ~[fmlloader-1.20.1-47.1.30.jar:?]
~- S7 N4 f: }) p2 _ - at net.minecraftforge.fml.loading.targets.CommonLaunchHandler.clientService(CommonLaunchHandler.java:99) ~[fmlloader-1.20.1-47.1.30.jar:?]
0 p* T W4 M, W7 r! j7 l: ^) p - at net.minecraftforge.fml.loading.targets.CommonClientLaunchHandler.lambda$makeService$0(CommonClientLaunchHandler.java:25) ~[fmlloader-1.20.1-47.1.30.jar:?]! b& u' N E' m
- at cpw.mods.modlauncher.LaunchServiceHandlerDecorator.launch(LaunchServiceHandlerDecorator.java:30) ~[modlauncher-10.0.9.jar:?]
Q! e/ t' E, T - at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:53) ~[modlauncher-10.0.9.jar:?]/ S2 i5 X6 C$ J6 I* P0 w
- at cpw.mods.modlauncher.LaunchServiceHandler.launch(LaunchServiceHandler.java:71) ~[modlauncher-10.0.9.jar:?]
1 ]' } i+ O$ A; U' r4 P - at cpw.mods.modlauncher.Launcher.run(Launcher.java:108) ~[modlauncher-10.0.9.jar:?]7 n o& a" \+ j. t) K4 C
- at cpw.mods.modlauncher.Launcher.main(Launcher.java:78) ~[modlauncher-10.0.9.jar:?]
3 E! w! r+ n0 C# e' {% l9 s - at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:26) ~[modlauncher-10.0.9.jar:?]
; m* ^, B [/ X( A& ~ - at cpw.mods.modlauncher.BootstrapLaunchConsumer.accept(BootstrapLaunchConsumer.java:23) ~[modlauncher-10.0.9.jar:?] b5 X! \" U4 t( M( `, U
- at cpw.mods.bootstraplauncher.BootstrapLauncher.main(BootstrapLauncher.java:141) ~[bootstraplauncher-1.1.2.jar:?]
5 O1 S2 O( f" D0 Q. \ - at jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:?]( a/ n/ }) i6 p$ b- a, w
- at jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77) ~[?:?]
- y' N& [1 N* F" W. C2 B8 a - at jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:?]* `6 X5 F$ l0 X. T( j( N( N2 ~
- at java.lang.reflect.Method.invoke(Method.java:568) ~[?:?]
+ ^1 \9 ]- o) Z0 s - at oolloo.jlw.Wrapper.invokeMain(Wrapper.java:112) ~[?:?]
# X7 p/ o# X4 d K5 n. U4 i* k - at oolloo.jlw.Wrapper.main(Wrapper.java:105) ~[?:?]
复制代码 简单说就是MTR尝试将一个 CapturingVertexConsumer 对象强制转换为Rubidium的类 VertexBufferWriter,但这两个类不兼容。' ~+ h: Y" l1 S
4 h, a3 ^' P4 t" B# ARubidium和oculus这两个模组是整合包原有的,支持性能优化和光影的模组。但是Rubidium自 2023 年12月起已经停止更新,不再维护。
; I$ [' P, D; r ]) Q5 g) l: t6 {( w经过研究,我将 Rubidium 替换为 Embeddium 。Embeddium是 Rubidium 的非官方分支,仍在活跃维护中,并包含更多兼容性补丁和新功能。; u3 _* L) r# R2 e$ Y+ q. _4 W @
当 Embeddium 配合 oculus使用时,所有功能都可以正常运行,且日志中未出现任何报错。
3 N! X! D7 i9 z) A9 N0 X
+ m$ n8 i" \) g# Z0 }" r4 {此问题也已提交至mtr的GitHub(https://github.com/Minecraft-Tra ... Railway/issues/1028) ,考虑到Rubidium已经停止维护,mtr是否可以主动兼容Rubidium?
7 z; S4 \0 U) m! K7 _0 K* p' J |