#Script API General

1 messages ยท Page 125 of 1

distant tulip
#

maybe make it an option tho

jolly citrus
#

if they know that they can get themselves easier matches by spoofing it then i feel it's more likely anyone would even try

distant tulip
#

you are saying that in public chat

jolly citrus
#

i know

#

people can dig this information up or not , they will know if ive implemented it or not eventually anyway xd

distant tulip
#

yeah, it is not hard to know if the server have that or not

last latch
#

nametags are also usable with msa-gamertags-only=true

honest spear
#

you player names? BC nameTags are related to entities and could ba change anytime

last latch
#

gamertags as in the xbox names

#

with the server property, Player.name will output the xbox name. zelisce in my case.

honest spear
last latch
#

Oh.

honest spear
#

all good, we mean the same thing

last latch
#

I thought I said gamertags, cuz of the property xD

#

mb sorry

honest spear
#

the funniest BDS property is isHardcore

round bone
honest spear
#

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

round bone
last latch
honest spear
#

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

honest spear
round bone
#

Con is pretty good among scripters tbh

honest spear
#

I used to script addons a lot back then, but i don't have as much time anymore

last latch
round bone
#

๐Ÿ˜‚

last latch
#

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

round bone
last latch
#

For some freaking reason the app is gone

#

that was my initial step ๐Ÿ˜ข

honest spear
#

you are not able to login on browser?

last latch
#

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

round bone
#

We can share my account

last latch
distant tulip
whole pulsar
#

has any of you made a backpack addon?

last latch
jolly citrus
#

is it possible to add components to items through scripts

distant tulip
#

no

jolly citrus
last latch
distant tulip
#

lock the item

last latch
#

To inventory

jolly citrus
#

i thought that's what adding component means LMAO

#

is lock_in_slot not an item component

open urchin
#

Those things are weird

last latch
#

Tbh I have never ever touched componenents in my entire career

distant tulip
open urchin
#

I'm just referring to terminology and calling them components

distant tulip
#

ah, yeah ig

#

man, if only they work on all containers

broken pawn
#

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...

remote oyster
broken pawn
#

yes but uppercase

#

W.afterEvents;

#

i just want an answer since i have problem to non-uppercase somehow

night acorn
#

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.

night acorn
#

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

subtle cove
#

I use laptop with touch and it changes accordingly
so u need to check it everytime

sinful portal
#

why does index.d.ts does not include in the debugBox? I tried installing it via npm

wary edge
#

If you install it with server it does not due to dependencies issue.

sinful portal
#

yeah sorry mate, I installed via npm i .../debug-utilities, it was outdated but I forgot about adding what release version it is

#

thanks

gaunt salmonBOT
fickle dagger
#

is there a way to take all formvalues from a modalformdata? I'm using a foreach loop for toggles and such

tepid kindle
#

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]
sinful portal
#

are there any workarounds?

#

my loops are very expensive

#

yo this is peak

fickle dagger
prisma shard
#

u do that in functions

sinful portal
#

I found a solution

sinful portal
#

so expensive that it crashes or lags the game

#

uses A* pathfind algo in xyz directions

prisma shard
#

do u mean to do smth after a runJob finishes

#

@sinful portal

prisma shard
#

what does it relate with return

sinful portal
prisma shard
#

do in function?

sinful portal
#

until I find the end node

sinful portal
#

the problem here is that

prisma shard
#

yes?

#

oh

sinful portal
#

a loop runs multiple times in a tick

prisma shard
#

ask AI

sinful portal
#

causing a lag spike

prisma shard
#

Put outside the loop

sinful portal
#

there is no other way to get a sequence array from a linked list node

#

I found a solution

prisma shard
#

im no specialist in this

prisma shard
sinful portal
#

I found a way to return the value of a job

prisma shard
sinful portal
#
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);
  });
}
prisma shard
fiery solar
sinful portal
#

yeah just wraps around a promise

prisma shard
prisma shard
#

INSIDE that job

#

unless you report the progress outside

tepid kindle
#

Uhh

lethal bramble
tepid kindle
#

Maybe like

jagged gazelle
#

no.

tepid kindle
#

I guess it will not work with game ticks also

sullen grotto
#

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

sullen grotto
mystic harness
#

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)

jagged gazelle
#

speaking of preview

#

I love the drop and pickup event listener...

mystic harness
#

ah okay ty

last latch
#

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

dusky flicker
#

i thought they made addons more optimized. I got inactive for a while

last latch
#

BDS on the other hand is a different story lmao

round bone
#

But they're not that slow tbh, it depends

tepid kindle
#

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-.---"

jagged gazelle
#

"dangerous" is wayy too OA ngl...

tepid kindle
#

Why

tepid kindle
#

It was still in pre-release so I think it might bug somehow

jagged gazelle
#

but saying dangerous is a huge stretch...

tepid kindle
#

Oh alright

jagged gazelle
#

It's not gonna make it device go kaboom or something

tepid kindle
#

Do you think there's alternative for canceling damage tho in stable

jagged gazelle
#

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

jagged gazelle
#

and it's hardcoded tags, name, etc.

tepid kindle
#

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

jagged gazelle
tepid kindle
#

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

jagged gazelle
weary umbra
#

how do I get the structure in a world with script api?

distant tulip
#

structureManager class if that what are you reffreing to

weary umbra
distant tulip
#

getGeneratedStructures?

weary umbra
#

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?

wary edge
#

No.

weary umbra
#

they need to add that to the /place command bc there is only the trail structures

tepid kindle
devout sandal
#

yoooo, how can i 'activate' a block perm based on player distance from it? (like the vanilla vaults)

#

nvm. on tick..

wise lichen
#

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.

jagged gazelle
#

that's a JSON UI problem

tepid kindle
wise lichen
untold magnet
#

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])

warm mason
#

If your TPS is so low, it's not because of getEntities

untold magnet
warm mason
untold magnet
#

mhm

untold magnet
#

i think using length or something

untold magnet
# warm mason 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

warm mason
untold magnet
untold magnet
untold magnet
#

one last thing ig

#

now lemme see the TPS and how much miners are working

stray spoke
#

Is there a shortcut function to detect if the container is full

round bone
untold magnet
untold magnet
#

only 11 are functioning, the rest isnt

stray spoke
round bone
stray spoke
#

Yeah I am currently using that

#

Just wanna know if there's a shortcut

#

Thanks

round bone
#

Optionally - you can add a single item and check if it returns an ItemStack or undefined

stray spoke
#

Yeah I've tried that too, but no worries I'll be using a loop instead, thanks again

dusky flicker
round bone
dusky flicker
#

generally i dont make addons with that much of entities

#

so i might be safe

last latch
warm mason
warm mason
round bone
last latch
round bone
#

And their state while benchmarking

warm mason
last latch
#

i wonder if making your own path finding algorythm would be better than BDS's one

dusky flicker
#

but it would be interesting

last latch
#

there is only one way to find out ๐Ÿ˜ˆ

round bone
last latch
#

were in script api general

round bone
#

And?

last latch
#

script api does not support rust right?

#

or no

#

or make script sdk for rust?

round bone
#

It's just a joke about rewriting everything into Rust, why would you even complain about it?

untold magnet
round bone
#
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
  }
}
untold magnet
round bone
#

Also in context of arrays/sets - in case of usage with for loops, they behave the same

untold magnet
round bone
#

I use providers very similar to my code snippet for dimensions also

untold magnet
round bone
untold magnet
#

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

untold magnet
#

like damage_over_time but nah, that will be bad for the actual entity

untold magnet
#

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

dusky flicker
#

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

round bone
round bone
dusky flicker
#

the only problem its cause idk if it would cause much effect since we are talking about js

round bone
dusky flicker
#

and we cannot control the memory layout of things

dusky flicker
#

in general making things focusing on using the cpu cache instead of ram makes code faster

round bone
#

Doesn't Minecraft just put anything related to scripts directly in RAM instead CPU?

dusky flicker
#

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

round bone
round bone
#

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

round bone
dusky flicker
#

minecraft is a whole new thing related to programming, and im thinking on using it to test some benchmarks of data structures

round bone
#

But I was simply putting Entity objects to an array

round bone
#

I haven't really worked much around add-ons since I've got a MacBook lol

#

I need to get into add-ons back

dusky flicker
#

what have you done after you got it?

broken pawn
dusky flicker
#

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

round bone
#

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

round bone
#

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)

dusky flicker
#

im having to write elixir code thede days

#

phoenix more specifically

round bone
#

I write my backend code using Elysia + Bun

dusky flicker
broken pawn
dusky flicker
#

i mean, i found elysia about 1 year and 6 months ago

round bone
#

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

dusky flicker
#

i got amazed with how simple things were

#

if compared to nest js(ew)

round bone
#

Elysia can be compared to Fastify, but better

dusky flicker
round bone
#

Since which version?

dusky flicker
#

idk as well, i forgot the one i met it for the first time

round bone
#

Mostly performance & documentation things

dusky flicker
#

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

round bone
#

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

dusky flicker
#

and i need to find opinions of people that aint from my country

round bone
#

Where are you from?

dusky flicker
#

im brazilian so having someone from another country only to find some misspelling

dusky flicker
# round bone Where are you from?

brazil ๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡ง๐Ÿ‡ท๐Ÿ‡ง๐Ÿ‡ท(it sucks living here)

dusky flicker
#

the lang

#

it still hasn't much thingsi

round bone
#

I don't really know Rust

#

๐Ÿ˜ญ

#

But I like the syntax of your language, it gives me vibes of Swift

dusky flicker
#

and you can understand by the docs

#

would be good enough

#

i want documenting it to make it easy to people contribute

last latch
round bone
#

I started using Cursor and I document most of things using it's AI, I really recommend it

dusky flicker
round bone
#

If 20$/month for better DX experience is not much for you, you'll be grateful while documenting by simply clicking tab

dusky flicker
dusky flicker
dusky flicker
#

the frontend is the handling of the text, ast, type checking, monomorphization

last latch
jagged gazelle
#

I don't think he's asking what's backend... they're not stupid

dusky flicker
#

the backend transforms the resolved tree into something that might run

jade grail
#

HOLY when did they add before hurt?

last latch
round bone
jade grail
#

is it in latest update?

last latch
dusky flicker
jade grail
#

but i cant wait to use it gonna make teams systems much more easier

jagged gazelle
dusky flicker
last latch
#

what would be the use of it

jagged gazelle
dusky flicker
#

i mean translating that code to json ui

jagged gazelle
jade grail
#

mc finally adding good stuff

jagged gazelle
#

just read the change logs lol

round bone
jagged gazelle
#

k?

last latch
#

like @rockwrap for example ๐Ÿฅ€

jade grail
jagged gazelle
#

I made my own before it even existed.

jade grail
#

id prefer a before pickup event

#

but this gonna prob be after

last latch
jagged gazelle
jade grail
#

can u change an item while its on the floor?

last latch
#

i think itemstack component exists

#

so yea

jade grail
#

How do u check if the player double jumps?

round bone
jagged gazelle
last latch
#

alright but you can change the enitity itself

round bone
#

What do you mean by entity itself? Other components/props?

last latch
#

by spawning and removing velocity

round bone
#

Also an option

last latch
round bone
#

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

#

๐Ÿ˜‚

last latch
#

Use Endstone and change the nonexistent entity's NBT API โœ…

untold magnet
#

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

untold magnet
#

nope

#

no getEntities, no array/Set()

untold magnet
broken pawn
#

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?

remote oyster
untold magnet
vivid heart
#

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

dusky flicker
broken pawn
#

afterEvents.effectAdd

#

i understand

broken pawn
#

every function worth 50 lines

untold magnet
# dusky flicker so how did you do it?

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

remote oyster
broken pawn
#

i got it

#

i always use let to short my line and as

#

๐Ÿ—ฃ๏ธ ๐Ÿ”ฅ ๐Ÿ”ฅ ๐Ÿ”ฅ

#

like EntityComponentTypes as ect, EntityEquippableComponent to eec

untold magnet
#

detecting the entity using effectAdd

broken pawn
#

seems like if the entity hasTag

#

but more simple

untold magnet
#

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

broken pawn
#

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

#

๐Ÿ—ฃ๏ธ ๐Ÿ”ฅ ๐Ÿ”ฅ

remote oyster
broken pawn
#

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

remote oyster
# broken pawn yes, that's what i wanted to figure out

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.

broken pawn
#

noted

#

it's my 1 year experience learning bedrock scripting + javascript from scratch

remote oyster
# broken pawn noted

Be open-minded to feedback by others, but also remember you won't be able to please everyone. So pick your battle's wisely.

broken pawn
#

๐Ÿ—ฃ๏ธ ๐Ÿ”ฅ

celest relic
#

Does anyone know what exactly the custom component array and depth limit is and if there's a way to bypass it?

empty yoke
#

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?

celest relic
wary edge
#

Perfromance reasons.

stray spoke
#

How many years have you been working Smokey

empty yoke
# wary edge Chunks aren't being loaded?

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?

empty yoke
empty yoke
# wary edge 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.

wary edge
empty yoke
#

but why doesn't this problem happen in single-player?

wary edge
empty yoke
#

so the solution would be to use a tickingarea when creating the cube, or avoid specatore mode?

wary edge
#

Does delaying the retrieval work?

empty yoke
wary edge
#

Correct, maybe even 5-10 secs.

#

If that works it shows the chunks are momentarily unloaded.

empty yoke
wary edge
dapper copper
dense coral
#

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

dense coral
#

like not even a true or false?

wary edge
#

Is there any reason for this example you chose you're choosing runCommand over native methods.

dense coral
#

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.

dense coral
wary edge
#

So, it should return the count, but for any other command, you won't get the context.

vivid heart
#

@wary edge how would i write a script basically rotating a entity depending on what state the block its on top of is in?

wary edge
vivid heart
dense coral
wary edge
#

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)

jolly citrus
#

does TextEncoder work in scripts

wary edge
dense coral
wary edge
#

Yes, you'll get the success count.

dense coral
#

I'll try it when I get back to my desk

jolly citrus
stray spoke
#

In old/legacy api it doesn't

vivid heart
wary edge
mystic harness
#

can i make myself invisible to others but visible to myself? like the hive spec mode

dense coral
snow knoll
mystic harness
#

ah okay thank you

#

can u give me a sample by chance

snow knoll
#

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

jolly citrus
snow knoll
#

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

jolly citrus
#

if thatโ€™s possible to do then thatโ€™s very cool

snow knoll
#

Assuming that when that is set to true or false it still makes the nametag dissappear

snow knoll
jolly citrus
#

no idea how one would go about hiding the nametag though

snow knoll
#

The method normally works for other mobs since they are normally nametag-less

jolly citrus
#

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

snow knoll
#

Which is just great

remote oyster
#

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.

devout sandal
#

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.

broken pawn
#

will unused function affect TPS?

earnest meadow
mystic harness
#

oh okay ty

subtle cove
broken pawn
#

nice

turbid delta
#

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>?

fallow minnow
#

but when i drop its just a software issue because its a super cheap server

subtle cove
untold magnet
# fallow minnow i can do 300 entities with 19 tps

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

undone sentinel
#

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

sinful portal
#

via getAllStates()

#

????

#

bugrock

weary umbra
warm mason
sinful portal
#

then the direction permutation shouldnt be there then

#

need to manually format my code to fit this in in my setblocks

untold magnet
#

like is it possible to move the specific entity using gametest? or just running a /tp command there or what?

distant tulip
#

you can tell it to path find to specific place

untold magnet
#

for me, ill try making the skeletons moves more unpredictability, so i have to use applyImpulse every like 3 ticks

untold magnet
distant tulip
#

for general use i would recommand looking into A* algo, or look into nox7 scripting resorce

untold magnet
#

ill stick with applyImpulse ig, it wont be that bad, right?

distant tulip
#

welp, depend on your code

untold magnet
#

since all im trying to do is enhancing their ai/movements using scripts while they have a target

halcyon phoenix
#

what are different ways to detect running?

devout sandal
sharp elbow
#

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.

wary edge
#

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[]

sharp elbow
#

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
  );
}
devout sandal
queen hamlet
#

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"
            }
          ]
        }
      ]
    }
  ]
}```
queen hamlet
#

so it only works with tools?

wary edge
#

It's going to try to spawn the loot with no additional context.

queen hamlet
#

hm

queen hamlet
wary edge
queen hamlet
devout sandal
wary edge
#

No.

#

You would need scripting logic.

turbid delta
#

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

halcyon phoenix
sudden nest
#

How do you like put armor to a zombie using script-api?

#

Similar to replaceitem entity

jagged gazelle
sudden nest
devout sandal
#

Is itโ€ฆ bad.. to do runTimeouts that are 1-2 hours long..?

stray spoke
#

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

small depot
#

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

broken pawn
#

if(itemStack.typeId=="minecraft:flint")

broken pawn
untold magnet
#

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.

oblique heath
#

Can we add/remove entity components ?

#

I have a few addon ideas that would depend on this being possible

subtle cove
#

there's no script-api method ive seen, or mybe im blind atm ;-;

oblique heath
#

Community needs to make some noise for this to be a feature

#

like smh

remote oyster
#

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.

sinful portal
#

overlap on world.beforeEvents.itemUse while usingworld.beforeEvents.playerInteractWithEntity

#

how to fix?

thorn flicker
#

you mean itemUse activates

sinful portal
thorn flicker
#

yeah figured

sinful portal
#

how to fix

thorn flicker
#

check if there's no entity in the player's view direction

sinful portal
#

wouldnt it affect performance if it needs to do entity check

#

everytime the item is interacted tho

thorn flicker
sinful portal
#

fine

#

thanks man

thorn flicker
#

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
sinful portal
#

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

thorn flicker
sinful portal
#

OH

#

hold on

#

so your saying I can set properties without predefining them in the entity.json file

#

via setProperty?

thorn flicker
#

no.

sinful portal
#

oh what property are you referring to?

thorn flicker
#

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

sinful portal
#

okay

#

yeah I think I get what you mean now

#

it could alternatively use a tag

remote oyster
thorn flicker
#

a temp property would be better.

#

no need to use tags, dynamic properties, scores...

sinful portal
#

I might need to refactor my whole shit bro ๐Ÿ˜ญ

#

im not sure if I should be happy or not

#

โ˜ ๏ธ

#

thanks guys

thorn flicker
sinful portal
#

how can you set an entity with a property, for instance player.job = true

#

?

thorn flicker
#

with the way you just showed

last latch
#

oh no

#

not again ๐Ÿ˜ญ

thorn flicker
sinful portal
#

Property 'job' does not exist on type 'Player'

thorn flicker
sinful portal
#

via the player instance?

remote oyster
thorn flicker
sinful portal
#

no

#

the error stems from type safety I assume

#

since I use td

#

ts

remote oyster
#

ts will require you to define it.

sinful portal
#

yeah, so can I assign new properties with a type tho

remote oyster
#

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.

sinful portal
#

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

thorn flicker
remote oyster
#

Wait until you learn about Prototypes ๐Ÿคฃ

#

Bro is gonna freak out lol

thorn flicker
last latch
jagged gazelle
#

I love prototypes

#

prototypes makes me feel alive

thorn flicker
stray spoke
#

No, it is a class

remote oyster
stray spoke
#

Should be player.prototype.myProperty

remote oyster
#

Nope, only if you want it to persist which isn't what we were discussing.

sinful portal
stray spoke
#

Alright

jagged gazelle
#

if you want persistency this is not he solution

sinful portal
#

wouldnt using object.newProperty would suffice?

remote oyster
sinful portal
#

any tips how to refactor my whole code now learning this new information๐Ÿ˜ญ

sinful portal
remote oyster
jagged gazelle
#

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.

remote oyster
#

That pretty much sums it up

thorn flicker
#

would defining it with prototype help in ts?

#

i dont use ts

remote oyster
#

Prototype isn't explicit to TS.

sinful portal
#

BRUH

#

ts is so peak

remote oyster
#

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.

sinful portal
#

yo why did I not learn this when I was two months old

thorn flicker
sinful portal
#

rookie mistakes

#

never again gng

jagged gazelle
# sinful portal so basically, one use case I would say is applying global data to all players if...

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

last latch
thorn flicker
#

lmao

jagged gazelle
#

then put some alcohol

thorn flicker
#

funnier to picture you typing all of this in the rain

#

lol

jagged gazelle
remote oyster
#

"Hey Google"

jagged gazelle
thorn flicker
thorn flicker
#

technically

#

am I wrong

remote oyster
#

Is water wet?

|| Quietly exits ||

jagged gazelle
thorn flicker
jagged gazelle
#

much dryer than her replies to me

thorn flicker
#

is fire on fire?

remote oyster
#

|| Quietly exits ||

thorn flicker
remote oyster
sinful portal
#

yo

#

the only concern here now is type safety

#

๐Ÿ˜ž๐Ÿ˜ž๐Ÿ˜ž

#

is there really no way to combat ts

jagged gazelle
#

I'm artistic autistic

thorn flicker
thorn flicker
remote oyster
sinful portal
#

I know how to use type safety

jagged gazelle
#

if you win then maybe there's a chance

remote oyster
thorn flicker
#

yes, start fist fighting your computer

remote oyster
#

Otherwise TS won't know what it is or how it's used.

jagged gazelle
#

-# wrong emoji lol

jagged gazelle
sinful portal
#

I meant

#

doesn't that include

thorn flicker
sinful portal
#

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 ๐Ÿ˜ญ

jagged gazelle
thorn flicker
#

with the interface

sinful portal
#

yo

#

I think I get what he means now

thorn flicker
#

man im learning still

remote oyster
sinful portal
#


    constructor() {

    }
}

const player = new Player()

interface Player {
    newHair: "blue"
}

Player.prototype.newHair = "blue"
#

it is now type safe

thorn flicker
#

uh

sinful portal
#

oops replied the wrong thing

remote oyster
# sinful portal I think like this

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}`);
remote oyster
#

That example was poorly done though.

#

Sorry

thorn flicker
#

extending wouldnt do the same thing?

remote oyster
#

Extending by means of a prototype?

thorn flicker
#

because ive looked up stuff and you can extend a type with an interface

remote oyster
#

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.

thorn flicker
#

so like this?

interface Whatever extends Player {
myProperty: boolean
}
sinful portal
#

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```
thorn flicker
#

yeah im just gonna wait for visual no offense

#

lol

sinful portal
#

no worries mate

thorn flicker
sinful portal
thorn flicker
#

loll

remote oyster
# thorn flicker so like this? ```ts interface Whatever extends Player { myProperty: boolean } `...
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.

jagged gazelle
#

๐Ÿคค

thorn flicker
#

why are you drooling

subtle cove
#

nah, them lips are just wet

thorn flicker
#

๐Ÿšถโ€โžก๏ธ ๐Ÿšช

devout sandal
#

Can we not delete dynamic properties, without deleting ALL of them on that entity??

remote oyster
devout sandal
devout sandal
open urchin
#

Setting it to undefined removes it

remote oyster
devout sandal
devout sandal
#

Wait, undefined or null?

remote oyster
# devout sandal 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!");
open urchin
#

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

devout sandal
open urchin
remote oyster
#

By reason, sound, and logic.

devout sandal
#

Is there a way to execute code in the โ€œonTickโ€ of vanilla blocks (like water)?

wary edge
devout sandal
# wary edge 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..?

wary edge
#

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.

wary edge
#

How does one setItem undefined in a custom storage_item item? I'm getting ContainerRules violation.

devout sandal
wary edge
jade grail
#

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?

jagged gazelle
jade grail
#

i cant set my projectile rotation can i just use script api using .setRotation method.

round bone
#

You have to use interfaces rather than classes in this case

sinful portal
#

I already implemented this and it works

dusky flicker
fallow minnow
#

why not

dusky flicker
drowsy scaffold
#

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 ()
stray spoke
stray spoke
#

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" 
halcyon phoenix
#

getAABB

#

can't wait for getAABBCC

warm mason
slow walrus
#

Axis-Aligned Bounding Box Collision Controller

warm mason
#

we need this

dusky flicker
#

too complex name

remote oyster
# stray spoke For example: ```js String.prototype.toName = function(){ return this.replace("...

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.

halcyon phoenix
#

what's the trick to make players immune to fall damage?

halcyon phoenix
#

now do AABBCCDD

slow walrus
warm mason
#

or the resistance effect before falling

remote oyster
#

A quick test could verify it, but I'm away from my computer so it won't be right now.

remote oyster
stray spoke
#

You're the same as the other user in off topic lol

remote oyster
#

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.

stray spoke
#

Now you're doing it again lol

warm mason
#

I need to test it

remote oyster
#

Definitely

warm mason
#

well, I don't think it will work..

remote oyster
#

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.

warm mason
#

doesn't work @remote oyster

remote oyster
#

Rip lol

#

I was actually hopeful it did

fiery solar
# remote oyster I was actually hopeful it did

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.

stray spoke
#

yall, is there a better way to make a custom furnace other than using entity chest

broken pawn
#

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

stray spoke
#

custom crafting table?

#

Bedrock can make that?, or is it just a chest ui

wicked girder
#

Is entityhurt before in beta or preview?

stray spoke
warm mason
stray spoke
#

Lmao

wicked girder
#

huh

#

Its not in the typings so idk

wary edge
wicked girder
#

sad

#

so confusing

#

I hope that comes soon

distant tulip
#

give it some time, it is new

snow jungle
#

how can ig ive mob armor using the script api?

open urchin
#

you have to use commands since they disabled the equippable component on non-player entities

open urchin
#

yes

snow jungle
#

how?

open urchin
#

this is how you'd do a diamond helmet

entity.runCommand("replaceitem entity @s slot.armor.head 0 diamond_helmet");
snow jungle
#

thank you

devout sandal
#

If I am using generateLootFromTable() and the table has enchanted books, they are just coming out as โ€œenchanted booksโ€ how can I fix this..?

snow knoll
noble pecan
#

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

fallow minnow
#

whats the point of floating text in debug utils if its the same poop performance as regular entity floating text

granite cape
#

p

fallow minnow
#

yes

#

its cool that in the preview its client side compatible but whats the point if its just as laggy

wary edge
#

No accidental kill @e

fallow minnow
#

i use remove event for killing them ๐Ÿ˜›

devout sandal
devout sandal
wicked girder
stray spoke
#

Is system.currentTick acts like world.getAbsoluteTime

snow knoll
#

Whereas, currentTick just gives you the indefinite number of ticks passed since that world started

slow walrus
stray spoke
open urchin
#

Block face returns a direction

stray spoke
#

Like for example I clicked the block on the side, it gets the block on that position

#

Ohh

open urchin
#

In front of where you clicked?

stray spoke
#

Yes

#

I can't find a function like block.getBlockOnDirection or something

open urchin
#

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();
stray spoke
#

Oh alright, that's manual now

#

Thankyou

#

What about like this:

const formatBlockFace = blockFace === "Up" ? "above" : blockFace === "Down" ? "below" : blockFace
    const targetBlock = block[formatBlockFace]()
#

Just replaces up into above, down into below, then call the method string using

#

What you think

#

Oh wrong string

open urchin
#

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

stray spoke
#

Oh yeh you're right I forgot

#

Thanks again

#

I'll use conditionals now

stray spoke
open urchin
#

From @minecraft/server

stray spoke
#

Thanks

broken pawn
#

that's why sometimes you'll see some addon has custom crafting_table with their custom tag

broken pawn
#

in my understandment, it's usually purposed to make some recipe only available on the required recipe tag

jagged gazelle
#

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...

jagged gazelle
round bone
woven loom
#

how to view dynamic properties nbt

round bone
#

They're bit more secure and a player cannot just jump by modyfing his time in his device

round bone
jagged gazelle
#

kk, might try later

round bone
jagged gazelle
#

just store

round bone
#

Use UTC timestamps then, they're bit better in this case

woven loom
#

i cant see them in universal minecraft editor

#

is there any other software to view dps

round bone
icy eagle
#

100000

subtle cove
#

Yesnt

icy eagle
#

yes

devout sandal
#

Can we use the enchant with levels function for items gotten with the loot table manager?

#

Also, how do we even use that function?

stray spoke
#

Nvm fixed

#

Im so dumb, it's just the particles who's in absolute xyz coords

earnest meadow
#

does minecraft just ignore a ts file?

#

inside the scripts folder

wary edge
sage portal
warm mason
#

100000th "100000th message"

runic crypt
#

When will entityHurt beforeEvent be released?

snow knoll
earnest meadow
snow knoll
stray spoke
#

I am the storm that is approaching

jagged gazelle
snow knoll
jagged gazelle
snow knoll
#

That makes more sense
I still think it will take longer

snow knoll
#

Someone give me an idea of something cool, but not hard, to do pls

stray spoke
#

Jenny Addon

devout sandal
#

how tf do you use the LootItem function??

snow knoll
stray spoke
#

Yeah lol

devout sandal
#

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?)