Fabric-ASM icon indicating copy to clipboard operation
Fabric-ASM copied to clipboard

What is this?

Open Decme opened this issue 2 years ago • 1 comments

This shows up in the md menu, but the info on the <> Code page looks aimed at describing the mod for programmers only. Anyone know how to explain what this is to a non-programmer?

Decme avatar Dec 12 '21 13:12 Decme

@Decme here's my attempt

Minecraft code is not built for mods. Many things available to Mojang developers are initially not available for modders.

If a modder encounters that something he/she needs is locked, there are multiple options:

  • Use Fabric API, the thing that you probably heard of, which fixes many of such inconveniences
  • If Fabric API doesn't support what you're trying to do, use a third-party library, like Geckolib or Fabric Shield Lib
  • If you didn't find any library that suits your needs, use Mixin, which is (disclaimer: this explanation is oversimplified for the sake of clarity) a tool that lets modders modify the game's code. One large benefit of Mixin is that, for the most part, it keeps you safe from breaking absolutely everything and ruining compatibility with other mods.
  • Unfortunately, for more specialized needs, Mixin might not support what you're trying to do, you'll have to use ASM, which is what Mixin is based on and a tool for directly modifying, replacing and adding code. ASM is limitless but it is extremely dangerous and there are limitless possibilities of screwing up.
  • This library, Fabric-ASM, is a set of utilities that makes working with ASM easier and, maybe, safer for Fabric modders.

kanpov avatar Dec 23 '21 15:12 kanpov