Questions tagged [minecraft-fabric]

For questions related to creating modifications for Minecraft using FabricMC, an unofficial Minecraft modding API created and built using the Java programming language. FabricMC uses the Yarn mapping set and modifies Minecraft using the Spongepowered Mixin library.

FabricMC

FabricMC is an unofficial modding API for the popular game , originally created by asiekierka and modmuss50.

Fabric is built using the programming language and uses its own custom class loader in order to load modifications.

Fabric officially supports the , and IDEs.

Components

In order to deal with Minecraft's obfuscated names, Fabric uses its own mapping set, Yarn (CC0), to provide names for obfuscated objects within Minecraft. FabricMC also has a plugin named Fabric Loom which is used to remap Minecraft and modification JAR files.

Fabric modifies Minecraft's class files using and its fork of Spongepowered Mixin.

Fabric is highly modular and is composed of several elements, most of which can be found in the GitHub organization.

More Information

Fabric's first version was made available in 2016, but the toolchain wasn't ready for mass usage until 2018 when it was released officially.

Since then, Fabric has updated to every Minecraft version (including "snapshot" versions) in a relatively quick time span.

asiekierka stepped down from Fabric development sometime during July/August of 2019. modmuss50 has continued developing FabricMC.

143 questions
1
vote
1 answer

How can I add a new Item to fabric?

I'm trying to code a mod, which adds a new Item to the game and I'm following a tutorial on youtube. I also looked everything up on the fabric website, but the code doesn't work. Here is the code I used. It is from the fabric wiki: public static…
Slykapar
  • 17
  • 4
1
vote
0 answers

How to include transiant depedency of springboot inside fabric mod

I want to use spring boot inside fabric mod. And it works while I'm runing my minecraft server with gradlew.bat runServer command. But when I'm using gradlew.bat build and put the production jar inside a real server I got no class deff found error.…
MrSolarius
  • 599
  • 11
  • 28
1
vote
0 answers

Minecraft Fabric modding change class declaration in mixin

I am creating a Fabric mod for Minecraft and was trying to change a variable in the declaration of a class. I am new at modding with Fabric and I am not sure how to do this. In the class net.minecraft.network.packet.c2s.play.PlayerMoveC2SPacket I…
Leo Minton
  • 98
  • 1
  • 8
1
vote
1 answer

FabricMC Change Text from TextRender.draw

I am fairly new to modding in Minecraft however I know a decent amount. What I need help with is rendering text on the screen, I would like to be able to render some text and update what is displayed as the text, here is what I…
future
  • 11
  • 1
1
vote
0 answers

Minecraft Fabric Moding: how to increase tick rate for only one class?

I am relatively new to programming Minecraft Mods and just tried to code a client side mode using the fabirc API. My problem so far is, that I want to animate my currently held Item, so I coded a way to move and rotate the Item. But now I can…
DerDane
  • 31
  • 2
1
vote
0 answers

io.netty.util.IllegalReferenceCountException: refCnt: 0 throws while invoking PacketByteBuf.readFloat in minecraft 1.16.5

I am trying to create a temperature system in my mod, and I synchronize temperature data (2 floats) with Fabric Networking API. Packets are created with these codes. // Temperature.java private float ambient; private float biome; public…
asablock
  • 11
  • 1
1
vote
1 answer

what is a gradlew.bat alternative/solution on macOS?

I'm following a Minecraft modding tutorial and they are using a gradlew.bat file which, as I am on macOS, I cannot run it. is there a workaround or alternative other than just switching machines and doing it on Windows or a virtual machine?
ProfMonkey07
  • 93
  • 1
  • 1
  • 7
1
vote
0 answers

how to get server ping on fabricmc

I am trying to make ping overlay mod on fabricmc 1.19.2, and I can't find any references related with that. I tried…
R0K0R lee
  • 21
  • 5
1
vote
1 answer

Draw a colored rectangle on Minecraft HUD

I am using Fabric 0.58.4+1.19.1 (MC 1.19.1) and I was wondering how I could draw a colored rectangle with an alpha value as an HUD element. I am new to fabric modding and I need to draw a black rectangle with low opacity on the screen as HUD. I have…
Spectre
  • 41
  • 4
1
vote
1 answer

Kotlin override method for different subclasses without code duplication

I have the following class hierarchy (minecraft modding with fabric): SwordItem, AxeItem extend ToolItem ModSwordItem extends SwordItem, ModAxeItem extends AxeItem, where ModSwordItem and ModAxeItem are my own classes with some custom logic…
Devoev
  • 374
  • 1
  • 10
1
vote
1 answer

How to draw a line in Minecraft with Fabric

Final target: draw a line in sky Env Config in build.properties minecraft_version=1.18.2 yarn_mappings=1.18.2+build.3 loader_version=0.13.3 fabric_version=0.51.1+1.18.2 Development environment: Ubuntu 22.04 IDEA…
1
vote
1 answer

How do I tell this minecraft fabric mod to use modmenu-2.0.14?

I want to update this mod (https://github.com/LambdAurora/MCPatcherPatcher) to minecraft version 1.17.1, and I have learned much already. If you had asked me a week ago what gradle was or how github works, I would have given you a blank stare. I…
1
vote
0 answers

gradlew genSource command in terminal is not working

I am trying to make a Minecraft mod but when I need to do .\gradlew genSource it keeps showing this error: Fabric Loom: 0.10.66 Error: Could not find or load main class worker.org.gradle.process.internal.worker.GradleWorkerMain Caused by:…
ConanPro
  • 19
  • 5
1
vote
1 answer

How can i remove a title screen element with fabric in Minecraft 1.18.1

I am currently able to add elements to the title screen: public abstract class MCEMixin extends Screen { protected MCEMixin(Text title) { super(title); } @Inject(at = @At("RETURN"), method = "initWidgetsNormal") private…
crrocc
  • 11
  • 1
1
vote
2 answers

Lang files not being used by fabric

I have got 4 items working but even with the lang files in the right place, the names are still all broken. the files are inside of src\resources\assets\cauldrons\lang\en_gb.json with the contents being { "item.cauldrons.gold-base": "golden…
kineticcat_
  • 117
  • 2
  • 9
1
2
3
9 10