Categories
minecraft technology virtualreality

We’re going to Disney! … in Minecraft VR

Welcome to Disney in Minecraft in Virtual Reality!

Disclaimer: This guide involves sideloading apks onto your Meta Quest 3. This is not officially supported by Meta and can go horribly wrong such that you may have to factory reset your device – if you are not comfortable with this stop here!

Requirements:

  • A purchased Java edition of Minecraft
  • A Meta Quest 2, 3 or 3s
  • Access to QuestCraft at the most recent version, at the time of writing 1.21.11
  • SideQuest installed on your PC, and possibly a usb cable if you want to connect your Quest to your PC in order to install apk files

In April our family went to Disneyworld and had a blast. When we came back, my young daughter was gloomy that the trip was over. Not to worry, with Disney in Minecraft I was able to bring our vacation to her!

While she is too young to wear a Meta Quest 3, she enjoys riding on the virtual rides on her PC in Imagine Fun, a family friendly, extremely detailed and faithful replica of Disneyland in Minecraft. Lucky me, I get to join her in virtual reality via QuestCraft.

To join the server, I use the current version of QuestCraft which I sideload onto the Quest using SideQuest . If you have not sideloaded an Android package (apk file), I recommend following SideQuest’s setup guide. QuestCraft shows up under “Unknown Sources” in the Application launcher after it is installed.

I subscribe to the QuestCraft Patreon so I benefit from more frequent and recent updates. You do not have to do this to enjoy Imagine Fun, so long as you have a version of QuestCraft that includes 1.21.11 or higher.

How to join the Imagine Fun server

Once you have opened QuestCraft on your headset, selected the most recent version supported by QuestCraft and clicked “Play”, the game will load.

Click “Multiplayer” and you will have to add the server.


The server address is

mc.imaginefun.net

Add the server and click “Join Server” to join.

You will have to click “Proceed” for it to accept the prompt for it to download a resource pack for you. Make sure you have the resource pack setting set to prompt or auto-download.

It will take about a minute to join the server and the scene may freeze. Don’t worry, this is perfectly normal!

Once you join the server, you may want to tweak a few settings to maximize your experience. I turn my rotation increment to “Smooth” to disable snap turning and avoid a jerky spin when I turn my view. To do this, use the settings button on the left controller to open the Minecraft menu.

Click Options, then use the trigger button on the right controller to select VR Settings then Locomotion Settings.

I also calibrate my height to my elevation while sitting down – this is the button on the very first Minecraft menu below the Options and above “Come back soon.”

Finally, I adjust the world size which is under the VR Settings. I enjoy the server while seated – of course, you are welcome to experience while standing too!

Advanced: How to enable Audio through the Headset

I was frustrated with the default audio experience on the headset which is that you have to generate an audio streaming link through the chat with the /audio command. When on a PC this is a natural flow since you can click the link and it will open a tab in your browser that you can use to pair your movements with audio from your in-game location. Pretty cool right? Well not so cool on the Quest since trying to paste this into a browser there will freeze your game.

I came up with a workaround for this that uses my Android phone as a relay for the audio. For what it’s worth I do not know if this would work on a non-Android phone or a PC.

For the record while you get used to it and it’s a much better quality audio experience, there is the definite possibility that the Imagine Fun folks will add in-server audio any time now and this method will become unnecessary. It will probably take you some time to get it working for you – so only dive in if you’re like me, you’re relatively tech savvy and really would prefer an elaborate workaround to typing in the address into a browser every time!

I sideloaded KDE Connect and AudioRelay onto the Quest using the same approach as I did with QuestCraft. Note that to use this approach you need the actual apk files. You can’t install Android apps from the Google Play store directly onto the Quest, you need to find and download the apk files from an apk mirror and sideload them. On the Android phone however, you definitely can and should install these apps via the Google Play store.

KDE Connect allows you to send clipboard contents from the Quest to your Android phone so you don’t have to type out the audio link on your phone every time you get one.

AudioRelay allows your Android phone to mirror its sound to the Quest. The idea is you copy the audio link from the Quest to the phone, then transfer the phone’s audio back to the Quest. Note that only the default browser, not Chrome, appeared to work with AudioRelay.

But how to set this up exactly once in game?

First you must pair the Quest and the phone in both KDE Connect and Audio Relay. This part is a one time setup.

After installing KDE Connect and AudioRelay on both the Quest and the phone, join the Imagine Fun server and move to the side so you can see what you’re doing. Everyone spawns in the same location, which gets crowded quickly.

To generate the audio link, the easiest way is to use the “IFone”. You can also use a Magic band, which is what I use in the screenshots. The difference is purely cosmetic.

This “IFone” object auto-spawns in your inventory. This is your way to interact with the park. Press the Y key on the left controller to bring up your inventory. Use the controller grip keys to highlight the IFone, then use the left trigger to open the interface. This will be an inventory-like menu. Use the right controller to click the “volume” icon, and this will create the link in your chat.

Quickly since it will scroll up, press and hold the “B” key on the right controller to open your radial menu. You should have an “Open Chat” option, so click that with a right trigger button press.

Use the right controller to click the “here” in the audio link where it says “Click *here* to open the web client”. They mean the audio web client.

Click “Copy to Clipboard”, not yes or cancel.

At this point make sure you have exited the chat – click the chat input and then click “Esc” on your floating keyboard to close the chat before moving to the next step.

Now that you have the link on your clipboard, use the Meta button to open the Quest interface. This will temporarily freeze your QuestCraft game. Don’t worry, once you exit the Meta menu the QuestCraft game will resume.

Click the nine-dot application launcher and choose “Unknown sources”, then click “KDE Connect”. Click the three dots on the top right corner. Click “Send clipboard”.

Without taking off your headset, lifting it up slightly or however you need to do it, paste the link from the Quest that should now have been transferred to the phone into the default browser on your Android phone.

It will bring up an audio connection, click the big button to confirm the connection and the phone will start playing the in-game audio. First part achieved!

Now to send the audio back to the Quest …

On your phone, open AudioRelay and click the Server tab.

Click the “Apps” section, and share the browser window you opened.

Now it should be available for the Quest to pick up.

Back on the Quest, if you need to hit the Meta Quest button to reopen the Meta menu again do so, then open the Unknown Sources applications again and open AudioRelay.

In the Player tab, select the phone. You should now hear the audio coming through the Quest speakers! Click the X on the bar below the AudioRelay application to close it, and the audio will continue playing while you are in the world of Imagine Fun.

Stay on top of keeping the phone from locking – extend the inactive time as much as you can and keep it handy to unlock it if needed.

One more nugget of advice – the Disneyland park map spawns in your offhand which is surprisingly difficult to remove due to the Minecraft keybinds not mapping perfectly to the controller buttons. If you do not remove it it will constantly remain in your offhand, which can be distracting on rides.

To fix this without a keybind, aim your right controller at your hotbar displayed along your in-game left arm and hold down the trigger button to focus the individual squares in the hotbar. Play with it until you highlight the offhand square, then you can drag the map away from your offhand. Weird how the simplest things can be the hardest to accomplish …

Playing with my daughter in Minecraft from VR is fun already, but spicing it up with a trip to Disney makes it all the more magical! Hope this helps you make some memories too!

Categories
devops minecraft

Create a Modded Minecraft Server on a hosted Kubernetes Cluster

Previous Post: Create a Kubernetes Cluster on Oracle Cloud for free using Terraform

Credit: This guy is the man, https://github.com/itzg . He maintains https://github.com/itzg/minecraft-server-charts/tree/master/charts/minecraft which is just an epic Minecraft Helm chart.

If you already have a Kubernetes cluster that’s perfect, if not you can follow the previous post to get one for free on Oracle Cloud.

If you are not using Oracle cloud you will need to modify the minecraft/_terraform.tf file slightly to use whatever storage backend you want for the terraform state file.

So change:

backend "oci" {}

to something like

backend "s3" {}

Or whatever your preference might be. See https://developer.hashicorp.com/terraform/language/backend if you need guidance on how to choose and what it means.

Check out the repository https://github.com/saranicole/minecraft-oci-k8s with git. We will be using the minecraft directory.

git clone https://github.com/saranicole/minecraft-oci-k8s.git
cd oci-free-cloud-k8s/terraform/minecraft

You will need to create a backend.conf file, a general.auto.tfvars, a minecraft.auto.tfvars file and possibly an oracle.auto.tfvars file. Depending on how you want this to end up you will put different contents into these tfvars files.

backend.conf

namespace = "<<Storage Namespace>>"
bucket    = "terraform-states"
key       = "infra/minecraft.tfstate"

general.auto.tfvars

chart_version = "5.1.2"

If you are using Oracle Cloud, create the oracle.auto.tfvars file.

oracle.auto.tfars

compartment_id = << Tenancy OCID >>
region = << Region >>
ssh_public_key = << SSH Public Key >>
user_ocid = << User OCID >>
fingerprint = << API Key fingerprint >>
private_key_path = << Path to API Key Secret File >>
bucket_namespace = << Storage Namespace >>

If you want a vanilla Minecraft server, use the structure below and tweak as needed (making sure to change accept_eula to TRUE):

# Change this to TRUE
accept_eula = "FALSE"
world_version = "26.1.1"
server_type = "VANILLA"
fabric_loader_version = "0.18.6"
difficulty = "easy"
whitelist = "<< YOUR MINECRAFT USERNAME >>,<< SOME OTHER MINECRAFT USERNAME >>"
ops = "<< YOUR MINECRAFT USERNAME >>,<< SOME OTHER MINECRAFT USERNAME >>"
motd = "Welcome to Minecraft on Kubernetes!"
mod_urls = [
  "<< MODRINTH JAR DIRECT DOWNLOAD URL >>",
  "<< SOME OTHER JAR DIRECT DOWNLOAD URL >>"
]
download_world_url = "<< DIRECT DOWNLOAD LINK OF ZIP FILE CONTAINING WORLD DATA >>"
rclone_dest_dir = "<< OBJECT STORAGE BUCKET SUCH AS S3 OR OCI BUCKET NAME >>/<< OBJECT STORAGE BUCKET PREFIX SUCH AS 'worlds' >>"
enable_oci_backup_bucket = false
enable_oci_load_balancer = false
rcon_password = "<< SUPER SECRET PASSWORD >>"

If you want Cobblemon, particularly cobblemon on Meta Quest, you will need to use contents like the following:

minecraft.auto.tfvars

# Change this to TRUE
accept_eula = "FALSE"
world_version = "1.21.1"
server_type = "FABRIC"
fabric_loader_version = "0.18.6"
difficulty = "easy"
whitelist = "<< YOUR MINECRAFT USERNAME >>,<< SOME OTHER MINECRAFT USERNAME >>"
ops = "<< YOUR MINECRAFT USERNAME >>,<< SOME OTHER MINECRAFT USERNAME >>"
motd = "Welcome to Cobblemon on Kubernetes!"
mod_urls = [
"https://cdn.modrinth.com/data/MdwFAVRL/versions/Ygf8KJFC/Cobblemon-fabric-1.7.0%2B1.21.1.jar",
"https://cdn.modrinth.com/data/P7dR8mSH/versions/yGAe1owa/fabric-api-0.116.9%2B1.21.1.jar"
]
download_world_url = "<< DIRECT DOWNLOAD LINK OF ZIP FILE CONTAINING WORLD DATA >>"
rclone_dest_dir = "<< OBJECT STORAGE BUCKET SUCH AS S3 OR OCI BUCKET NAME >>/<< OBJECT STORAGE BUCKET PREFIX SUCH AS 'worlds' >>"
enable_oci_backup_bucket = false
enable_oci_load_balancer = false
rcon_password = "<< SUPER SECRET PASSWORD >>"

If you are using Oracle, you will want to change both enable_oci_backup_bucket and enable_oci_load_balancer to true.

In the case of Oracle the rclone_dest_dir will be “minecraft-backups/worlds”.

Run the init first to confirm that Terraform is working and make sure to inspect everything it will create.

terraform init -backend-config=backend.conf

Then run the plan

terraform plan

If there are any errors due to missing information, make sure your files are all filled out correctly.

Once the plan succeeds with no errors, you can apply the Terraform.

terraform apply

Enter “yes” when it prompts you.

It should finish like this:

Apply complete! Resources: xx added, 0 changed, 0 destroyed.

At the end you will see:

Outputs:
  + my_minecraft_server_ip = "xxx.xxx.xxx.xxx"

This is your Minecraft server ip address! Connect to port 25565 with this directly, or create a friendly DNS name in your preferred way.

If connecting with the ip address you can type in these numbers in this format:

xxx.xxx.xxx.xxx:25565

I recommend https://www.duckdns.org/ as a convenient way to give your Minecraft server a friendly url.

Way to go! You now have a Minecraft server in your preferred configuration set up on your Kubernetes cluster.

Interested in more? Take a look at the last blog post in this series:

Connecting to a Cobblemon Minecraft Java Server in VR

Categories
minecraft virtual reality

Connecting to a Cobblemon Minecraft Java Server in VR

QuestCraft! It’s awesome and I highly recommend subscribing to their Patreon. To emphasize a point they make many times over, you need to own Minecraft Java Edition in order for this to work, and you need access to your Microsoft login in order to log into Minecraft.

The basic installation instructions are available at https://github.com/QuestCraftPlusPlus/QuestCraft . You will need to follow these instructions and start a single player world on version 1.21.1 first in order to have the folder created that you need to place the mod jars into. You will also want to download this jar file https://files.xrcraftmc.com/QuestCraft/Cobblemon-fabric-1.7.0%2B1.21.1.jar which is the fixed Cobblemon mod which ONLY works with Minecraft version 1.21.1 . Make sure your server is running Minecraft version 1.21.1 as well, they have not yet released a more current patched version. Everything Minecraft 1.21.1!

Also, grab the Fabric API jar at 0.116.9 – https://cdn.modrinth.com/data/P7dR8mSH/versions/yGAe1owa/fabric-api-0.116.9%2B1.21.1.jar and https://cdn.modrinth.com/data/nOK0dI1c/versions/rKDl7Dxe/request-1.0.0%2B1.21.1.jar and https://cdn.modrinth.com/data/ccKDOlHs/versions/JB1fLQnc/owo-lib-0.12.15.4%2B1.21.jar while you are at it. These are the Quest-Rebound jars which enable battling Pokemon. You will need to install all of these mods in your mods folder on your headset.

Once you have successfully connected to a single player world, you will need to back out of the game and connect to the headset using SideQuest again.

Click the folder on the top bar which is how you can navigate the Quest’s directory structure.

………………………………………. This one
……………………………………………. ↓

Then you will want to navigate to:

Android > data > com.qcxr.qcxr > files > instances > 1.21.1 > mods

Drag the jar files you downloaded earlier into this folder:

  • Cobblemon-fabric-1.7.0 1.21.1.jar from the QuestCraft folks
  • Fabric API at 0.116.9
  • Quest Rebound
  • owo-lib

Now you should be able to connect to a Cobblemon server!

How to Battle Wild Pokemon and other Cobblemon Stuff

You will quickly find that Cobblemon relies on keybinds that are unavailable in QuestCraft. Worry not! You can use Quest Rebound to overcome this barrier.

Instructions on using Quest Rebound are quoted from the modrinth website:

Quest Rebound – Rebinding Instructions

Add this mod to your QuestCraft instance as normal and start your game. In the game, you can go to Options -> Controls -> Open VR Bindings Menu to change your keybinds.

To reset your keybinds, delete the interaction_profiles directory from your instance root.

You *must* restart your game in order for key rebinds to take effect.

Specifically for battling wild Pokemon, you can rebind “Throw Selected Pokemon” to your left controller’s x key. Make sure to uncheck its current function checkboxes before checking the Cobblemon function box.

Personally I find the left x button a good choice because its default function is to dash forward a bit, which I do not need as much as I need to battle wild Pokemon.

You could try binding the Throw action to your radial menu, but the problem is you have to interact with a Pokemon to trigger it, and left clicking the radial menu while you’re facing the it will harm the Pokemon!

So instead, bind the action to your x key, then when you want to battle a wild Pokemon, face it and press x on your left controller, and you will get the battle menu.

The “Open overlay” and other controls are fine to bind to the radial menu. To do this, click “Options”, then “VR Settings” then “Radial Menu”. Click the number that appears in the center and you will get more blank radial tiles. Click one of these tiles and you will get a bunch of actions you can assign to the tiles, including Cobblemon-related actions.

To use the radial menu once you’ve assigned it, click the y button on the right controller and it will open.

Happy Cobblemon’ing! I’m in the QuestCraft Discord server, user “saranicole1980” so feel free to ping me there if you have any questions!