i cant figure out how to remove a blocks custom tag on right click (its in a seperate script and verified working), and im fairly sure im just laying out my code incorrectly ... im trying to go through an array of log ids, which will remove their "sapable" tag and damage the sap tap. the blocks arent losing their tags, and the item isnt even getting to the cooldown state either so its not working at all for some reason. ive tried troubleshooting it for like an hr and i still cant figure it out
const sapLogs = ["#tfc:douglas_fir_logs", "#tfc:spruce_logs", "#tfc:maple_logs", "#tfc:palm_logs"]
sapLogs.forEach((blockID) => {
if(event.block.id == blockID && event.item == "kubejs:sap_tap") {
event.player.addItemCooldown("kubejs:sap_tap", 5)
if (!event.block.hasTag("ztfc:sapable")) { return; }
event.player.damageHeldItem("MAIN_HAND", 1)
event.block.tags.removeTag("ztfc:sapable")
}
});
});```