AEA: TNT CrashFix

Quick rating

AEA: TNT CrashFix

No reviews yet

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.

Bug Fixes
Performance & Optimization
Mod Loaders
Fabric
Minecraft

Community voices

Reviews

Versions
Loading versions…
Match includes

Click once to include, again to exclude, again to clear

Rating Any
Any 0.5 1.0 1.5 2.0 2.5 3.0 3.5 4.0 4.5 5.0
Min
Max
Play Status
Reviews
Time Played
hrs+
Verified developers only
Has developer response
List view
Grid view
Compact view
Sort by
Date
Rating
Helpful
Unhelpful
Edited
Sort ascending
Delete this review?

This removes your review from the project. You can write a new review after.

Review submitted for moderation

Your review has been sent to moderators, who will check that it meets our guidelines before it appears publicly.

No reviews yet. Be the first to review this project!

Get it on

Available Platforms

Compatibility

Supported Environments

Dev Environment
Client Optional
Server Optional

About

Project Details

Type
Mod
License
MIT License
Latest Version
aea-tnt-crash-fix-1.0.0.jar
Authors
CurseForge
Modrinth

For authors

Embed Badge

If you're the author of this project, you can embed a live badge anywhere that supports HTML or Markdown. It updates automatically whenever ratings change.

Custom banner text
ModDex rating badge preview

Use HTML for any page that supports it, or Markdown for README files and Markdown-based descriptions.

Identifiers

Platform IDs

CurseForge ID
Modrinth ID

Resources

External Links

About

Description

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

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.
  • Make sure Additional Entity Attributes is also present, directly or through Origins Legacy / Apoli Legacy.
  • 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

Screenshots

Gallery

This project has no gallery images yet.

Versions

Files

Relations

Project Relations

More like this

Similar Mods

Suggestions use data such as tags, dependencies, dependents, descriptions, titles, and more to rank how much they overlap with this mod.

On ModDex

Community snapshot

0
Ratings
0
Followers
0
In stacks

By the numbers

Statistics

<1,000
Total Downloads
CurseForge
<1,000
Modrinth
<1,000
Last Updated
CurseForge
Modrinth
Created
CurseForge
Modrinth
Last synced
When ModDex last fetched this project from CurseForge or Modrinth. Every project is re-checked on a schedule, and any project that ships a new file is synced automatically within hours of the release.
New file updates sync automatically
How syncing works