--- a/net/minecraft/world/level/block/TntBlock.java
+++ b/net/minecraft/world/level/block/TntBlock.java
@@ -26,18 +26,24 @@
 import net.minecraft.world.phys.BlockHitResult;
 
 public class TntBlock extends Block {
+
     public static final BooleanProperty UNSTABLE = BlockStateProperties.UNSTABLE;
 
     public TntBlock(BlockBehaviour.Properties settings) {
         super(settings);
-        this.registerDefaultState(this.defaultBlockState().setValue(UNSTABLE, Boolean.valueOf(false)));
+        this.registerDefaultState((BlockState) this.defaultBlockState().setValue(TntBlock.UNSTABLE, false));
     }
 
     @Override
     public void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
         if (!oldState.is(state.getBlock())) {
             if (world.hasNeighborSignal(pos)) {
-                explode(world, pos);
+                // Paper start - TNTPrimeEvent
+                org.bukkit.block.Block tntBlock = net.minecraft.server.MCUtil.toBukkitBlock(world, pos);;
+                if(!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.REDSTONE, null).callEvent())
+                    return;
+                // Paper end
+                TntBlock.explode(world, pos);
                 world.removeBlock(pos, false);
             }
 
@@ -47,7 +53,12 @@
     @Override
     public void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, BlockPos sourcePos, boolean notify) {
         if (world.hasNeighborSignal(pos)) {
-            explode(world, pos);
+            // Paper start - TNTPrimeEvent
+            org.bukkit.block.Block tntBlock = net.minecraft.server.MCUtil.toBukkitBlock(world, pos);;
+            if(!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.REDSTONE, null).callEvent())
+                return;
+            // Paper end
+            TntBlock.explode(world, pos);
             world.removeBlock(pos, false);
         }
 
@@ -55,8 +66,8 @@
 
     @Override
     public void playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) {
-        if (!world.isClientSide() && !player.isCreative() && state.getValue(UNSTABLE)) {
-            explode(world, pos);
+        if (!world.isClientSide() && !player.isCreative() && (Boolean) state.getValue(TntBlock.UNSTABLE)) {
+            TntBlock.explode(world, pos);
         }
 
         super.playerWillDestroy(world, pos, state, player);
@@ -65,42 +76,57 @@
     @Override
     public void wasExploded(Level world, BlockPos pos, Explosion explosion) {
         if (!world.isClientSide) {
-            PrimedTnt primedTnt = new PrimedTnt(world, (double)pos.getX() + 0.5D, (double)pos.getY(), (double)pos.getZ() + 0.5D, explosion.getSourceMob());
-            int i = primedTnt.getFuse();
-            primedTnt.setFuse((short)(world.random.nextInt(i / 4) + i / 8));
-            world.addFreshEntity(primedTnt);
+            // Paper start - TNTPrimeEvent
+            org.bukkit.block.Block tntBlock = net.minecraft.server.MCUtil.toBukkitBlock(world, pos);
+            org.bukkit.entity.Entity source = explosion.source != null ? explosion.source.getBukkitEntity() : null;
+            if(!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.EXPLOSION, source).callEvent())
+                return;
+            // Paper end
+            PrimedTnt entitytntprimed = new PrimedTnt(world, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, explosion.getSourceMob());
+            int i = entitytntprimed.getFuse();
+
+            entitytntprimed.setFuse((short) (world.random.nextInt(i / 4) + i / 8));
+            world.addFreshEntity(entitytntprimed);
         }
     }
 
     public static void explode(Level world, BlockPos pos) {
-        explode(world, pos, (LivingEntity)null);
+        TntBlock.explode(world, pos, (LivingEntity) null);
     }
 
     private static void explode(Level world, BlockPos pos, @Nullable LivingEntity igniter) {
         if (!world.isClientSide) {
-            PrimedTnt primedTnt = new PrimedTnt(world, (double)pos.getX() + 0.5D, (double)pos.getY(), (double)pos.getZ() + 0.5D, igniter);
-            world.addFreshEntity(primedTnt);
-            world.playSound((Player)null, primedTnt.getX(), primedTnt.getY(), primedTnt.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
-            world.gameEvent(igniter, GameEvent.PRIME_FUSE, pos);
+            PrimedTnt entitytntprimed = new PrimedTnt(world, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, igniter);
+
+            world.addFreshEntity(entitytntprimed);
+            world.playSound((Player) null, entitytntprimed.getX(), entitytntprimed.getY(), entitytntprimed.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
+            world.gameEvent((Entity) igniter, GameEvent.PRIME_FUSE, pos);
         }
     }
 
     @Override
     public InteractionResult use(BlockState state, Level world, BlockPos pos, Player player, InteractionHand hand, BlockHitResult hit) {
-        ItemStack itemStack = player.getItemInHand(hand);
-        if (!itemStack.is(Items.FLINT_AND_STEEL) && !itemStack.is(Items.FIRE_CHARGE)) {
+        ItemStack itemstack = player.getItemInHand(hand);
+
+        if (!itemstack.is(Items.FLINT_AND_STEEL) && !itemstack.is(Items.FIRE_CHARGE)) {
             return super.use(state, world, pos, player, hand, hit);
         } else {
-            explode(world, pos, player);
+            // Paper start - TNTPrimeEvent
+            org.bukkit.block.Block tntBlock = net.minecraft.server.MCUtil.toBukkitBlock(world, pos);
+            if(!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.ITEM, player.getBukkitEntity()).callEvent())
+                return InteractionResult.FAIL;
+            // Paper end
+            TntBlock.explode(world, pos, player);
             world.setBlock(pos, Blocks.AIR.defaultBlockState(), 11);
-            Item item = itemStack.getItem();
+            Item item = itemstack.getItem();
+
             if (!player.isCreative()) {
-                if (itemStack.is(Items.FLINT_AND_STEEL)) {
-                    itemStack.hurtAndBreak(1, player, (playerx) -> {
-                        playerx.broadcastBreakEvent(hand);
+                if (itemstack.is(Items.FLINT_AND_STEEL)) {
+                    itemstack.hurtAndBreak(1, player, (entityhuman1) -> {
+                        entityhuman1.broadcastBreakEvent(hand);
                     });
                 } else {
-                    itemStack.shrink(1);
+                    itemstack.shrink(1);
                 }
             }
 
@@ -112,11 +138,23 @@
     @Override
     public void onProjectileHit(Level world, BlockState state, BlockHitResult hit, Projectile projectile) {
         if (!world.isClientSide) {
-            BlockPos blockPos = hit.getBlockPos();
+            BlockPos blockposition = hit.getBlockPos();
             Entity entity = projectile.getOwner();
-            if (projectile.isOnFire() && projectile.mayInteract(world, blockPos)) {
-                explode(world, blockPos, entity instanceof LivingEntity ? (LivingEntity)entity : null);
-                world.removeBlock(blockPos, false);
+
+            if (projectile.isOnFire() && projectile.mayInteract(world, blockposition)) {
+                // CraftBukkit start
+                if (org.bukkit.craftbukkit.v1_19_R1.event.CraftEventFactory.callEntityChangeBlockEvent(projectile, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) {
+                    return;
+                }
+                // CraftBukkit end
+                // Paper start - TNTPrimeEvent
+                org.bukkit.block.Block tntBlock = net.minecraft.server.MCUtil.toBukkitBlock(world, blockposition);
+                if (!new com.destroystokyo.paper.event.block.TNTPrimeEvent(tntBlock, com.destroystokyo.paper.event.block.TNTPrimeEvent.PrimeReason.PROJECTILE, projectile.getBukkitEntity()).callEvent()) {
+                    return;
+                }
+                // Paper end
+                TntBlock.explode(world, blockposition, entity instanceof LivingEntity ? (LivingEntity) entity : null);
+                world.removeBlock(blockposition, false);
             }
         }
 
@@ -129,6 +167,6 @@
 
     @Override
     protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
-        builder.add(UNSTABLE);
+        builder.add(TntBlock.UNSTABLE);
     }
 }
