#Script API General
1 messages ยท Page 125 of 1
hm yeah but i feel like not making it such open information that matchmaking is influenced by your input device would make cheating incidents less likely
if they know that they can get themselves easier matches by spoofing it then i feel it's more likely anyone would even try
you are saying that in public chat
i know
people can dig this information up or not , they will know if ive implemented it or not eventually anyway xd
yeah, it is not hard to know if the server have that or not
nametags are also usable with msa-gamertags-only=true
you player names? BC nameTags are related to entities and could ba change anytime
gamertags, not nametags
gamertags as in the xbox names
with the server property, Player.name will output the xbox name. zelisce in my case.
yea you just said nematags, so i corrected you
Oh.
all good, we mean the same thing
the funniest BDS property is isHardcore
Explaining such easy things to a Scripting Leader is hilarious, lol
me as scripter i would never trust gamertags/player names, as you as an addon instance you don't have control on where is the addon run
It depends on the type of an add-on. If you're making an add-on for your own network, you shouldn't worry about it
Seen people with similar statuses asking for basic help ๐ข better safe than sorry is my motto
yea sure, but from the script view, you can't trust it
not as programmer but as the script executor
anyway
xuids are the way in my opinion
Sry, i think i did some jokes on April 1 last time
This role might some sort of an achivement, but some people that have it, shouldn't
Con is pretty good among scripters tbh
I used to script addons a lot back then, but i don't have as much time anymore
endstone with script sdk all the way!!!
Just use PHP and be a walking dead for other developers
๐
i got a problem, i changed from windows to pop!_os and i cant login to my github account ๐
tried all my previous emails and passwrods
and couldnt find on my phone which email had github emails
im screwed GG
I am not sure but you can login via GitHub mobile
you are not able to login on browser?
nah, tried my personal and public email with my new password and sadly did not work
Alright found which email
damn, had my old password instead of my new one ๐ข
i have like 5 different passwords and 4 different emails
We can share my account
feel free to send your email and password ๐
you can pay to change that iirc
has any of you made a backpack addon?
Oh right you can
is it possible to add components to items through scripts
no
so no way to make items given through scripts undroppable ?
You can change the lock mode
lock the item
To inventory
i thought that's what adding component means LMAO
is lock_in_slot not an item component
Those things are weird
Idk lol.
Tbh I have never ever touched componenents in my entire career
how so?
I'm just referring to terminology and calling them components
why use all uppercase in import won't work?
import {system as S, world as W, BlockPermutation as BP, EquipmentSlot as ES} from "@minecraft/server"
but using normal is works...
import { world as W } from "@minecraft/server"
W.sendMessage("Hello World");
You mean something like this?
yes but uppercase
W.afterEvents;
i just want an answer since i have problem to non-uppercase somehow
did minecraft change the com.mojang folder? havent played minecraft in ages and apparently they moved to another sdk or something and now when i compile my packs with bridge, they dont appear.
weird. set the compiler output to C:\Users\gorbolaxis\AppData\Roaming\Minecraft Bedrock\Users\Shared\games\com.mojang but it doesnt appear. might be a bug with bridge.
had to restart bridge, works now for some reason
thanks!
I use laptop with touch and it changes accordingly
so u need to check it everytime
why does index.d.ts does not include in the debugBox? I tried installing it via npm
It does.
If you install it with server it does not due to dependencies issue.
yeah sorry mate, I installed via npm i .../debug-utilities, it was outdated but I forgot about adding what release version it is
thanks
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]
is there a way to take all formvalues from a modalformdata? I'm using a foreach loop for toggles and such
Maybe use switch
All values are inside an array in formValues so you can name each value like:
const [name,age] = data.formValues;
//name is from formValues[0]
//age is from formValues[1]
hmm alright, I'll try that out
thank you
uhm why would you return something in runJob at the first place
u do that in functions
I found a solution
expensive calculations
so expensive that it crashes or lags the game
uses A* pathfind algo in xyz directions
so you optimize it?
what does it relate with return
ill give you an example, I have a path class that reference another path class representing a linked list, I need to get this sequence and return this sequence array
do in function?
until I find the end node
a loop runs multiple times in a tick
ask AI
causing a lag spike
Put outside the loop
there is no other way to get a sequence array from a linked list node
I found a solution
im no specialist in this
alr gl
I found a way to return the value of a job
type DoneCallback<T> = (value: T) => void;
/**
* RunJob returns a promise
* @param generatorFactory
* @returns
*/
function runJobAsync<T>(
/**
* return around your generator function.
* @param resolve use this callback to resolve the task
* @param reject use this callback to reject the task
*/
generatorFactory: (resolve: DoneCallback<T>, reject: ()=>void) => Generator<void, void, void>
): Promise<T> {
return new Promise((resolve, reject) => {
const gen = generatorFactory(resolve, reject);
system.runJob(gen);
});
}
Oh. this is what my version of runjob does
Thanks. Glad somebody got some use out of it
yeah just wraps around a promise
its helpful if you just wnat to report the progress, i didnt know what you meant by 'returning'
I am returning the value
dude. I did just say you can't return a value
INSIDE that job
unless you report the progress outside
Uhh
thats just a promise, not the internal returned value of the generator
Maybe like
no.
I guess it will not work with game ticks also
Is there a way to get the direction a carved pumpkin block is facing through a script? I'm making a custom golem and I want it to be rotated towards pumpkin's face when it spawns
Nvm, found out I can use minecraft:cardinal_direction state
with the new entity hurt before event, can i disable team damage with it? (js like pvp off where they dont really deal the hit or sum)
yeh.
speaking of preview
I love the drop and pickup event listener...

yes, there's a cancel property
ah okay ty
Yea BDS becomes more bearable each update
I just hate how unoptimized BDS can be
Optimizing addons and bds should be their next priority
Would also help with the commercialization of BDS in the featured servers list
how bad is minecraft addons optimization?
i thought they made addons more optimized. I got inactive for a while
addons seem bearable but many people say they are slow
BDS on the other hand is a different story lmao
Really depends on the code
But they're not that slow tbh, it depends
I can't even trust beta beforeEvents that much
sounds dangerous or might not work sometimes, or not recommendable
Or I'm wrong
What's worse for me is it needs Beta API on, while addon users always don't do that and complain "Can you update this, it doesn't work on v1.2-.---"
huh??
"dangerous" is wayy too OA ngl...
Why
This is understandable...
It was still in pre-release so I think it might bug somehow
but saying dangerous is a huge stretch...
Oh alright
It's not gonna make it device go kaboom or something
Do you think there's alternative for canceling damage tho in stable
But yes it's beta it doesn't necessarily mean it should completely work, that's why it's testing phase, tho in my experienced I never had a problem with dealing before events even if I'm doing a huge load
Editing the json file.
damage sensor unfortunately
and it's hardcoded tags, name, etc.
Yeah, I agree, it's just not too flexible for me like changes in-game
But I'll guess I'll work on that, thanks again
and to add more, it's not too bad to try them out tbh especially if ur doing very simple script
I guess I'll try that on
Thanks
I was making something like a survival allies system
So I gotta need flexible damage canceling
But I do hope it became stable in the future
me with chatSend way back be like:
how do I get the structure in a world with script api?
structureManager class if that what are you reffreing to
no I mean minecraft generated structures
getGeneratedStructures?
Bruh I look the properties for world and not for dimensions xd thank you
I think the docs for MinecraftFeatureTypes is buged, like the auto complete thing
Is there away to generate the fortress structure?
No.
they need to add that to the /place command bc there is only the trail structures
Yo same
yoooo, how can i 'activate' a block perm based on player distance from it? (like the vanilla vaults)
nvm. on tick..
Is it possible to use a script to hide the scorebar from certain players? I have a problem with my addon that I've been working on. I've made it so that the scorebar displays the health of my entity, which is a ship, but I only want it to be visible to the player piloting that ship. In other words, if a player pilots the ship, I want them to see the health of the ship they're piloting in the scorebar, and if another player pilots a different ship, I want only that player to see the health of their ship. I don't want both players to see the health of their different ships in the scorebar.
not with scripts...
that's a JSON UI problem
You can just hide the scoreboard then display their own score using actionbar via /titleraw or script
I'm using the action bar to display the ship's HUD; I'll switch to using the title bar if there's no other option.
what is the most efficient way to get entities without costing too much TPS?
the getEntities().forEach(entity =>{***}) was giving 13-15 TPS with 64 total entities
is there like a better way to make it works?
and getEntities() by itself is working for only one entity, like i am applying impulse for two zombies, one of them is getting the impulse but the other isnt, so i had to make the script work for each or at least all entities at the same time
(like one applyImpulse for all zombies instead of giving each one its own value [if possible])
Dimension.getEntities itself takes approximately 0-1 ms (it also depends on the number of entities and filters), and there is no more efficient method
If your TPS is so low, it's not because of getEntities
64 entities was giving 13-15 TPS,
@untold magnet
mhm
is there any way to reduce the amount of entities i can detect? (like 11 zombies will have applyImpulse, any more wont be counted at all.
i think using length or something
show full code
ig this should work (per player too)
system.runInterval(() => {
count++;
for (const player of world.getAllPlayers()) {
const playerDim = player?.dimension;
const playerLoc = player?.location;
const Miners = playerDim?.getEntities({location:playerLoc, maxDistance:55, type:'xhardercore:zombie_minerzack'});
if (Miners.length <= 11) console.warn(Miners.length);
};
});;```right?
rn it stop the warning when the entities length is above 11, which wont do any improvements i believe, since i am still using getEntities
Well, this code shouldn't cause any slowdown
like i need to add the getEntities inside the if to return if their length was too high, then after that, i need to turn their functionality on (dynamic property) so i have to getEntities once again
yeah that works, no slowdown (maybe cuz i have removed their functionality, lemme try with it.
wait, i think i figured it out,
one last thing ig
now lemme see the TPS and how much miners are working
Is there a shortcut function to detect if the container is full
Check if emptySlots are equal to zero
so far, 20 TPS with 88 miners
only 11 are functioning, the rest isnt
the items were stackable
You have to loop through entire inventory and calculate it on your own then :/
Optionally - you can add a single item and check if it returns an ItemStack or undefined
Yeah I've tried that too, but no worries I'll be using a loop instead, thanks again
what i see that make the game slower is the amount of entities
That's the biggest deal, you can somehow reduce amount of them?
/kill @e[type=!player] the unique way i can do so ingame
generally i dont make addons with that much of entities
so i might be safe
dont forget clearing all the dropped loot too
I recently tested this, somewhere around 500 zombies is the ceiling for 20 tps (tested on BDS with a Ryzen 9 7950x processor)
with path finding or idle?
Well, they were just walk around on a flat surface
It really depends on what type of entity are you working with
Heard the TPS drop when the zombies chase you on survival
And their state while benchmarking
didn't test it :/
i wonder if making your own path finding algorythm would be better than BDS's one
probably not
but it would be interesting
there is only one way to find out ๐
If you'd rewrite it in Rust, then yes
were in script api general
And?
It's just a joke about rewriting everything into Rust, why would you even complain about it?
is it a complaint?
well, rn it does that, the only issue is: im using 3 getEntities and two for (const entity) to make it works
You can use a single array/set for entities, also try reducing amount of for loops in your project
import { world, system } from "@minecraft/server"
class EntityManager {
static #entities = {
"overworld": [],
}
static {
void this.#init()
}
static #init() {
const overworld = world.getDimension("overworld")
system.runInterval(() => {
this.#entities.overworld = overworld.getEntities()
})
}
get overworld() {
return this.#entities.overworld
}
}
like instead of turning on the entity functionality using a for and using another for to use that functions, i can just increase the Set() and using one for to get that entity?
Try looping through all entites only a single time, sometimes it might be actually better to do it more times, but in most cases - one is enough
Also in context of arrays/sets - in case of usage with for loops, they behave the same
umm, what is the point from doing all of that? + can it detect a limited amount of entities in all dimensions?
i see,
It might reduce calls of getEntities across project (depends on your code)
I use providers very similar to my code snippet for dimensions also
well, the getEntities will be used once in my core addon, i wont be using any more getEntities.
You don't have to use my provider then, all is good then ๐
in that case, i have to do some BP improvements, to like find a better way to detect the entity or something
or making the detected entities limited, or rare/wont spawn that often
there might be a way to make the entity do something in its BP that i can detect using scripts without having to getEntities
like damage_over_time but nah, that will be bad for the actual entity
effectAdd might work,
detecting when my entities gets a specific effect type that wont do anything to them (like nausea) then using some events in the entity.json, i can apply that effect for this special entity, then i can remove the effect using the script and do my stuff without ANY getEntities or for loops
I'll do some heavy testing soon
OR i can use DataDrivenEntityTriggerAfterEvent Class without having to add any effects, instead just triggering a null event in the entity.json to be able to detect that entity
and i think the mob effect one is better than the DataDrivenEntityTriggerAfterEvent Class one, since i only have to deal with the effect cooldown instead of dealing with timers or triggering any event
that probably isn't the best idea for performance. Idk if cache locality helps that much on minecraft, but this interval would make it bad for the gc
a slotmap that inserts the entities based on events would be a better idea
but i forgot if there are events for everything related to entity spawn and dying
Just a simple template of my idea, I usually implement add/remove system to it
EntitySpawn and EntityDie/EntityRemove are probably enough
using it might be a good solution then
the only problem its cause idk if it would cause much effect since we are talking about js
Cache helps; if you use multiple Dimension.getEntities or you just have plenty of entities in your world
and we cannot control the memory layout of things
with caching i mean the cpu cache
in general making things focusing on using the cpu cache instead of ram makes code faster
Doesn't Minecraft just put anything related to scripts directly in RAM instead CPU?
it does, but the thing is how the cpu reads the ram
in general, it tries to look into its cache
l1,l2 and l3
if it fails, then it goes to the ram
talking about js, only, probably these things dont work that much
I know how does it work, but I don't think this'll affect it that much tbh
probably not
AFAIK (and I have benchmarked long time ago), entity managers (better prototype of my handlers) are good for optimization, but they're not such a game-breaker in most cases
have you got the code?
It was ~a year ago and I've switched to MacBook in July, I don't have it anymore
minecraft is a whole new thing related to programming, and im thinking on using it to test some benchmarks of data structures
But I was simply putting Entity objects to an array
(how things work internally)
I haven't really worked much around add-ons since I've got a MacBook lol
I need to get into add-ons back
what have you done after you got it?
hmmm.... so the usage of "this." is to state what thing the js should read? seems to be like that
i got a job so i have almost no time for addons
also because im writing a programming language
so i really got no time
I am 16 currently, so I am just taking smaller commissions (related to Minecraft, but not always to add-ons directly) at this moment; also I work on school projects (full-stack apps for internal usage), so yeah - I don't really work with MC:BE add-ons
this is a variable that points to the object you're currently in, in this case - this points to an instance of this class
You'll see it mostly in classes, but sometimes also in functions (because some people still use functions as classes in JavaScript, lol; just use classes)
cool, im working as, idk full stack dev
im having to write elixir code thede days
phoenix more specifically
I write my backend code using Elysia + Bun
did it get more visibility?
understandable, although it wasn't my mastery learning software things
i mean, i found elysia about 1 year and 6 months ago
The only exception are school projects, where I use Express (but still with Bun runtime) so other people would be able to maintain it in future
Elysia can be compared to Fastify, but better
what kind of features did elysia got?
Since which version?
idk as well, i forgot the one i met it for the first time
Mostly performance & documentation things
another thing
can you see the language project im doing?
i mean, im trying to find Contributors to help me since its a language
and it'd be damn hard for me to do everything alone
I am only proefficient with C++/TypeScript (I know also some Python, Java etc., but these are the languages I use the most), so yeah
and i need to find opinions of people that aint from my country
Where are you from?
im brazilian so having someone from another country only to find some misspelling
brazil ๐ง๐ท๐ง๐ท๐ง๐ท๐ง๐ท๐ง๐ท๐ง๐ท๐ง๐ท๐ง๐ท๐ง๐ท๐ง๐ท(it sucks living here)
anyways, https://github.com/cykna/slynx
the lang
it still hasn't much thingsi
I don't really know Rust
๐ญ
But I like the syntax of your language, it gives me vibes of Swift
if the codebase doesn't confuse you
and you can understand by the docs
would be good enough
i want documenting it to make it easy to people contribute
looks better than json ui
I started using Cursor and I document most of things using it's AI, I really recommend it
I'm getting inspiree by qml actually
If 20$/month for better DX experience is not much for you, you'll be grateful while documenting by simply clicking tab
i might use it then, caude zed ai doesn't help much with documenting
but i was wondering about writing a backend for json ui
a backend?
languages have backend and frontend
the frontend is the handling of the text, ast, type checking, monomorphization
I know what a backend is
I don't think he's asking what's backend... they're not stupid
the backend transforms the resolved tree into something that might run
HOLY when did they add before hurt?
in the preview
It's pretty new
is it in latest update?
latest preview
it looks like im the stupid then ๐ข
i gotta do abit of waiting
but i cant wait to use it gonna make teams systems much more easier
nah, just a little miscom...
anyways, i didn't understand the question
like wdym backend for json ui
what would be the use of it
we can also detect drop and pickup of items...
i mean translating that code to json ui

HOLYYYY
mc finally adding good stuff
just read the change logs lol
There were already snippets of code that implemented the same thing
k?
like @rockwrap for example ๐ฅ
๐ญ every tick checking if the inventory changes
I made my own before it even existed.
nah. entityRemove event was my go
u'll be happy when I tell u this...
keep forgetting items are entities on the floor
can u change an item while its on the floor?
How do u check if the player double jumps?
It's in read-only mode, so you cannot

alright but you can change the enitity itself
What do you mean by entity itself? Other components/props?
by spawning and removing velocity
Also an option
i think its the only option lol
I've got alternative methods
If I need to drop an iron ingot, I just spawn a zombie in the same place and pray that zombie will drop an iron ingot
๐
Use Endstone and change the nonexistent entity's NBT API โ
yooo, my new system is soo much better, better than almost any getEntities u could make
the only getEntities i am using in this system is inside the entity counter,
217 entities, 20 TPS,
i can detect those entites to do whatever i want without affecting the TPS like getEntities
Add/remove?
just to be clear, i did not use any intervals or for loops
how
imma diagnose how it works
looks like i have nothinf to know for my project use
time to spamming function
๐ฃ๏ธ ๐ฅ ๐ฅ
anyway is it better to use function to compile everything then export it into runInterval? does it makes the game runs better?
What do you mean when you say "compile everything"?
effectAdd.
ok so I'm making a train mod and I'm making the trains rotate with a script and i already made my locomotive spawn at 90 degrees but the part I'm struggling with is getting the trains to rotate 90 degrees when it hits a curved rail, can someone help me make them rotate on curves? thx
so how did you do it?
like this:
system.runInterval(()=>{
ImplementSaturation();
ImplementPlayerOrigin();
ImplementPlayerPower();
},20)
every function worth 50 lines
using an entity (like player.json) to apply the nausea effect to my mobs using the mob_effects component, then detecting when the entity gets the nausea effect using the scripts to detect the entity
Yes and no. Depends on how expensive the tasks are for those other functions and whether or not it's required to run them periodically. This is one of those things where either you have to share your code for further analysis or run tests yourself.
i got it
i always use let to short my line and as
๐ฃ๏ธ ๐ฅ ๐ฅ ๐ฅ
like EntityComponentTypes as ect, EntityEquippableComponent to eec
Database (Set())
saving the entity iD using entityLoad then getting the entity using a for loop and world.getEntity(iD)
detecting the entity using effectAdd
and more stable
but my script isnt stable, i have to modify it heavily to make it useable
rn it has alot of block detections and dynamic properties, so i am getting very low TPS
good luck with it then
i've test so many marketplace addons, some of them causes pretty low tps
perhaps they have to use MemoryTier
with the new setting player can set their memoryTier on setting now
๐ฃ๏ธ ๐ฅ ๐ฅ
Pretty common in this environment. Many are still learning how to optimize code using the API's made available to us.
yes, that's what i wanted to figure out
mostly it should be related to graphics usage like particles i guess
most bedrock players complain about drop fps cuz a lot of particle
The best way to learn is to write your code, test its performance, and then study its behavior to understand why it behaves the way it does. Through thorough analytical investigation, you can iteratively refine your implementation to better serve both your project and its users. Just requires practice, studies, and patience.
noted
it's my 1 year experience learning bedrock scripting + javascript from scratch
Be open-minded to feedback by others, but also remember you won't be able to please everyone. So pick your battle's wisely.
๐ฃ๏ธ ๐ฅ
Does anyone know what exactly the custom component array and depth limit is and if there's a way to bypass it?
2 and no.
I'm having a problem that I can't figure out why it happens, in single-player it doesn't appear to happen while in multiplayer it happens when players are far from each other I don't understand if it's a problem if there are mobile players causing this bug; the system consists of capturing entities within a 15-block radius, giving a special tag to all target entities, I also used dynamic properties to see if it was a tag problem, then the entities are placed inside the bedrock cube where the owner who triggered the event is located, through logs I checked if it still reveals the entities inside the cube with the tag and the property, from what I see it still reveals them inside the cube, but when I use an item that triggers another event the entities are no longer detected and disappear instantly but I'm checking the code there is no .kill() or .remove() or teleport so I wonder what this problem could be, spectator mode?
2... why is it so little....
Perfromance reasons.
Chunks aren't being loaded?
How many years have you been working Smokey
when the secondary item is used to trigger the ability event the player ends up in spectator mode maybe the chunk is no longer loaded in spectator mode and therefore it no longer finds the mobs in the cube and they despawn?
I just tried turning off spectator mode and it seems to work, but I need spectator mode otherwise the owner gets stuck in the bedrock, the alternative would be to use a ticking area in the cube?
Then I don't understand why the spectator mode should cancel the loading of the chunk if I am present in that chunk?
This error does not occur in single player
Is this not feasible?
This happens if I keep the spectator mode on from what I see from the various tests, I'm trying to understand why it gives me 0 live entities when I use the second item, from what I'm seeing I assume it's the spectator mode that causes the problem, but if I use entities generated via eggs before capturing them it seems that they are considered from the tests I tried to do, I don't understand exactly where the problem comes from.
The chunks might be unloaded for a few ticks when converting to spectator.
but why doesn't this problem happen in single-player?
Because local instance vs server.
so the solution would be to use a tickingarea when creating the cube, or avoid specatore mode?
Does delaying the retrieval work?
do you mean giving a delay (20 ticks) to the enable after spectator mode has been activated?
Correct, maybe even 5-10 secs.
If that works it shows the chunks are momentarily unloaded.
is there any event to know if the chunk is loaded?
There is a dimension.isChunkLoaded method.
sounds like a great way to stop that annoying unloaded chunks error
How can I get if a command executed correctly? Like this command just for testing purposes. How could I run code if it was successful in placing the block. Because running the command in game setblock 0 0 0 bedrock returns Block placed if successful and The block couldn't be placed if it failed. How can I either get that result and run code if it gives me a certain output or even just if it successfully ran.
player.runCommand(`setblock 0 0 0 bedrock`)
I definitely over explained what I was looking for but oh well
You cannot.
like not even a true or false?
Is there any reason for this example you chose you're choosing runCommand over native methods.
This example not exactly other that it gives a true or false statement in game. My goal is to repeatedly try to connect to a websocket server until it is successful.
And as far as I'm aware there is not method other than runCommand to connect to a websocket
Ok, I can see that there is https://stirante.com/script/server/2.4.0/classes/CommandResult.html
Documentation for @minecraft/server
So, it should return the count, but for any other command, you won't get the context.
@wary edge how would i write a script basically rotating a entity depending on what state the block its on top of is in?
Rotate to face in the same direction the block is?
yea like how a minecart rotates on a curved track
So would this work with a wss?
You would need to get the block the entity stands on(various methods) -> get the block state you want and then use and if/else or switch case to do entity.setRotation(blah)
does TextEncoder work in scripts
It should. But if the command has context of various success or failures, you won't know what it is.
So do I just do this?
player.runCommand(...).successCount
Yes, you'll get the success count.
I'll try it when I get back to my desk
??
what are those various methods? for getting the block under the entity.
You can do dimension.getBlock or entity.getBlockStandingOn
can i make myself invisible to others but visible to myself? like the hive spec mode
const serverAddress = "localhost:8000"
world.sendMessage(`${player.runCommand(`/connect ${serverAddress}`).successCount}`) // returns 0 no matter what
You can use playAnimation and use the players option to make every player that isn't you able to see the animation
I can, but how does the game know which player should be invisible?
Tags? Dynamic properties? Or something else, it's just easier with some ways than others
This wonโt hide their nametag though
Darn. That's a good point
They'd probably also have to edit the player.json to add and remove a component group that makes the player go dissappear when invisible
if thatโs possible to do then thatโs very cool
Assuming that when that is set to true or false it still makes the nametag dissappear
Most definitely
no idea how one would go about hiding the nametag though
The method normally works for other mobs since they are normally nametag-less
ye
but players have nametags which are rendered separately
you can hide player nametags through player.json but you canโt toggle them on and off to my knowledge at least
Which is just great
Only way I can remember to do it is to change their size from 1 to 0 in player.json. Create events that can switch between the two sizes then use the script API to trigger the event when needed to make them "invisible". This also hid their name tag but I haven't done this in a while so I cannot confirm if it's still valid today. The API did, for a brief moment, allow you to change their size without modifying the JSON but then they quickly converted it to read only. So that forced modifying the file to create the events that could then be triggered later.
bump
how... TF do you use LootTable/LootPool/LootEntry/LootTableManager... i am trying to make a clone trial vault and want to use the loot tables instead of having to write my own "determine the loot to dispense" code.
will unused function affect TPS?
yes but it's unrelated to scripts, better go #1067869318383157430 or #1067869022273667152
oh okay ty
if they're not declared/defined in the loop, then no
nice
does anyone know why PlayerSelector part of custom commands requires you to be opped to use it? otherwise it says <insufficient permissions for selector expansion>?
To Do (Open)
Unresolved
i can do 300 entities with 19 tps
but when i drop its just a software issue because its a super cheap server
just a wild guess:
entity selectors used to be abused to locate/find certain players, w/o having op perms. then devs decided to disable em for some time... until further improvements...
i just made a better one, the only delay it has is from the game cannot load 200 zombies targeting a villager without impacting the TPS,
the new one adds the zombie into a Set(), then inside a runInterval, i made it that it runs per 8 entities, lets say the array has 100 zombies, 8 of them will take damage while the 92 rest will wait for another tick to another 8 zombies receive a damage
now i am applying the effects to 100 entities without causing any TPS, 200 entities by themselves will cause lower TPS bec of the entities path finding. so even if there was 200 entities, the system should not cause that much TPS lag
Hi hi who knows how to
When a player join a function
/function assign tag
Will be randomly assign from 1 of the 10 tag
And after getting assign to that tag you will get a [you are (tag)] message
And after getting that specific tag you will get a specific effect that corresponding the that specific tag
Let's say
I got a tag name runner
It give me speed infinite 1
And weakness infinite 1
And if you die the effect will come back
Yeah thats very weird
"direction" is basically "cardinal_direction" but in another format
then the direction permutation shouldnt be there then
need to manually format my code to fit this in in my setblocks
like is it possible to move the specific entity using gametest? or just running a /tp command there or what?
you can tell it to path find to specific place
for me, ill try making the skeletons moves more unpredictability, so i have to use applyImpulse every like 3 ticks
i see, so like when my skeleton targets the player, i can make it moves around using gametest while targeting the player?
for general use i would recommand looking into A* algo, or look into nox7 scripting resorce
eh, not sure
probably not
ill stick with applyImpulse ig, it wont be that bad, right?
welp, depend on your code
since all im trying to do is enhancing their ai/movements using scripts while they have a target
what are different ways to detect running?
Anyone got any info on this..? Sorry.
The most direct way is to create loot tables (the JSON files), then use the LootTableManager instance on world to get that loot table, then use that same manager to generate loot from it. With the given array of ItemStack, you can spawn them with a Dimension instance
If you want to do that procedurally, I suppose it might be possible to create loot tables at runtime? I have never really tried.
I don't see a constructor defined on those classes.
If you need to do runtime, it's better to create your own loot table manager.
All loot table manager does is return a ItemStack[]
If I had this loot table defined here:
BP/loot_tables/trials/default.json
{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:stone"
}
]
}
]
}
And the following script compiled, then invoking main would get the table, generate an ItemStack of 1 Stone, then drop it in the world.
function spawnLoot(
table: string,
dimension: Dimension,
location: Vector3
): void {
const manager = world.getLootTableManager();
const table = manager.getLootTable(table);
const loot = manager.generateLootFromTable(table);
for (const item of loot) {
dimension.spawnItem(item, location);
}
}
function main() {
const player = world.getAllPlayers()[0];
// Just going to assume they exist for now
spawnLoot(
"trials/default",
player.dimension,
player.location
);
}
Awesome. Thank you.
im not seeing getLootTable or generateLootFromTable in the api docs. are those valid methods?
https://stirante.com/script/server/2.4.0/classes/LootTableManager.html#getloottable
I see them perfectly.
Documentation for @minecraft/server
hey guys! I need some help understanding whats happening with an unwanted script+loot_table result. The idea i had was that short grass (or tall grass) would have a chance of dropping the short grass item when broken with a held flint. Idk if match_tool condition literally only works with tools or you can assign it any item, but i would appreciate some clarification on this topic!!!
heres the script:
const dropChanceGrasses = 0.09;
world.beforeEvents.playerBreakBlock.subscribe(event => {
const { block, player } = event;
const blockPosition = block.location;
if (block.typeId === 'minecraft:tall_grass' || block.typeId === 'minecraft:short_grass') {
if (Math.random() < dropChanceGrasses) {
const { x, y, z } = blockPosition;
player.runCommandAsync(`loot spawn ${x} ${y} ${z} loot "grass_dropshit"`);
}
}
});```
and the loot_table:
```{
"pools": [
{
"rolls": 1,
"entries": [
{
"type": "item",
"name": "minecraft:short_grass",
"weight": 1,
"conditions": [
{
"condition": "match_tool",
"item": "minecraft:flint"
}
]
}
]
}
]
}```
You didnt pass in any tool.
so it only works with tools?
No, I meant you didn't pass any tool into the command.
It's going to try to spawn the loot with no additional context.
hm
thanks smokey
do you happen to know a way to add a condition in the script that first detects if there is a item in the player's hand and, if it is a flint, proceeds with the item drop chance?
I dont understand why youre even using a loot table when youre doing scripting in the first place.
intuition, i am no scripting master here sir
can you create 'valut' like behavior with just a block.json..?
I feel like scripts would be better suited for whatever you're saying
Whatever it is you can do a tick.json spam adding effects to people with a tag and do scoreboard players random for your tag randomization
Kind of simple
Kind of simple
whot?
How do you like put armor to a zombie using script-api?
Similar to replaceitem entity
equippable BUT it doesn't work with non-player entities since it's broken, you need to keep using replaceitem
Ah okayy, I'm only using it for debugging anyways, thank you!
Is itโฆ bad.. to do runTimeouts that are 1-2 hours long..?
I think not, but it will stop if you leave the world early
The better way is either use Date.now() comparison or ingame scoreboard counter
Just my suggestion
the best thing you can do is save them in a local storage like in a map
detect when they spawn and despawn to remove or add
same for players
that should be faster
but of course its better if you use filters
then you have to add a new "if"
if(itemStack.typeId=="minecraft:flint")
anyway you can't use runCommandAsync if you use script V2, it should be runCommand
i just made a system that get entities without using any getEntities or getEntity(id)
saving the entities in a Map() or a Set() (i did that using effectAdd, so i can control which entity should be functioning) and u can just call them in ur interval in an order, calling 8 entities every tick instead of every single one every tick
no getEntity() is used, no loops is used to extract the entity, just one simple loop that makes the system works on 8 entities at the time.
Can we add/remove entity components ?
I have a few addon ideas that would depend on this being possible
with entity.json events that add/remove em, afaik
there's no script-api method ive seen, or mybe im blind atm ;-;

Community needs to make some noise for this to be a feature
like smh
As far as I know you can only add or remove components if they exist in the entity JSON file. Then create an event that can be called to toggle the components for adding and removing. The script API can call and trigger that event as needed. As far as adding a component through the script API without touching the JSON file, I don't believe that is currently possible.
yeah, its not
overlap on world.beforeEvents.itemUse while usingworld.beforeEvents.playerInteractWithEntity
how to fix?
you mean itemUse activates
yes mb
yeah figured
how to fix
check if there's no entity in the player's view direction
Documentation for @minecraft/server
wouldnt it affect performance if it needs to do entity check
everytime the item is interacted tho
everything effects performance, i dont think this would be that bad
there's also another method you could use, but im not sure if it'll work, it depends on the entity interact event triggers after the item use event triggers. If you give the player a property in the entity interact event and check if its true in the item use event, you can cancel the item use event from triggering. (remove the property in system.runTimeout after)
and by property, I dont mean a dynamic property, thats not needed you can just do this, which will also be removed after reloading the scripting environment (/reload or closing the world)
player.myProperty = true
yeah I assume it could work but I dont want to mess with player.json files so that it can support other addons
btw
I have another question @thorn flicker
i didnt say to use json properties.
oh
OH
hold on
so your saying I can set properties without predefining them in the entity.json file
via setProperty?
no.
oh what property are you referring to?
you can create a temporary property on the player instance in the scripting environment with the way I just showed you
this has nothing to do with entity json properties you define in their file
player is an object. In that object consists of other properties and methods. By you doing the following:
player.myProperty = true
You are creating and defining a new property for the player object. The catch to this is that it's only kept in memory so it won't persist if you need it to. Not without intervention.
a temp property would be better.
no need to use tags, dynamic properties, scores...
yo, this is fire. I forgot about that!
I might need to refactor my whole shit bro ๐ญ
im not sure if I should be happy or not
โ ๏ธ
thanks guys
wait isnt entity a class?
yes
with the way you just showed
what
Property 'job' does not exist on type 'Player'
and how are you getting this property
via the player instance?
import { world } from "@minecraft/server";
const player = world.getPlayers()[0];
// job does not exist so we must predefine it
player.job = false
if (player.job === false) {
player.job = true;
}
you are not using getProperty are you
ts will require you to define it.
yeah, so can I assign new properties with a type tho
Need to create an interface in your ts script so ts knows how to handle the non existing property. The interface is only needed for TS. It won't be there when you compile it to js. It just gives instructions to ts on what to do.
mmm
I found a workaround that would support ts
using an object inside the class
this.storage = {}
then I do instance.storage.newDih = true
yo this is peak
thanks guys
lol I guess that works
not what again

using prototypes
ah.
I thought its a class
No, it is a class
It is, doing that just creates it in the runtime memory. So it's only temporary.
Should be player.prototype.myProperty
Nope, only if you want it to persist which isn't what we were discussing.
any use case of prototypes in mc? like where it is explicitely implemented?
Alright
extend something, you can create custom methods or properties
if you want persistency this is not he solution
wouldnt using object.newProperty would suffice?
Depends on your use.
any tips how to refactor my whole code now learning this new information๐ญ
are there instances where I would need to use protoype compared to the .newProperty
There are instances where you would use a variety of different ways to write your code but which one you pick is truly dependent on your logic.
It really depends, there are pros and cons in using prototype or direct assignment
object.newProperty adds properties to that specific object only, while Prototype.newProperty adds properties to all objects of that type. Use instance properties for data unique to each object, and prototype properties for shared behavior/methods.
That pretty much sums it up
OHHHHH
okay
that is so cool
Prototype isn't explicit to TS.
so basically, one use case I would say is applying global data to all players if Im going to use Prototype.newProperty
BRUH
ts is so peak
With ts you just declare the module with an interface that explains what that property or method is. This way TS understands what it is and how it's used in your code.
yo why did I not learn this when I was two months old
you've been learning js straight out of the womb?
not knowing how to code before even going to the egg cell is already a mistake
rookie mistakes
never again gng
DIRECT ASSIGNMENT
const car1 = {
brand: 'Toyota',
model: 'Camry'
};
car1.color = 'red'; // direct assignment
console.log(car1.color); // 'red'
console.log(car1.brand); // 'toyota'
const car2 = {
brand: 'Honda',
model: 'Civic'
};
console.log(car2.color); // undefined```
PROTOTYPE
```js
function Dog(name) { this.name = name; }
Dog.prototype.species = 'Canine'; // shared
Dog.prototype.bark = function() { return 'Woof!'; };
const dog1 = new Dog('Max');
const dog2 = new Dog('Bella');
console.log(dog1.species); // 'canine'
console.log(dog2.species);
console.log(dog1.bark()); // 'woof!'
console.log(dog2.bark());
console.log(dog1.hasOwnProperty('species')); // fals
console.log(dog1.hasOwnProperty('bark')); // falss```
I hate typing on the phone while my fingers are wet
I learned thinking in bytes does that count?
are you in the rain or some shit
lmao
I just washed my hands lol
then put some alcohol
I won't even be able to type at all since my screen is broken lol
then how did you
Gemini is standing by lol
"Hey Google"
it's just small water unlike rain...
rain is small water too
Is water wet?
|| Quietly exits ||
I disabled any help from that, I'm scared that it might happen to me...
yes
nah, it's dry as hell...
much dryer than her replies to me
is fire on fire?
well, define wet.
Covered or saturated with a liquid. ๐
yo
the only concern here now is type safety
๐๐๐
is there really no way to combat ts
I'm artistic autistic
cool
man idk
Learn about type safety. It's better that it catches it now while writing the code then you testing it in a world only to ask yourself, why?
I meant in assigning properties
I know how to use type safety
ask TS on a hand-to-hand combat
if you win then maybe there's a chance
When you assign a property that doesn't exist in a object you need to create an interface that defines it.
yes, start fist fighting your computer
Otherwise TS won't know what it is or how it's used.
-# wrong emoji lol
-# my dyslexic ahh read it as "fisting"
how tho?
I meant
doesn't that include
been watching some weird shit lately huh
predefining it in the object itself
like lets say I want to add a player.newProperty = referenceInAnotherObject
I dont think I can use .newProperty: newType ๐ญ
yes, I watch a lot of history on YouTube and I am too lazy to teach it tomorrow
you would need to extend player right
with the interface
man im learning still
Nah, it's pretty simple. I'll type an example soon. I'm rushing to get out the door for an appointment lol.
yeah, no rush
I think like this
constructor() {
}
}
const player = new Player()
interface Player {
newHair: "blue"
}
Player.prototype.newHair = "blue"
it is now type safe
uh
oops replied the wrong thing
Quick example. In rushing out the door. Got to go lol.
// Define an interface for our extended player
interface PlayerWithJob {
job: boolean;
}
// Import Minecraft world
import { world } from "@minecraft/server";
// Get the first player
const player = world.getPlayers()[0] as PlayerWithJob;
// Predefine the job property if it doesn't exist
if (player.job === undefined) {
player.job = false;
}
// Example logic
if (player.job === false) {
player.job = true;
}
console.log(`Player job status: ${player.job}`);
hm
extending wouldnt do the same thing?
Extending by means of a prototype?
because ive looked up stuff and you can extend a type with an interface
Yes, that's the best way because it directly connects to the class in question. Otherwise it's global. Which in most cases global is fine since it's typically isolated to the script. But the other way is useful if creating your own d.ts file.
so like this?
interface Whatever extends Player {
myProperty: boolean
}
class Player {
constructor() {
}
}
class PlayerWithJob extends Player {
}
const player = new Player()
interface Player {
job: boolean
}
interface PlayerWithJob{
newHair: "blue"
}
PlayerWithJob.prototype.newHair = "blue"
const newPlayer = new PlayerWithJob()
newPlayer.job = false```
ye
uhh
yeah im just gonna wait for visual no offense
lol
yea, I was just sending it to ask visual for his feedback XD
no worries mate
while ensuring me that im right without knowing if I am?
oh I wasnt replying to your message sorry
loll
import { world, Player } from "@minecraft/server";
// Extend Player to include a job property
interface PlayerWithJob extends Player {
job: boolean;
}
// Get the first player
const player = world.getPlayers()[0] as PlayerWithJob;
// Initialize the job property if it doesn't exist
if (player.job === undefined) {
player.job = false;
}
// Example logic
if (player.job === false) {
player.job = true;
}
console.log(`Player job status: ${player.job}`);
That's the best way honestly.
It tells typescript to include everything the Player class contains plus what you are adding.
hmm...
๐คค
why are you drooling
nah, them lips are just wet
๐ถโโก๏ธ ๐ช
Can we not delete dynamic properties, without deleting ALL of them on that entity??
Set that specific dynamic property as undefined.
Does having 8000+ โundefinedโ dynamic properties affect performance?
(Not a specific number, just meant to be big)
Setting it to undefined removes it
Are you trying to delete 8000+?
Undone or undefined?
No, I just donโt want them to stack up.
Wait, undefined or null?
import { world } from "@minecraft/server";
// Set
world.setDynamicProperty("eventTimer", 1200);
// Get
const timer = world.getDynamicProperty("eventTimer");
world.sendMessage(`World event timer: ${timer}`);
// Delete
world.setDynamicProperty("eventTimer", undefined);
world.sendMessage("World eventTimer deleted!");
In js undefined is generally used for things that dont exist (setting a property to undefined stops it from existing) whereas null is used for something that exists but explicitly has no value
Ok, I just realized in the docs it says to use null so I thought Iโd ask, thanks yall.
You too, Ty.
Null isn't a valid value according to the type declarations so the docs are wrong
Yea, I don't know when the doc was updated and changed from undefined to null but null would be the inappropriate way of deleting it.
By reason, sound, and logic.
Is there a way to execute code in the โonTickโ of vanilla blocks (like water)?
No. You cannot hook that up to a vanilla block.
Ughhhhh, ok.. thank you. Iโm trying to attach a dynamic property to the player that placed the water with the block.typeid and coordinates as a identifier, and a number in ticks as a countdown, and modify it each tick to simulate ageing similar to vanilla where if itโs unloaded it doesnโt count down. Any advice..?
I would probably tie the coordinate to a dynamic property and have a System where every X tick or what not, check if the chunk is loaded then countdown.
How does one setItem undefined in a custom storage_item item? I'm getting ContainerRules violation.
What hook would you use..? (SorryX))
playerInteractWithBlock
i have an issue
when i shoot a projectile in script api and set the ownere of it as a player
when im trying to see who the owner is it doesnt let me?
are you using projectileHit event listener or something?
i cant set my projectile rotation can i just use script api using .setRotation method.
this is what i do
I am not sure, but these classes are marked with a private/protected constructors
You have to use interfaces rather than classes in this case
the player class was just for demonstration
I already implemented this and it works
why would you modify the prototype?
why not
why not make a function for it instead?
proto look more pretty ๐ฃ๏ธ๐ฅ
to my knowledge there isn't any real difference between the two other then that prototypes can override existing methods without the need to extend the class
actually I retract that
Prototypes:
- Can override original method signatures
- should be used for super frequent calls
- can give property extensions
Functions: - Cannot override original method signatures
- Have to be imported from file-to-file
- should be used for moderate to less frequent calls
- always have to be invoked via
()
Not simping but she's more prettier
Prototypes for me are just appended methods that use the class's "this" context, which is more efficient
For example:
String.prototype.toName = function(){
return this.replace("minecraft:","").split("_").map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(" ")
}
const id = "minecraft:oak_log"
const name = id.toName()
console.log(name) //returns "Oak Log"
.
But function can be a shortcut like:
const toName = (str)=> str.replace("minecraft:","").split("_").map(w => w.charAt(0).toUpperCase() + w.slice(1)).join(" ")
const id = "minecraft:oak_log"
console.log(toName(id)) //returns "Oak Log"
what would that mean?
Axis-Aligned Bounding Box Collision Controller
tf is this
too complex name
I havenโt tested this directly, but itโs something Iโve been thinking about. I'm pretty confident my thoughts are correct on this.
Because all behavior packs share the same JavaScript engine at runtime, modifying something like String.prototype would affect every pack loaded in that world at that moment. That means if multiple packs are enabled, each with their own purpose, other packs could see and potentially use a method like toName, even though it wasnโt defined by them.
This raises some important concerns. For example, if one pack overrides or modifies an existing method or property, adding custom function logic, getters, or setters, another pack may try to use that same API as it was originally designed and released by Mojang, only to find that it no longer behaves as expected. When this happens, the issue can be very difficult to diagnose, because the breaking change comes from an entirely different behavior pack.
In a community-driven ecosystem where behavior packs are shared and combined, this kind of global side effect can create fragile and unpredictable environments.
Because of this, if you plan to release a behavior pack publicly, I would suggest and recommend it to be best to avoid modifying prototypes and instead rely on explicit utility functions or namespaced helpers. Using prototypes in an isolated, private, environment would clearly be acceptable of course.
Just my two cents I wanted to share.
what's the trick to make players immune to fall damage?
each pack has their own isolated runtime afaik
slow_falling effect for 1 tick to reset the falling height
or the resistance effect before falling
I know for certain stored information, such as dynamic properties, are isolated. I just don't know about the rest because it's something I haven't considered until moments ago.
A quick test could verify it, but I'm away from my computer so it won't be right now.
Is this ai lol
No, this is me sharing my thoughts. Stick around and you'll get use to it talking to me lol.
You're the same as the other user in off topic lol
I believe there are a few others like me. I'm pretty confident we are a rare breed with this current generation and ongoing "trends" if you will lol.
Now you're doing it again lol
If this is the case, we can use this as an efficient method of passing data or even functions between addons
I need to test it
Definitely
well, I don't think it will work..
I'm not 100% positive it will work either. It's very likely the developers have it isolated, or sandbox in its own environment. But without testing to verify it's uncertainty.
doesn't work @remote oyster
Yeah, the best we can do for passing data from one addon to another is script events (or @minecraft/server-net for larger data transfer on BDS).
A global namespace object would be cool though.
yall, is there a better way to make a custom furnace other than using entity chest
unless they managed to add support for create something like supported custon crafting_table, i guess no?
rn only custom crafting_table or custom_stonecutter
Is entityhurt before in beta or preview?
Beta
preview
Lmao
Beta in Preview.
give it some time, it is new
how can ig ive mob armor using the script api?
you have to use commands since they disabled the equippable component on non-player entities
replaceitem?
yes
how?
this is how you'd do a diamond helmet
entity.runCommand("replaceitem entity @s slot.armor.head 0 diamond_helmet");
thank you
Why would they do this
If I am using generateLootFromTable() and the table has enchanted books, they are just coming out as โenchanted booksโ how can I fix this..?
@wary edge ?
I'm pretty sure we don't know
If we did, we'd probably say it at the alongside the fact that it isn't possible
is simpleMobTest the name of this gametest?
Also i'm assuming that in order to change the mobs summoned I have to change the "fox" and "chicken" values in the const things at the top
whats the point of floating text in debug utils if its the same poop performance as regular entity floating text

p
Is it?
yes
its cool that in the preview its client side compatible but whats the point if its just as laggy
No accidental kill @e
i use remove event for killing them ๐
Does anyone know about this?
Nvm.. ima just enchant โem at runtime..
yes but making a claim protection system is hard without it and I dont wanna make a whole scuffed system if its coming out next update TwT
Is system.currentTick acts like world.getAbsoluteTime
The 2 are almost the same with slight differences, getAbsoluteTime can be altered by general in-game time related mechanics such as the time commands, setAbsoluteTime, and (I think) won't be changed if the gamerule for always day is true, but I haven't checked there
Whereas, currentTick just gives you the indefinite number of ticks passed since that world started
shared runtimes wouldn't be that great imo, the issues you'd run into would greatly outweigh any kind of benefit
Understandable thank you, like the absolute time is based on world time, while currentTick is based on the script environment maybe
I'm kinda confused by the blockFace, how do I get the block where the item is used on, the syntax were string but it also says it returns Block
If you want to get the block that was used on, get the block property instead of blockFace
Block face returns a direction
Like for example I clicked the block on the side, it gets the block on that position
Ohh
In front of where you clicked?
You'd have to make your own by checking the block face and use the block direction methods like this
let block;
if (blockFace === Direction.Down) block = e.block.below();
Oh alright, that's manual now
Thankyou
What about like this:
const formatBlockFace = blockFace === "Up" ? "above" : blockFace === "Down" ? "below" : blockFace
const targetBlock = block[formatBlockFace]()
What you think
Oh wrong string
You'll have to use toLowerCase for the others
And i'd say its bad practice to rely on the values of an enem but it'll be fine with how minecraft versions things
Is the Direction imported from world
From @minecraft/server
Thanks
it does still use crafting_table ui, but the difference is it use tags for the block
that's why sometimes you'll see some addon has custom crafting_table with their custom tag
in my understandment, it's usually purposed to make some recipe only available on the required recipe tag
I guess it's not?
Is it normal that the new Date() in Minecraft doesn't match with ur device's time?
In mobile it matches perfectly but in my desktop it shows different lol
it's not a script problem since it works fine in mobile...
Are you a host of this world?
It's a single player, so yes...
Do you have to use time based on user's device? Prefer to use UTC timestamps
how to view dynamic properties nbt
They're bit more secure and a player cannot just jump by modyfing his time in his device
Yes2
In a NBT file?
kk, might try later
Is it more like a display thing or to store in a database?
just store
Use UTC timestamps then, they're bit better in this case
i cant see them in universal minecraft editor
is there any other software to view dps
NBT Editor does not clean it up?
100000
Yesnt
yes
Can we use the enchant with levels function for items gotten with the loot table manager?
Also, how do we even use that function?
You need to transpile it into js.
A message like this shows up every week on this channel ๐
100000th "100000th message"
When will entityHurt beforeEvent be released?
We don't know
next stable probably
I doubt it
It's beta in preview, not even stable in preview yet
I'd definitely give it more time
I am the storm that is approaching
Not stable script, STABLE Minecraft but BETA script version
But the question was when will it be released
I assume that "released" refers to when will it come to stable in both script version and minecraft version
I'm talking about the response of Curly... they probably meant stable Minecraft version not stable script version
That makes more sense
I still think it will take longer
Someone give me an idea of something cool, but not hard, to do pls
Jenny Addon
how tf do you use the LootItem function??
Someone else is doing that here ๐ญ
Yeah lol
ok, at least how can i modify an itemstack to add a data value to it (ominous bottle to ominous bottle level 4 for example?)
Documentation for @minecraft/server