Introduction to the ImmersiveMC API
Starting with ImmersiveMC 1.5.0 Beta 2, ImmersiveMC comes with a fully-featured API to make programming your own block-based Immersives as easy as possible!
Warning
Section titled “Warning”Due to ImmersiveMC being a mod that has constantly evolving features and VR requirements, the API will likely change as ImmersiveMC changes. This documentation should remain up-to-date to match the latest version of the API, however you may need to adjust your code as these updates happen to ensure your ImmersiveMC integration does not cause a crash with incompatible versions. This guide will cover how to do so.
Getting Started
Section titled “Getting Started”The pages on the left-hand side are ordered from more beginner concepts to more advanced functionality provided by ImmersiveMC. As such, it’s recommended to begin reading about the different concepts within ImmersiveMC. Before then, though, you’ll need to add ImmersiveMC to your project!
Loom (Fabric and Architectury)
Section titled “Loom (Fabric and Architectury)”- Add the following to your
build.gradlefile. For Architectury, this should be done for all of your subprojects:repositories {maven {url = "https://cursemaven.com"}} - Add the following to the
dependenciessection of yourbuild.gradle.FILE_IDshould be replaced with the file ID of the ImmersiveMC version you depend on. TheFILE_IDcan be found by visiting the “Files” tab of ImmersiveMC’s CurseForge page, clicking the file you want, then copying the numbers at the end of the URL. As with step 1, if you’re using an Architectury project, this should be done for all of your subprojects, using the Fabric version of ImmersiveMC for yourcommonsubproject:modApi "curse.maven:immersivemc-607017:FILE_ID" - Refresh gradle, then you’ll be good to go!
NeoForge and Forge
Section titled “NeoForge and Forge”- Add the following to your
build.gradlefile.repositories {maven {url = "https://cursemaven.com"}} - Add the following to the
dependenciessection of yourbuild.gradle.FILE_IDshould be replaced with the file ID of the ImmersiveMC version you depend on. TheFILE_IDcan be found by visiting the “Files” tab of ImmersiveMC’s CurseForge page, clicking the file you want, then copying the numbers at the end of the URL.compileOnly fg.deobf("curse.maven:mcvrapi-591092:FILE_ID")runtimeOnly fg.deobf("curse.maven:mcvrapi-591092:FILE_ID") - Refresh gradle, then you’ll be good to go!