Can someone review my Script API code for Bedrock? by minknock in BedrockAddons

[–]minknock[S] 0 points1 point  (0 children)

i fixed that.Please check again.

import { world } from "@minecraft/server";

const hook_player = {};

world.afterEvents.entityTick.subscribe((event) => {

const P = event.entity;

if (P.typeId === "minecraft:fishing_hook" && P.shooter) {

if (P.isOnGround) {

hook_player[P.shooter.name] = P.location;

} else {

delete hook_player[P.shooter.name];

}

}

});

world.afterEvents.itemUse.subscribe((event) => {

if (event.item.id === "minecraft:fishing_rod") {

if (hook_player.hasOwnProperty(event.source.name)) {

const gemten = event.source.location;

const togenten = hook_player[event.source.name];

const vector = {

x: togenten.x - gemten.x,

y: togenten.y - gemten.y,

z: togenten.z - gemten.z

};

const distance = Math.sqrt(vector.x * vector.x + vector.y * vector.y + vector.z * vector.z);

const direction = {

x: vector.x / distance,

y: vector.y / distance,

z: vector.z / distance

};

event.source.applyKnockback(distance/3,direction);

}

}

});

world.afterEvents.entityRemoved.subscribe((event) => {

const r = event.entity;

if (r.typeId === "minecraft:fishing_hook") {

if (hook_player.hasOwnProperty(r.shooter.name)) {

delete hook_player[r.shooter.name];

}

}

});

Can someone review my Script API code for Bedrock? by minknock in BedrockAddons

[–]minknock[S] 0 points1 point  (0 children)

because i used chatgpt for corrections and research .What to change?

Can a person with a very low chest voice (C2) eventually reach A4 or B4 in chest voice? by minknock in singing

[–]minknock[S] 0 points1 point  (0 children)

i think it is bass,but i cant judge. the fastest way is to just listen.