minecraft posts

Subscribe to just minecraft posts via RSS.

Run LWJGL 2 Natively on Apple Silicon

Running Minecraft 1.13 and later natively on Apple Silicon Macs isn’t terribly complicated. Since those versions use LWJGL 3 which includes arm64 macOS as a supported platform, you can just download the appropriate version, replace the LWJGL version info in MultiMC, and you’re off to the races. The end of maintenance for LWJGL 2, however, long predates the ARM transition and so getting Minecraft versions prior to 1.13 up and running requries a bit more work.

Minecraft Mod Statistics

About a year ago, I was poking around the CloudFlare dashboard for my website, specifically the Security section of the Analytics page. To my surprise, it reported that it had blocked 78 thousand “bad browser” threats in the last 24 hours (almost one a second). Now, I don’t have very much on my website. My blog doesn’t get much traffic, and the only other thing that does is my fediverse instance. And that volume of inbound traffic is nowhere near what I would expect for my small instance, which probably doesn’t federate with more than a couple hundred others. I found the Firewall section of the dashboard, which shows the details of individual blocked requests. To my surprise, almost all of the blocked requests were to a subdomain I previously used as an update server for my Minecraft mods. Forge, a Minecraft mod loader, provides a mechanism by which mods can specify a URL that Forge can use to get a JSON object describing the latest versions of the mod, in order to notify the player if an update is available. A few years ago, I built a small tool to generate JSON files in Forge’s update format using Git repo tags from the GitHub API. This was running on my server, but some time in the couple years since I’ve stopped actively building mods for Minecraft, I shut it down. And in the time since then, CloudFlare has decided that all the traffic to the update server is a threat and should therefore be blocked. CloudFlare keeps a little bit of information about each blocked request going back quite a while, so this provides a surprising amount of information about the usage of my mods.

Kotlin and Minecraft Forge

So, you wanna use Kotlin in your Forge mod? Well there’s good news, I’ve just released Forgelin, a fork of Emberwalker’s Forgelin, a library that provides utilities for using Kotlin with Minecraft/Forge.

Forgelin provides a Kotlin langauge adapter that allows your main-mod class to be a object. In order to use the language adapter, you must specify the modLanguageAdapter property in your @Mod annotation to be net.shadowfacts.forgelin.KotlinAdapter.