File tree Expand file tree Collapse file tree
src/client/java/com/github/squi2rel/vp/vivecraft Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ dependencies {
5454 include " uk.co.caprica:vlcj:4.10.1"
5555 include " uk.co.caprica:vlcj-natives:4.8.3"
5656
57- modCompileOnly " maven.modrinth:vivecraft:1.21.4-1.3.2 -fabric"
57+ modApi " maven.modrinth:vivecraft:1.21.4-1.3.0 -fabric"
5858}
5959
6060processResources {
Original file line number Diff line number Diff line change 11package com .github .squi2rel .vp .vivecraft ;
22
3- import com .github .squi2rel .vp .VideoPlayerClient ;
43import org .joml .Matrix4f ;
4+ import org .vivecraft .api .client .VRRenderingAPI ;
5+ import org .vivecraft .api .client .data .RenderPass ;
56import org .vivecraft .client_vr .ClientDataHolderVR ;
67import org .vivecraft .client_vr .VRState ;
78
89class VivecraftImpl {
910 private static final ClientDataHolderVR DATA_HOLDER = ClientDataHolderVR .getInstance ();
10- private static Object renderPassObj ;
11+ private static final VRRenderingAPI RAPI = VRRenderingAPI . instance () ;
1112
1213 static boolean isRightEye () {
13- if (renderPassObj == null ) {
14- renderPassObj = VideoPlayerClient .getEnumValue ("RIGHT" ,
15- "org.vivecraft.api.client.data.RenderPass" ,
16- "org.vivecraft.client_vr.render.RenderPass" );
17- }
18- return DATA_HOLDER .currentPass == renderPassObj ;
14+ return RAPI .getCurrentRenderPass () == RenderPass .RIGHT ;
1915 }
2016
2117 static boolean isVRActive () {
2218 return VRState .VR_RUNNING ;
2319 }
2420
2521 static Matrix4f getRotation () {
26- return DATA_HOLDER .vrPlayer .getVRDataWorld ().getEye (DATA_HOLDER . currentPass ).getMatrix ();
22+ return DATA_HOLDER .vrPlayer .getVRDataWorld ().getEye (RAPI . getCurrentRenderPass () ).getMatrix ();
2723 }
2824}
You can’t perform that action at this time.
0 commit comments