diff --git a/develop/items/potions.md b/develop/items/potions.md index 69410f034..c63559215 100644 --- a/develop/items/potions.md +++ b/develop/items/potions.md @@ -23,7 +23,7 @@ Just like items and blocks, potions need to be registered. Let's start by declaring a field to store your `Potion` instance. We will be directly using the initializer class to hold this. -@[code lang=java transclude={19-27}](@/reference/latest/src/main/java/com/example/docs/potion/FabricDocsReferencePotions.java) +@[code lang=java transclude={18-27}](@/reference/latest/src/main/java/com/example/docs/potion/FabricDocsReferencePotions.java) We pass an instance of `StatusEffectInstance`, which takes 3 parameters: diff --git a/players/troubleshooting/crash-reports.md b/players/troubleshooting/crash-reports.md index 955a4661a..83ebd8ade 100644 --- a/players/troubleshooting/crash-reports.md +++ b/players/troubleshooting/crash-reports.md @@ -64,12 +64,15 @@ Now that we know what each section of the crash report is, we can start to break Using the example linked above, we can analyze the crash report and find the cause of the crash, including the mods that caused the crash. -The stack trace in the `---- Minecraft Crash Report ----` section is the most important in this case, as it contains the main error that caused the crash. In this case, the error is `java.lang.NullPointerException: Cannot invoke "net.minecraft.class_2248.method_9539()" because "net.minecraft.class_2248.field_10540" is null`. +The stack trace in the `---- Minecraft Crash Report ----` section is the most important in this case, as it contains the main error that caused the crash. -With the amount of mods mentioned in the stack trace, it can be difficult to point fingers, but the first thing to do is to look for the mod that caused the crash. +::: details Show Error + +<<< @/public/assets/players/crash-report-example.txt{7 log} - -<<< @/public/assets/players/crash-report-example.txt{8-9,14-15 log} +::: + +With the amount of mods mentioned in the stack trace, it can be difficult to point fingers, but the first thing to do is to look for the mod that caused the crash. In this case, the mod that caused the crash is `snownee`, as it is the first mod mentioned in the stack trace. diff --git a/reference/latest/build.gradle b/reference/latest/build.gradle index 3721255ac..94a88fcb6 100644 --- a/reference/latest/build.gradle +++ b/reference/latest/build.gradle @@ -1,6 +1,6 @@ def minecraftVersion = "1.21" def yarnVersion = "1.21+build.7" -def fabricApiVersion = "0.100.4+1.21" +def fabricApiVersion = "0.102.0+1.21" dependencies { minecraft "com.mojang:minecraft:${minecraftVersion}" diff --git a/reference/latest/src/main/java/com/example/docs/event/FabricDocsReferenceEvents.java b/reference/latest/src/main/java/com/example/docs/event/FabricDocsReferenceEvents.java index 922834ebd..150d6b616 100644 --- a/reference/latest/src/main/java/com/example/docs/event/FabricDocsReferenceEvents.java +++ b/reference/latest/src/main/java/com/example/docs/event/FabricDocsReferenceEvents.java @@ -13,7 +13,7 @@ import net.fabricmc.api.ModInitializer; import net.fabricmc.fabric.api.event.player.AttackBlockCallback; -import net.fabricmc.fabric.api.loot.v2.LootTableEvents; +import net.fabricmc.fabric.api.loot.v3.LootTableEvents; // Class to contain all mod events. public class FabricDocsReferenceEvents implements ModInitializer { @@ -35,7 +35,7 @@ public void onInitialize() { // :::1 // :::2 - LootTableEvents.MODIFY.register((key, tableBuilder, source) -> { + LootTableEvents.MODIFY.register((key, tableBuilder, source, registries) -> { // Let's only modify built-in loot tables and leave data pack loot tables untouched by checking the source. // We also check that the loot table ID is equal to the ID we want. if (source.isBuiltin() && COAL_ORE_LOOT_TABLE_ID.equals(key)) {