Skip to content

Commit

Permalink
Merge branch 'main' into l10n/main
Browse files Browse the repository at this point in the history
  • Loading branch information
its-miroma authored Oct 29, 2024
2 parents 76f9446 + ec8dcb2 commit 5a37d4c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
2 changes: 1 addition & 1 deletion develop/items/potions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
11 changes: 7 additions & 4 deletions players/troubleshooting/crash-reports.md
Original file line number Diff line number Diff line change
Expand Up @@ -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}

<!-- TODO: show part of this file -->
<<< @/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.

Expand Down
2 changes: 1 addition & 1 deletion reference/latest/build.gradle
Original file line number Diff line number Diff line change
@@ -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}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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)) {
Expand Down

0 comments on commit 5a37d4c

Please sign in to comment.