Skip to content

Commit

Permalink
fix: correctly attribute TNT primer in unstable TNT
Browse files Browse the repository at this point in the history
  • Loading branch information
Restioson authored and Gegy committed Jun 15, 2024
1 parent 4e4038c commit c46eac8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public final class GameRuleType {
public static final GameRuleType UNSTABLE_TNT = GameRuleType.create()
.enforces(BlockPlaceEvent.AFTER, result -> (player, world, pos, state) -> {
if (result != ActionResult.FAIL && state.getBlock() == Blocks.TNT) {
TntBlock.primeTnt(player.getWorld(), pos);
TntBlock.primeTnt(player.getWorld(), pos, player);
player.getWorld().setBlockState(pos, Blocks.AIR.getDefaultState());
}
});
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/plasmid.accesswidener
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,5 @@ accessible field net/minecraft/world/GameRules$IntRule value I

accessible method net/minecraft/entity/Entity unsetRemoved ()V
accessible method net/minecraft/server/network/ServerPlayerInteractionManager setGameMode (Lnet/minecraft/world/GameMode;Lnet/minecraft/world/GameMode;)V

accessible method net/minecraft/block/TntBlock primeTnt (Lnet/minecraft/world/World;Lnet/minecraft/util/math/BlockPos;Lnet/minecraft/entity/LivingEntity;)V

0 comments on commit c46eac8

Please sign in to comment.