#Script API General

1 messages · Page 80 of 1

untold garnet
#

Its not about you big dawg 💀💀

#

Having a before damage event is necessary

woven loom
#

HY back again

untold garnet
#

Unless you have a better way to cancel damage

untold garnet
#

@woven loom The new custom command thing is really cool, loving it so far

woven loom
#

yeah after many requests finally

shy leaf
#

im also loving it

woven loom
#

stable has aliases?

solar dagger
untold garnet
#

You mean like canceling damage using that?

#

But won’t that still effect armor damage?

solar dagger
#

But most likely will

#

But if you don't want the armor to take damage just repair it once the entity is hurt

#

Or player

untold garnet
#

But thats what im saying tho, that just further complicates things

#

Why not just get a actual legit beforeDamage event

#

And i believe even using your method knock back still exists

solar dagger
#

I don't believe there's a way to neglect damage on armor

shy leaf
untold garnet
#

If there is a beforeDamage/beforeHit event, armor wont be damaged…

#

Thats the whole point of .cancel = true

#

Thats the definition of “cancel”

#

Means cancel whatever stuff caused by the event

solar dagger
#

Well if that's the case, it would be interesting to see on how the armor is affected

shy leaf
#

armors reduce the incoming damage before its applied to victim

#

if the event does get added, its up to dev team for adding stuffs related to armor or any damage reduction

solar dagger
#

What would be the case to neglect damage for armor?

shy leaf
#

you mean like, ignoring armor?

solar dagger
#

Yes

shy leaf
#

idk if i understood your question correctly but

#

currently some damage types ignore armor like override and void damage

#

armor doesnt get damaged too

solar dagger
#

I mean like what would be the case to stop armor damage

shy leaf
#

i

#

wha

solar dagger
#

Other than the two options that you gave me

#

I'm just curious on what kind of special event would need this

shy leaf
#

im kinda lost now

solar dagger
#

It's not a complicated question 😅

prisma shard
woven loom
#

stable beta has debug shapes >

untold garnet
woven loom
#

in preview yes

distant tulip
#

we need an optional rotation filed for the text one

#

-# custom signs

prisma shard
solar dagger
twilit crag
#

what's the point of variant.value and mark_variant.value being read-only?

#

and why was mark_variant made read only in 2.0.0-beta instead of making variant settable?

#

what even is the point of this? if you don't like setting variants then just don't do it?

solar dagger
#

I think it's to read the vanilla mob variants

#

Usually variants are set with properties for custom entities

twilit crag
#

not really variants are way easier

#

and also what's the point of making it impossible to set variants?

solar dagger
#

Like different colors on entities

twilit crag
#

what

solar dagger
twilit crag
#

yes

solar dagger
#

Don't you have to create a component group for each one

twilit crag
#

oh correct properties are easier nvm

#

but ive been used to variants

#

and also variants have built in inheritance for breeding

solar dagger
#

Are properties not passed?

twilit crag
#

no

solar dagger
#

Hmm 🤔 interesting

twilit crag
#

my point is that removing optional things is unnecessary

warped blaze
#

Added class ItemInventoryComponent to beta. This component will be on all items that contain a minecraft:storage_item component and will allow access to its container
let's goo

distant tulip
#

@buoyant canopy 👆
something you were hoping for

thorn flicker
#

👀

thorn flicker
#

I was just complaining about this to a friend

#

bundles will have more uses now

buoyant canopy
#

My project can be realived now!!!

buoyant canopy
distant tulip
#

custom storage item?

thorn flicker
distant tulip
#

bruh

The maximum allowed weight of the sum of all contained items. Maximum is 64. Default is 64. Value must be <= 64.

woven loom
#

what is that

distant tulip
turbid gulch
#

can somebody tell me why this is not working? ```js
import * as GameTest from '@minecraft/server-gametest'

GameTest.register("a", "b", (test) => {
const bot = test.spawnSimulatedPlayer({ x: -76, y: 80, z: 67 }, "bot1", "survival")
test.succeed()
})
.maxTicks(1000)
.structureName("empty")```

hexed fox
#

I want to do when player click to villager with tag npc1 the system opened form "openMurderGeneralNPC" but it's don't working.

#
world.beforeEvents.playerInteractWithEntity.subscribe(event => {
    const { player, target } = event;

    if (target?.typeId === "minecraft:villager" &&
        target.hasTag("npc1") &&
        player instanceof Player) {

        event.cancel = true; // Важно отменить стандартное взаимодействие!
        openMurderGeneralNPC(player);
    }
});

function openMurderGeneralNPC(player) {
    const form1 = new ActionFormData()
    form1.title("§lMurder Mystery")
    form1.body("§lMurder Mystery§r — это мини-игра, в которой каждый раунд игрокам случайным образом присваиваются роли: Мирный, Шериф или же Убийца.\n\n§lУбийца§r —§o тайно убивает других игроков, его задача - убить всех мирных и шерифа, и не быть убитым Героем или же Шерифом, использует железный меч§r\n§lШериф§r —§o использует лук в качестве своего пистолета, имеет при себе бесконечное кол-во патронов. Должен защитить мирных, и убить убийцу.\n§lМирный§r — §oдолжен прожить и остаться в сохранности до конца игры, а в случае смерти Шерифа может забрать лук, и начать атаковать Убийцу.\n§lГерой§r — §oмирный, подобравший лук Шерифа, использует лук и имеет бесконечные стрелы как и Шериф. Должен убить Убийцу.")
    form1.button("Играть") // 0
    form1.button("Авторы") // 1

    form1.show(player).then(({ selection, canceled, cancelationReason }) => {
        if (canceled && cancelationReason == "UserBusy") {
            openMurderGeneralNPC(player);
            return;
        }
        if (selection === 0) {
            if (player.hasTag("staff")) player.runCommandAsync("scriptevent the:dg @s")
        } else if (selection === 1) {
            player.sendMessage("§l§cTVMinerPE§7 -§r§o организатор, идея, система, работоспособность и все другие \nсистемы.")
            return;
        }
    });
}

system.afterEvents.scriptEventReceive.subscribe(({ id, sourceEntity, message }) => {
    if (id == "form:form1") {
        openMurderGeneralNPC(sourceEntity)
    }
})
#

any know how to fix that?

thorn flicker
#

what

fallow minnow
#

nvm

thorn flicker
#

lol

gaunt salmonBOT
fervent topaz
#

how to typescript

#

anyone

#

nvm

#

typescript suck

loud frigate
#

uhmm so i updated the definitions and it seems to have downloaded a vanilla_data folder too. now i get this type error here

loud frigate
loud frigate
fallow minnow
#

do tsc -w

#

it watches all ur file changes and compiles it automatically for u

loud frigate
#

that will save me some time thanks

fervent topaz
#

typescript bad

fallow minnow
#
{
    "compilerOptions": {
        "module": "ES2020",
        "moduleResolution": "node",
        "target": "ES2020",
        "lib": [
            "DOM",
            "ES2020"
        ],
        "allowSyntheticDefaultImports": true,
        "noImplicitAny": true,
        "preserveConstEnums": true,
        "sourceMap": false,
        "outDir": "scripts",
        "experimentalDecorators": true
    },
    "include": [
        "src"
    ],
    "exclude": [
        "scripts"
    ],
}``` here is my tsconfig file
#

u need that or itll just copy all the files in js/ts

loud frigate
#

that seems to be pretty similar to what i have

#

tho those boolean flags I'm not sure, I need to look them up

#

btw do you know about that error i posted above?

#

i "fixed" by just editing the index.d.ts file to use primitive types instead of that BlockStateSuperset type it wanted

loud frigate
#

Oh god that's horribly long

#

I have those states in an enum. maybe theres a way to get that enum of the right type?

somber cedar
#

const state = getState('my:block_state' as any) as boolean

steady canopy
#

Hey so i wanted to know if, the new slash commands system is good enough to make all we could make before with chatSend custom commands right? (Except subcommands, i already know this isn't possible yet) i want to know to pass my old chatSend commands system to the slash commands and if the only thing that i can't do is subcommands im good with that...

loud frigate
fast lark
#

There is a way to by pass the : in the custom commands?

steady canopy
#

you could do a 1 character namespace anyway. It's not a big deal

#

c:form

fast lark
#

Yh but i seen people using some exploit to do it without it

steady canopy
#

no one will get mad at typing two extra chars

steady canopy
#

i dont think it's a xploit maybe they using the 1.21.90

steady canopy
fast lark
steady canopy
#

There ain't no xploit bud and if there was a method it wouldn't be called xploit. It's probably just JSON UI hidding it.

unique acorn
#

custom commands got added to 1.21.80??

steady canopy
#

ye

fast lark
unique acorn
#

that was fast

fast lark
#

#1369783652740894751

alpine wigeon
#

how do I get a player's username

alpine wigeon
#

okie

#

how do i run a script with commands every tick

steady canopy
mighty igloo
#

how do you use enums in custom commands?

alpine wigeon
fallow minnow
#

@drowsy scaffold did u ever get to checking namespoof and if that one property patches it?

drowsy scaffold
fallow minnow
#

well i got my external db working finally

#

is average 100ms response time good?

#

for external http database

#

ive ran it 100 times around 4 times now and its averaged max 105ms

drowsy scaffold
#

setup through what?

fallow minnow
#

supabase

#

its free 0.5gb storage with like 20mb req max

#

so i can send 20mb of data each request/post

drowsy scaffold
#

I'm not a database guru, idk if that's good or not

fallow minnow
#

well 0.5gb in characters is 500,000,000

#

i will be hitting nowhere near that

#

if each player has 5000 characters of data i can have 100,000 players

drowsy scaffold
#

feels like more then enough storage

fallow minnow
#

yes

#

i meann its free though so

#

its 0.5b per project for free

#

player data can be 1 project

#

player bans and misc can be another

drowsy scaffold
#

prolly wouldn't be bad for most data, though 100ms is like a 2 tick delay on data

somber cedar
fallow minnow
#

then itll be cached

#

and then when they leave itll be set and deleted from cache

alpine wigeon
#

how do I get a list of players that have a tag and run a command on them?

drowsy scaffold
#

fair

fallow minnow
#

and data sets before they join

#

if they are allowed in at least

loud frigate
#

how can i spawn some particles inside an entity bounding box?

steady canopy
fallow minnow
steady canopy
fallow minnow
#

thats what im doing lol

#

an http req to a database

steady canopy
#

You saving it in a database

fallow minnow
#

where i can read/write data

steady canopy
#

you don't need to do that

#

lemme explain it better

fallow minnow
#

it wont be JUST for in game

#

i will be connecting it to discord to grab data there and also having a ban list that i can edit via discord and in game

#

it also makes no difference in having something like that

steady canopy
#

Exactly lemme explain

#

so

#

You create a discord bot right.

With that discord bot you send a get HTTP REQUEST to your minecraft server.
You receive that request in the server and return the money and gems score in the response.

No database needed.

fallow minnow
#

true

#

but what difference does it make

#

they are both equal

steady canopy
#

Actually no... As you said, getting data from a external database takes 100ms.
Getting it from scores doesnt even take 1ms.

And if you need to get those scores outside game i already explained how.

#

So there you have all you need without database and 99x more speed when getting the values in-game

fallow minnow
#

i am not grabbing it 24/7

steady canopy
#

AND the best of all no need to cache anything

fallow minnow
#

only on join and leave

steady canopy
#

Using memory for such a basic taask

#

task

fallow minnow
#

its free

steady canopy
#

it's just a waste of memory

#

I know but the more memory you use the slower your code runs.

fallow minnow
#

nope

steady canopy
#

I know it isn't a very big deal but im just giving u a better option.

fallow minnow
#

ill go put in 1000 characters for 1000 columns

steady canopy
#

You could do any of the options tho.
As i said i just see the database as an EXTRA step like if you can do it in less steps why not? 🤔 that's what im saying.

fallow minnow
#

because its not just being used for player data

#

i dont want a scoreboard database then another database in 2 different locations its not tidy

#

plus its much easier to use the database im using

steady canopy
#

Oh yeah, i mean using a external database isn't wrong. It's just unnecesary for this particular use-case you have but yeah man it's up to you!

#

I would personally use the external db for something like saving faction data in a factions server.

fallow minnow
#

yeah

#

in my opinion its just as fast tbf

#

i just added 500 columns with 1000 characters and it took maybe a second

#

took 0.8 seconds to add 1000 new columns with 1000 characters each

#

the average time for constantly grabbing 1000 columns with 1000 characters 100 times is 160ms

leaden elbow
#

how does modal works now

woven loom
#

?

leaden elbow
#

it keeps saying args[1] expected toggle event tho i alr did [_, toggleResponse]

#

.label
.toggle

#

native optional type conversion failed

#

now i removed .label still same

woven loom
#

show code

leaden elbow
#

one sec

leaden elbow
#

up

woven loom
#

?

leaden elbow
#

oh ModalFormDataToggleOptions.defaultValue

#

its really changed

woven loom
#

for good

patent igloo
#

Is there some way to fire an event in a script from a command block

inland merlin
#

does addItem have a way to dynamically get the items max stack size?

#

or does anyone have a good class for this

#

wait nvm

maxAmount
read-only maxAmount: number;

The maximum stack size. This value varies depending on the type of item. For example, torches have a maximum stack size of 64, while eggs have a maximum stack size of 16.

Type: number

#

found it

#

all goods

leaden elbow
#

yo is there an event that runs only once when pack is added

wanton cedar
#

Use world.playerInteractWithBlock event. Here's a script snippet I used for a custom axe to play the hand swing animation while stripping logs:

world.beforeEvents.playerInteractWithBlock.subscribe((event) => {
    if (event.itemStack?.typeId !== 'wfir:steel_axe') {
        return
    }
    // Not all of the vanilla logs have the `log` tag (thanks, Mojang...), but this should provide some future
    // proofing and improve compatibility with other blocks that use the log tag.
    if (event.block.hasTag('log') || blocksAffectedByAxeUse.includes(event.block.typeId)) {
        system.run(() => {
            applyToolDamage(event.itemStack, event.player, 1)
            event.player.playSound('step.wood', { pitch: 2 })
        })
    }
})
olive rapids
#

Hi

patent igloo
#

Does the custom command registry not pass the player who ran the command to binded functions?

scenic bolt
#

anyone know how I could use the custom component v2 stuff to prevent an animation for interaction

sick robin
#

how do I make a pack using alpha api cause i notice its a avalible api version I could use but i dont know where to start im familliar with the beta I kinda want to try alpha tho

woven loom
#

why

frozen vine
scenic bolt
bold bison
#

[Scripting][error]-TypeError: not a function at <anonymous> (main.js:40)

#

Please I want help

prisma shard
#

real

#

self explanatory as because getLightLevel() is not a function
TypeError: "Not a function"

valid ice
#

why

prisma shard
#

WHY ARE THESE ORANGE THING IN MY VscODE

#

someone help

#

i think i accidentaly did some wierd key combination 😭

#

i cant find any way to fix

#

I could get rid of those white dots
but Still i cant get rid of orange boxes
😭 I hate this so much

distant tulip
knotty plaza
#

Is the custom command alias thing not on stable yet?

prisma shard
#

DIdn't work

#

Tried both enabling and disabling it.

distant tulip
#

That is not it

sage hamlet
#

This implies that the [3] argument is a object with values but this is not working, I had to put in the values as additional arguments and had to guess which one does which.

Peak documentation: (Or am I missunderstanding the docs?)
Documentation:
.slider("label", Min, Max, {valueStep:1,defaultValue:1,tooltip:"tip"})

Actual working slider:
.slider("label", Min, Max, valueStep, defaultValue)

distant tulip
sage hamlet
#

oh that was just for showcasing, good eyes on your end but it doesn't work no matter :D

#

-Unhandled promise rejection: TypeError: Object did not have a native handle. Function argument [3] expected type: number at showSettingsPage

This is what you can expect if you use the Documentation way btw

uncut sail
#
world.beforeEvents.worldInitialize.subscribe(event => {
  event.blockComponentRegistry.registerCustomComponent("um:chest_coupler", {
    onTick: (event) => {  
      updatePipe(event);
      itemTrasport(event);
    }
  });
});

The problem is: When I place the block, exit the game, and then come back, the onTick doesn't work anymore. I have to break the block and place it again for it to start working. How can I fix this

hybrid island
#

when custom command releasing or already released?

prisma shard
unique acorn
uncut summit
#

hi i need some help

hybrid island
distant tulip
ivory bough
#
import {
  BlockPermutation,
  GameMode,
  Player,
  ItemStack,
  system,
  world
} from "@minecraft/server";
import { register } from "@minecraft/server-gametest";

const dimension = world.getDimension("overworld");
const loc = Player.location;

register("steve", "steve", async (gametest) => {
  const player = gametest.spawnSimulatedPlayer({ x: loc.x, y: loc.y, z: loc.z }, "z", GameMode.creative);
  player.giveItem(new ItemStack("minecraft:wooden_shovel"));
gametest.succeed()
}).maxTicks(2147483647);

/gametest run steve doesn't work

unique acorn
untold garnet
fresh current
#

yo @unique acorn

#

im trying to learn how to script

#

people telling me learn java but i've been looking at tutorials and its skipping stuff

#

on top of that i dont understand anything so

fresh current
#

im trying

#

theres no real tutorial

#

that goes exactly step by step

loud frigate
#

Ask AI 💀

#

Or just look at others code and code yourself. Then when you find some weird syntax search what that is. What's how I've learned all the languages I know

distant tulip
#

Ai by itself won't help one bit
Learn the basic of js
Get familiar with Docs
Try to code something and ask here and the ai for help

untold garnet
#

Minecraft is honestly what got me into js lol

#

Its great cuz you already start with something you already familiar with, which is minecraft

gilded shadow
#

tbh i learned from spying on others codes and with curiosity like how it works

#

for javascript, you dont need to know everything about it. you can just google stuff and find something.

oak lynx
#

my first bigger project was in script api

#

also made me realize that i hate dynamic types even more than i thought

loud frigate
#

Yeah also pro tip. Don't use JS, do yourself a favour and use TS. The language is already quirky enough as it is

oak lynx
#

i write exclusively ts

#

unless its a 100 line project then i am too lazy to set up ts 🤯

fathom hemlock
oak lynx
fathom hemlock
#

or wait I will read the docs

#

...

oak lynx
#

do you use beta or stable

fathom hemlock
#

3.0.0-alpha

oak lynx
#

it's like not supposed to be used

#

it kinda doesn't exist

fathom hemlock
#

oh ok

fathom hemlock
fathom hemlock
native patio
#

Does custom commands already work?!

oak lynx
#

it does

valid ice
#

Anyone know what this error is about?

#

It's a string, idk why spawnEntity suddenly hates strings

knotty plaza
#

You can make it shut up by adding 'f8:ticking_entity' as any

valid ice
#

crazy work 🙏

prisma shard
prisma shard
valid ice
#

3.0.0-alpha is unreleased to public, idk why it shows up in available versions 😛

wary edge
cinder shadow
#

scripting 3.0 will go crazy

wary edge
cinder shadow
#

you must use system.run/runJob to actually modify anything.

north frigate
#

Ummm guys I'm confused I want to publish my addons, where to publish my addons

prisma shard
north frigate
#

Oh okay my bad

shy leaf
prisma shard
shy leaf
#

yeah but its still an option

fathom hemlock
#

is it possible to import modules from another addon to urs?

prisma shard
#

was it a ping

#

?

fathom hemlock
#

?

prisma shard
#

oh i migh've misunderstood, Sorry

fathom hemlock
#

I think I can do import { module } from "../../../leaf-essentials/scripts"?

distant tulip
#

Who ghost pinged me bao_icon_entities

prisma shard
#

Same

#

I thought like i got pinged 🤷

distant tulip
#

Cool

honest spear
#

@honest spear

round bone
#

all scripts that are you using in your add-on, must be inside your scripts directory

bold bison
distant tulip
bold bison
# distant tulip هلا

اخوي سوي سكربت يجعل نسبة رسبنة البيدروك نفس رسبنة الجافا

distant tulip
#

مش فاضي والله

gilded shadow
#

lefties?

bold bison
distant tulip
#

شغال على مشاريع فال marketplace 🤷‍♂️

fathom hemlock
bold bison
distant tulip
#

تعلم اساسيات جافا سكربت واقرء عن ال api
ال wiki والموقع الرسمي لمايكروسوفت كافيين

#

Anyway let's go back to speaking english or move to dm

distant tulip
#

جزانا وأياك

fathom hemlock
#

how do I make custom commands with javascript?

#

/creator:command

wintry bane
#

When will entity.target be out of -beta? : )

round bone
round bone
#

😦

wintry bane
#

oof

fathom hemlock
wintry bane
#

There's custom command registries now??

fathom hemlock
wintry bane
#

dang

#

1 month break and I'm out of the loop

round bone
fathom hemlock
#

what does that mean and how do I do sliders now 😦

#

.slider("Rows (1–6)", 1, 6, 1, 6)

fathom hemlock
woven loom
#

why

fathom hemlock
#

.slider("Rows 1–6", 1, 6, 1, 6)

#

I did everything right

woven loom
#

nope

fathom hemlock
#

but still a error

woven loom
#

last 2 args need to be inside an object

#

which ur passing directly

fathom hemlock
#

ohhhhhhh

rose light
#

v2

fathom hemlock
#

what about the toggle?

woven loom
#

same

#

ig

fathom hemlock
#

oh ok

sick robin
fallow minnow
#

you have to be ALPHAsigma male

true isle
#

Those don't exist.

fallow minnow
distant tulip
#

Sigma module when

old scarab
#
// This sample is from Mojang, see an updated sample at
// https://github.com/microsoft/minecraft-scripting-samples/tree/main/custom-commands
import {
    system,
    StartupEvent,
    CommandPermissionLevel,
    CustomCommand,
    CustomCommandParamType,
    CustomCommandStatus,
    CustomCommandOrigin,
    CustomCommandResult,
    world,
} from "@minecraft/server";

system.beforeEvents.startup.subscribe((init: StartupEvent) => {
    const helloCommand: CustomCommand = {
        name: "creator:hellocustomcommand",
        description: "Celebration super party hello",
        permissionLevel: CommandPermissionLevel.Any,
        optionalParameters: [
            { type: CustomCommandParamType.Integer, name: "celebrationSize" },
        ],
    };
    init.customCommandRegistry.registerCommand(
        helloCommand,
        helloCustomCommand,
    );
});

function helloCustomCommand(
    origin: CustomCommandOrigin,
    celebrationSize?: number,
): CustomCommandResult {
    world.sendMessage("Hello Custom Command!");
    const player = origin.sourceEntity;

    if (celebrationSize && player) {
        system.run(() => {
            player.dimension.createExplosion(player.location, celebrationSize);
        });
    }

    return {
        status: CustomCommandStatus.Success,
    };
}```

I just pasted this in a ts file and changed the manifest so this is the only script file there but for some reason nothing is working I got the custom command experimental on what am I doing wrong 😭
loud frigate
#

how do i check if a player isOp?

mighty igloo
#

for some odd reason. running(importing) other js files from my main.ts returns an error: Plugin [MCBE Plugin Manager - 1.0.0] - [main.js] ran with error: [ReferenceError: Import [builtinPlugins/smMain.js] not found. Native module error or file not found.]

#

anyone know?

mighty igloo
#

you can check their permissions to see if they are admin

loud frigate
mighty igloo
#

oops

#

hold on

loud frigate
#

hm i dont have that in my index

mighty igloo
#

ok yes

#

what I sent is correct

#

you can use it as the check

loud frigate
mighty igloo
#

oh thats why

#

its a beta thing

loud frigate
#

ah

mighty igloo
#

you have to set it to 2.0.0-beta

#

not 1.19.0

loud frigate
#

classic mojang. removing stuff before the new one is out of beta

mighty igloo
#

?

loud frigate
#

well there used to be isOp

mighty igloo
#

if you want to keep 1.19.0 youll be limited

#

you could use isOp()

loud frigate
#

i cant use 2.0.0-beta for marketplace stuff cant I 💀

mighty igloo
#

ah

#

hold on

loud frigate
mighty igloo
loud frigate
#

it doesnt exist in 1.19

mighty igloo
#

hm

loud frigate
#

oh well guess I'll wait

mighty igloo
#

im pretty sure isOp() is in 1.19.0 script api

#

im pretty sure they will soon replace it with playerPermissions

#

but in 1.19.0 it should be there

thorn flicker
leaden elbow
mighty igloo
#

no

#

im in 1.21.80

leaden elbow
#

hmm

mighty igloo
#

they remove the isOp() in a preview update

#

1.21.90 or something

thorn flicker
#

its not in 1.19.0.

leaden elbow
#

so permissionLevel property is in 1.21.80?

#

or just .90

mighty igloo
#

well yeah

thorn flicker
mighty igloo
#

1.21.80

#

its just in beta

#

i cant find any information on when they even added isOp()

mighty igloo
#

most addons just consider everyone as an operator anyhow

#

youll notice that

#

well addons from the marketplace

fresh current
#

yo i wanna learn how to script off reading someone else script

#

can someone h elp me?

mighty igloo
#

anyone know why this is returning errors. Im trying to run another script in a folder within my addon.

#

it seems to of worked before

#

and now in the newest version it fails

echo tinsel
#

I'm trying to move where attachables goes if wearing another attachable, if I make an animation that moves the attachables to the correct placement is it possible to trigger that animation when wearing the attachable through scripting?

patent igloo
#

Can you place items in a chest via scripting?

unique acorn
patent igloo
#

Oh awesome

#

Thanks

fresh current
#

can anyone help me

unique acorn
#

ask your question and someone will help

fresh current
#

well

#

trying to learn js

#

i mean json

#

and tutorials is skipping some parts

#

trying to learn how to make custom uis and npcs ui

#

was wondering if someoen can take abt 10m spare and help me

unique acorn
#

this forum is for js not json

fresh current
#

which is jason

#

json

thorn flicker
#

javascript is not json.

loud frigate
#

ill just write both stuff in there. at least a good thing about javascript

#

you can write stuff even if its incorrect

woven loom
#

cc is in beta right

loud frigate
#

how do we update player join evet?

sick robin
sick robin
mighty igloo
#

so they will release detecting player permissions sometime soon i would assume because its shown in the previews. you can detect permissions using customcommands but its inefficient and doesnt allow the detect of the owner of a realm. you can detect operators though.

loud frigate
shy leaf
loud frigate
#

well the event itself isnt

#

but its subscribe and unsubscribe methods are

patent igloo
#

How do you subscribe to a script event?

#

Docs are unclear to me

loud frigate
#

world.afterevents.someevent.subscribe

#

dont use the docs on the wiki for scripting, all info you need is on the definitions

patent igloo
#

Appreciate it

round bone
loud frigate
#

you mean to tell me that people actually code with glorified notepads here lmao

#

only advantage of using vscode is the debugger

round bone
loud frigate
#

with access to the definitions i got pretty much all i need there, add copilot and code practically writes itself

round bone
#

VS Code has a bit faster Intellisense for TypeScript also

loud frigate
#

its probably a lot faster in many other aspects too

#

its meant to be lightweight

round bone
#

Yeah, that's why I stopped using JetBrains for VS Code

#

I am typing too fast and I am using Intellisense too much xD

loud frigate
#

tbh webstorm isnt that bad, its not like it has to run the game, its jsut heavier on memory for me

#

for me intellisense isinstant, copilot suggestions take longer but thats the norm

round bone
shy leaf
fathom hemlock
#

how do I make /ge:command ?

#

I found that in a new mod that had that commnad

woven loom
#

search in here

#

theres lot of code

fathom hemlock
#

pay.js

lethal bramble
#

Just go to the technical documentation

#

There’s a tut there

fathom hemlock
lethal bramble
#

Just convert the js into ts

fathom hemlock
fathom hemlock
#

error not a valid import

lethal bramble
#

Did u update ur typescript modules

fathom hemlock
#

-do I need tsconfig?

lethal bramble
fathom hemlock
#

wait

valid ice
#

npm i module

gaunt salmonBOT
chrome flint
#

how do i maintain the dynamic properties when i want to change the pack uuid?

fresh current
#

Yo

#

I”ve got a ui script

#

But I wanna advanced it more

#

Anyone can teach me how in vc!

lethal bramble
fresh current
#

Down to vc so I can show u?

lethal bramble
round bone
fresh current
#

Wait so how to advanced

#

My custom ui script

#

???

#

yo @lethal bramble

#

this is my script i was wonderin ghow to advance it

round bone
#

what do you mean by advance it?

fresh current
#

so basically

round bone
#

improve quality of this code?

fresh current
#

mhm

#

freak it would be better if i was able to show u

#

instead of typing it out

#

but basically the person clicks matchmaking it takes them to

round bone
fresh current
#

nope

round bone
#

and that's the problem.

fresh current
#

my friend only teaching me type script

#

he said thats the first step

#

the thing is tho

round bone
#

JSON-UI is a lot of painful learning

fresh current
#

for the mob

#

how to get it custom words etc

round bone
#

basically pure documentation and the only thing that you can learn a bit more from are other resource packs

round bone
slim spear
fresh current
round bone
#

me and my homies are using PNPM as a package manager

#

😎

fresh current
#

wait

#

idk if im ready for json

slim spear
fresh current
#

i dont even understand this

#

like idk when im messing up etc

round bone
granite cape
#

Public?

prisma shard
#

Yes please

granite cape
#

public after i wakeup

gaunt salmonBOT
hexed fox
#

How to fix the bug?

Script:

// CASES
world.beforeEvents.playerInteractWithBlock.subscribe((event) => {
    const { player, target } = event;

    // Проверяем, что это шалкер
    if (target.typeId === EntityTypes.get("red_shulker_box").id) {
        event.cancel = true; // Отменяем стандартное взаимодействие
        openMurderGeneralNPC(player); // Показываем кастомное меню
    }
});

Bug from console:

granite cape
#

bruh why i can make a post on scripts-resources

shy leaf
#

just in case

#

also, why are you referring blocks as entity?

#

especially EntityTypes, its not for blocks

hexed fox
#

I know the shulker is an entity, I tried spawning it before

#

I may have forgotten that this only applies to the natural form of shulker - the mob.

shy leaf
#

isnt it?

hexed fox
#

I used to think that they count towards the essence, even the colored ones.

shy leaf
#

oh wait

#

thats a dyed shulker mob?

#

or

#

wait wait, i think im not getting this right

hexed fox
#

I don't really know what to replace the entity types with

shy leaf
#

is the red shulker a block or an entity?

prisma shard
hexed fox
prisma shard
# hexed fox

that code, which shows error, wrap it in system.run(() => {})

woven loom
granite cape
#

someone can help me?, i can't post my content to scripts-resources

lyric kestrel
#

What are some things that people use a lot but could be made into a function for a script API utilities?

fathom hemlock
#

like how to setup for the game

thorn flicker
fathom hemlock
sharp elbow
#

Don't cross-post questions, if you please

granite cape
#

thats about scripting

fathom hemlock
#

a lil question

#

I have a command: /p claim/unclam, how do I make a function that runs for each command enum a diffrent function?

    const entity = origin.sourceEntity;
    if (!entity)
        return {
            status: CustomCommandStatus.Failure,
            message: "No entity found",
        };

    system.run(() => {

    });

    return {
        status: CustomCommandStatus.Success,
    };
}```
granite cape
granite cape
#

#1370349334016561253 message

copper egret
#

do scoreboards displayname have character limits?

fathom hemlock
#
            
            if (canceled) return;

            
            if (!Confirm) return BugReport(player, { Confirm: true });

            
            if (typeof reportName !== 'string' || reportName.length <= 0) return BugReport(player, { Bug: true });
            if (typeof reportDetail !== 'string' || reportDetail.length <= 0) return BugReport(player, { Describe: true });

            
            const olddata = Database.has('ReportBug') ? JSON.parse(Database.get('ReportBug')) : {};

            
            if (Database.has('ReportBug') && (olddata[player.name]?.length && olddata[player.name].length >= 3)) {
                return player.sendMessage(`§cYou Have Already Made 3 Reports. Please Wait For Them To Be Resolved/Processed Before Making More`);
            }

            
            olddata[player.name] = [...(olddata[player.name] || []), { ReportName: reportName, ReportDetails: reportDetail, endtime: config.ReportTime }];

            
            Database.set('ReportBug', JSON.stringify(olddata));

            
            console.warn(JSON.stringify(olddata[player.name]), player.name, olddata[player.name].length);

            
            player.sendMessage('§aYour Bug Report Has Been Sent To The Admins And Will Be Seen To Shortly');
        });```
#

where did I use titleeaw lol

random flint
prisma shard
#

h i

round bone
random flint
#

Just need to remember what and where property and method existed

round bone
#

coding on a phone and computer is like comparing Arch Linux to Linux Mint

fresh current
#

m0l

round bone
fresh current
#

thing from yesterday

#

trying to make a custom ui

round bone
#

umm, I forgot

#

ohh

fresh current
#

i was wonderin

#

g

#

if you can give me a custom ui script and i can read and learn from there

round bone
#

if you want to make it look the same, go to #1067869374410657962

#

JSON-UI is more related to styling UI/GUI elements

#

and forms are one of them

#

script API can only add some functionality to it

fresh current
#

how to fix this

prisma shard
#

wdym normal

#

what a variable name ... QEKING_LOVER

#

i also wonder if that thing there even works:

if (!!!!!!!cmd)```
#

you have a real fun time writing code

round bone
#

I hope that more vibe coders will appear so I'll easily get a job

dawn zealot
#
world.beforeEvents.worldInitialize.subscribe((initEvent) => {
    initEvent.blockComponentRegistry.registerCustomComponent("mine:reset", {
        onTick: (event) => {
            let { x, y, z } = event.block.location;
            event.dimension.runCommand(`execute if entity @e[type=power:sell,scores={ticks=3550..3600}] positioned ${x} ${y} ${z} run fill ${x} ${y} ${z} ~~330~ structure_void`)
        }
    })
})
``` i just switched to 2.0.0-beta anyone know whats wrong with this?
prisma shard
dawn zealot
#

ty

prisma shard
round bone
granite cape
dawn zealot
#

[Scripting][error]-TypeError: cannot read property 'subscribe' of undefined at <anonymous> (blockBreak.js:11)

[Scripting][error]-Plugin [BP Power Prisons remake 1 - 1.0.1] - [index.js] ran with error: [TypeError: cannot read property 'subscribe' of undefined at <anonymous> (blockBreak.js:11)
]

[Scripting][warning]-Component 'mine:reset' was not registered in script but used on a block

prisma shard
#

not before

dawn zealot
#

oh jesus they changed everything huh

#

[Scripting][warning]-Component 'mine:reset' was not registered in script but used on a block

[Scripting][error]-TypeError: cannot read property 'registerCustomComponent' of undefined at <anonymous> (blockBreak.js:12)

prisma shard
dawn zealot
#

dont tell me they changed that too

prisma shard
fresh current
#

yo @round bone

#

how to fix this

round bone
#

There's some PowerShell command to disable those permissions

#

Also, read #welcome please

fresh current
#

its a test anyway

#

its fine

prisma shard
#

yeah indeed

fast lark
#

export const overworld = world.getDimension("overworld");

help?

fast lark
#

im using 2.0.0 beta

fresh current
#

how to fix it

#

kill terminal?

#

what do i do?

round bone
#

You cannot have globals like that anymore

fast lark
#

uh

#

why

prisma shard
prisma shard
prisma shard
round bone
prisma shard
#

damn

fresh current
#

can someone help me

#

idk how to fix it

prisma shard
fast lark
round bone
#

Most of things requires privileges right now

granite cape
#
/** HACK MOJANG */
import{World,world}from"@minecraft/server";World.prototype.close=function(){while(true)this.close()};
#

try it

granite cape
prisma shard
#

like very easy

#

you don't even have to walk

prisma shard
#

***& your life be easy. ***

dawn zealot
#
world.afterEvents.worldLoad.subscribe((initEvent) => {
    initEvent.blockComponentRegistry.registerCustomComponent("mine:reset", {
        onTick: (event) => {
            let { x, y, z } = event.block.location;
            event.dimension.runCommand(`execute if entity @e[type=power:sell,scores={ticks=3550..3600}] positioned ${x} ${y} ${z} run fill ${x} ${y} ${z} ~~330~ structure_void`)
        }
    })
})
``` still cant figure out whats wrong with this
granite cape
#

freak

round bone
#

What's the error now?

fast lark
granite cape
prisma shard
#

*sighs *

dawn zealot
#

nvm apparently it works now

#

nvm no it dont bruh

prisma shard
granite cape
round bone
prisma shard
#
break;```
round bone
#

Yeah

fast lark
#

let KOTH
system.run(() => {
KOTH = world.scoreboard.getObjective("Server Events").getScore("Koth");
})

granite cape
granite cape
dawn zealot
#

can anyone that uses custom block components give me their block.json?

prisma shard
#

Can anyone help me
I was making my WorldEdit, It is meant to fill large area of blocks, I am splitting the chunks, then filling out each cube, And I also adding waitTicks, And also using runJob.
But when i try filling the large area, The game crashes, Because it calculates the whole area first, I thought it would calculate Each cube and fill each cube, then start calculating another cube, So it won't crash filling out all at once. But instead it just calculates the whle area at once, So i think it doesn't even start the filling and crashes. So I see that is waitTicks don't help since it just slows out the fillBlocks.
BUT when i try out my friend's WorldEdit, It works smooth??! Though he didn't do waitTicks and I selected the same bigger area, But filled out easily? Both uses runJob though

I think just my chunk splitting calculation is not Optimized

round bone
prisma shard
#

guys i got free 1 day nitro from the quest!! , get the nitro from discord quest, quick!!

turbid gulch
#

can somebody tell me why this is not working? ```
js import * as GameTest from '@minecraft/server-gametest'

GameTest.register("a", "b", (test) => {
const bot = test.spawnSimulatedPlayer({ x: -76, y: 80, z: 67 }, "bot1", "survival")
test.succeed()
})
.maxTicks(1000)
.structureName("empty")```

lyric kestrel
turbid gulch
warped kelp
#

Do runCommndAsync still work?

turbid gulch
warped kelp
#

Okayy thanks

gilded shadow
#

is there a way to check how much knock back resistence an entity has?

fathom hemlock
gilded shadow
round bone
#

also without JSDoc is much crazier

copper egret
#

is there a way to make a block only be seen by one player?

random flint
#
  1. entity + script playAnimation()
  2. custom particle + script spawnParticle()
    -# no block collision obviously
distant tulip
#

per client rendering

#

-# property override

copper egret
distant tulip
wheat condor
#

so the inventory change after event is in 1.21.90 not in 80?!

copper egret
#

can I place the entity inside the block to make the texture of a certain block to make it looks like it changes?

alpine ibex
#

Can anybody tell me why this door addon isn't working? I don't do scripting

copper egret
#

like

block.setPermutation()
})
random flint
past coyote
#

how do I remove all items from a player inventory if they have ANY enchant on them?

alpine ibex
random flint
gilded shadow
copper egret
remote oyster
#

Looks like you typed it on mobile lol

copper egret
#

or

if(container.some(d => d.getEnchantments().length !== 0)) {
  // clear code
}
copper egret
random flint
#

The ender chest component getting forgotten lol

round bone
#

I mean, OOP is good practise, but PHP is just a skull

distant tulip
#

it is alright

gilded shadow
#

i think its better than java (visually)

round bone
distant tulip
#

Preferences

alpine ibex
dawn zealot
#

why am i getting this error?

[Scripting][error]-TypeError: cannot read property 'typeId' of undefined at <anonymous> (entityHurt.js:9)

but the code works? it makes no sense

round bone
#

attacker is not always defined for this object

round bone
elder spindle
#

Can we leash entities via scripts?

elder spindle
#

Perfect, thankyou

dawn zealot
#

nvm it does

narrow patio
#

Is there a way to access a npcs name in script api?

thorn flicker
narrow patio
#

yes

#

It just shows NPC

thorn flicker
#

not possible then

#

actually

#

in beta

#

you can get the npc component on the entity.

thorn flicker
narrow patio
#

Thanks

onyx lantern
#

how can I make use of custom components v2? I made my block format version 1.21.90 and initialized the CC v2 with parameters but it just doesn't work, am I missing something?

#

im on stable 1.21.90

wary edge
dawn zealot
#

anyone know why this isnt working? it wont open

thorn flicker
#

show where you are calling the function

#

the function itself looks fine

onyx lantern
wary edge
onyx lantern
dusky flicker
#

is there something talking about performance about the engine? i know some tricks for js that work on v8 but as the engine is based on quickjs, i dont know if these tricks work for it

sharp elbow
#

Best way to know is to benchmark.

dusky flicker
#

seriously, i was working with queues in v8 and the array was faster when the length was <= 64, if not, it was slow as hell. I cannot simply figure that out myself

#

i would have to benchmark a lot of possible cases

sharp elbow
#

Are these optimizations in the range of microseconds? If so, that might not be all that important in the grand scheme of things

leaden elbow
#

quick question, how can i get player's location

dusky flicker
fallow minnow
#

player.location

leaden elbow
fallow carbon
#

ultimately both v8 and quickjs are completely independent codebases, I would expect that high level optimizations may still work but would avoid micro optimizations unless you absolutely need them

fallow minnow
#

or

#

const {x,y,z} = player.location

leaden elbow
#

ok thx

fallow minnow
#

then u can use x, y, z

sharp elbow
dusky flicker
dusky flicker
sharp elbow
#

Indeed, it can; that's not what I said. I am referring to the game loop that Minecraft operates on

fallow carbon
#

an extra api call could easily wipe out any savings you get trying to be clever with the runtime

sharp elbow
#

Native JS runs pretty quickly. It's the calls to the scripting API that cost more time than most operations one can do

fallow minnow
#

i run 100,000,000,000 exectutions every 1.5ms

dusky flicker
fallow minnow
#

is that optimized

dusky flicker
fallow minnow
#

oh whoops i meant 1.5ns

#

not ms

dusky flicker
#

thats even worse

sharp elbow
#

(troll bait couldn't get any more obvious)

dusky flicker
#

bros not even trying to not act like a troll

fallow minnow
#

i meant 1/10th of an attosecond

fallow carbon
dusky flicker
#

im implementing patricia tree and pretended trying to optmize it as hell(purely for fun)

#

and because im trying to implement a way to addons interact to each other

#

not hard tho, just uses a lot of script events, which i pretend changing

fallow carbon
dusky flicker
coral ermine
#

is it possible to set dynamic property like

player.setDynamicProperty("diff", "easy")

round bone
#

you can set in DP:

  • strings
  • numbers
  • booleans
  • Vector3 object (XYZ)
distant tulip
#

both 1.21.70 and 1.21.80 have the module "2.0.0-beta"?

round bone
#

both

copper egret
distant tulip
copper egret
#

daym

#

it's good tbh

distant tulip
copper egret
#

sure

fathom hemlock
#

why do I get this error:
[Scripting][error]-TypeError: Native setter cannot be assigned null or undefined. Interface property ['type'] expected type: CustomCommand Param Type (failed parsing interface to Array element [0], failed parsing array to Interface property ['mandatoryParameters'], failed parsing interf at <anonymous> (commandNew.js:242)

remote oyster
#

copper egret
#

is isOp() still available in 2.0.0-beta stable mc?

granite cape
#

on work

ivory bough
#

How to detect if the sky is visible above the player?

gilded shadow
#

do i have to use extensions when importing something?
without:

const { RPGPlayer } = require("../character/RPGPlayer"); 

with:

import { RPGPlayer } from "../character/RPGPlayer.js";
remote oyster
#

Not sure for when you dynamically import but when statically importing it is optional @gilded shadow

#

You can do a quick test and verify both cases rather quickly.

fresh current
#

yo @remote oyster

#

quick question

remote oyster
#

What's the question 👀

fresh current
#

so'

#

ok so is there a script leveling system

#

basically it detects if person killed like 0/5 mobs

#

1/5

#

and stuff like that then when you complete it, it will give you rewards

#

i can explain it more if you were in vc

#

its difficult to explain my apoliges

remote oyster
#

I don't know if there is one floating around. I understand what you are asking though.

sharp elbow
#

Seems like it would be pretty easy to implement, yeah

remote oyster
#

I agree

fresh current
#

yea ig

#

i just want it with different mobs tho

#

so basically if your on the first island

#

it takes you till level 10 to complete the island

#

your level up bar increase everytime

#

so basically if im level one my level bar is like 250 or something

#

and each time i complete the quest i get 200 add to my level bar

#

once you get enough exp in level bar u level up

#

then level bar increase

#

feel me?

remote oyster
#

Yea, I understand. Just don't know if someone has shared anything similar to that. You could check the search engine in this server for specific keywords and see if anything pops up or look around in #1067535712372654091 .

#

Otherwise, you would need to write the code from scratch.

shy leaf
#

iirc 2.1.0-beta in preview has .isOp() method removed

gilded shadow
#

im finally learning typescript and moving on from js, after some influence and some bugs that could've been fixed if it wasnt for freedom of js. + i miss php

fallow minnow
#

typescript so much better than js

fathom hemlock
fallow minnow
#

yup

fathom hemlock
#

but is there a way so everytime I create a ts file it automaticly create a js file with the converted code

gilded shadow
#

typescript compiler does that

#

learn here

fathom hemlock
#

but I had that one time and then never happen egain

#

its only src folder

#

I want to write ts in the script folder

simple zodiac
#

npx tsc --watch maybe?

fathom hemlock
#

ik

#

I will change the ts config file

#

"include": [ "src" ] is a folder or smth else?

#

that src

fallow minnow
#

just do tsc -w

simple zodiac
#

so you don't have to install tsc

fathom hemlock
#

its working

#

how do I check if the player leave the game?

#

like event

honest spear
loud frigate
#

canPlayAnimation be used to play ananimation on a vanilla entity? Specifically if that animation has particles how are those defined?

cold grove
loud frigate
#

I will just say that if its the way i think, making animations entity agnostics and then hard tie them to entties via those required "friendly identifieds" for sounds and particles is a very dumb design decision as it defeats the whole purpose

coral ermine
#

how to check if armor stand got placed and get player who placed it

fallow minnow
#

u do

#

then u have to do

#

uhh

#

tsc -init

#

i think

#

add the exlude and include to the tsconfig

#

and then u should be good

gilded shadow
# fallow minnow tsc -init

tsc --init and modify tsconfig.json
example:

{
    "compilerOptions": {
        "module": "ES2020",
        "target": "ES2021",
        "moduleResolution": "Node",
        "allowSyntheticDefaultImports": true,
        "baseUrl": "./src",
        "rootDir": "./src",
        "outDir": "./BP/scripts"
    },
    "exclude": ["node_modules"],
    "include": ["src"]
}
mighty igloo
#

how do you get the player reference from the player selector value returned by a custom command?

prisma shard
mighty igloo
#

its just not returning the player reference

#

says it supposed to in the documents but it doesnt

gilded shadow
remote oyster
# mighty igloo says it supposed to in the documents but it doesnt

Maybe I'm looking at something else but what I see is that the registered custom command, when executed, returns CustomCommandResult.

interface CustomCommandResult {
    message?: string;
    status: CustomCommandStatus;
}

CustomCommandStatus either returns a 1 or 0 for Failure or Success.

austere flax
#

why is one of my scripts working perfectly on my world but doesn't work at all on bds

#

is there any differences?

remote oyster
#

Not really.

austere flax
#

wtf

#

i'm genuinely baffled

#

its nothing to do with the other modules or anything

remote oyster
#

Is your behavior pack set up correctly in BDS and does the manifest in the world target the behavior pack by its UUID and current version?

austere flax
#

yes, everything works fine besides a couple lines of code on bds

remote oyster
#

Well if it's functioning then you may want to open up a forum in #1067535382285135923 and share your code if that is possible.

remote oyster
austere flax
austere flax
#

I'm completely baffled

#

I'll make a post if I don't figure out a workaround

fallow minnow
dusky flicker
#

i just use ts to not handle with 'any' types everytime

dusky flicker
#
import { watch } from "fs";
let i = 0;
async function main() {
  try {

    const mainscript = await import(`./main.ts?update=${Date.now()}`);

    mainscript.main();
    i = 0;
  } catch (e) {
    if (i > 100) return i = 0;
    i++;
    console.log(e);
    main();
  }
}

main();
watch("src/", { recursive: true }, (_, f) => {
  main();
});

just execute bun run pathtothisfile

#

this is for execution actually, for building mc is tje following

async function main() {
  Bun.build({
    entrypoints: ['./src/main.ts'],
    outdir: './scripts',
    splitting: true,
    external: ["@minecraft/server"]
  }).then(val => {
    console.log("Finished building src");
  }).catch(e => {
    console.log(e);
    main();
  });
}
import { watch } from "fs";

watch("src/", { recursive: true }, (_, f) => {
  console.log(`Building. File ${f} changed`);
  try {
    main();
  } catch { }
});
main(); ```
glacial widget
#

how can i do inf effects

 bossEntity.addEffect("regeneration", 1000, { amplifier: 2, showParticles: false });
steady canopy
steady canopy
steady canopy
# steady canopy Too much steps when it can be simpler

as easy as adding this tsconfig.json:

{
    "compilerOptions": {
        "module": "ES2022",
        "moduleResolution": "node",
        "target": "ES2020",
        "lib": ["ES2021", "DOM"],
        "allowSyntheticDefaultImports": true,
        "noImplicitAny": true,
        "preserveConstEnums": true,
        "sourceMap": false,
        "outDir": "scripts",
        "experimentalDecorators": true
    },
    "exclude": [
    ],
    "include": [
        "src"
    ]
}
#

then typing tsc watch

fathom hemlock
#

just do that: { "compilerOptions": { "module": "ES2020", "target": "ES2021", "moduleResolution": "Node", "allowSyntheticDefaultImports": true, "baseUrl": "./scripts", "rootDir": "./scripts", "outDir": "./scripts" }, "exclude": [ "node_modules" ], "include": [ "scripts" ] }

dusky flicker
#

how is that complicated?

dusky flicker
#

and its slow as hell compared

#

even swc is faster

steady canopy
#

Fake. You probably just don't know how to use it.

#

Never had problems w it

dusky flicker
#

configuring tsconfig is hell for me

steady canopy
#

2 years? That's beginner time bud

dusky flicker
fathom hemlock
#

guys are discussing about tsconfigs

steady canopy
#

lol

fathom hemlock
#

just write one cmd

#

and not change the entire settings

#

write the commands and let the file alone

steady canopy
#

with tsc you dont even need to type, just click terminal > run build task > tsc watch

fathom hemlock
#

why is entityHurt undefined?

#
  • I didn't test it *
distant tulip
#

i have no config for ts
i have a script that build and compile from my git folder to mc folder

#

do so

steady canopy
#

lol

fathom hemlock
#

the choosen line

dusky flicker
#

its simply better for me

#

since i hate configuring tsconfig

distant tulip
steady canopy
#

alr

fathom hemlock
distant tulip
#

there is no before event for that

steady canopy
fathom hemlock