#Script API General
1 messages Β· Page 85 of 1
will it still work in the same format i used?
it's just 400 lines of code
jeez
brooooooo what's this π
world.setDynamicProperty(`createbedrock:add_stress_units_${facingDirection}_${facedOppositeBlockLocation.x}_${facedOppositeBlockLocation.y}_${facedOppositeBlockLocation.z}`,
How else do i store data block-wise?
i mean ${} ${} ${} ${} ${}
also face-wise too
Do u not like it?
π
shorter and nicer than appending to string
?
i fear no man
but that thing... it scares me:
your code
just use JSON.stringify(facedOppositeBlockLocation)bruh
L M F A O
Nah that's gonna be slow
deserialize every tick?
for 100+ blocks?
Object.values(facedOpp......).join('_')
Hmm
Nah that aint simplistic
(my code is obv simplistic duh)
shortening the name?
like FOBLoc
XD
Nah in a week i'll forget what does that even mean
// FOBloc = facedOppositeBlockLocation
i ve seen it done in fh5 modding
i still have the issue
when i first place motor -> shaft it says RPM: 0 ... opposite RPM: 0
opposite RPM in that case should be some value
(which it becomes after i replace the shaft)
75% of your script is just setting dynamic properties
are 0 and -0 the same number?
Idk and idc, in that case the motor would need to be giving 0/-0
but motor gives some lets say 123
i'll send u vid
watch the log up top to see what i mean
(the log is all i got currently for knowing what happens)
obs just had some attack or sth
but this is what i got
also shaft texture is half broken but blockbench failed to export it correctly for some reason
wow, so less
for 2 blocks?
400 lines is very little
for 2 blocks bro
you should have at least 2,3K for 2 Blocks
lol
I have 3000 lines that give 0 content (it's just one file)
perfect
My pretty wave file
ik
no one beating me
How many megabytes?))
Keep dreaming
I see a serious opponent.
200kb on compressed zip
let me pull out my server addon
they re not big they re 300 lines each
And not in zip?
that's a whole crafting system
hahaha
So, what is the weight of the files?
depends, max: 500 min: 10
How is that?
more than 500 lines per file is crazy work
im too lazy to split up some files so i just put everything in one
damn. That's puny
Are these bytes?
For each of my blocks, I have 21 files, each with 16 states, and there's 9 blocks 
And the total weight?
My Largest addon got: (1.753.088 Bytes)
(including node_modules)
the main.js file from my stats addon is 500kb in size and it's about 9000 lines
good try, but no
damn
No, seriously, I use every single one of those files
lmao
I had to split each into a separate block, otherwise 1 block would be too much for the world
dw most code are auto generated, im not that insane i think
without jsDoc and comments?
I currently use up 20k permutations, and I'm adding 50 more textures to each type of block; tall_wedge, tall_corner_wedge, etc, panel, stairs,
Well, yes, it's so easy to count the number of comments in a 9000 line file.
Question: Why the hell do you need so many permutations?
A quick question: are u up to create 32 permutations for each block in create?
it's about 300kb if minified, mostly bc it's json content for mapping ids to textures and translation keys
wdym?
Each permutation is a different texture
And it uses vanilla textures, so it's completely texture pack compatible
did this in just 450 lines
In the create mod stuff rotates, and for each point in rotation it'd need permitation
You have 20 thousand textures?
that still a lot
allat just to not finishing the project and never posting the addon π π₯
No. Each block has 16 framed states, with the 4 cardinal traits
so that alone takes up 64 permutations
If I want to do it all in 1 block, it'd be way too much of a performance hit, and would actually use a lot more permutations
Oh yeah, that combination of the barrel texture and the grey background, perfect! (no)
Keep up the good work
its not even finished β_β
very performant tho, about 2ms latency i think
I can help when I'm finished updating my add-on @wheat condor if you want
i think it will never make to be posted, recreating all the minecraft crafting in a mod and editing them is a lot
How do you check that?
that actually impressive for json ui
Ye, but is doable
Wait, is it json UI?
Where did you get this graph from? By the way, it's cool that you have such an optimized code.
||using LeGend's ChestFormData||
debugger
its an extension
thank you
Did not know that was a thing
all json ui
I thought you were using the forms that JS has access to
oh
i AM using forms
I don't have much know how with JS forms xD
I would like to learn though
Seems interesting
they're like really limited
ye
they are good enough
its just actionFormData, and im using ChestFormData that is a class to display forms like a chest with clickable items
modalFormData too
my goal is to create an addon that makes minecraft feel like a new game more challenging and complex
How do you seek to accomplish that?
wait a second
btw, if you want to have a look at what I'm making, I can send you the curseforge link, or join VC later and I can show you how it works
Would u mind helping me to create the create mod port? it is very very complex
Or is that not what you want
Doesn't this feel like a new game?
Kinda. good biomes
You should ask the people that have done a lot for the port of it
Goofy was his name
basically java combat
if you want to see more i got new mob ai https://discord.com/channels/523663022053392405/1358836142438486239
Actually, lets take this out of here, since this is js chat
Okay i gave this messy ass code to claude ai
and it gave me some real nice code
YAAAAY
IT WORKS
Sorry for the terrible quality, i had to compress it for it to fit into 10mib
Just 23 hours of work over 2 days
Alr alr
How do i animate the thing tho?
I tried to transfer my javascript behavior pack from education edition over to bedrock edition and... well it's not going well
I'm getting errors like this
[Scripting][error]-Plugin [Box Scripts - 0.1.0] - [index.js] ran with error: [ReferenceError: Native function [World::getDimension] does not have required privileges. at <anonymous> (index.js:3)]
[Scripting][error]-Plugin [Box Scripts - 0.1.0] - [index.js] ran with error: [ReferenceError: Native function [World::sendMessage] does not have required privileges. at <anonymous> (index.js:2)]
Does anyone know how i fix that
put it in worldLoad afterEvent
aint that now system.afterEvents.startup ?
yeah I can't find any documentation on worldLoad
r u using 2.0.0-beta?
in the script api v2, scripts start as soon as the world starts loading, so if you think about it, when you run getDimension there is no dimension because world didnt load yet
yes
that one is for registering custom componnets or commands
so maybe via system.run
It's changing in 2.0.0
thanks
When calling API methods that potentially alters something in the world in a subscribed beforeEvent then it will throw an error because it's read only. In such cases you can handle it in the afterEvent if applicable or you can offset the execution at a later time, typically at the end of the same tick, or following tick. Most common way to do this is to create a function that can be called to execute the API methods and use system.run() to call that function.
also how do i make that flipbook texture to animate
i see thank you
This is great - thanks.
Does get closest biome find biomes in unloaded chunks or is it limited to aim distance + previously loaded?
idk
form.header('text')
like this β
Oh nice
Thx serty
Would you like any help expanding this?
450?? thats a lot
Not really
to make that it is
He's also using JSON UI too
cant you store vector3 in dynamic properties
How to cancel players turning item frames?
You can't
Can't you cancel playerInteractWithBlock event?
was about to say that
that doesnt detect item frames
oh bruh
No
world.beforeEvents.playerInteractWithEntity.subscribe((event) => {
if (event.block.typeId === "minecraft:frame") {
event.cancel = true;
}
});
It cancels the item frame from turning, but it also cancels adding items to the frame.
well duh
every time i try to get players using @a or @s in tick.json functions or in scripts it always returns "Player"
nevermind it's a problem with my internet and not being signed in...
100000 comments
is there a script resource for storing and tracking mob effects?
Nah it isnβt, it includes also all the ui patterns and options in abig json structured like object, and fully functional crafting
is this a good maze algorithm?
any suggestions?
still works
shifted it to 2000, 2000
looks good
are you able to dynamically choose to have more segments?
is there a way to make it so some custom commands are hidden if you don't have a specific tag?
Oh nice
yeah it's a branching maze
custom commands?
its a new thing in 2.0.0-beta
woah
Is it possible to run a check that an item is in the game before running a function
Or somehow have it set every item avail to a component
const despawnableMobs = [ "bat", "drowned", "glow_squid", "phantom", "bee", "allay", "fox", "cat", "goat", "tropicalfish", "panda", "pufferfish", "dolphin", "trader_llama", "wandering_trader", "turtle", "hoglin", "piglin", "piglin_brute", "sniffer" ]
world.afterEvents.entitySpawn.subscribe((event) => {
if (despawnableMobs.includes(event.entity.typeId)) {
Β event.entity.remove();
Β }
});
Why doesn't this despawn the given entities?
typeId will include the minecraft: prefix so it won't match, you should to typeId.replace("minecraft", "")
world load afterEvent maybe
Thats only the events to run after world loads which may be useful however it doesnt answer how to loop threw every item in game
If ppl know if where items are stored list array map ect maybe its possible but jdk
I want to put every item into an object to use for my ge
it's ```js
Dimension.getEntities({ type: "minecraft:item" });
Also whats all needed to earn the scripting role
Wait that gets all items in game including modded items
I think you can choose which roles you have somewhere
yes
however, if you want to test for specific items, you have to get the ItemStack component from the item first
I need to make it so my grand exchange can work without my itemComp dependency
I may need help porting that
Thats a 600 line file thats plugged in to my old pack i need to be able to use it as a standalone feature for my currency addon
damn
Alot went in to that to allow buying and selling acrossed logged in state of game
what
You can make buy or sell orders that will be fulfilled even if you log off game as long as someone buys it
I see, that's cool
I'm guessing it stores a dynamic property for when you log in and gives the money you received?
Yup to world using your player id
You need to claim it from ge
The issues however are
1 it uses that packs itemComp which are all the items that game uses which is an object
It uses a scoreboard currency
So i need to make it not dependent on that comp or add all items dynamicually to an itemComp in that project
And be coded to use my coins instead of scoreboard
Its alot and i could use a hand on it
I thought script chat would be most likely to know: there really is no way to define and iterate over ordered data in regular Molang except by using a bunch of conditionals ...right?
...I have a looong page of very silly looking code here...
oop accidently put a space on the script
what does this mean?
code
import { world} from '@minecraft/server'
world.beforeEvents.playerInteractWithBlock.subscribe(ph =>{
const item = ph.itemStack;
const block = ph.block;
if(ph.isFirstEvent && item && item.typeId == "ms:broken_mellohi" && block.typeId == "minecraft:jukebox")
{
console.log('hi')
const d = ph.block.dimension;
const l = ph.block.location;
d.playSound("sounds.broken_mellohi",l, { pitch: 1.0, volume: 1.0 });
}
});
wrap d.playSound() with system.run()
please use a bit more descriptive variable names
π
does entity.runCommand() require cheats on?
thanks
are you sure about this downvote?
Gega's variable names must be written in hex
I hope that Gega is not contributing to any OSS projects
OSS?
open-source software
Gega* be like
const ABB = AC.BB(BD)
β
hmm?
this code is unreadable
Gega still could read it
Once i tried to steal a code
and this code was..
well idk how to explain
but not even chat gpt were able to help me reading that
I asked on block general but nobody answers, how do i convert java model made of sub textures with multiple cubes into one png texture with bedrock model
not a script question though.
ask chatGpt if no one answers
or just be patient
Neko Waddup man
hello π
down to vc?
not atm, doing my TD script
nope
Can be done via script, but it's probably made with alot of json
interesting
Wont be that easy to do
try it with Bridge: https://bridge-core.app/
How the hell you know that π
You got that from kal'tsit
smart humans dont need explaining variable names
// [Kal'tsit Log - Rhodes Diagnostics Terminal v3.1]
// Hex-encoded variable names (for... reasons.)
const _6772656574696E67 = "Hello, "; // 'greeting'
const _746172676574 = "World!"; // 'target'
const _6D657373616765 = _6772656574696E67 + _746172676574; // 'message'
// Output result
console.log("[Rhodes Terminal] " + _6D657373616765);
// Kal'tsit's reaction
console.log("\n[Kal'tsit] You named your variables in hex.");
console.log("[Kal'tsit] The system is running, but barely. Memory integrity: 57%.");
console.log("[Kal'tsit] This is either brilliance... or sabotage.");
She would Code in Assembly
Damn. That's some insane obfuscation
Only the finest in the community.
I quite like it
Nah it's tactical variable coding (TVC)
why tho...
|| Comedy ||
entities, with nameable component always_show true
vanilla (no rp). or custom (require rp)
In gametest module, does the simulated player load chunks?
It should.
Alternatively, You can load chunks using ordinary custom entity and tick_world component
can I use tickingarea and remove it later via script right?
You can... but that'll require a command since there's not yet a native one.
Take note that the tickingarea also has a limit too.
anyone got a template for the custom command script?
I hope people do. It's a good way to protect their projects if they don't want others to take them
console.warn(weapon.typeId, weapon.getComponent('cooldown'), weapon.hasComponent('cooldown'))
-# "Great Script API" moment
What's wrong with this
Doesn't that just mean it returns en empty component
empty component = no component
What does "empty component" mean? Even if the component is empty (and it is not empty) it should return true because this item has it
Since it expects the component to be an object
In short, hasComponent is broken.
Hm
Hey so uhm how do i do the flipbook animations that are controlled by js (rotation stages: none, slow, medium, fast)?
You cant do that.
Well, if you make a million models, it will look similar.
Although it's better to just put an entity there
What does models have to do with anything?
if i define custom state of the block, how do i set default value for it or sth
oh
block.setPermutation(block.permutation.withState('wiki:my_state', 1))
thanks
i dont want to look rude but please dont give answers that probbably wont help

Yoo i think i know how
the worst is that if someone dont know what is doing probably will believe in you
It was sarcasm
{
"condition": "q.block_state('createbedrock:rotation_15') == true",
"components": {
"minecraft:geometry": "geometry.shaft_15"
}
},
{
"condition": "q.block_state('createbedrock:rotation_30') == true",
"components": {
"minecraft:geometry": "geometry.shaft_30"
}
},
{
"condition": "q.block_state('createbedrock:rotation_45') == true",
"components": {
"minecraft:geometry": "geometry.shaft_45"
}
},
{
"condition": "q.block_state('createbedrock:rotation_60') == true",
"components": {
"minecraft:geometry": "geometry.shaft_60"
}
},
{
"condition": "q.block_state('createbedrock:rotation_75') == true",
"components": {
"minecraft:geometry": "geometry.shaft_75"
}
},
then i switch them using script
every tick
Just use entities
that's gonna be laggy
Setting a property on an entity once is less laggy than setting a property on a block every tick
+this will make the animation smoother
animations
dynamic speed?
Possible.
yes, just use entity properties and sync them with the client
how would i implement the entity rotation thing though for concise answer with what to e.g. set speed to -67 rpm or 213 rpm
And if you are going to use block properties, don't create 100500 properties from Boolean instead of just storing a number in one property.
well that's smart
Thats just math. Learn entity animations first to figure out how to rotate it at a set rpm, then make it a variable.
You can ask in #1067869022273667152 how to use entity properties in animations, and then just set the property to the entity via entity.setProperty('name', 'value')
Also, are you using custom components V2?
Y
Can be optimized
q.life_time*q.property('id') in any axes you want
Then I recommend you create a component that binds an entity to a block, and removes it if the block is broken, etc.
Your 2.147b limit wont stop me from flawlessly making a currency system to far exceep it take that mojang
1000 blocks with a custom component that is called every tick is by definition not optimized
now make that 1000 entities
You can optimize the appearance of entities
And make them less than 1000 by 1000 blocks
brb
In any case, it's up to you, I just suggested it as one of the ways. And you 100% will have to take great care of optimization if you want 1000 such blocks not to lag
does anyone have the same issue where reload all doesn't work because of permission level issue? im operator... doesn't show any other options to raise it
since last update mostly
yes, I found out the way to fix this
if you trigger .setOp(true) it fixes it, I just made it trigger when I clicked a stick
use dynamic properties
they have much higher limits
ooo ok ty
No need i did something better and realistic
I used an item
Or items
Aka coins physical holdable currency
works great! thanks a quiick fix !
@sterile epoch hey did you sleep well
no
Oh dope
Now all we need is the grand exchange

Wanna help with that
sure in like 30 mins or sum
Ok just let me know
@sterile epoch i dmed you btw
THEY ADDED CUSTUMIZED SUPERFLATS!!!!!!
Does system.beforeEvents.shutdown fire when /reload is executed
yeah with /reload all i think
whatβs the difference between /reload and /reload all
/reload all reloads the world
let test = new ModalFormData()
test.title("Test")
test.dropdown("test", ["one", "two", "three"], 2) // Function argument [2] //expected type: ModalFormDataDropdownOptions | undefined
test.show(player).then((r) => {
if (r.cancelationReason == "UserBusy") {
testText(player)
} else {
console.warn(r.formValues[0])
}
})
}```
basically it keeps not letting me set the default value of modalformdata. how would I fix this
btw I have to drive an hour to help someone, so might take a minute to answer any question
I keep recieving this error every tick and I don't know how to fix it
``[Scripting][error]-TypeError: cannot read property 'getComponent' of undefined at <anonymous> (cooldown_timers.js:19)`
import { system, world } from "@minecraft/server";
world.afterEvents.entityHitEntity.subscribe(({ damagingEntity: player }) => {
if (player.typeId !== "minecraft:player") return;
const item = player.getComponent("equippable").getEquipment("Mainhand");
if (!(item.typeId.includes("battleaxe") || item.typeId.includes("echo_warhammer"))) return;
const cooldown = item.getComponent("cooldown");
const ticksLeft = cooldown.getCooldownTicksRemaining(player);
if (ticksLeft == 0) cooldown.startCooldown(player);
})
system.runInterval(() => {
for (const player of world.getAllPlayers()) {
const item = player.getComponent("equippable").getEquipment("Mainhand");
const cooldown = item.getComponent("cooldown");
const ticksLeft = cooldown?.getCooldownTicksRemaining(player) ?? 0;
//Battleaxes
if (item.typeId.includes("battleaxe")) {
if (cooldown.cooldownTicks >= ticksLeft - 1) { player.runCommand("function battleaxe_sfx") }
if (ticksLeft > 0) {
player.addEffect("weakness", 3, { showParticles: false, amplifier: 255 });
}
}
//Thunder Staff
if (item?.typeId === "genb10:thunder_staff" && player.isSneaking) {
if (cooldown.cooldownTicks >= ticksLeft - 1) { player.runCommand("function thunder_staff") }
}
//Echo Warhammer
if (item?.typeId === "genb10:echo_warhamer") {
if (cooldown.cooldownTicks >= ticksLeft - 1) { player.runCommand("function echo_warhammer") }
if (ticksLeft > 0) {
player.addEffect("weakness", 3, { showParticles: false, amplifier: 255 });
}
}
}
})
anyone know how to fix it?
// Issues here
player.getComponent("equippable").getEquipment("Mainhand")
You need to verify that the player has an item in their main hand by checking if item is undefined or not, before trying to get a component for the item.
is there a way to make a player not take fall damage but only if a condition is ment
Edit the player.json file.
no that would make it perm it needs to be depending on a dynamic property
basicually if they wear full diamond they get a dynamic property that lets them not take fall damage
Does my behavior manifest look correct? Or is it missing something?
{
"format_version": 2,
"header": {
"name": "Minigames BP",
"description": "Super epic minigames",
"uuid": "fbcc63f0-3127-4e46-9800-e5740ffe203d",
"version": [
1,
0,
0
],
"min_engine_version": [
1,
20,
80
]
},
"modules": [
{
"type": "data",
"uuid": "fdbb01d8-aa61-4321-be91-a2c9fca6607e",
"version": [
1,
0,
0
]
},
{
"description": "Scripting module",
"type": "script",
"uuid": "7feae44b-34d9-4322-b774-f8a4de2fdece",
"version": [
0,
0,
1
],
"entry": "scripts/main.js"
}
],
"dependencies": [
{
"uuid": "98f4459d-f3d1-4ea6-9497-b7f254bc5f0e",
"version": [
1,
0,
0
]
},
{
"module_name": "@minecraft/server",
"version": "1.11.0-beta"
},
{
"module_name": "@minecraft/server-ui",
"version": "1.1.0"
}
]
}
player.json, disable/enable the fall damage with an event defined in the player.json and trigger it when the player has full diamond
are you on latest version of minecraft? you should be using 1.19.0 version of server module
or 2.0.0-beta if you need beta stuff
Sorry I sent the incorrect manifest, here it is
{
"format_version": 2,
"header": {
"name": "Peakness BP",
"description": "Straight peak",
"uuid": "e56c2196-e745-4dc6-98da-d9f0d09446d3",
"version": [
1,
0,
0
],
"min_engine_version": [
1,
21,
50
]
},
"modules": [
{
"type": "data",
"uuid": "db32f58d-78bc-4658-8c45-84314290dd5b",
"version": [
1,
0,
0
]
},
{
"description": "Scripting module",
"type": "script",
"uuid": "7feae44b-34d9-4322-b774-f8a4de2fdece",
"language": "javascript",
"version": [
0,
0,
1
],
"entry": "scripts/main.js"
}
],
"dependencies": [
{
"module_name": "@minecraft/server",
"version": "1.13.0"
},
{
"module_name": "@minecraft/server-ui",
"version": "1.3.0"
}
]
}
I didnt know a script can effect player.json
the version is still outdated, but it should work
unless you intended it
min_engine_version?
it doesn't edit it, just triggers an event that adds a component group with a damage_sensor component
or minecraft/server
How do i write that
they are not suggesting scripts
you use the damage sensor component with filters
well if the pack is for latest version(1.21.80+) only, then yeah
its outdated
both
It can test that you have full dosmond?
updated to 1.19.0 and min engine version to 1,21,80 and it is still not working
do i have dependencies incorrect?
Here is my resource manifest as well
{
"format_version": 2,
"header": {
"name": "Peakness RP",
"description": "Straight peak",
"uuid": "2daa78c9-ddb1-4602-9d90-46cf393d70a5",
"version": [
1,
0,
0
],
"min_engine_version": [
1,
21,
80
]
},
"modules": [
{
"type": "resources",
"uuid": "81d12a5c-02ba-4d67-9c82-3dc7fbb5dcbf",
"version": [
1,
0,
0
]
}
]
}
Actually confuzzled
"minecraft:damage_sensor": {
"triggers":{
"cause": "fall",
"damage_modifier": 0
}
}
}``` this in components group where do i trigger it
"deals_damage: "no"
-# or false depending on what format version
get rid of the modifier.
just keep it in the main components and just use filters directly in the component.
You dont even need compinent groups. Just use filters to test when to negate damage. No scirpting.
at this point, try jsom validators in google
The JSON is valid, maybe my manifests are correct but I'm missing a core file in my behavior/resource pack?
...wait
this is all I have
uh
which I suggested
i think you have resources as dependency in resource pack
which is why its probably not working
Where do i add the filter
in the damage sensor component within triggers.
Im not seeing any way to add a filter into that component
sleep deprivation is hitting way too hard rn
look at the docs.
does the resource manifest need dependencies?
"minecraft:damage_sensor": {
"triggers":[
{
"cause": "fall",
"deals_damage": false
}
]
},
inside of triggers, you can use a filter.
within on_damage
well its not required but if youre making an addon that needs both rp and bp, then yeah you should add behavior pack as dependency for your resource pack
and vice versa
i still dont know the actual reason why its not working, sorry
Okay yeah everything just mysteriously started working so
Just going to assume a bit flipped in my computer or something i don't know
welcome to addon development!
everything can stop and start working mysteriously out of nowhere
(and its painful)
None of the filters says anything about player equipment
dude
I sent you a doc to the filter
Not a dude
Thank you for the help at least, I needed the versions changed so
yw
you can scroll up and use the link I sent you.
im looking and i still dont understand as in filters there is no has_equipment the docs are not as straight forward as you think
you should move to #1067869022273667152 since this is no longer a script thing.
it shouldnt be that hard moving for this is rather pointless but the docs are useless
how are you concluding that there's no has_equipment
In the filter for damage sencer trying to do it throws error
all_of
i did that has same option
ill send you a doc to learn how to setup filters.
is there a native function for camerashake command?
no
Ty
requires more.
define the domain and the value which will be the item id.
you'll see the domain values in the doc.
"triggers":[
{
"on_damage": {
"filters": [
{
"all_of": [
{
"test": "has_equipment",
"value": "diamond_leggings",
"domain": "armor"
},
{
"test":"has_equipment",
"value": "diamond_helmet",
"domain": "head"
},
{
"test":"has_equipment",
"value": "diamond_boots",
"domain": "feet"
},
{
"test":"has_equipment",
"value": "diamond_leggings",
"domain":"leg"
}
]
}
]
},
"cause": "fall",
"deals_damage": false
}
]
}```
hold on that was meant to be chestplate
make that torso.
or torso ok
"triggers": [
{
"on_damage": {
"filters": [
{
"all_of": [
{
"test": "has_equipment",
"value": "diamond_chestplate",
"domain": "torso"
},
{
"test": "has_equipment",
"value": "diamond_helmet",
"domain": "head"
},
{
"test": "has_equipment",
"value": "diamond_boots",
"domain": "feet"
},
{
"test": "has_equipment",
"value": "diamond_leggings",
"domain": "leg"
}
]
}
]
},
"cause": "fall",
"deals_damage": false
}
]
},```
not the order I would put it in, but yeah.
i still take fall damage in full diamond tho
any error
no
are you positive? whats your format version
have you tried with mineraft:diamond_chestplate and similar? Dunno if that would do anything or not
Probably doesn't do anything, then
I was thinking that but I thought that wouldnt matter
Doesn't hurt to try, ig
ive used it witout the namespace
yeah.
I swore using filters in on_damage would go with the properties for damage sensor.
I also see other people doing it too
I wonder if its a deeper issue on player.json
Because if damage sensor worked but filter didnt wouldnt i take no damage from fsll at all
thats true.
it should still trigger.
maybe something is wrong with the filter
doing this worked for me:
"minecraft:damage_sensor": {
"triggers": [
{
"on_damage": {
"filters": [
{
"all_of": [
{
"test": "has_damage",
"value": "fall"
},
{
"test": "has_equipment",
"value": "diamond_chestplate",
"domain": "torso"
},
{
"test": "has_equipment",
"value": "diamond_helmet",
"domain": "head"
},
{
"test": "has_equipment",
"value": "diamond_boots",
"domain": "feet"
},
{
"test": "has_equipment",
"value": "diamond_leggings",
"domain": "leg"
}
]
}
]
},
"deals_damage": false
}
]
}
guys can someone hepl it no working
// Quantum calculator powered by vibes
function calculate(a, b) {
if (a = b) { // Oops: assignment, not comparison
return "same same but different";
}
let result = a + b - "banana"; // NaN time
console.log("Calculating result:", result);
try {
result **= "π¦"; // unicorn-powered exponentiation
} catch (e) {
alert("Math broke. Send help. π");
}
return result ?? maybeDefinitelyUndefinedProbably;
}
const output = calculate("5", [1, 2, 3]);
document.body.innerHTML = <marquee>${output}</marquee>; // bring back the 90s
so without has_damage for you didnt work?
It did not
thats weird.
it dont displae ore ui like it siad it wuld
It cancelled all damage with the "cause": "fall" weirdly enough
uh
use const
yw
ore ui only takes leibniz equations, sorry
what error??
if its working for herobrine, you are doing something wrong on your end
make sure you saved properly
Its def my player.json i tested a feature i know works and nope
ummm thats not script api
princess is aware, I suggested to go to entities.
Omfg if it was due to this comma ill scream
I do
And no it didnt player.json is somehow not loaded
Is 1.21.0 still a valid format version
yes
Idk what else it is i tried changing values the player.json is essentually not loaded
I checked the pack file to just to be sure and its there minecraft is just notbloading it at all
Some do, to avoid innovative/complex work getting quickly ripped off I guess. Marketplace is kinda full of that thing (but it's harder to rip off complex beautiful structures and get away with it, than the code behind the scenes). I've seen worse. I assume they don't actually code in it unless they're insane, this would be done before delivery.
Sadly, the International Obfuscated JavaScript Code Contest doesn't appear to be running any more. That was true art. Happily, there's still mind-bending examples in that and many other languages to marvel at.
nope, the add-on won't even attempt to load the scripts if the manifest.json specifies a beta version and the toggle isn't enabled
make sure there are no syntax errors there
send it as .json
i changed format version to test did not fix
how do i get discord to do that
drag and drop the file into discord
thats conserning
so I can't use VSCode
i dont see any either
did you open it in vscode
check the content error log
Omfg im an idiot i fixed it
So because bridge gives all my packs a player.json i was over riding it
If i want a pack to add to another packs player.json without over riding it how do i do that
look at my parrot
you can't, you have to merge them together manually
you could have just modified pig.json to do that lol
also I have already done that before
Except mine also allows you to make things like experience orbs, ender dragons, armor stands, and players ride you too (you can let anything ride anything).
that wasnt the point that was not what the goal was that was a test
bump
actually, i might just make a post
Can anyone help me with this?
import { world } from "@minecraft/server";
const commandPrefix = "!";
async function handleCommand(command, args, player) {
const dimension = player.dimension;
switch (command) {
case "balance":
await dimension.runCommandAsync(`tellraw "${player.name}" {"rawtext":[{"text":"Β§c${player.name}Β§b's balance: ","score":{"name":"${player.name}","objective":"money"}}]}`);
break;
case "test":
await dimension.runCommandAsync(`say test`);
break;
default:
await dimension.runCommandAsync(`tellraw "${player.name}" {"rawtext":[{"text":"Β§4Unknown command: Β§f${command}"}]}`);
}
}
world.beforeEvents.chatSend.subscribe((event) => {
const { message, sender } = event;
if (message.startsWith(commandPrefix)) {
event.cancel = true;
const args = message.slice(commandPrefix.length).trim().split(/\s+/);
const command = args.shift().toLowerCase();
handleCommand(command, args, sender);
}
});
2.0.0 beta
and what help do you need
Everytime I type "!test" it's days error
Says*
I'm making a custom command if I type "!p <page>" every page triggers a function from mc command /function
W8
[Scripting][error]-Unhandled promise rejection: TypeError: not a function at handleCommand (main.js:13)
Β Β at <anonymous> (main.js:27
)
So just dimension.runCommand?
yeah
I'll try
[Scripting][error]-Unhandled promise rejection: ReferenceError: Native function [Dimension::runCommand] does not have required privileges. at handleCommand (main.js:13)
at <anonymous> (main.js:27)
you have to wrap it in a system.run(() => {})
also I recommend using a custom slash command instead
Did u use @minecraft/server-admin?
.
Nvm got it
why doesnt the block update its neighbours when destroyed
Its such a great feeling when something just a few days ago you had no clue how to build is working flawlessly
All i do is copy paste from gpt I'm such a noob TvT
function handleCommand(command, args, player) {
const dimension = player.dimension;
system.run(async () => {
// Check if admin
const result = await dimension.runCommand(tag "${player.name}" list);
let hasAdminTag = false;
if (result.statusCode === 0) {
const match = result.statusMessage.match(/tags:\s*(.*)/);
if (match && match[1]) {
const tags = match[1].split(",").map(tag => tag.trim());
hasAdminTag = tags.includes("admin");
}
}
Is this right?
What does the documentation tell you?
https://stirante.com/script/server/
plug it in to chatgpt and it will simple decode it
I'm giving up
Fair
Gpt isn't good at this
I knowΒ².. i already got my code working only one problem is having error when already got admin tag somthin
Can you send your full code?
I'll be able to help in 5mins
In here?
Nah, I see you made a thread
Thanks can i ask if there's any bots runs the code if theres an error smthin
Yes, in #debug-playground
Idk how to use it tho
Thereβs a short guide here https://jaylydev.github.io/posts/jaylybot/#script-api-debugger
we need event trigger right click
as long as you know your logic chatgpt is good, the more specific you are the better the result
in terms of scripting that is, but when comes to jsons files like the entities and blocks, it gets most stuff wrong
bump
world.beforeEvents.itemUse.subscribe(event => {
const player = event.source
const item = event.itemStack
if (!item || item.typeId !== "minecraft:compass") return
const riding = player.getComponent("riding")?.entityRidingOn
if (!riding || riding.typeId !== "test:riding_entity") return
const tags = riding.getTags()
if (tags.includes("ride_1")) {
player.runCommand("execute if entity @e[type=test:riding_entity,tag=ride_1] run event entity @e[type=test:riding_entity,tag=ride_1] ride_2")
} else {
player.runCommand("execute if entity @e[type=test:riding_entity,tag=ride_2] run event entity @e[type=test:riding_entity,tag=ride_2] ride_1")
}
})
What is wrong here?
Error in line with first player.runCommand
Thatβs a beforeEvents. Wrap your functions inside a system.run
Thank you
If im seperating my rpg packs up should i also make a seperate pack for quests
Wait ill need to unless the quest only uses that skills level
is it possible to make an alternative for is_in_village filter using scripts?
i had to replace the environmental_sensor ,now I can't detect villages to trigger raids
i heavily reccommend claude ai
what's the dofference though they're almost all the same
wouldn't chatgpt or deepseek can do that to?
I think what matters is the data they were trained and the dellivery of the data requested
chatgpt has length limits lower
onPlayerInteract
that wouldn't work on air right?
someone explain why the menu shows up twice ples
Commands.instance.registerCommand(
"cape",
"Switch your cape",
"",
undefined,
1,
null,
({ sender }: { sender: CustomPlayer }) => {
const availableCapes = Capes.getCapeListForPlayer(sender);
const form = new ActionFormData();
form.title(`${mainConfig.mainColor}Β§oCapes`);
// "None" cape should always be shown first
form.button(availableCapes[0].displayName || availableCapes[0].identifier);
form.divider();
form.label("Β§9Teams Capes");
// team capes
const teamCapes = availableCapes.slice(1).filter((cape) => cape.lockToFaction);
teamCapes.forEach((cape) => {
form.button(cape.displayName || cape.identifier);
});
form.divider();
form.label("Β§9Other Capes");
// rank-based etc.
const otherCapes = availableCapes.slice(1).filter((cape) => !cape.lockToFaction);
otherCapes.forEach((cape) => {
form.button(cape.displayName || cape.identifier);
});
const runId = system.runInterval(async () => {
const response = await form.show(sender.player);
if (!(response.cancelationReason === FormCancelationReason.UserBusy)) {
system.clearRun(runId);
if (response.canceled || response.selection === undefined) {
return;
}
const selectedCape = availableCapes[response.selection];
if (selectedCape) {
sender.player.setProperty("ultra:cape", selectedCape.identifier);
const capeName = selectedCape.displayName || selectedCape.identifier;
if (selectedCape.identifier === "none") {
sender.player.sendMessage(`Β§9Your cape has been deactivated.`);
} else {
sender.player.sendMessage(`Β§bCape set to: ${capeName}`);
}
}
}
});
}
);
Could someone tell me how to fix this? My menu has disabled buttons
Probably a visual bug or some resource pack is getting into your way
Diagnose my code next plz
Hm
In system.runInterval, you're attempting to pause it using await <Promise>. But that simply doesn't work cus runInterval just runs regardless if the promise is resolved or not
yea
so
bascially
im watching this video
and he says to put "theses lines"
and it look like this
l l
idk what it is
or how to place them
look like 2 l
i'm resolving the promise because form.show returns a promise
you mean these? ||
The issue is that runInterval does not wait until that promise is resolved. So when the form.show() is initially called, the next tick, another form.show() is called.
Right
You might want to use an available forceShow to see how it works. There's reason its using custom interval like while (true) instead of the built-in system.runInterval
i used herobrine's last time I tried something like this and it did use system.runInterval
I remember hearing a while ago that mojang is changing the way permissions work, is this true?
Probably because he knows what he's doing.
The point of using runInterval from what I interpret from your code, is so it could try to show the form until it was successful.
Are you saying I don't know what I'm doing
I take disrespect in that
So, you know what you're doing? Okay, you must be good then π
Indeed I am
Instead of runInterval to tries to attempt and force the form, its commonly done like this:
async function forceShow(player,ui) {
while (true) {
const respond = await ui.show(player);
if (respond.cancelationReason !== "UserBusy")
return respond;
}
}
In your code, you can potentially do it like these:
const r = await forceShow(player,ui);
or
forceShow(player,ui).then(r=>{})```
That's my diagnosis while Im typing this on my phone at 1 AM midnight π
Sorry, got too hooked up on a stranger getting offended.
Maybe check this link:
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Logical_OR
The logical OR (||) (logical disjunction) operator for a set of operands
is true if and only if one or more of its operands is true. It is typically used with
boolean (logical) values. When it is, it returns a Boolean value. However,
the || operator actually returns the value of one of the specified
operands, so if this operator is used with non...
First line of this message was NOT necessary
alr lets not
? what line
average script beef forming
I remember hearing a while ago that mojang is changing the way permissions work, is this true?
Idk why you even bothered to say something that you hopefully clearly knew could potentially offend someone
just ignore the dude
Anyway I already implemented my own fix
const _ = () =>
form.show(sender.player).then((response) => {
if (!(response.cancelationReason === FormCancelationReason.UserBusy)) {
world.sendMessage("show success");
if (!(response.canceled || response.selection === undefined)) {
const selectedCape = availableCapes[response.selection];
if (selectedCape) {
sender.player.setProperty("ultra:cape", selectedCape.identifier);
const capeName = selectedCape.displayName || selectedCape.identifier;
if (selectedCape.identifier === "none") {
sender.player.sendMessage(`Β§9Your cape has been deactivated.`);
} else {
sender.player.sendMessage(`Β§bCape set to: ${capeName}`);
}
}
}
} else {
world.sendMessage("show fail");
_();
}
});
system.run(_);
Yes
I'm either unconsciously rage-baiting or sleepy lol
sorry
It's alright
they removed isOp in the script api
I meant like a new permissions system
it relates to custom command permission level
For custom commands? yeah, there's an Enum on the microsoft doc iirc
Let's be real the probability of getting an answer to your minecraft inquiries in any of the other channels in this server are low compared to this one
I know about that
I also sometimes find myself attempting to sneak in a few questions clearly not related to scripts in here
fr lol
people in this channel just know shit
Documentation for @minecraft/server
I know about that, I was asking about a different thing
im not aware of what you are speaking of then.
mb
Someone said that mojang was changing the way permissions work in bedrock
all good, no worries
real.
The behaviour channel is the probably the most barren one
what permissions
and you believed them
I am curious though
yes
I can't find the message but I know someone said it at one point
I mean I js wanted to see if anyone knew more about that
I just sent them that.
forgot to *reply
gega.

lol
I
sent that
.
Im so used to microsoft docs, other docs feel weird π
perhaps the person thought they were changing it, when they saw this.
okay
ngl the ms docs are so ass
Perfect. I also made trash addons π
such as?
The addon I made π
which is?

._.
yo @random flint
import { PlayerInteractWithBlockAfterEvent, PlayerInteractWithEntityAfterEvent, system, WeatherType, world, Entity, EntityTypes, ItemStack } from "@minecraft/server";
import { ActionFormData, MessageFormData } from "@minecraft/server-ui";
import "cc.js";
world.beforeEvents.playerBreakBlock.subscribe(data => {
const player = data.player
world.sendMessage('Poof! ${player.name} broke a block!')
})
world.beforeEvents.chatSEnd.subscribe(data => {
const message = data.message;
const sender = data.sender;
const prefix = '!';
const rankTags = sender.getTags().filter(tag => tag.startsWith('rank:'));
const formattedRanks = rankTags.length > 0
? rankTags.map(tag = tag.replace(/(rank:)/, ' '))
: [ 'Β§bMember' ];
if (message.startsWith(prefix)) return; {}
data.cancel = true
world.sendMessage('[ ${formattedRanks} ] ${sender.name}: ${message}')
})
world.beforeEvents.chatSEnd.subscribe(data => {
const sender = data.sender;
const message = data.message;
const prefix = '!';
if (message === '${prefix}spawn') {
data.cancel = true
system.run(() => {
sender.teleport({ x: -7, y: 65, z: -7 });
sender.sendMessage("Β§aTeleported To Spawn Location!");
})
} else if (message === '${prefix}gmc' || message === '${prefix}gmc') {
if (!sender.hasTag("admin")) {
data.cancel = true;
sender.sendMessage("Β§gYou do not have permissions to run this command!");
} else {
data.cancel = true;
const gameMode = message === '$(prefix)gmc' ? "creative" : "survival";
system.run(() => {
world.getDimension('overworld').runCommand('gamemode ${gamemode} ${sender.name}');
sender.sendMessage('Β§aGamemdoe set to ${gameMode} sucessfully!');
});
}
}
})
its not working
damn
damn
#pocketedition #bedrock #minecraft #timestop #jojoreference #commandblock
yeah its use command blocks
no addons or mods being used
just wana tell you, it can save the velocity of the arrow you shot in time stop.
dont subscribe i dont have good content
wall of text
Thats a command not addon lol
please make this a code block with js syntax highlighting
I was gonna say that
it makes 10x easier to read
it does
import { ActionFormData, MessageFormData } from "@minecraft/server-ui";
import "cc.js";
world.beforeEvents.playerBreakBlock.subscribe(data => {
const player = data.player
world.sendMessage('Poof! ${player.name} broke a block!')
})
world.beforeEvents.chatSEnd.subscribe(data => {
const message = data.message;
const sender = data.sender;
const prefix = '!';
const rankTags = sender.getTags().filter(tag => tag.startsWith('rank:'));
const formattedRanks = rankTags.length > 0
? rankTags.map(tag = tag.replace(/(rank:)/, ' '))
: [ 'Β§bMember' ];
if (message.startsWith(prefix)) return; {}
data.cancel = true
world.sendMessage('[ ${formattedRanks} ] ${sender.name}: ${message}')
})
world.beforeEvents.chatSEnd.subscribe(data => {
const sender = data.sender;
const message = data.message;
const prefix = '!';
if (message === '${prefix}spawn') {
data.cancel = true
system.run(() => {
sender.teleport({ x: -7, y: 65, z: -7 });
sender.sendMessage("Β§aTeleported To Spawn Location!");
})
} else if (message === '${prefix}gmc' || message === '${prefix}gmc') {
if (!sender.hasTag("admin")) {
data.cancel = true;
sender.sendMessage("Β§gYou do not have permissions to run this command!");
} else {
data.cancel = true;
const gameMode = message === '$(prefix)gmc' ? "creative" : "survival";
system.run(() => {
world.getDimension('overworld').runCommand('gamemode ${gamemode} ${sender.name}');
sender.sendMessage('Β§aGamemdoe set to ${gameMode} sucessfully!');
});
}
}
}) ```
with js tag
why send it again
import { PlayerInteractWithBlockAfterEvent, PlayerInteractWithEntityAfterEvent, system, WeatherType, world, Entity, EntityTypes, ItemStack } from "@minecraft/server";
import { ActionFormData, MessageFormData } from "@minecraft/server-ui";
import "cc.js";
world.beforeEvents.playerBreakBlock.subscribe(data => {
const player = data.player
world.sendMessage('Poof! ${player.name} broke a block!')
})
world.beforeEvents.chatSEnd.subscribe(data => {
const message = data.message;
const sender = data.sender;
const prefix = '!';
const rankTags = sender.getTags().filter(tag => tag.startsWith('rank:'));
const formattedRanks = rankTags.length > 0
? rankTags.map(tag = tag.replace(/(rank:)/, ' '))
: [ 'Β§bMember' ];
if (message.startsWith(prefix)) return; {}
data.cancel = true
world.sendMessage('[ ${formattedRanks} ] ${sender.name}: ${message}')
})
world.beforeEvents.chatSEnd.subscribe(data => {
const sender = data.sender;
const message = data.message;
const prefix = '!';
if (message === '${prefix}spawn') {
data.cancel = true
system.run(() => {
sender.teleport({ x: -7, y: 65, z: -7 });
sender.sendMessage("Β§aTeleported To Spawn Location!");
})
} else if (message === '${prefix}gmc' || message === '${prefix}gmc') {
if (!sender.hasTag("admin")) {
data.cancel = true;
sender.sendMessage("Β§gYou do not have permissions to run this command!");
} else {
data.cancel = true;
const gameMode = message === '$(prefix)gmc' ? "creative" : "survival";
system.run(() => {
world.getDimension('overworld').runCommand('gamemode ${gamemode} ${sender.name}');
sender.sendMessage('Β§aGamemdoe set to ${gameMode} sucessfully!');
});
}
}
})
There
change to .chatSend
more wall of text
what is chatSEnd
new event just dropped
lol
Also It would help if you told us what part of it does not work
this one is no longer beta
So we know what part we should look at
when im typing in game
it doesnt pop up as member
Turn on content log in the setting creator tab
bruh...
bruh what?
I was joking
how is that a joke, lol
I got minato's joke but the beta joke did not make sense
are we deadass
sometimes there's a miss, its fine bro
i mean, if he didn't see the follow up you will find him latter saying that he heard it from one guy
r u slow
I said "this one"
whatever ion even care
yea
ah yes, im slow because I didnt like your joke
I like your joke π
ok we get the point
import { PlayerInteractWithBlockAfterEvent, PlayerInteractWithEntityAfterEvent, system, WeatherType, world, Entity, EntityTypes, ItemStack } from "@minecraft/server";
import { ActionFormData, MessageFormData } from "@minecraft/server-ui";
import "cc.js";
world.beforeEvents.playerBreakBlock.subscribe(data => {
const player = data.player
world.sendMessage('Poof! ${player.name} broke a block!')
})
world.beforeEvents.chatSEnd.subscribe(data => {
const message = data.message;
const sender = data.sender;
const prefix = '!';
const rankTags = sender.getTags().filter(tag => tag.startsWith('rank:'));
const formattedRanks = rankTags.length > 0
? rankTags.map(tag = tag.replace(/(rank:)/, ' '))
: [ 'Β§bMember' ];
if (message.startsWith(prefix)) return; {}
data.cancel = true
world.sendMessage('[ ${formattedRanks} ] ${sender.name}: ${message}')
})
world.beforeEvents.chatSEnd.subscribe(data => {
const sender = data.sender;
const message = data.message;
const prefix = '!';
if (message === '${prefix}spawn') {
data.cancel = true
system.run(() => {
sender.teleport({ x: -7, y: 65, z: -7 });
sender.sendMessage("Β§aTeleported To Spawn Location!");
})
} else if (message === '${prefix}gmc' || message === '${prefix}gmc') {
if (!sender.hasTag("admin")) {
data.cancel = true;
sender.sendMessage("Β§gYou do not have permissions to run this command!");
} else {
data.cancel = true;
const gameMode = message === '$(prefix)gmc' ? "creative" : "survival";
system.run(() => {
world.getDimension('overworld').runCommand('gamemode ${gamemode} ${sender.name}');
sender.sendMessage('Β§aGamemdoe set to ${gameMode} sucessfully!');
});
}
}
})
slow
how about make a post
Turn on the content log in the creator, Minecraft settings. It will show an error for easier debugging. Or maybe open a post for someone who really wants to help show up.
-# What a nice sky I have right now. Too bad it's 1 AM midnight for me.π
also might as well migrate to custom commands instead of chatsend.
both are in beta
it still chatSEnd
the code you sent doesnt reflect that
It has its own limitations
and what are these limitations that would lead you to use chatSend instead?
both have unique pros and cons
Well, custom command is good for basic commands. And helps show what argument should be filled. And what it does from the description.
You can't really change the enum dynamically or have subcommands. typing spaces on the string argument require you to type quotation marks "bob fish"
ChatSend is more the freedom alternative. Thought it would lack the tooltip or autocompletion.
how can i get the highest score in the scoreboard using scripts?
idk
get the objective and use the getScores method.
Documentation for @minecraft/server
like this?
import { system, world } from "@minecraft/server";
world.afterEvents.entityDie.subscribe(event => {
if (event.deadEntity.typeId !== "minecraft:warden") return;
const player = event.damageSource.damagingEntity;
if (player?.typeId !== "minecraft:player") return;
player.runCommand("scoreboard players set @s wardenDefeated 1")
})
system.runInterval(() => {
let setWardenDead = 0;
for (const player of world.getAllPlayers()) {
if (player.getScores(wardenDefeated) > setWardenDead) {
setWardenDead = 1
}
}
})
that's not a method on the player class.
also is there an after event or something to check when food is eaten
and check what it was if possible
yeah.
world.afterEvents.itemCompleteUse
Documentation for @minecraft/server
thanks
i need some ideas ```// cobblestone
// - common: stone table, gravel, gem table
// - uncommon: iron nugget, gold nugget
// - rare: diamond
// - lore: lost lore
// red sand
// - common: cactus, terracotta (random mesa colors 1β25)
// - uncommon: bones, sand table
// clay
// - common: bricks, flower pot
// - uncommon: slimeball, ink sac
// - rare: painting
// - legendary: ancient pottery loot table
// cobbled deepslate
// - common: coal, cobblestone
// - uncommon: redstone dust, lapis
// - rare: amethyst shard
// - legendary: echo shard
// soul sand / soul soil
// - common: bone
// - uncommon: nether wart
// - rare: ghast tear, soul torch, dried ghast
// - legendary: wither skeleton skull, soul relic
// podzol
// - common: sapling table
// mycelium
// - common: mushroom table
// - legendary: mooshroom spawn egg
// mud
// - common: clay ball, dirt
// - uncommon: wheat seeds, fern
// - rare: leather
// - legendary: muddy pig spawn egg, swamp totem
// moss_block
// - common: moss carpet, azalea
// - uncommon: glow berries, vines
// - rare: spore blossom
// - legendary: flowering azalea tree, ancient druid relic
// netherrack
// - common: gold nuggets, glowstone dust
// - uncommon: quartz
// - rare: ruby, fire charge
// - legendary: demon horn, nether relic
// magma_block
// - common: gold nugget, lava bucket
// - uncommon: fire charge
// - rare: blaze rod, magma cream, nether brick
// - legendary: blaze spawn egg, inferno core
// end_stone
// - common: end rod, chorus fruit
// - uncommon: purpur block
// - rare: ender pearls, shulker shells, dragon breath
// - legendary: end table, void crystal, dragon egg fragment
anyone even here
like ive seen down times at night but this is dead dead during the day
does anyone know how to fix the last part of my code ? I'm tryin to get the blocks above to update the at the same time i interact with other blocks, like if they were connected
I'm so lost rn
I have done it my pack if you kill an axolotl you will spend the rest of eternity or until you keave that world in the nether
Ideas for what
And i think youβd have better luck asking in #off-topic
or really anywhere else
lol
i mean left click
@jolly citrus i need ideas to fill out the loot table for those to fill up alchemy skill
That seems like a general #add-ons not a scripting specific question.
Its done with script but its ideas
Is there an event I can subscribe to that helps me know when a player has intereacted with a villager? itemUse won't tell me which villager
playerInteractWithEntity afterEvent
thanks
Documentation for @minecraft/server
is btoa / atob supported in the api
@sterile epoch hey whats up
hi
I made my forced eternal nether for ppl who kill an axolotl
How do i get a loot table to drop a written book that i custumized
No. The only way is just to make a dummy entity and use is_in_village and then get that data into script
kinda ig since they removed isOp
idk
do the same for dogs
(tamed)
also
is btoa / atob supported in the api
a built in function that converts text to base 64 I want to use it for an encrypter
sir this is #1067535608660107284 this doesn't relate to scripting at all
Im not a sir
ok ma'm
@prisma shard that person did it deliberatly to attack me i blocked it
what>
xd bro just asked to stop flood
actually i dont think theres one, probably you'll need to rely on top of some oib in npm or some implementation by your own
actually i dont know the need of saving data in base64, i dont think you will be able to send to some where that enforces utf8 or some other encoding than utf16(js builtin)
what would you encrypt?
Im not a bro your not asking anything your attacking
holy hell im not using bro to refer to you
You replied to me
is that an argument?
You replied to me with no context so
Someone i knew online took her life due to bullying so im not in a good mood right now
jeez
damn, i used to bully people
good times
Im blocking that is not ok
you need to calm down
yeah I just asked chatgpt to recreate it and it did
easy peasy 
wasnt there anything in npm?
as i only code with ts i prefer using it and bundling the file
I imported this one, thank you
@sterile epoch how are you doing
your welcome. π
but why do you need base64, by the way?
isnt there some specific part of the code to look at?
encryption
good
well, but only by using base64 does not make it encrypted
anyone can get the data
ascii character safety
Wanna work on hrand exchange tommorrow @sterile epoch
wdym?
is there a beforeevent for entityHurt?
welp
nevermind, thank you though!
hey man
is it possible to detect if a block is waterlogged?
block.isWaterlogged
Im not a man
just ignore them
lol im dumb, thanks xD
I would need a ticking component to constantly check this, right?
nope
oh wait
yes
you need to
does ticking causes a lot of lag?
it depends on what you do inside that ticking
I only use runInterval as I can manipulate when will it check
interesting, mind elaborating?
I was told to avoid runInterval
it's just that I can do delays and stuff
But is it really any better than ticking?π€
I think maybe making runInterval async could give some advantage
what matters is what you do inside of it
Or runJob
Async is not always good for performance
runJob is better instead
oh yeah runJob exists too
Well, still depends
I think its peak
Just need to make each job not resource expensive
Shouldnt be a big matter
yeah at the end of the day what matters is what you do inside of it
It is
runJob is useless if each job is causing lag
Yes, I use runJob for my Custom Chunk Generators and its the best thing ive done
Yeah, it is the best in handling heavy tasks
should I do runJob for my maze generator?
Yeah
how would i know the difference?
Different between?
If you are in pc use the debugger
the extension in vsc?
Yeah
alright
depends, usually i use async to dont block the thread
and keep things running