#An item that increases the player’s underwater breathing duration while equipped.
1 messages · Page 1 of 1 (latest)
function slowDrowning(player) {
try {
const air = player.getComponent("minecraft:breathable");
air.totalSupply = 200;
air.airSupply = air.totalSupply;
}
catch (e) {
console.warn("No se pudo modificar respiración:", e);
}
}
system.runInterval(() => {
const players = world.getPlayers();
players.forEach((player) => {
const ItemMainhand = player?.getComponent('equippable').getEquipment('Mainhand');
if (ItemMainhand?.typeId === "ssss:ssss") {
slowDrowning(player);
}
})
},1);```
It’s when you have ssss:ssss in hand?
yes
Do you got any errors?
Yeah so that why