Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Miscellaneous changes before updating to 1.21.3 #209

Merged
merged 4 commits into from
Oct 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"
its-miroma marked this conversation as resolved.
Show resolved Hide resolved
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