#Script API General
1 messages · Page 23 of 1
Yeah that's the same
idk i think i had the same issue with this before
and kinda solved it with that? i dont remember
just suggesting
In arrow functions () isn't required if there's only 1 param.
what about trying it on vanilla interactable entities
Try shearing a sheep
That 100% counts as a successful interaction.
If it still doesn't run, check your file, maybe it didn't get imported or smt
yeah that's why i saw
afterEvents only works if the entity has interact component
if i use beforeEvents
it doesn't matter
but doesn't work well for players / mobs
it is not fixed lol
yipeen't
i still havent figured out how on EARTH applyKnockback strength works
all i know is that the strength is like blocks per tick
it is not
but i really cant figure out the x strength
when i tested it in runInterval with 1/20 of the y strength it did give me the exact velocity of it
applyKnockback() takes account of Knockback Resistance right?
this is really really weird
@shy leaf ...

wait that is apply Impulse 🗿
i seen hem using it for player
maybe it is another one
Can anyone please help me make a form for chat ranks ???
Form heading- Ranks
Button 1- Create Ranks
Button 2- Delete Ranks
Button 3- Add Ranks
Button 4- Remove Ranks
Button 5- About
Button 6- Cancel
the rank prefix is "rank:<rank name>"
it adds tags
like /tag @s add rank:name
the you get a rank
any ideas ?
if anyone knows pls ping/dm me
If you want an add-on made for you for free, you're most likely out of luck. The best thing you can do is watch tutorials and read guides so you can learn how to develop it yourself.
People won't work for free, but you can always offer to pay them to make something for you.
i mean i asked for help/suggestions
Installation for @minecraft/server
Latest API module install:
npm i @minecraft/[email protected]
Beta API module install:
npm i @minecraft/[email protected]
Preview API module install:
npm i @minecraft/[email protected]
Preview Beta API module install:
npm i @minecraft/[email protected]
I can vouch for this solution. Just need to convert applyImpulse to applyKnockback for players. Here's a video of me using it to apply a single knockback command that launches the player to an exact point I specify.
how to make that change
#1286283295801348096 message
will take a look
thanks
Guys does itemCompleteUse detect eating or is it something else that detects when I eat something
hmm.. currently there's a lot of cases of that playerInteractWithEntity event isn't working
for some users
#1285791890087870555 message
when the item finishes charging, so ig finishing eating would be a case too
So it works I guess
Detects when an item has been eaten or has finished using its use duration
You can also use onConsume custom component if its for custom items
Oh OK then it's valid
how to get an array of all item ids?
this may not be the one youre looking for
but its close enough
is it stable?
it looks like it jst have air in stable
it contains every vanilla item types
Guys why does this say this? I defined it using let and it doesn't work and tried it with const and doesn't work too
youve got the script wrong
are you running it in runInterval?
just point to the part where youre getting the error
i dont want to check the entire code
let randompose = Math.floor(Math.random() * 6) + 1;
let randoma = Math.floor(Math.random() * 6) + 1;
and where did you put it
Inside a world.
...yeah like,
No system.
you can post the chunk of the code
Wdym?
export function center(target,vector3 = { x: 0, y: 0, z: 0}) {
const { x, y, z } = vector3;
const c = {
x: target.location.x+x,
y: ((target.location.y+target.getHeadLocation().y)/2)+y,
z: target.location.z+z
}
return c;
}```
like this
I can't post the entire code I need nitro lol
system.afterEvents.scriptEventReceive.subscribe((event) => {
if (event.id == "space:randomtp2") {
let randomo = Math.floor(Math.random() * 4) + 1;
let randoma = Math.floor(Math.random() * 6) + 1;
switch (randomo) {
case 1:
let randomint5 = Math.floor(Math.random() * (29 - 15 + 1)) + 15;
world.getDimension("overworld").runCommand(`execute as @r at @s run tp @e[type=space:the_one_who_watches] ^ ^ ^${randomint5}`);
break;
case 2:
let randomint12 = Math.floor(Math.random() * (29 - 15 + 1)) + 15;
world.getDimension("overworld").runCommand(`execute as @r at @s run tp @e[type=space:the_one_who_watches] ^ ^ ^-${randomint12}`);
world.getDimension("overworld").runCommand("execute as @r at @s run playsound toww.behind");
break;
case 3:
let randomint21 = Math.floor(Math.random() * (29 - 15 + 1)) + 15;
world.getDimension("overworld").runCommand(`execute as @r at @s run tp @e[type=space:the_one_who_watches] ~${randomint21} ~ ~`);
break;
case 4:
let randomint6 = Math.floor(Math.random() * (29 - 15 + 1)) + 15;
world.getDimension("overworld").runCommand(`execute as @r at @s run tp @e[type=space:the_one_who_watches] ~-${randomint6} ~ ~`);
break;
default:
break;
}
}
switch (randoma) {
case 1:
world.getDimension("overworld").runCommand("event entity @e[type=space:the_one_who_watches] minecraft:pose1");
break;
default:
break;
}
});```
@shy leaf
how do i use it
randoma is defined inside that first if block. The switch statement near the end of the function is outside of that block, and thus the variable is not defined
you have to import MinecraftItemTypes from @minecraft/vanilla-data
and then do something like MinecraftItemTypes.DiamondSword
but if youre still trying to get the array
im not sure about that cuz there are lots of items in game
are you sure it's stable?
or do i need to add it to the manifest?
oh you probably have to add it to the manifest mb
what does that mean???
what are the docs even smoking
means its not included by default in the game
i dont like how ms docs gave us that for an example in addEnchantment
only to make it external
Because...their setup includes using esbuild or something

bruh i just keep clicking enter+up+enter to reload and end up using reload all
third time in a row
what is the manual way of being able to use it?
i have run this command npm i @minecraft/[email protected]
now what do i do?
I would recommend searching in #1067535712372654091 or this channel to learn how to use that
I dont relly see why you would even use that module in the first place anyways
Does this guide work https://jaylydev.github.io/posts/bundle-minecraft-scripts-esbuild/
he wants to get the array of entire item
but
im honestly not sure if that works
i just need to get a simple array of all item ids
I simply would just use the ItemTypes
is that beta?
Idk
it works yaya
nice
hmm, scripts will stop working on the specific entity if it is in unloaded chunks right?
Sad womp womp
so making a custom furnace thing will stop working when the chunks aren't loaded
yah thats good
get entities with type check
Yeah I know
I cant see in the types that says that its incompatible
you can make it tick the world as i said
yeah i found out the same way yesterday
onTick?
ooh, i got a really nice idea,
end-game machines will have an upgrade, making the upgraded block works even inside unloaded chunks
or, having a custom block that will keep chunks loaded but requires energy
entity component
from the json part
yah i see
Is this possible ??
a script n which there is a text box in which i can type a message
then there is drop-down menu with list of all players
finally when i press the submit button, it runs /execute as <player i selected> run say <message i input>
bro
you should do it yourself
there are lot of guides about it
imma try
There is an example of ModalFormData
@runic crypt
import { ModalFormData } from "@minecraft/server-ui";
function showSettingsForm(player) {
const form = new ModalFormData();
form.title("Game Settings");
form.toggle("Enable Flying Mode", false);
form.slider("Sound Volume", 0, 100, 1, 50);
form.dropdown("Difficulty", ["Peaceful", "Easy", "Normal", "Hard"], 2); // Dropdown (default to "Normal")
form.submitButton("Confirm");
form.show(player).then(response => {
if (response.canceled) {
player.sendMessage("Settings update canceled.");
} else {
const [enableFlying, volume, difficulty] = response.formValues;
player.sendMessage(`Flying Mode: ${enableFlying}`);
player.sendMessage(`Volume: ${volume}`);
player.sendMessage(`Difficulty: ${["Peaceful", "Easy", "Normal", "Hard"][difficulty]}`);
if (enableFlying) {
player.runCommandAsync("ability @s mayfly true");
} else {
player.runCommandAsync("ability @s mayfly false");
}
}
});
}```
i want something a bit different
i knew how to make modal forms tho
what i need help with
search modalform in github or search in this server cuz im too lazy or in yt
a script in which there is a text box in which i can type a message
then there is drop-down menu with list of all players
finally when i press the submit button, it runs /execute as <player i selected> run say <message i input>
i did couldn't fix anything like it :(
how do i filter out waterlogged blocks from BlockTypes.getAll
i figured out a way, i just convert the type into an id, and then the id into a type, then get rid of the duplicates
this will remove the waterlogged state of the block
BlockTypes returns a waterlogged version?
@wary edge
could you provide some assistance ?
function showMessageForm(player) {
const form = new ModalFormData();
form.title("Send a Message");
form.textField("Enter your message:", "Your message here");
// Create a dropdown with all the players' names
const playerNames = world.getPlayers().map(p => p.name);
form.dropdown("Select a player to speak as:", playerNames, 0);
form.submitButton("Send Message");
form.show(player).then(response => {
if (response.canceled) {
player.sendMessage("Message sending canceled.");
} else {
const [message, selectedPlayerIndex] = response.formValues;
const selectedPlayerName = playerNames[selectedPlayerIndex];
// Execute the command as the selected player
player.runCommandAsync(`execute "${selectedPlayerName}" ~ ~ ~ say ${message}`);
player.sendMessage(`Message sent as ${selectedPlayerName}: ${message}`);
}
});
}
// Listen for the itemUse event
world.events.itemUse.subscribe(event => {
const { source: player, item } = event;
// Check if the item is a stick
if (item.typeId === minecraft:stick) {
showMessageForm(player);
}
});
can you fix this script ?
its showing errors and idk how to fix it, as I can't even locate the error
part of it was made by me and part of it was made by chat gpt
HELP
world.beforeEvents.playerInteractWithEntity.subscribe(e => {
const { itemStack, player, target } = e;
if (target.typeId !== 'npc:npc_prova') return;
// HERE
})```
how can i run a function
named "main"
this
i need help asap :(
can you take a look at this ?
and tell me where i went wrong ?
because it is not working
bro left caps lock on 😂
can you share the error?
use /execute ?
apparently, i was getting some waterlogged stairs, signs, slabs, and whatever
it just says "missing ) on line 33"
where is the line 33?
wdym?
can you pls try running the code if possible ?
my minecarft is reinstalling
what is line 33
minecraft:stick to "minecraft:stick"
wait....
there isnt a line 33 💀
ITS BLANK 😭
can you pls run it and see if it works for you ?
function showMessageForm(player) {
const form = new ModalFormData();
form.title("Send a Message");
form.textField("Enter your message:", "Your message here");
// Create a dropdown with all the players' names
const playerNames = world.getPlayers().map(p => p.name);
form.dropdown("Select a player to speak as:", playerNames, 0);
form.submitButton("Send Message");
form.show(player).then(response => {
if (response.canceled) {
player.sendMessage("Message sending canceled.");
} else {
const [message, selectedPlayerIndex] = response.formValues;
const selectedPlayerName = playerNames[selectedPlayerIndex];
// Execute the command as the selected player
player.runCommandAsync(`execute "${selectedPlayerName}" ~ ~ ~ say ${message}`);
player.sendMessage(`Message sent as ${selectedPlayerName}: ${message}`);
}
});
}
// Listen for the itemUse event
world.events.itemUse.subscribe(event => {
const { source: player, item } = event;
// Check if the item is a stick
if (item.typeId === "minecraft:stick") {
showMessageForm(player);
}
});
thank you :D
wtf
is it possible to open form using /scriptevent ?
idk
like /scriptevent gwim:open ?
it is
oh 💀
yes
i cant count ig
how ??
system.afterEvents.scriptEventReceive.subscribe((event) => {
const {id,initiator,sourceType,sourceBlock,sourceEntity} = event;
})
so something like this ?
function showMessageForm(player) {
const form = new ModalFormData();
form.title("Send a Message");
form.textField("Enter your message:", "Your message here");
// Create a dropdown with all the players' names
const playerNames = world.getPlayers().map(p => p.name);
form.dropdown("Select a player to speak as:", playerNames, 0);
form.submitButton("Send Message");
form.show(player).then(response => {
if (response.canceled) {
player.sendMessage("Message sending canceled.");
} else {
const [message, selectedPlayerIndex] = response.formValues;
const selectedPlayerName = playerNames[selectedPlayerIndex];
// Execute the command as the selected player
player.runCommandAsync(`execute "${selectedPlayerName}" ~ ~ ~ say ${message}`);
player.sendMessage(`Message sent as ${selectedPlayerName}: ${message}`);
}
});
}
// Listen for the itemUse event
world.events.itemUse.subscribe(event => {
const { source: player, item } = event;
system.afterEvents.scriptEventReceive.subscribe((event) => {
gwim:open
})
if (item.typeId === "minecraft:stick") {
showMessageForm(player);
}
});
what ???
huh
uhhhh
your code is messed up
what are you trying to do
"was made by chat gpt"
send a message as another player
mh
how to use script to label something? As in I have script saving inventory in barrels. Is there a way I could get the script to label the barrels with the player name somehow when it saves them? Like could script place a sign with the name? Or summon and invisible entity with the Player name?
// /scriptevent id:test test message
system.afterEvents.scriptEventReceive.subscribe((event) => {
const {id,message,sourceBlock,sourceEntity} = event;
// id is "id:test"
//message is "test message"
//sourceBlock is the block that triggered the event
//sourceEntity is the entity that triggered the event
if(id === "test" && message === "test message"){
//...
}
})
yes to all
there is a sign component in beta
Ok is any of it available in stable, server 1.11.0 I'm working in education edition v1.21.05
and if I can't do any of it in stable. I can use 1.12.0 Beta if I have to.
so something like this ?
function showMessageForm(player) {
const form = new ModalFormData();
form.title("Send a Message");
form.textField("Enter your message:", "Your message here");
// Create a dropdown with all the players' names
const playerNames = world.getPlayers().map(p => p.name);
form.dropdown("Select a player to speak as:", playerNames, 0);
form.submitButton("Send Message");
form.show(player).then(response => {
if (response.canceled) {
player.sendMessage("Message sending canceled.");
} else {
const [message, selectedPlayerIndex] = response.formValues;
const selectedPlayerName = playerNames[selectedPlayerIndex];
// Execute the command as the selected player
player.runCommandAsync(`execute "${selectedPlayerName}" ~ ~ ~ say ${message}`);
player.sendMessage(`Message sent as ${selectedPlayerName}: ${message}`);
}
});
}
// Listen for the itemUse event
world.events.itemUse.subscribe(event => {
const { source: player, item } = event;
// Check if the item is a stick
system.afterEvents.scriptEventReceive.subscribe((event) => {
const {id,message,sourceBlock,sourceEntity} = event;
if(id === "test" && message === "test message"){
}
})
if (item.typeId === "minecraft:stick") {
showMessageForm(player);
}
});
this ?
the entity way is stable
you will need a custom entity
you can use the one from my banner maker
I have no issues making custom entities
why are you putting an event inside another event
alr
can you point me at an example of how to summon the entity and give it the player name?
I have not found anything like that when I tried searching.
open a post and ping me there
I don't know
that make the event useless
can you help me
pls minato
pls
plsplsplsplsplsplsplsplsplsplspslsplspsl
@distant tulip plapalalapalapalapaalapalplaplsplsplspslplspslpslspslpslspslpsspslspslpslspslspslspsslpsslpsls
how about this ?
function showMessageForm(player) {
const form = new ModalFormData();
form.title("Send a Message");
form.textField("Enter your message:", "Your message here");
// Create a dropdown with all the players' names
const playerNames = world.getPlayers().map(p => p.name);
form.dropdown("Select a player to speak as:", playerNames, 0);
form.submitButton("Send Message");
form.show(player).then(response => {
if (response.canceled) {
player.sendMessage("Message sending canceled.");
} else {
const [message, selectedPlayerIndex] = response.formValues;
const selectedPlayerName = playerNames[selectedPlayerIndex];
// Execute the command as the selected player
player.runCommandAsync(`execute "${selectedPlayerName}" ~ ~ ~ say ${message}`);
player.sendMessage(`Message sent as ${selectedPlayerName}: ${message}`);
}
});
}
system.afterEvents.scriptEventReceive.subscribe((event) => {
const {id,message,sourceBlock,sourceEntity} = event;
if(id === "test" && message === "test message"){
}
});
player is not defined
@distant tulip
now ?
who are yo sending it to
in?
btw*
the player who's name i select in drop-down menu
script event event don't have any form in it...
929 lines ? 😭
world.beforeEvents.playerInteractWithEntity.subscribe(e => {
const { data, player, target } = e;
if (target.typeId !== 'npc:npc_prova') return;
player.runCommandAsync('say ciao')
main(player)
})
function main(player) {
const form = new ActionFormData()
.title('§g§rDark menu')
.button(`§cWarps`, 'textures/aulonia_icons/icontextures/magma_cream.png')
.button(`§dTpa`, 'textures/aulonia_icons/icontextures/ender_pearl.png')
.button(`§fPay`, 'textures/aulonia_icons/icontextures/coin_04c.png')
.button(`§6Shop`, 'textures/aulonia_icons/icontextures/gold_ingot.png')
.button(`§6Statistiche`, 'textures/aulonia_icons/Quest.png')
.button("§o§b???\n§7[ ??? ]", 'textures/aulonia_icons/NoTexture.png')
.show(player).then(({ canceled, selection }) => {
if (canceled) {
player.playSound("random.break")
}
if (selection == 0) Warps(player)
if (selection == 1) tpMenu(player)
if (selection == 2) moneyTransfer(player)
if (selection == 3) Shop(player)
if (selection == 4) Menu(player)
if (result.selection === 5) {
return
}
})
}```
yep
system.run(()=>{
//code that show the event
})
what i want is
Textbox- Enter message here
Drop-down- Select Player
Submit- execute command when pressed
okay boss
give me a sec
Okay
system.afterEvents.scriptEventReceive.subscribe((event) => {
const {id,sourceEntity} = event;
if(id === "id:send"){
const players = world.getPlayers()
const playerNames = players.map((player) => player.name)
const form = new ModalFormData();
form.dropdown("player", playerNames);
form.textField("message","Type a message");
form.show(sourceEntity).then((r) => {
if(r.canceled) return
if(!r.formValues[0] || !r.formValues[1]) return
const player = players[r.formValues[0]]
player.sendMessage(`<${sourceEntity.name}> ${r.formValues[1]}`)
})
}
})
THANK YOU 😭
@distant tulip
i copied the scrp to another folder, to make it run a /tag command (to add rank) however the command doesn't work
I tried other commands like give dirt and other stuff
it also didnt work
system.afterEvents.scriptEventReceive.subscribe((event) => {
const {id,sourceEntity} = event;
if(id === "gwim:rank"){
const players = world.getPlayers()
const playerNames = players.map((player) => player.name)
const form = new ModalFormData();
form.dropdown("player", playerNames);
form.textField("message","Type a message");
form.show(sourceEntity).then((r) => {
if(r.canceled) return
if(!r.formValues[0] || !r.formValues[1]) return
const player = players[r.formValues[0]]
player.runCommandAsync(`tag add ${sourceEntity.name} gwim:${r.formValues[1]}`)
})
}
})
can you take a look and tell me what i did wrong ?
Debug result for [code](#1067535608660107284 message)
Compiler found 4 errors:
[36m<REPL0>.js[0m:[33m9[0m:[33m15[0m - [31merror[0m[30m TS2345: [0mArgument of type 'Entity' is not assignable to parameter of type 'Player'.
Type 'Entity' is missing the following properties from type 'Player': camera, inputPermissions, isEmoting, isFlying, and 23 more.
[7m9[0m form.show(sourceEntity).then((r) => {
[7m [0m [31m ~~~~~~~~~~~~[0m
``````ansi
[36m<REPL0>.js[0m:[33m12[0m:[33m30[0m - [31merror[0m[30m TS2538: [0mType 'true' cannot be used as an index type.
[7m12[0m const player = players[r.formValues[0]]
[7m [0m [31m ~~~~~~~~~~~~~~~[0m
``````ansi
[36m<REPL0>.js[0m:[33m13[0m:[33m54[0m - [31merror[0m[30m TS2339: [0mProperty 'name' does not exist on type 'Entity'.
[7m13[0m player.runCommandAsync(`tag add ${sourceEntity.name} gwim:${r.formValues[1]}`)
[7m [0m [31m ~~~~[0m
``````ansi
[36m@minecraft/server-gametest.d.ts[0m:[33m3[0m:[33m38[0m - [31merror[0m[30m TS2307: [0mCannot find module 'mojang-minecraft' or its corresponding type declarations.
[7m3[0m import * as mojangminecraft from "mojang-minecraft";
[7m [0m [31m ~~~~~~~~~~~~~~~~~~[0m
There are no errors from ESLint.
uh what
am confused, keeps saying hasTag is not defined?
world.afterEvents.entityDie.subscribe((ev) =>{
const player = ev.damageSource.damagingEntity
const dead = ev.deadEntity
if(dead instanceof Player && player.hasTag("ctf")){
world.sendMessage(`CTF >> player has dropped flag, flag has been set at its location`)
player.removeTag("ctf")
overworld.setBlockType({ x: -11, y: 71, z: 2 }, "minecraft:standing_banner")
removeEffects(player)
}
show full error?
i meant show full error
as in send it
it probably "can't call function hasTag of undefined"
If the entity dies and it isnt caused by a player the player value would be nil
That could be the problem
ohhh
@distant tulip
function hashKeyToSlot(key) {
let hash = 0;
for (let i = 0; i < key.length; i++) {
hash = (hash << 5) - hash + key.charCodeAt(i);
hash = hash & hash;
}
if (settings.timeWarn == true) {
console.warn(`slot ${Math.abs(hash % (9999999999999999999999999999))}`)
}
return Math.abs(hash % (9999999999999999999999999999));
}
you got any ideas of how can i add arrays support for hashing keys?
posted this #1286407414974775336
I have a question
The PlayerInteractWithEntity component is used when you interact with a specific item with the mob?
for example, interacting with a stick will make the mob disappear and add a lore to the stick.
item it's optional
you can get the itemstack if u want
How do I test if an entity already exists at a location before doing something.
world.getEntity(id: string)
dimension.getEntities({type:id,location,vector3,distance:0.5})
so how would I put that in an if statement so that if the entity does exist at that spot I can have it return.
would it be just
if(dimension.getEntities({type:id,location,vector3,distance:0.5})) return
no that return an array
check if it is empty
what is the syntax to do that?
either
if(array[0]) return
or
if(array.length == 0) return
So if i make my own?
Like
Make a test to check wich armor is the player using and add the value of the protection and add it to the score
This is very interesting, it's because I want to try to make a golden bow but without having to hit the mobs
how do i display text to a actionbar again
lowk forget
whats the player. function
Should be player.onScreenDisplay.setActionbar("text");
tx
is it possible to summon a tamed entity with script?
How do I detect an entity with coordinates X: 1 Y: 10 Z: 0?
Const entity = ????
uh
block.dimension.spawnParticle('my:particle', ???) i had to make this spawn the particles slightly above the block center
like 0.3 above the block center
block.above(0.3) spawn the particles away from the block
anyone know why this isnt working?
import { system, world } from "@minecraft/server";
world.afterEvents.playerJoin.subscribe((data) => {
const playerName = data.playerName;
const playerId = data.playerId;
const player = world.getAllPlayers().find(p => p.id === playerId);
player.teleport({
x: 11.5,
y: -27.5,
z: -110.5
})
});```
are you getting content logs
yes
then post
[Scripting][error]-TypeError: cannot read property 'teleport' of undefined at <anonymous> (systems/events/playerJoin.js:42)
i dont get it
even the debugger bot got 0 errors
the debugger checks for only visible errors like syntax error or unused definitions
still, there should be no error
try some instead of find, maybe?
same error
const player = world.getAllPlayers().forEach(player => {if (player.id === playerId) return player;})```
even tried this and same error
did you try using playerSpawn instead
that also counts when you respawn
it worked but i only want when they join the world
if (data.initialSpawn)
isnt that for when the player joined for the first time since the world was open
i dont remember
^ yes
not when they spawn each time
initial is their first time ever joining
not each
atp you can try filter
i'm pretty sure initialSpawn would work
same error
const playerCenter = player.dimension.getEntities({
location: player.getHeadLocation(),
maxDistance: 3
});
const targetCenter = player.dimension.getEntities({
location: {x:target.location.x-1.5, y:target.location.y, z:target.location.z-1.5},
volume: {x: 3, y: 0.25, z: 3}
});
const commonEntities = playerCenter.filter(entity =>
targetCenter.some(targetEntity => targetEntity.id === entity.id) &&
entity.id !== target.id
);```
taken from my code
i stand corrected
bruj
it used to be initialSpawn was the first time ever joining
i guess they updated it
weird
but thx
oh yeah it makes sense
i still dont get why they dont let us get Player directly instead of just ids
idek
its a afterEvent tho
but considering the teleport 'worked'
the issue wasnt the teleport, it was saying player wasnt found
which if it doesnt exist how did the event trigger??? 😭
i giggled at this
idk i dont see any other solution other than Map
it worked
whar
import { system, world } from "@minecraft/server";
world.afterEvents.playerSpawn.subscribe((data) => {
const player = data.player;
if (!data.initialSpawn) return;
player.teleport({x: 11.5,y: -27.5,z: -110.5})
});```
this works
@half drum was right
they changed initalSpawn
huh?????????

hmmm,
const { x: eX, y: eY, z: eZ } = block.location;
('my:parricle', { x: eX, y: eY + 1, z: eZ })?
I'll go to sleep rn,
const {x,y,z} = block.center()
block.dimension.spawnParticle('my:particle', { x: x, y: y+0.3, z: z })
GENTLEMEN!!!
Let's say the player gets a tag. When given the tag, I intend for a given item to activate a cooldown, and the player removes the tag from themselves. It works fine, but I cannot at ALL figure out how I could get the current held item's cooldown category and cooldown duration, as the damned startItemCooldown demands I get those two arguments.
Is it vanilla items or a custom one?
A custom one, however it is a type of item in the addon that is in MASSIVE amounts. They all have their own cooldown times and categories, so individually going through each of those would be mind-numbing.
I am working with this dog water rn:
for(const player of world.getAllPlayers()) {
if(player.hasTag("tera_cooldown")) {
player.getItemCooldown("teraCooldown")
player.startItemCooldown("teraCooldown", tickValue)
player.removeTag("tera_cooldown")
}
}
}
);
You can get the ItemStack, and then get the ItemCooldownComponent:
itemStack.getComponent("minecraft:cooldown")
My question is, what about the duration?
It has its own startCooldown() method. It should run on its default set value from the json
Wait, what!? How!?
I can't find that anywhere in the damn beta api
i give you the link?
it's ItemStack component, not entity
You can just do ctrl+f on your keyboard to open up a search tool. It will find any matching or similar text in that page
I was pissed off and skimming through the search because I was running on 3 hours of sleep, coffee, and hopes and dreams
I skimmed over it by mistake hours ago
would help if you learn js basics:D
i do know the basics, i cant figure out how to add /scriptevent
i think some people have already ask for that in this chat
where are you adding the scriptevent
i
in this
oh this, i figured out on my own :D
you can just post the chunk of the code
that actually makes sense 💀
i dont even know what youre trying either
have u tried to make a console.warn?
import system and do system. afterEvents. scripteventreceive. subscribe and continue as you do any afterEvent
uhh no ?
i want the form to open when i do /scriptevent gwim:rank
i did the same in another script
and it worked
ur code already includes the scriptevent part
you made the function but you didnt add it inside the event
just need to call the function
yea, but it doesn't work
thats the problem
because it's empty
cause u haven't call the function
what's the function name?
any will do
openRanksMenu(player or entity whatever)
lets go with ranks ?
oh that function
@runic crypt try adding this one just for try
alright
call it inside the empty {}
write openRanksMenu(sourceEntity)
where do i write this exactly ??

line 25 💀
u just said u knew basics
im curious how you even managed to build the functions
i think i got it
system.afterEvents.scriptEventReceive.subscribe((event) => {
const {id,sourceEntity} = event;
if(id === "gwim:rank"){
openRanksMenu(sourceEntity)
}
this ?
chat gpt on top 🫡

wont sourceEntity be player ?
@shy leaf
oh wait nvr mind
forget it 🙂
do you even know how if works? yes this is correct
i dont know if i should respond to it
❌
you missed a bracket
system.afterEvents.scriptEventReceive.subscribe((event) => {
if(event.id === "gwim:rank" && event.sourceEntity) {
openRanksMenu(event.sourceEntity)
}
}
sourceEntity can also be undefined so you need to make sure it isn't when calling the function
yeah, in case you run it through a command block
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
use content logs
One message removed from a suspended account.
One message removed from a suspended account.
its in settings
One message removed from a suspended account.
it shows your script error logs
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
its defined as main script file but the game says its not there
check your scripts and manifest
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
uhhhhh?
you sure thats the right manifest?
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
also
i recommend using development packs for making addons
you can use /reload command to reload changes in scripts and mcfunctions
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
when you use those for storing packs youre making
then yep
One message removed from a suspended account.
you dont have it?
One message removed from a suspended account.
One message removed from a suspended account.
then create development_resource_packs and development_behavior_packs in com.mojang folder
and then put the packs in there
One message removed from a suspended account.
what link?
One message removed from a suspended account.
oh right
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
return to com.mojang
you should see a developer folder
click this to go back a directory, and you want to put your pack into development_behavior_packs instead of behavior_packs.
The development... folders allow Minecraft to reload the pack when you reload a world.
In the non-development versions of the folders, each time you create a world and apply a pack to it, the pack is copied into the world folder and will not be reloaded unless the version number is incremented. This means you won't see any changes you make to your pack in a world that already has it applied, as the world now has an older outdated copy of it.
it is there by default
you don't need to make it
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
yeah
use those for developing
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
you may need to clear cashed packs from you world
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
read 😅
why do people see list of errors and don't try to understand them
this is the only script related error
make the main.js file specified on your manifest
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
translated?
One message removed from a suspended account.
send your manifest
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
change "main.js" in your manifest to whatever path the script is on
including the full path
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
One message removed from a suspended account.
make sense
hey quick question
how big is the command queue?
and also
is there a way to set a lot of blocks quickly
(5120 blocks to be precise)
ok structures might work
Can I edit files with scripts ? Like I have a file that exports a giant object and I was wondering if I can edit it with script
no
~onPlayerInteract: i => { turning aThing from false to true }
~runInterval(() => { if (aThing = true) { ,,, } })```help?
or
onPlayerInteract: i => { ~runCommand('scriptevent a:thing') }
and detects the scriptevent inside of a runInterval
Why are you insisting on using runInterval? The point of scripting's event-based system is so you can run actions precisely when, and only when, they occur
like,
const scriptEvent = ~scriptEventReceive.sub(({ id }) => { if(id === 'a:Thing') })
look,
when the player interacts with a block, it will do something that will be detected inside of a runInterval
Why not just perform that action right as they interact with a block?
Why the looping code? It's overhead you don't need
im making something that requires runInterval
Could you elaborate further?
interacting with the block will generate energy,
i had to make the runInterval detect that energy, i mean after interacting with the block it will do something like change the value of something,
if that something has the value of 1 it will be detected
just like on and off button
interact will turn it on, and after 1 second it will set back that value from on to off, gosh i cant explain well
Mm, and that energy has a value that depletes over time, and it should do some action when it hits 0.
I can see a use for runInterval in something like circuitry. A ticking game loop is the most straightforward way to make it deterministic
Native property setter [Entity::nameTag] does not have required privileges. since when does changing nameTag require privilages??
it is so dumb
Anything that affects the game state isn't allowed in beforeEvents. Name tag probably because it needs to send data to the client
bro
i am not asking why
"since when does changing nameTag require privilages??"
That is precisely answered by vprufus's response. If you are working in a read-only context, you cannot (or at least, should not be able to) edit the game's state—and apparently that includes setting name tags(?)
world.~customBlockComponents(() => {
onPlayerInteract: i => { changing the value of energy from 0 to 1 }
})
system.runInterval(() => { if (energy = 1) {,,,} })```
runInterval is not needed for this either, just use run
since a long time ago
Pretty sure it was changed, I code addons since a year and never ever had this issue in my entire life
Stuff changes 🤷
well, how can i turn that energy value? from 0 to 1
If energy is a globally scoped variable, it should be as simple as energy = 1;
go learn javascript
this is such a basic thing
beforeEvents were added in @minecraft/server version 1.4.0, which was over a year ago
duh, before 1.21 the nameTag was changeable, im pretty sure
not in a before event
anything that modifies the world state is not allowed in a before event context
use a system.run() to change the nametag
its really not that big of a deal wrapping your code in system.run
tell me how it is?
better to use none
i am talking about wrapping a code in system.run
it is a big deal
well you can't so you have no other options, how is it a big deal?
yes I know, I'm talking about the same thing
So wrapping a code in system.run is not required
a code
What do you think this means?
are you fucking stupid?
bro is still not telling me how it is a big deal
I think he's talking about privilege system
guys, what is the difference between "your code" and "entity.nametag = """
world.beforeEvents.playerSpawn.subscribe(e => {
e.player.nameTag = "idiot" // won't work, missing required priviliges
})
world.beforeEvents.playerSpawn.subscribe(e => {
system.run(() => {
e.player.nameTag = "idiot" // will work
})
})
how should i answer to 3 guys at the same time??
yup and?
"and"?
yeah i know
lmao
i am telling that putting system.run is a big deal (a code)
dont come complaining here about something if you're not gonna fucking listen lmao
why is it a big deal?
fair, I just want to know why you think its a big deal.
cuz system.run delays your code?
onPlayerInteract: i => { if (energy === false) return true }?
i dont put everything in system.run
THATS WHAT ITS SUPPOSED TO DO YOU DUMBASS
you've proven this?
ew
It will run in the same tick
did i ever say it shoudnt?
you HAVE to delay the code till the next tick so it's inside the read / write context. BeforeEvents run outside of the game's tick, so they are in a read-only context
you should put system.run for work
did i ever doubt that?
i said that you putting system.run is a big deal in general
it literally is fucking not but ok
your arguing is pointless because you're completely wrong
yo
sometimes you actually need this one tick, but ok
sup
just calm down bro
you're arguing with some random on discord for some minecraft development xd
it is annoying sometimes ngl
i dont think so, i wouldnt put everything in system.run
lol
quick question if yall have time
i read the whole conbo and he's just trying to get answer why you can't change nametag in the same tick in before event
then dont
yea wsp
you could just redirect him to this one resource
instead of calling him a fucking idiot
ask away
i dont, they say something different about itand argue about it
is there a before event of entityHitentity?
or you can all ignore him cuz his answer wont change
no
no
entityHurt?
neither
no.
nope
he is a fucking idiot because 3 people told him multiple times but he's too stubborn to listen
just move away from discord dawg
its not that deep
bro there's clowns everywhere on the internet, you cant fight them all
lets relax.
true
your making it more serious than it really is
I'm not angry
can I make it work with max value instead of normal value?
.getComponent('minecraft:health').setCurrentValue();
js step away from discord for a few
well you are infuriated at most.
youre saying idiot, where i dont. just stop arguing
no you can't modify player's max health with script api
well is there a way to disable red flashes when player hit another entity?
i wish you could
player.json
to set max value you have to use component groups in player.json
player.json -> damage_sensor (tag management)
calling you an idiot doesn't change the fact you're completely wrong
but visually, while be able to still doing damage, I dont know.
damn so I cant connect it with a scoreboard
add-ons are more server-side, you can't set someone's sneak ig
player.dimension.spawnEntity('minecraft:fireball', { x: x, y: y, z: z }); ```
Not work why?
you can
you can its just super buggy
okay, i understand, but that's still not the reason to call him a fucking idiot xd
whenever im changing player.json it looks like i have speed buff when join the world and im flying when taking damage
just spam him link to this mini-doc
Bro, stop arguing, i never said im not wrong, just turn your discord off
you're probably trying to spawn it outside of the loaded chunks
how you're supposted to change readonly value?
it's not readonly
im good thanks
world.getDimension(player.dimension).spawnEntity
its not readonly
its writable
What does this mean?
no
that you're trying to spawn the entity in chunks that aren't loaded?
the chunk has to be loaded to spawn a entity in it
does this even toggles sneak?
its buggy
sometimes
it toggles it for like 1 tick out of the second
and it goes back to standing
and the camera bugs if you try to move
its funny how i found it, i was trying to set another player value to true and picked sneaking by accident 😭
its weird tho
@grave nebula @slow walrus The location where the entity spawns is in front of the player.
watchu know bout file structure 😭
why it would be not read-only if it's that buggy
i have no clue
can you console.warn the location?
console the loc
^
mistake prob
instead they make things read only that are cool like entity.target
world.getDimension(player.dimension).spawnEntity("minecraft:fireball", { x: x, y: y, z: z });
don't do what that guy said
change it back
player.dimension.spawnEntity() is fine
...
in my opinion, it should be read-only
how come
or just some component to set it
the unexpected type is cause he's passing a Dimension object to getDimension which needs a string
changing the entity target's?
yeah
I disagree, im leaving it there
but that's only my suggestion
^
it used to not be readonly
when did they changed it?
prob some long time ago ig
make structure with fireball
save it
then load it when diamond pressed
😐
player.runCommandAsync(“structure load minecraft:f ${ePos.x} ${ePos.y} ${ePos.z}”)```
yep, bedrock doesn't get any fun stuff
define pos first
dont use commands
theres structureManager class
world.structureManager
map markers...
what does it do
on java you can put down banners and it shows up on maps.
what will happens if load 334mb worth of mcstructures into Minecraft lol
place your bets
if this goes well
I'll comeback with 1.5 gb of mcstrucures
I'll be pleasantly surprised if it goes well
dam
holy hell
termux copying is sloww
took 30 seconds to copy 330ish mb to minecraft
@fallow rivet just change fireball.json
Change the summonable to true
{
"format_version": "1.12.0",
"minecraft:entity": {
"description": {
"identifier": "minecraft:fireball",
"is_spawnable": false,
"is_summonable": true,
"is_experimental": false
},
"component_groups": {
"minecraft:exploding": {
"minecraft:explode": {
"fuse_length": 0,
"fuse_lit": true,
"power": 1,
"causes_fire": true,
"fire_affected_by_griefing": true,
"destroy_affected_by_griefing": true
}
}
},
"components": {
"minecraft:collision_box": {
"width": 0.31,
"height": 0.31
},
"minecraft:projectile": {
"on_hit": {
"impact_damage": {
"damage": 6,
"knockback": false,
"semi_random_diff_damage": false
},
"definition_event": {
"affect_projectile": true,
"event_trigger": {
"event": "minecraft:explode",
"target": "self"
}
}
},
"power": 1.6,
"gravity": 0.00,
"inertia": 1,
"liquid_inertia": 1,
"uncertainty_base": 0,
"uncertainty_multiplier": 0,
"anchor": 1,
"offset": [ 0, -0.1, 0 ],
"reflect_on_hurt": true,
"catch_fire": true
},
"minecraft:physics": {
},
"minecraft:pushable": {
"is_pushable": true,
"is_pushable_by_piston": true
},
"minecraft:conditional_bandwidth_optimization": {
"default_values": {
"max_optimized_distance": 80.0,
"max_dropped_ticks": 7,
"use_motion_prediction_hints": true
}
}
},
"events": {
"minecraft:explode": {
"add": {
"component_groups": [
"minecraft:exploding"
]
}
}
}
}
}
player.getComponent('minecraft:inventory').container.setItem(8, { amount: 1, typeId: "minecraft:compass", keepOnDeath: true, lockMode: ItemLockMode.inventory, nameTag: `GUI` })```
has no errors but doesnt set the item
You need to make it an ItemStack
https://stirante.com/script/server/1.14.0/classes/ItemStack.html
let item = new ItemStack(id, count)
item.keepOnDeath = true
setItem(item)
Documentation for @minecraft/server
What does this mean?
Code?
use what ever throwing that
inside system.run
world.beforeEvents.playerInteractWithEntity.subscribe(async eventData => {
let entity = eventData.target
let player = eventData.player
let equipment = player.getComponent("equippable")
let hand = equipment.getEquipment("Mainhand")
let tame = entity.getComponent( "minecraft:is_tamed" );
let lore = hand.getLore()
if (entity && hand && !tame && hand?.typeId == "mc:genie_lamp" && lore.length == 0 && entity.typeId != "minecraft:player") {
let newItem = new ItemStack(ItemTypes?.get("mc:genie_lamp_captured"))
let mobName = entity.typeId;
let test = entity.id;
newItem.setLore(["§fID: " + test,"§fMob: " + mobName])
player.runCommandAsync(`titleraw @p actionbar {"rawtext":[{"translate":"function.lampc"}]}`);
entity.runCommandAsync(`structure save ${entity.id}_mob_capture_device ${entity.location.x} ${entity.location.y} ${entity.location.z} ${entity.location.x} ${entity.location.y} ${entity.location.z} true disk false`).then(r => {
entity.teleport({
x: 0, y: -100, z: 0
})
entity.kill
equipment.setEquipment("Mainhand", newItem)
})
}
if (entity && hand && tame && hand?.typeId == "mc:genie_lamp" && lore.length == 0 && entity.typeId != "minecraft:player") {
entity.runCommandAsync(`effect @e[c=1,r=5,type=!item,type=!xp_orb,family=!inanimate,type=!player] instant_health 1 0 false`)
}
})
use system.run around setting the lore
...
but why beforeEvents in the first place
question, i have my scripts in development_behaivor_packs on a server, whenever i do /reload in terminal the scripts dont actually update
after nothing happened, there was no error but it didn't work either, and before is giving this error but it doesn't work either
Is there any way I can identify the mob I interacted with?
world.beforeEvents.playerInteractWithEntity
yes but to identify the mob, before I used entity hurt and it identified normally
did you delete the one in behaivor_packs
eventData.target.typeId
there isnt one
try new world
🗿
I tried this but it didn't change much.
I would like that when I interact with the mob it exchanges my mother's item for another and this new item already comes with a selected lore, and it would also execute a command to save the mob as a structure and then delete the mob from the world.
what component
what is it that is not working?
getComponent('allTypes')
don't work. as in game or what
const inv = entity.getComponent('inventory'). ← nothing is showing up
in web only,
its fine in-game
is there anything else i can use to code a script for minecraft?
{ on mobile }
with auto complete you van use termux
waveplayz have some guides in the resource channel
other than that there is some simple code editors in the store
i had to install something inside termux to make it work right?
I'll do some searches
https://discord.com/channels/523663022053392405/1207044647919296612
@woven loom you were saying there is an easier way
did you post any guides about it?
@distant tulip
i have a question
is it possible to use scripts to identify if an entity has a specific tag, then show its health in form of a bossbar ?
yeah
really how ?
entity from view direction?
no i wanna make a custom boss (vanilla mob, but it shows a bossbar)
but it shows the bossbar only if it has tag "boss"
alr
give me a sec
oki thanks :D
there is this pkg called helix which is more cleaner than neovim setup
pkg -y i \
helix helix-grammars \
nodejs-lts
npm i -g typescript typescript-language-server
config at ~/.config/helix/config.toml
theme = "flexoki_dark"
[editor]
cursorline = true
cursorcolumn = true
auto-save = true
color-modes = true
completion-replace = true
# popup-border = "menu"
[editor.gutters]
layout = ["diagnostics", "spacer", "line-numbers", "diff"]
[editor.statusline]
left = ["mode","diagnostics","spinner", "file-name", "read-only-indicator", "file-modification-indicator"]
right = ["selections", "register", "position", "file-encoding"]
mode.normal = 'N'
mode.insert = 'I'
mode.select = 'S'
[editor.indent-guides]
render = true
[editor.lsp]
display-inlay-hints = true
[keys.insert]
C-s = [
":format",
":write"
]
C-S-s = "commit_undo_checkpoint"
C-q = ":quit"
C-c = "yank"
C-v = "paste_clipboard_after"
C-z = "undo"
C-y = "redo"
C-right = "indent"
C-left = "unindent"
C-f = "search"
"A-space" = "hover"
"A-r" = "rename_symbol"
"A-l" = "goto_reference"
"A-d" = [
"goto_definition",
"insert_mode"
]
"A-t" = "goto_type_definition"
"A-w" = "diagnostics_picker"
"A-a" = "code_action"
"A-f" = "select_references_to_symbol_under_cursor"
aslo @supple warren ^
the config is not complete yet but that is what i have rn
@untold magnet
thanks
this what shows up when i type nvim,
its not like that yt vid@woven loom
i have no idea
i am not using mobile
@distant tulip
can you tell me how its done ?
it is
i am sending a video
give it a second
oki thanks :D
@runic crypt
const distance = 45
const barLength = 20;
const empty = "█"
const full = "█"
system.runInterval(() => {
world.getPlayers().forEach(player => {
const entities = player.dimension.getEntities({
tags:["boss"],
maxDistance:distance,
location:player.location,
excludeNames:[player.name]
});
if(!entities.length) return;
const bossBars = entities.map(entity => getHealthBar(entity))
player.onScreenDisplay.setActionBar(bossBars);
})
});
function getHealthBar(entity) {
const health = entity.getComponent('health').currentValue;
const maxHealth = entity.getComponent('health').effectiveMax;
const healthPercentage = health / maxHealth;
const filledLength = Math.round(barLength * healthPercentage);
const emptyLength = barLength - filledLength;
const filledBar = full.repeat(filledLength);
const emptyBar = empty.repeat(emptyLength);
const healthBar = `[§c${filledBar}§r${emptyBar}]`;
return `\n${healthBar} ${health}/${maxHealth} HP`;
}
this looks insane
but one more question
is it possible to make it like a bossbar ??
wait like this
made with this
add scoreboard objectives and setdisplay to sidebar
dose that support multiple entities?
yes
see
i added score to a zombie and drowned
it worked
how dose it know the percentage
it uses scoreboard
between 100 to 0
i set score and it reflects the score
let me see
sure :D
idk what should i do
i will clear termux data, and start it over
whats the issue
nvim showing up this
i can't do anything there
i already cleared up the app data, now im installing nodejs
i am not using nvim
i hate nvim its too much to work with
I'll use nodejs
wat?
but idk what should i do after installing it
did you follow the cmds i gave

if so then use hx file.js to open the editor
thats the setup ^
pkg -y i
helix helix-grammars
nodejs-lts
npm i -g typescript typescript-language-server
should i paste this first?
idk im completely lost
- install the editor helix
- install the language sererv with npm
- setup the config
- use it
yes
uh
remove -y
should i clear the app data again bec i installed nodejs?
no need
alright its installing now
I really hate bridge website, it keeps glitching and sometimes removes my entire addon
hm
i just need autocomplete tool for coding the addon,
bridge-v2 autocomplete is glitched
set config
pkg i micro
mkdir -p "~/.config/helix/"
touch "~/.config/helix/config.toml"
micro "~/.config/helix/config.toml"
Ctrl+v
Ctrl+s
Ctrl+q
copy the whole thing and paste right?
yes
done
@distant tulip
imma go skeep, when you figure it out, can you dm it to me ??
install npm i @minecraft/server
then hx test.js
press i to start typing
write code and see auto completion
press ESC to exit insert mode
type :write to save :quit to quit @untold magnet
skeep well buddy
umm
i did this one
just to be clear this is not multiplayer friendly
the first one above is
const distance = 45
const healthObj = world.scoreboard.getObjective('boss:health')??world.scoreboard.addObjective('boss:health','dummy');
world.scoreboard.setObjectiveAtDisplaySlot("Sidebar",{objective:healthObj});
system.runInterval(() => {
world.getPlayers().forEach(player => {
const entities = player.dimension.getEntities({
tags:["boss"],
maxDistance:distance,
location:player.location,
excludeNames:[player.name]
});
if(!entities.length) return;
entities.forEach(entity => {
healthObj.setScore(entity, getHealthBar(entity));
})
})
});
function getHealthBar(entity) {
const health = entity.getComponent('health').currentValue;
const maxHealth = entity.getComponent('health').effectiveMax;
const healthPercentage = health / maxHealth;
return healthPercentage*100;
}
no problem :D
and thanks :D
what are the modules needed ?
minecraft/server and ?
nothing, somehow
@distant tulip
it works great !!
but how do i set the name above the bossbar ?
Like my mob is named §6§lEldrich God
how do i set it above the bossbar ??
@woven loom ^
did u save it ?
how tho?
copy config
micro "~/.config/helix/config.toml"
paste by doing ctrl+v
save by doing ctrl+s
exit by ctrl+q
ctrl+v
ctrl+s
ctrl+q```?
those are diff steps
micro "~/.config/helix/config.toml"
i think im so dumb
paste this
# WavePlayz's config
theme = "flexoki_dark"
[editor]
cursorline = true
cursorcolumn = true
auto-save = true
color-modes = true
completion-replace = true
# popup-border = "menu"
[editor.gutters]
layout = ["diagnostics", "spacer", "line-numbers", "diff"]
[editor.statusline]
left = ["mode","diagnostics","spinner", "file-name", "read-only-indicator", "file-modification-indicator"]
right = ["selections", "register", "position", "file-encoding"]
mode.normal = 'N'
mode.insert = 'I'
mode.select = 'S'
[editor.indent-guides]
render = true
[editor.lsp]
display-inlay-hints = true
[keys.insert]
C-s = [
":format",
":write"
]
C-S-s = "commit_undo_checkpoint"
C-q = ":quit"
C-c = "yank"
C-v = "paste_clipboard_after"
C-z = "undo"
C-y = "redo"
C-right = "indent"
C-left = "unindent"
C-f = "search"
"A-space" = "hover"
"A-r" = "rename_symbol"
"A-l" = "goto_reference"
"A-d" = [
"goto_definition",
"insert_mode"
]
"A-t" = "goto_type_definition"
"A-w" = "diagnostics_picker"
"A-a" = "code_action"
"A-f" = "select_references_to_symbol_under_cursor"
oh, i completely forgot about it
now i click Ctrl+v and Ctrl+s and Ctrl+q right?
done
@woven loom still no autocorrect
u installed types and grammers ?
what are these?
how?
maybe I should make a little guide on how to get vscode on android
make one
well, i did some testing and we are both wrong:
I thought system.run delayed 1 Tick (which is wrong and only skips around 30 miliseconds, the currentTick stays the same) so we were both wrong
The Event Privilages have been changed in 1.20 so im right about it being new (proof #1116091026843635732 message)
And yes, since system.run executing code in the same tick it is not a big deal
But it is still sometimes a trouble.
||it doesnt say how big of a delay but if sending this helps you, sure||
the callback in the param runs in the next game tick
I can't seems for the life of me. find good nbt library for JavaScript
welp
it's rawdoggin binary time
sigh
pkg i helix helix-grammars nodejs-lts
npm i -g typescript typescript-language-server
Made one in #1072983602821861426
haven't done that,
hey man I used it for a long time, its not worth putting all the effort in configuring every single piece when you can use an out of box working solution
TY!
If you like the customizability then yeh go for it
idk man haven't touched my config in a year lol
finally something useful more than bridge-glitch2
I spent like 3-4 hours on it
also I think most people use nvim because it's vim rather than the customizability of it
personally I use it because it's easy to install new lsp
oh, getComponent is broken here too
nah, just stable autocompletions
Its due to the type defs
Stable doesnt have a map of components while beta does


