Back to mods
AEA: TNT CrashFix project artwork

CurseForge · Minecraft mod

AEA: TNT CrashFix

Fixes an Additional Entity Attributes crash when explosions drop block XP without a breaking player. Keeps vanilla XP behavior and does not fake player ownership.

Choose a version Pick your version below, then grab the matching file.

Quick answer

Which AEA: TNT CrashFix release should I use?

Updated 3 months ago
Latest stable file aea-tnt-crash-fix-1.0.0.jar
Game version 26.1, 26.1.1, 26.1.2
Loader Fabric

AEA: TNT CrashFix aea-tnt-crash-fix-1.0.0.jar targets 26.1, 26.1.1, 26.1.2 with Fabric. The project page does not say whether this file belongs on the client, dedicated server, or both. No extra mods listed for this file.

Where it goes

Is AEA: TNT CrashFix required on the client, server, or both?

The project page does not say whether this file belongs on the client, dedicated server, or both.

Client Source doesn’t say
Dedicated server Source doesn’t say
Loader for this release Fabric
Required install it here Optional supported, not mandatory Not supported do not install here Source doesn’t say do not assume

The source does not explicitly classify this release as client-only or server-only.

What else does AEA: TNT CrashFix aea-tnt-crash-fix-1.0.0.jar need?

aea-tnt-crash-fix-1.0.0.jar. Change the file and its required mods may change too.

No extra mods listed for this file

This file does not list any required mods. Do not add a library just because a different file uses it.

This file does not list any required or optional mods.

Before you install it

Add AEA: TNT CrashFix without breaking your instance.

Built for AEA: TNT CrashFix aea-tnt-crash-fix-1.0.0.jar. Pick another file and the loader, install side or required mods may change.

  1. 01

    Stick to this file

    Use aea-tnt-crash-fix-1.0.0.jar. It targets 26.1, 26.1.1, 26.1.2 with Fabric; another release may have different loader, side or dependency requirements.

  2. 02

    Bring the mods it needs

    This file does not list any required mods. Do not add a library just because a different file uses it.

  3. 03

    Put it on the correct side

    The project page does not say whether this file belongs on the client, dedicated server, or both.

  4. 04

    Pick the file you checked

    Use the “Get this file” button beside aea-tnt-crash-fix-1.0.0.jar. It opens that exact file at the source.

About this project

What does AEA: TNT CrashFix add?

AEA TNT Crash Fix

AEA TNT Crash Fix is a tiny Fabric compatibility patch for Minecraft 26.1.2.

It prevents a crash caused by Additional Entity Attributes when TNT, beds, respawn anchors, or other explosions break blocks that try to drop experience without a valid player breaker.

This mod does not change TNT behavior, does not disable explosions, and does not fake player ownership. It only prevents one specific null-player XP modifier crash and keeps the vanilla XP amount.

The crash this fixes

On some Fabric 26.1.2 instances with Origins/Apoli/Additional Entity Attributes, TNT explosions in the Nether can crash the game/server with a stack trace like this:

Description: Ticking entity

java.lang.NullPointerException: Cannot invoke "java.lang.ref.WeakReference.get()" because "this.additionalEntityAttributes$breakingPlayer" is null
    at net.minecraft.world.level.block.Block.modify$zzb000$additionalentityattributes$additionalEntityAttributes$modifyExperience(Block.java:730)
    at net.minecraft.world.level.block.Block.popExperience(Block.java:471)
    at net.minecraft.world.level.block.Block.tryDropExperience(Block.java:644)
    at net.minecraft.world.level.block.DropExperienceBlock.spawnAfterBreak(DropExperienceBlock.java:34)
    at net.minecraft.world.level.block.state.BlockBehaviour$BlockStateBase.spawnAfterBreak(BlockBehaviour.java:1172)
    at net.minecraft.world.level.block.BlockBehaviour.onExplosionHit(BlockBehaviour.java:204)
    at net.minecraft.world.level.ServerExplosion.interactWithBlocks(ServerExplosion.java:226)
    at net.minecraft.world.level.ServerExplosion.explode(ServerExplosion.java:251)
    at net.minecraft.world.entity.item.PrimedTnt.explode(PrimedTnt.java:142)
    at net.minecraft.world.entity.item.PrimedTnt.tick(PrimedTnt.java:130)

The ticking entity is usually minecraft:tnt, but the underlying problem can also happen with other explosion sources if they break XP-dropping blocks without a normal player mining action.

Why it happens

Additional Entity Attributes adds player-based XP drop modifiers. Internally, it stores the player who broke a block in a field similar to:

WeakReference<Player> breakingPlayer;

That works for normal mining, because a real player is breaking the block.

Explosions are different:

  1. A player lights TNT, or an explosion starts a TNT chain.
  2. TNT explodes later.
  3. The explosion breaks blocks.
  4. Some blocks try to drop experience.
  5. Additional Entity Attributes tries to apply player-based XP modifiers.
  6. But the block was not broken by a normal player action.
  7. breakingPlayer can be null.
  8. AEA calls .get() on that null reference.
  9. The server or singleplayer world crashes.

What this mod does

AEA TNT Crash Fix adds a small Mixin guard around the Additional Entity Attributes block XP modification method.

If AEA has no valid breakingPlayer, this mod returns the original XP value instead of letting the game crash.

In plain English:

No breaking player -> no player-based XP modifier -> vanilla XP amount

The intended fallback is vanilla behavior. If there is no player breaker, there is no honest player to apply player-based XP bonuses or penalties to.

What this mod does NOT do

This mod does not:

  • disable TNT;
  • disable explosions;
  • prevent chain reactions;
  • change explosion power;
  • change block destruction rules;
  • change TNT ownership;
  • find the nearest player;
  • use a fake player;
  • apply XP modifiers to a random player;
  • remove XP drops entirely;
  • patch Lithium or other optimization mods.

The fix is deliberately narrow: it only handles the missing breakingPlayer case in the Additional Entity Attributes XP modifier.

Multiplayer and client requirements

Dedicated server

If you run a multiplayer server, install this mod on the server.

Players do not need to install it.

The mod does not add blocks, items, entities, packets, commands, or registries that clients need to know about. It only patches server-side XP drop logic.

Singleplayer

For singleplayer, install this mod in the client instance.

Singleplayer uses an integrated server inside the client process, so the patch must be loaded by the client to fix singleplayer worlds.

Summary

Use case Where to install
Dedicated multiplayer server Server only
Player joining a patched dedicated server Not required
Singleplayer world Client
Open to LAN host Host client

Compatibility

Built and tested for:

  • Minecraft 26.1.2
  • Fabric Loader 0.19.3
  • Java 25
  • Additional Entity Attributes 2.2.3+26.1
  • Apoli Legacy 2.12.4+26.1.2
  • Origins Legacy 1.12.5+26.1.2

Known compatible in the original test environment with:

  • Fabric API 0.152.1+26.1.2
  • Lithium 0.24.5+mc26.1.2

The mod does not mix into Lithium classes.

Installation

  1. Download the jar.
  2. Put it in the appropriate mods folder:
    • dedicated server: server mods/ folder;
    • singleplayer: client instance mods/ folder.
  3. Make sure Additional Entity Attributes is also present, directly or through Origins Legacy / Apoli Legacy.
  4. Start the game or server.

On startup you should see the mod listed as:

aea_tnt_crash_fix 1.0.0

You should also see:

AEA TNT Crash Fix loaded.

Logging

When the fix prevents the crash, the log will contain a rate-limited warning like:

[AEA TNT Crash Fix] Prevented XP crash: Additional Entity Attributes breakingPlayer was null during Block.popExperience/explosion. Keeping vanilla XP.

The warning is rate-limited to avoid log spam during TNT chains. It logs at most once every 30 seconds.

Recommended test checklist

Use a test world or a backup copy of your world.

Recommended checks:

  1. Explode one TNT in the Nether.
  2. Explode a chain of 5 TNT.
  3. Explode a chain of 10 TNT.
  4. Explode TNT near quartz ore, gold ore, ancient debris, or other XP-related blocks.
  5. Use a bed explosion in the Nether.
  6. Use a respawn anchor explosion where applicable.
  7. Mine XP-dropping ore normally with a player.
  8. Mine XP-dropping ore with Origins/Apoli powers that affect XP, if your pack has them.
  9. Confirm that XP still drops.
  10. Confirm that the game/server no longer crashes.

FAQ

Is this needed on the client when joining a server?

No. If the server has the mod, normal clients do not need it.

Is this needed for singleplayer?

Yes. Singleplayer runs an integrated server inside the client, so the client must load the mod.

Does this remove XP from explosions?

No. When the crash condition is detected, the mod keeps the original vanilla XP amount.

Does this fake a player?

No. This mod intentionally does not use fake players or nearest-player logic.

Does this change Origins powers?

It should not change normal player mining behavior. If a real player breaks a block and AEA has a valid player reference, AEA can still apply its XP modifiers normally.

The patch only skips player-based XP modification when there is no valid player breaker.

Does this fix all Additional Entity Attributes bugs?

No. It only targets the breakingPlayer == null crash in AEA's block XP modification path.

Technical details

The relevant AEA logic is a Mixin into net.minecraft.world.level.block.Block, modifying the XP argument passed by Block.popExperience.

The problematic case is equivalent to:

additionalEntityAttributes$breakingPlayer.get()

when additionalEntityAttributes$breakingPlayer itself is null.

AEA TNT Crash Fix injects at the head of AEA's generated XP modification method and checks the stored WeakReference first.

If the reference is missing or cleared, it returns the original XP value immediately.

License

MIT

Project description from CurseForge.

Pick your setup

AEA: TNT CrashFix by Minecraft version and loader

Choose the version and loader you play, then open the matching release.

3 available setups

Check the dependencies, then try the file in a copied instance before changing a world you care about.

Recent files

AEA: TNT CrashFix versions and loaders

1 of 1 releases match

Looking for an older file? The official CurseForge project page is in Resources.