5
2019
Reading Minecraft World into Unity (using Substrate)
Quick test for reading Minecraft worlds into unity.
Note: example code uses particle for each block, so it gets pretty slow.
Compile Substrate.dll:
– download this repository https://github.com/minecraft-dotnet/Substrate
– unzip, open Substrate-master\SubstrateCS\Substrate.sln
– Solution Explorer: Right click over Substrate (NET4), Set As Startup Project
– Select Release (from the configuration dropdown in toolbar, although default “Debug” works also)
– Press F5 to compile
– Should see message in output: “========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ==========”
– Go to the output folder (shown in the output window above that previous line)
– Copy “Substrate.dll” into your unity project, Assets/Plugins/Substrate/x64/ folder
– Note: You need to compile 64bit version (which should happen by default)
Minecraft:
– Start minecraft with 1.12.2 version (apparently substrate is designed up to that version?)
– Create new world, enter into it once, then can exit minecraft
Unity:
– Test with this script: https://gist.github.com/unitycoder/e0bb32b9d6ece0b4bde7be270e2e2a6f
– Add ParticleSystem into scene, then assign it to the script (see below for my particle system settings screenshot)
References / Resources:
– Block ID’s http://media.dinnerbone.com/uploads/2013-09/files/28_00-44-23_YfmAkomVI.txt
TODO
– Use mesh (instead of particles)
– Optimize..
– Load chunks-on-demand
– Add player
– Test with unity raytracing!
Related Posts
Leave a comment
Recent posts
- [GreaseMonkey] Unity Forum Fixer
- UnityHub: Make Hub application background Translucent
- Customize SpriteShapeRenderer quality (but has issues)
- Editor tool: Copy selected gameobject’s names into clipboard as rows (for Excel)
- Editor tool: Replace string in selected gameobject’s names
- UnityHub: Enable built-in Login Dialog (no more browser login/logout issues!)
- Use TikTok-TTS in Unity (with WebRequest)
- Create Scene Thumbnail Image using OnSceneSaved & OnPreviewGUI
- webgl+javascript TTS
- Using Moonsharp (LUA) + Unity Webgl
- Using 3D gameobject prefabs with Unity Tilemap + NavMesh Surface
- Custom Unity Hub Project Template Preview Image/Video (using HTML+CSS in package description)
Recent Comments
- Vector3 maths for dummies! on
- UnityHub: Make Hub application background Translucent on
- UnityHub: Make Hub application background Translucent on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- Install Android SDK+JDK+NDK for Unity (without AndroidStudio or Unity Hub) on
- [Asset Store] Point Cloud Viewer & Tools on
- [Asset Store] Point Cloud Viewer & Tools on
- ffmpeg stream raw video into Unity Texture2D on