diff --git a/Canopy [BP]/scripts/src/rules/tntPrimeMaxMomentum.js b/Canopy [BP]/scripts/src/rules/tntPrimeMaxMomentum.js index c8e112a..10a7d22 100644 --- a/Canopy [BP]/scripts/src/rules/tntPrimeMaxMomentum.js +++ b/Canopy [BP]/scripts/src/rules/tntPrimeMaxMomentum.js @@ -15,6 +15,7 @@ world.afterEvents.entitySpawn.subscribe(async (event) => { const entity = event.entity; if (await Rule.getValue('dupeTnt')) { system.runTimeout(() => { + if (!entity.isValid()) return; correctErrorAndNegateXZVelocity(entity); applyHardcodedImpulse(entity); }, 1); diff --git a/Canopy [BP]/scripts/src/rules/tntPrimeNoMomentum.js b/Canopy [BP]/scripts/src/rules/tntPrimeNoMomentum.js index fa52fa0..52ac5e3 100644 --- a/Canopy [BP]/scripts/src/rules/tntPrimeNoMomentum.js +++ b/Canopy [BP]/scripts/src/rules/tntPrimeNoMomentum.js @@ -14,6 +14,7 @@ world.afterEvents.entitySpawn.subscribe(async (event) => { const entity = event.entity; if (await Rule.getValue('dupeTnt')) { system.runTimeout(() => { + if (!entity.isValid()) return; correctErrorAndNegateXZVelocity(entity); }, 1); } else {