Vivecraft (Minecraft VR)

Hello,

I’m trying to get vivecraft to work. I installed the prism launcher and the mod through the launcher.

What I’m trying:

  1. Launch Steam VR
  2. Start Prism Launcher
  3. Start Minecraft
  4. Enable VR (not working)

Minecraft:

  • Version 1.20.1
  • Fabric Mod Loader
  • The Version Tab in Prism Launcher Lists:
    • LWJGL 3 (3.3.1)
    • Minecraft (1.20.1)
    • Intermediary Mapping (1.20.1)
    • Fabric Loader (0.16.9)

Here is a part of my nixos configuration:

  programs.gamescope.enable = true;

  programs.steam = {
    enable = true;
    remotePlay.openFirewall = true; # Open ports in the firewall for Steam Remote Play
    dedicatedServer.openFirewall = true; # Open ports in the firewall for Source Dedicated Server
    localNetworkGameTransfers.openFirewall = true; # Open ports in the firewall for Steam Local Network Game Transfers
  };
  hardware.steam-hardware.enable = true;

environment.systemPackages = with pkgs; [
      (prismlauncher.override {
    # Add binary required by some mod
    additionalPrograms = [ ffmpeg ];
   })
];

When i try to enable VR in minecraft I get the following error:


VR Init Error
java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.openvr.VR
knot//org.vivecraft.client_vr.provider.openvr_lwjgl.MCOpenVR.initializeOpenVR(MCOpenVR.java:779)
knot//org.vivecraft.client_vr.provider.openvr_lwjgl.MCOpenVR.init(MCOpenVR.java:268)
knot//org.vivecraft.client_vr.VRState.initializeVR(VRState.java:62)
knot//net.minecraft.class_310.handler$dbi000$vivecraft$toggleVRState(class_310.java:15796)
knot//net.minecraft.class_310.method_1523(class_310.java)
knot//net.minecraft.class_310.method_1514(class_310.java:802)
knot//net.minecraft.client.main.Main.main(Main.java:250)
net.fabricmc.loader.impl.game.minecraft.MinecraftGameProvider.launch(MinecraftGameProvider.java:480)
net.fabricmc.loader.impl.launch.knot.Knot.launch(Knot.java:74)
net.fabricmc.loader.impl.launch.knot.KnotClient.main(KnotClient.java:23)
org.prismlauncher.launcher.impl.StandardLauncher.launch(StandardLauncher.java:105)
org.prismlauncher.EntryPoint.listen(EntryPoint.java:129)
org.prismlauncher.EntryPoint.main(EntryPoint.java:70)

Do I need to set some paths or include other packages in prism launcher?

That sounds an awful lot like your version of lwjgl doesn’t support OpenVR? Or at least not in the way Vivecraft expects.

I’d expect it to at least have that class present but not working but it doesn’t appear to be there at all.

I’m not deep into lwjgl but I’ve used Vivecraft on Windows before and I’ve done my fair share of Java.

I’ve been meaning to set up Vivecraft on Linux too but haven’t gotten around to it yet. It was really cool from what I remember.

You could try to download a custom lwjgl version that has OpenVR (or ideally OpenXR) support. That should at least net you something other than the NoClassDefFoundError.

You may have to then run prism launcher inside of an FHSEnv because it may attempt to dlopen some FHS-dependent shared object. I’ve had to do that for running OpenXR apps with SteamVR before IIRC.

Thank you for the tip. Installing minecraft 1.21.x moved the error to Library could not be loaded dynamically (1.20.x does not work with LJGWL 3.3.3).

To get it run in VR mode i have to launch prism-launcher with steam-run prismlauncher. This also works for other launchers e.g. atlauncher