#1.20.80.22 - Preview
1 messages ยท Page 2 of 1
There were all sorts of inconsistencies with things like :shank:. A lot of those work now.
I'll have to figure out where and how later.
:_input_key.sneak:, :_input_key.jump: I imagine there is other ones like .attack .interact?
attack and use
Also forward, left, right, back, inventory
Ah, you should try onQueuedTick when it comes.
Will do
That's.... ๐ does it work on signs? It sohuld?
Seems like it does not work on signs or books
Yeah, it only exists in limited places. ๐ฆ
So I guess the changelog was very literal, it's not a change to raw text, it's literally /tellraw and /titleraw specifically
Hopefully script-correspondant ones, too.
So even more weird and bad
Well, it's a stopgap for especially Marketplace teams.
But, yeah, hopefully they'll have something more consistent down the road.
Input key list:
:_input_key.togglePerspective::_input_key.jump::_input_key.sneak::_input_key.forward::_input_key.left::_input_key.back::_input_key.right::_input_key.inventory::_input_key.use::_input_key.chat::_input_key.codeBuilder:- EDU:_input_key.cycleItemLeft::_input_key.cycleItemRight::_input_key.attack::_input_key.sprint:
Doing something like this has been wanted for a while, so even the bare minimum is not so bad
Darknavi if you are still around will these work in server ui forms?
https://pastebin.com/HbDWKTPV
You can do all these too. Not as useful since they just map directly to characters you could already have typed
Are we still waiting on the update to be available?
I see Tryashtar's from emoticons.json. Where'd you find these?
Lang!
Oh, there are more. Like menuTabLeft.
When we looked at these tellraw updates, the original proposal was to rework the entire system, which would have taken months. Instead, we looked at doing as small of a change as possible to unlock new scenarios quicker. So yes, what was released today is limited. But I stand by the call that getting this out quicker is more important than waiting much longer.
I was just clicking through search quickly. There are were too many dupes to grab one at a time. Was going to pull them and get uniques later
kinda huge tbh
Small features fast!
As the creators of marvel snap did a GDC talk on. Build, Play, Learn. Repeat.
Marketplace maps are definitely going to be using these inputs once it releases as stable
tellraw @a {"rawtext":[{"text":":_input_key.mobeffectsandinteractwithtoast:"}]}
What does that display as ๐
Unassigned, to me as a keyboard user. ๐
It's for controllers.
hotbar.1 is another that works.
Lots of things, reallyโฆ
I wonder what happens if you use the feature wherein multiple keys are bound to the same thingโฆ
Stop opening cans Cici!
It's clear we've never met. Hi, I'm Cici! 
It's hard to tell which ones are valid since any random thing like :_input_key.ajsdlfkjasklijraoesijf: turns into Unassigned
I can guess at which ones are valid. Give me a minute.
attack
pickItem
use
drop
hotbar.1
hotbar.2
hotbar.3
hotbar.4
hotbar.5
hotbar.6
hotbar.7
hotbar.8
hotbar.9
inventory
togglePerspective
jump
sneak
sprint
left
right
back
forward
mobEffects
chat
command
emote
menuTabLeft
menuTabRight
copy_coordinates
copy_facing_coordinates
lookUpSlight
lookDownSlight
lookUpRight
lookUp
lookUpLeft
lookRight
lookCenter
lookLeft
lookDownRight
lookDown
lookDownLeft
lookUpSmooth
lookDownSmooth
lookLeftSmooth
lookRightSmooth
cycleItemLeft
cycleItemRight
flyUpSlow
flyDownSlow
mobeffectsandinteractwithtoast
These are the canonical option settings for input systems.
I'd documented them a while back.
I dont mind light mode from you but the green text really?
Noice thank you
Can't promise they'd work! But they should.
Sorry. ๐
๐ i cant see the green
dawg
its invisisble
colour blind?
Captain's log:
6 hours since the changelogs were posted. No signs of the update anywhere on the windows platform. Some BAO users are getting angry and hungry for new things to play with. It appears the update was lost in the sea of pipelines when they were being transferred. The mobile and console ships are enjoying their treasures. The Java ship is rolling in MLG tricks and hammer time
Iโm liking those captain logs, they should always delay Windows releases so we get more
The bogged got stuck in the pipeline again. Gotta call a plumber
Thomas, can you kick the Windows Store server again?
@radiant mango @vagrant valley Check the store
Minecraft Preview v1.20.80.22 is out now on the Microsoft Store!
WOOOO
Oh hey it's out
No more logs
Too bad I can't get on now
Looks like the bot failed to send the message the first time
Bro...
I kicked it!
@sinful stump Captain log
As soon as I turned of my PC, the update drops
What's up?
;w;
^
They just released the preview on Windows
I had to double check the install first
๐ lmao they released it after I woke up
Captain's log:
A few minutes after my previous entry, the Windows Store army has returned us our stolen Preview build. Every BAO user is now hopping in joy. The gods have blessed us. Thomas no longer has to walk the plank
"treasure": true
Hey, anyone know what this function does in loot tables?
Sorry to bother but Any news on defferd coming to consoles in the beta and preview version @fringe bluff ?
Ps4/ps5
no news
we'll announce this sort of thing in the changelog, so no need to message me
They are coming just wait. Bruh
No need to be rude also been waiting for almost a year now ๐
epic bug
Not only meeeeeee
that's the function that is used when we get the preview (our treasure) , and Thomas doesn't need to walk the plank anymore
There's something wrong in the sky I told you
๐ the preview for PS just got introduced
What do you expect
oooh
uhh what
Pinging @flint cypress
But sorry if I come across as rude, didn't mean to
Show code.
That looks very interestingโฆ
That's not a function. It's just a property for that that allows treasure enchantments to be rolled.
I see
what's that?
aaaah okay
Sorry when was I going to walk the plank???
The 7th hour
Whyyyy!
The gods require a sacrifice
We can still sacarfice Thomas for more features in next preview
Yes, not dmg though
Not sure if this has been mentioned, but I just saw it. "Harcore mode" coming soon.
ye, it was mentioned
๐ yep
Cant believe theyre abandoning hardcore mode in favour of harcore
preview right?
lmao
I didn't even realise it said "harcore" xD
And I thought you said "hardcode mode"
๐
Yeah. It only shows up in the old UI from what I can tell
Java peeps always said they would never add harcore mode to bedrock!
No one thought they would ever add harcore
great now i dont have to see if its shadowdropped every week :doggySmurkW:
I understood it, I just was (giving an attempt at) playing along
You must fall 83 blocks to one tap the warden with the new mace with a crit
Useless shit but I'll still find it out lol
pvp is going to change to just people launching themselves into the sky to try and jump on you
I'm guessing shield will still block it at least
ye lol
I want real-life combat to be this, now.
on java they can use offhand for the charge
@primal lake, thoughts on #announcements message?
I'm not the intended recipient of this message, but I am grateful for you letting us know.
Will we ever see Java 1.9 combat come to bedrock?
Also, I love the cross fox in your profile picture
No
We will see combat v3
wolf
It's cute and that is all that matters
Thank you for asking.
They've been telling us it was coming so I've only been doing entity stuff. I don't use any of those.
As long as they don't remove Entity stuff I'm find. IMO Blocks and items have already been "dump" objects
My biggest block request was let us use the water blockshape on/with custom blocks. It's the most powerful and amazing blockshape there is and with 2 minor changes to how it culls to custom blocks it would really make alot of vanilla and custom blocks epic. I use it now for sand, gravel and other "soft" material blocks, but it has some light leaking and culling issues with custom blocks that need fixed.
I can do everything I want to from the BP/RP side it just harder to do but with the added entity properties and query scoreboard it easier today than it was last week.
No reason to hold you all back because of my stupid old ass. Enjoy your JS, make wonderful things with it. Maybe someone will make a bridgev3 that does it all.
Or maybe I'll go back to mainly UE5 as JS takes over. Who knows.
I'm just happy I get to make games today.
Check #1182091012177399809
I had been waiting for 3-4 years for custom blocks to do connected textures. But after I saw block events were going to work. I just sat down and worked it out from the BP/AC player point of view and commands. I can push this out 80+block so 99% of the time the player doesn't even see it converting in real time.
This also shows the water blockshape in the mud. Notice it's not squared and instead meets the water, I know this break minecraft but I like it alot more. https://youtu.be/yBk3RdNEW2A
Presented by CyberAxe of www.OutLandishlyCrafted.com
Tip and Support Welcome, it takes hordes of hours to provide free support.
HTTP://www.OutLandishlyCrafted.com
#minecraft, #bedrock, #mcpe, #indiegamedev, #blockbench, #animations, #portals, #prototype #live
I also worked out.
Block doors, keys, multi-blockdoors
Sitting on blocks, block animations
Trigger Block "fake" events and many others just from the BP side. I have guides for most those.
So I think there are still 2 clear paths BP/RP and JS... Im not sure the powers that be are happy about that. But is what it is.
What do you think? Are you excited about what JS will enable creators to do?
I feel weird. I was doing JS long before it was reborn on Bedrock. I love Molang. I kinda just wish they had gotten that right the first time around.
I think molang has a big place on the RP still! Script on server (with molang), molang on client vibes
Deprecate molang when client scripting comes ๐
World gen
Also, we need client scripting just because.
anyway
iโm making my own pbr pack soon
๐
spaghetti pbr
or nostalgia pbr
or big eddy pbr
Yes, that would have been nice. However, it's so hard to have a child (Bedrock) this new game out there. You really have no idea how it will do in the world as it grows up and interacts with people. So looking at what was java, and what was C++ games.
There just doesn't seem like an easy logical middle compromise. So I understand json basics and lets just get it out there and see how it does.
But since it's done so very very well now that looks like a silly idea. But if it would have failed like a few other titles we wont name. I think it would have looked like a good business choice.
I think ever developer/studio/producer is struggling with this choice. So I don't fault them at all. It's an impossible choice to make and win at. Might as well go to Vegas and put it on a table.
I commend them for sticking with it and focusing on the creators. Most AAA game studios don't get that the creators are what keep the games alive for decades.
I wonder if with custom world gen client side chunk generation would get disabled. A client might not know how to generate custom biomes? ๐ค
They don't disable it with features. And you can put structures in the resource pack to have them compatible with client-side chunk generation.
So I don't think so?
Which still isnt documented or well known
Nothing is. I don't think I've seen a single product on the Marketplace that used features or feature rules.
This fix might lead to it would be disabled? Or at least if we had biomes today
I dont think theyre allowed too based on the qna
We are allowed toโฆ
I should probably ask my marketplace owner for further clarification...but i dont think we're gonna do add-ons
If it's stable its fair game!
#1214988608654540850 message yeah just the part "mess with world gen"
Oh you didn't mention Add-Ons
Ig that refers to vanilla. Ig also @hearty wind comment from a while back threw me off
Yeah, only random seed worlds can use features and feature rules.
Well...how....would a set map use world gen?
I completely forgot about dynamic worlds
Don't generate that many chunks?
God, if not even Sean remembered dynamic worldsโฆ that's not good.
No wonder those didn't take off.
Dynamic world makes sense though
I think it got overshadowed by addons and how the first few batches had xray "scam"
Its just not ad avdertised
I guess the blatant failure of documentation for world-gen doesn't help. Nor does not including features or feature rules in the vanilla assets repo. Nor does the small creator community for such. Nor does not having biomes working yetโฆ
I'm hoping it'll take off in the future.
I think the last one is the biggest for a lot of people. Biomes are great, and I think people will see how great features areโฆ but only once we get biomes.
No offense to kayla she did an amazing job trying to push dynamic worlds but after that i barely saw any mentions of it anymore?
Isn't having some sort of a map a requirement for marketplace? How does that affect dynamic worlds
I donโt think there are enough world-gen pros to do anything with it. Non-world-gen kinda worked, though. I know some studios that did something with that. But most of those endeavors are now best served with add-ons.
No map for those
Ah
Personally I feel Minecraft, No Man's Skies and many other dynamically gen'ed games struggle from the same issues. 2% of no man's skies has been explored but we've already seen everything interesting to see.
Biomes are great but if you have 20 biomes and just repeat them over and over, you still only have 20 biomes. I think where marketplace does well is meeting in the middle in some cases.
The best marketplace map IMO is a normal seed with a custom build themed area in the middle. I think a 50% hybrid of dynamic generation with 50% hand crafted is key to an immersive story and long term engagement.
Sadly there are warehouse partners whose goals seem to be, to get the player in and out of their addon as fast as they can to keep sales going. Instead of building quality long term customer relationships. We see the opposite with the mobile microtransaction scum.
If marketplace paid by both player engagement and playtime and upfront sales instead of only upfront sales I think things would change.
yeah, Dynamic Worlds are essentially Map Templates, without world data. So any seed can be used. But it can only create "New Worlds".
Add-Ons are a different flavor, and can be applied to new or existing worlds. They also have significantly more rules on what they can do to try and prevent collisions and player data loss.
So will we get access to change Dynamic Worlds template or make our own
What do you mean?
We'd need to provide data-driven approaches to control world-gen.
(which we want to do, of course)
Right now I have to start flat, remove everything, then build outward
but like a "space" one... not sure why you'd want a Dynamic World here instead of a normal world template
sure. totally.
Personally. I'd like a template for water only. void only, land only...
๐ Kayla...idk how much influence you have over the social media team... (maybe i can pester LZA instead) ... but a "round up"/recap of what the marketplace has achieved the past year might be great! And helps introduce each category
"Dynamic Worlds" is really just a marketplace thing. Ya'll could already do all this stuff with normal add-ons.
oh sorry. I missed that. I was thinking worldgen templates
Lots more social stuff is planned for Marketplace, don't worry about that.
Thank you for all the hard work
I understand if you can't tell me this if it's under nda.
Is there a limit on pixel depth for marketplace content. Can I submit HD addons for marketplace? I can't tell if my struggles with HD content is because partners don't want to take the risk or if there is a "policy" against it. I know there is alot of distain for HD content in the community and I'm told a lack of interest, yet no one has tried it, so I understand eitherway. I'd love to put my space game and other hybrid HD content on marketplace but have assumed by my interactions with partners its 0% chance. I'm getting close to finishing my space game and have to decide now what.
There is no HDR pipeline in the game currently AFAIK
I just me HD textures
oh - not sure offhand.
What resolution do you mean by HD? Lifeboat has some maps that have high poly high texture size models iirc
Thats why I'm asking I don't know what the limits are or if there are limits
Here is the inside of my space ship. This is on the players head and is the 1st person viewport.
There's definitely a max size for the atlas.
Sure. sure
It's probably different per platform too. Like I don't expect a Switch to have the same GPU capabilities as a desktop PC.
true. But I'm not having technical issue. I'm asking about policy. Bedrock can do it just fine
I've also heard it's possible to be graylisted on the Marketplace. However, I'm not sure if that's only related to performance.
I'm not sure what we can talk about related to that. but my focus is not mobile. I'd really like to provide some content for everyone else not mobile I feel is under served. The rest of us shouldn't be held down because of those platforms. We should have options for mid/higherend devices too IMO. If I have to self publish I'd only hit PC anyways.
I'm excited to see how well it will do on lowerend devices though. I've been really working hard to keep the particles and load low. Other than having to tick stuff map wide for the particle to play I think it will do well. Since most of the map is open space the block count total map wide is extreme low. In testing on highend I can have hundreds to thousands of fighters and pirates entities all attacking each other at once with out alot of issues. Bedrock as an engine is AAA IMO. with a finished lighting system be it RTX or deferred it will be epic.
harcore mode
Perfect
Oh....something is very wrong with the full block geo or the material instances in this preview
How so?
The real question is are you step on or step off?
"minecraft:material_instances": {
"*": {
"texture": "sculk"
}
},
"minecraft:geometry": {
"identifier": "minecraft:geometry.full_block"
},
``` this...is what you're seeing in the video....it's supposed to be a sculk texture...but it ins't
Wax on, wax off
Also steam is like....downloading a game for me rn so i cant record the other two components yet
Oh yeah that's odd
Smh...looks like thomas has to walk the plank after all...the gods are obviously not pleased
Please not the plank ๐ญ
@fringe bluff Here's a video showcasing all three custom components ๐
definitely gonna mess around before i make a yt video on the technical changes in 1.20.80.22 if i bother making one lol
๐ Yeah...step off
Tick tock: Step off!
daamn, didn't expect the beta to be this late
and yes i still called it beta
just a 3-4 hours gap after i slept and woke up
also yeah btw, the resource packs tab in the create world screen still crashes @sullen lotus
eh maybe i might try beta to see if it gonna crash for me or what
i don't think that's gonna work
Or it is ?
Nooooooooooo why did you leave it ๐ญ๐ญ๐๐ฅบ๐
The block was so loyal even it start talkin when you leave it ๐
They added grid support for mobile?!
this wasn't possible before.
it was only lists
you can only change the grid - list and vice versa after turning the GUI scale from 0 to -1 then switch it again and boom.
old news
oh. thought this was something new
since I didn't try messing with GUI sizes since just a bit
Iโve actually noticed that too. The block in the image is supposed to have the sand texture but it doesnโt
If you didnt know, mace breaks all blocks 1.5 times faster on bedorck
same issue here
I found a gameplay bug which is quite broken. If you collect a decorated pot which has loot tables with the fist, u get the decorated pot and the loot table.
However, if you put the decorated pot again and break it again with the fist, it will give another item from that loot table. And that goes infinitely, so infinite loot
@compact epoch
eventData.blockTypeRegistry.registerCustomComponent(
'adk-lib:on_random_tick_say_hi',
{
onRandomTick: (componentData) => {
componentData.dimension.runCommand(
`say Tick tock! from ${componentData.block.typeId} at ${componentData.block.x}, ${componentData.block.y}, ${componentData.block.z}`
);
}
}
);
does onRandomTick not let you define the randomness?
uhh preview is crashing kinda too often
Wdym?
What command are you trying to run?
setblock <block_pos> grass
As in how random is it, what if I want the random tick to only go off 1/100 ticks at random vs 1/1000
Then you can do math.random() < blah return
well then there's no point in doing onRandomTick
setblock ${componentData.block.x} ${componentData.block.y} ${componentData.block.z} grass
because that just adds an extra layer of unknown randomness
Xorkent beat me to it
So you want queued ticking then
Though ideally youโd want to isolate the block into its own const to minimize calls to component data
I want to be able to define how random the tick is lol
IT doesn't make sense to me for there to be a randomTick component we can define, without being able to define the randomness of it
So basically you want queued ticking then
I mean that's what I'll have to use to create an actual randomTick component
because you can't define the randomTick range
So then you just have to wait for the upcoming previews
So how random is onRandomTick then
eventData.blockTypeRegistry.registerCustomComponent(initEvent => {
initEvent.blockTypeRegistry.registerCustomComponent('kai:hello_world', {
onStepOn: e => {
componentData.dimension.runCommand('setblock ${componentData.block.x}, ${componentData.block.y}, ${componentData.block.z} grass');
}
});
});
is this good
Just like the old randomtick component?
and how random was that
Oh no, change componentData to e
๐คท Random tick....
Nearly all video games (including Minecraft) are driven by one big program loop. Just as every gear in a clock is synchronized with the pendulum, every task involved in advancing a game simulation is synchronized with the game loop. Appropriately, one cycle of the game loop is called a tick.
Seems useless then
What exactly do I have to import btw? just world?
Yeah
For you yes
Not knowing how random it actually is is the issue
Random tick is used for grass/fire spreading/decay. Crops growing, etc
its giving me eventData not defined at blah blah
It's the same randomness as a normal ticked block ๐คท do yo know how ticks work?
What is that randomness ๐ฟ
๐ฟ Read the damn link
A game tick is where Minecraft's game loop runs once. The game normally runs at a fixed rate of 20 ticks per second, so one tick happens every 0.05 seconds (50 milliseconds or 1/20 seconds), making an in-game day last exactly 24 000 ticks (20 minutes). However, if the computer is unable to keep up with this speed, there are fewer game ticks per second (TPS). As the vast majority of actions are timed based on tick count rather than on wall clock time, this means that many things take longer on a slower computer.
that's why you have 3 weeks delay zack
I know what a tick is
๐ฟ
import { world } from "@minecraft/server";
eventData.blockTypeRegistry.registerCustomComponent(initEvent => {
initEvent.blockTypeRegistry.registerCustomComponent('kai:hello_world', {
onStepOn: e => {
e.dimension.runCommand('setblock ${componentData.block.x}, ${componentData.block.y}, ${componentData.block.z} grass');
}
});
});
not working
๐ did you....read the docs?
import { world } from '@minecraft/server';
world.beforeEvents.worldInitialize.subscribe((eventData) => {
eventData.blockTypeRegistry.registerCustomComponent('adk-lib:on_step_on_say_hi', {
onStepOn: (componentData) => {
componentData.dimension.runCommand(`say Hi from ${componentData.block.typeId} at ${componentData.block.x}, ${componentData.block.y}, ${componentData.block.z}`);
}
});
eventData.blockTypeRegistry.registerCustomComponent('adk-lib:on_step_off_say_hi', {
onStepOff: (componentData) => {
componentData.dimension.runCommand(`say D: don't leave me!!! from ${componentData.block.typeId} at ${componentData.block.x}, ${componentData.block.y}, ${componentData.block.z}`);
}
});
eventData.blockTypeRegistry.registerCustomComponent('adk-lib:on_random_tick_say_hi', {
onRandomTick: (componentData) => {
componentData.dimension.runCommand(`say Tick tock! from ${componentData.block.typeId} at ${componentData.block.x}, ${componentData.block.y}, ${componentData.block.z}`);
}
});
});
you didn't do before initialize
you sure that 3 week delay was for me>?
oh i forgot
yes
im sure
So like this?
world.beforeEvents.worldInitialize.subscribe(eventData => {
eventData.blockTypeRegistry.registerCustomComponent('kai:hello_world', {
onStepOn: e => {
e.dimension.runCommand('setblock ${componentData.block.x}, ${componentData.block.y}, ${componentData.block.z} grass');
}
});
});
#1217858750031859733 message
pfft im not reading
You are using a string literal. These are represented by double quotes or single quotesโ"" or ''. You need to use a template literal, which is represented using accent marksโ``
OH i didnt even notice that as well
No commas
Although you probably want to use an API method to place the block instead of running a command
What if I want to change from state 0 to 1 of that same block
that command was the clearest example of what i needed
Even more reason to use an API method. It should have a way to change block states, lemme look real quick
Yea a command is the most straightforward, but comes with limitations of its own
Also how do you "look for what you need" when it comes to scripting
I think command is an easy entry for kaoiga since hes never done scripting
You can either reference the documents on the web (at https://docs.microsoft.com/en-us/minecraft/creator) or by looking through the type file (d.ts file) provided by the @minecraft/server NPM JS package
I do the latter personally, the web docs are more annoying to navigate
agreed
also just a quick update, you can't still send a redstone signal with scripting right?
Im open to learning if teachers have patience ๐ฅบ๐
This is what I have, by the way
Actually how do you set a block at another location
Can't seem to figure out how I change a block ID, I see it's stored in a BlockPermutation, but I cannot edit the properties of the block's permutation, or use the new constructor on the BlockPermutation class
Oh, I'm overthinking it. There's a Block.prototype.setType() method
Sometimes the API has native methods that are really easy and straightforward to use. Here setting the block ID on itself could not be more straight forward:
import { world } from '@minecraft/server';
world.beforeEvents.worldInitialize.subscribe((eventData) => {
eventData.blockTypeRegistry.registerCustomComponent('kai:hello_world', {
onStepOn(e) {
// This
e.block.setType('grass')
// vs
e.dimension.runCommand(
`setblock ${e.block.x} ${e.block.y} ${e.block.z} grass`
);
}
});
});
Oh cool you can do ${e.block.y+1} too, looks useful
And if you want the block adjacent to the event's block, you could use e.block.above(1)?.setType('grass')
oh I see
But when you say "straightforward", does that means it is faster or just more compacted?
A little of both, but primarily with a focus on "easier to read."
Past readability, it also uses a method native to the API instead of having to run a command. Commands are not particularly fast and can slow down script execution, especially if used synchronously like this
So in that sense, it is more "straightforward" by using the simpler, intended solution instead of making one up on your own
I see
I'm still workshopping a way to change that
I believe so
And is the namespace not needed?
I'd expect Minecraft to assume no namespace to be "minecraft:"
Looks like there is a static method on Blockpermutation to create a permutation, neat.
So here's the thing to understand about blocks in scripting. You have a Block class, which represents the location in the world (and type ID), then you have a BlockPermutation, which represents information about the block at that location (including block states). When we want to change the block state, we apparently need to create a new permutation from scratch, like so. Be sure to import both world and BlockPermutation at the top:
onStepOn(e) {
e.block.setPermutation(
BlockPermutation.resolve(e.block.typeId, { my_state: 1 })
);
}
You can assign other states in the object there, at { my_state: 1 }
I should probably test to see if this works
So this means we don't have to define that permutation in the server block.json file, in the permutations field?
You likely still do, scripting can only safely assign states/permutations the game knows about after all
Hm, okay, interesting
Yup, that is working, neat!
It is very compacted in comparison to commands
Now if you have multiple block states and they should be preserved, you need to include the old values when resolving a new BlockPermutation. JavaScript has convenient syntax for doing this:
/*1*/ onStepOn(e) {
/*2*/ e.block.setPermutation(
/*3*/ BlockPermutation.resolve(e.block.typeId, {
/*4*/ ...e.block.permutation.getAllStates(),
/*5*/ 'custom:bit_1': !e.block.permutation.getState('custom:bit_1')
/*6*/ })
/*7*/ );
/*8*/ console.warn(JSON.stringify(e.block.permutation.getAllStates()));
/*9*/ }
On line 4 we are using the getAllStates() method to obtain the states from before. This returns an object much like the one in my previous example. Then we use the spread syntax ... to add all of its properties to the current object (that we are building).
On line 5 we specify the property we want to set. Here I am simply toggling the bit_1 value on and off by obtaining the old value and grabbing the inverse of it.
So in my pack I have three boolean states: "custom:bit_1", "custom:bit_2", and "custom:bit_3"
e.block.permutation.getAllStates() may return something like { 'custom:bit_1': false, 'custom:bit_2: true, 'custom:bit_3': false }
Then by combining that object's properties with the expression on line 5, I get { 'custom:bit_1': true, 'custom:bit_2: true, 'custom:bit_3': false }, still preserving the value of "custom:bit_2"
It's stuff like that that makes scripting complicated, since you need to be very precise about what you are changing, and to be aware of what exactly the API calls you make are returning.
should have reported it
I understand your question better now. Yes, you should still define the permutation if you want the block to change components when the script sets the state. And of course you still need the states defined within the description
I see, I understand this
Is interesting how specific we must be for something as simple, Iโm not sure whatโs my opinion on it yet
This works perfectly:
import { world, BlockPermutation } from '@minecraft/server';
world.beforeEvents.worldInitialize.subscribe((eventData) => {
eventData.blockTypeRegistry.registerCustomComponent('kai:hello_world', {
onStepOn(e) {
e.block.setPermutation(
BlockPermutation.resolve(e.block.typeId, {
...e.block.permutation.getAllStates(),
'kai:collision': !e.block.permutation.getState('kai:collision')
})
);
console.warn(JSON.stringify(e.block.permutation.getAllStates()));
}
});
});
Scripting is more robust than the old JSON system. With that power comes greater responsibility
(I do miss the old block events though)
Agreed, yup
I'm not sure how to use it, but there is a linter that detects when you use a command in scripting when there is an API equivalent
https://github.com/Mojang/minecraft-scripting-libraries/tree/main/tools/eslint-plugin-minecraft-linting
Have you used es lint before? It's a plugin for it ๐
does anyone have a good tutorial on how custom components work for the preview?
#announcements message
ty
I haven't ๐
I'm not very familiar with the web ecosystem, I've only used javascript for Minecraft scripting
im curious tho, it seems like someone could make a library of classes i could just use for each event for blocks or items i can use for custom components
https://github.com/microsoft/minecraft-scripting-samples/tree/main/ts-starter
The typescript starter in the scripting samples repo has the linter set up if that's helpful to peep at! ๐
Yes...thats what we discussed when it was first introduced
Thanks, it's helpful but a little overwhelming. I'm not sure how that would fit in with the rest of my workflow. But it's a helpful example
You mainly have to install the required npm packages and download the eslint.config.mjs file to your project root from what i observed
tbh. I don't know what a project root is. It's a minecraft world
Ok haha
the new starter has the lint rule, vanilla-data, and math all built in now too ๐
Could you explain a little of each? I'm not entirely sure what lint rule means
The lint rule checks to see if you are using a command that has a native api already ie if you do runcommand("/setblock") it will suggest you use the native api instead
Why is the scripting starter git in the microsoft github org but the libraries, samples, and editor starter kit are in mojang 
Is eslint bundled as a non dev dependency within the linting plugin so users don't need to install eslint?
In most cases for eslint plugins eslint itself is just a dev dependency
ie, in the typescript eslint plugin
Thanks for explaining
uhhhh, kind of a historical oddity ๐
my thinking was that to use the plugin, you will need to depend on eslint and the rule depends on eslint, so its a dependency. plus the lint rule is a dev dependency once in the starter
it's a minor nuance though, but if you do run into problems with that specific set up, feel free to post an issue up
vanilla-data is the package @minecraft/vanilla-data that contains enums for the content in the game at a specific version, stuff like MinecraftBlockTypes. @minecraft/math is a javascript only library with vector3 helpers you can use.
I decided not to add the plugin to our current project because it blew our packages up by 4x ish
, Which isn't in itself an issue. But doesn't seem worth it for linting ๐ฆ
That makes sense! Looking at some of the big eslint plugins part of their install steps is to install eslint first, possibly breaking it apart would be more "conventional"?
We import this normally like we do for "@minecraft/server"? Or "minecraft/server-ui"?
I guess it's a matter of getting docs updated
That's gonna be very helpful, and amazing with the changes coming
bundling may needed and is preferred
it does need bundling to use. The documentation for the typescript starter is going to be updated really soon with the new starter stuff
hm... I have a problem, not sure if it's something that is intentional or not with onStepOff
It looks like the boundary for onStepOff isn't the entire block?
customEvent.blockTypeRegistry.registerCustomComponent('runecraft:cure', {
onStepOn: (eventData) => {
const entity = eventData.entity;
entity.__onEffectBlock = 1;
const cureInterval = system.runInterval(() => {
if(entity.__onEffectBlock == 0) {
system.clearRun(cureInterval);
}
entity.removeEffect('darkness');
entity.removeEffect('mining_fatigue');
entity.removeEffect('blindness');
entity.removeEffect('bad_omen');
entity.removeEffect('nausea');
entity.removeEffect('poison');
entity.removeEffect('slowness');
entity.removeEffect('weakness');
entity.removeEffect('wither');
}, 0)
},
onStepOff: (eventData) => {
const entity = eventData.entity;
if(entity.dimension.getBlock({ x: entity.location.x, y: (entity.location.y) - 1, z: entity.location.z }).typeId != eventData.block.typeId) {
world.sendMessage(`You have stepped off the ${eventData.block.typeId}. Now standing on: ${entity.dimension.getBlock({ x: entity.location.x, y: (entity.location.y) - 1, z: entity.location.z }).typeId}`)
entity.__onEffectBlock = 0;
}
},```
this issue only exists at the boundary between two solid blocks
I cooked too much
ended up cooking my brain
the boundary part is still true though
Didn't notice the new search for players screen. Recommended players feature gives the ability to connect with more players.
i guess this is more of adding xbox friends.
would be more useful if it allows the user to directly join the friend world with it
so you literally want strangers to just randomly join your world and make hell of a mess in it
that one are minecraft fault itself honestly
once someone adds you even without you knowing them, they'll able to join your world regardless.
this happened to me everyday.
bruh
even i add someone who literally doesn't knows me or read my username, i still can join their world
don't know why but this is really flawed.
unless you turn multiplayer off entirely
Cool...
Wow...
Damn
export class effect extends onStepOn {
onStepOn(componentData: BlockComponentStepOnEvent) {
componentData.entity.addEffect('speed', 200, {
showParticles: false,
amplifier: 2
});
}
}
``` if you export your custom component registration and import it into the main.js file you cant reload
๐๏ธ
applyKnockback :3
Why are they two different things? (Question is for above not for video)
Disappearing block
Oh boo...knocback works for all entities except item entities....impulse works on all entities except players
Iโm not sure how both of them work behind the scenes but afaik applyImpulse can cause client desync
Which is why itโs disabled for players
:/ and i assume the same reason for item entities for knockback then
Probably
https://github.com/JaylyDev/ScriptAPI/tree/main/scripts/player-impulse you could try this, not sure if it is 100% the same as applyImpulse for other entities though
one thing Im confused on is
directionX: number, directionZ: number, horizontalStrength: number bc all that really matters is the strength and the numbers are just for direction. What's the formula for it? like 1, 1, 1 makes it weak but 1,1,10 makes it strong. If i do 10,10,1 i just go 3 diagonally
Direction doesn't affect the strength. Final strength is computed as vertical*vec3(0, 1, 0) + horizontal*normalize(vec3(x, 0, z)). Normalization part makes it so that direction is a vector of length 1 so it doesn't affect the kb strength but only defines horizontal direction
Poopmutation
๐ญ It's not poop
It's the ancient debris texture
But something is wrong with geometry.full_block
What happens if you leave and rejoin
To test what?
Like would it stop working? Would the timer reset? Would it stay in the time it was when you left?
So far Iโm only doing stuff with onstep
Its random tick so... ๐คท
Does grass stop growing when you leave and rejoin?
I mean, it was an issue present with minecraft:random_ticking so Iโm seeing if they fixed it lol
But no it doesnโt stops in grass
never heard of that issue
^
I experienced it at the very beginning of my journey when joining and rejoining frequently
Skill...issue
youโre just a nerd

very easy launch pad
customEvent.blockTypeRegistry.registerCustomComponent('runecraft:leap', {
onStepOn: (eventData) => {
eventData.entity?.applyKnockback(eventData.entity.getViewDirection().x, eventData.entity.getViewDirection().z, 3, eventData.entity.getViewDirection().y * 1.5);
}
})```
oh
i wish these components were for vanilla blocks as well
applyImpulse is not for players
applyKnockback works for most of entities
only items or xp orbs doesn't supports knockback
but all "mobs" does
yeah, applyImpulse I would need to just use it's current velocity
honestly, anything other htan players I should be using velocity
I don't think mobs have a view direction?
Chad is on our chat
weird, are wind charges supposed to be considered range damage? I feel like magic makes more sense
It's not meant to be
entities does have view vector
but idk about items
and projectiles
ya projectiles does
but not sure about items
Pretty sure they donโt, unless they save their owners vector
but i think they also hove view_direction,
still trying to figure out how to do constantly effect application while keeping track of the player effectively
think this will be better for a ticking component when we get that though
You have to change that to on_fall_on when it comes
wdym
double that fall damage when on_fall_on
why would I do that lol
I mean activate your code when on_fall_on
Is more logical that just stepping on it
Like fortnite launch pads or slime blocks
no, it's intended use is to mimic my custom potions
I have a leap potion that does the same effect, players will be able to use them on sponges to make the sponges apply their effect to entities on top of them
Ohh
Okay
Feedback; include so when you break the sponge it leaves an area of the potion effect for some seconds
nope
๐
Why view direction and not velcoity?
because I want it to go in the direction the player is looking
I kinda just copy pasted my potion effect knockback over
but I can kinda see why it should function differently if it's on a block
using velocity also makes it impossible ot send the player upwards to actually go anywhere
I could use view direction for the Y, but it just looks unintuitive if it isn't going in the direction the player is looking imo

export class impulse extends onStepOn {
onStepOn(componentData: BlockComponentStepOnEvent) {
componentData.entity.applyKnockback(
componentData.entity.getVelocity().x,
componentData.entity.getVelocity().z,
1,
1
);
}
}
Oh well
normal people would be running towards the jump pad
You didn't add any vertical knockback. And you need to adjust the horizontal knockback too
Idk, my intended use is for it to go in the players view direction
player velocity looks unintuitive
How do you use slime blocks?
counterpoint:These aren't slime blocks
Counter-counter point: A player would assume you'd be going in the direction you were going before like a slime block
Counter-counter-counter point:A player would reasonably learn that you go in the direction you are looking after 1 use
especially considering that is how the potion functions
https://github.com/SmokeyStack/adk-lib Custom Component library, first release
I canโt wait for parameters
Nice work but meh, kinda disappointing that this happened before Mojang ๐
Parameters would be bitchin
Well Mojang has far higher quality standards than me
Im working on a plant growth component rn :/ the block property name has to be hardcoded
They also had far more time than you to make that lol
I think it would be wise to release v1.0 before releasing a vanilla script
Just make a component for every possible name?

That works for Vanilla...but custom plants with custom growth stages? No
You do want players to have the freedom to use their own property names, right?
Iโm just sayingโฆ
regex when /s
Of course, but if they only confirmed theyโll provide those scripts in later updates..
Like they did with what components are getting its scripting version
But oh well
A good โtemplateโ for a custom component for a plant would be random ticking that changes from state 1 to 2, from 2 to 3, from 3 to 4.
Ping me when you make that
It sounds like you will do it lol
soon..
I can't really see them doing that tbh unless it's specifically for creators to use
How you gonna tackle data driven stuff?
Unless they literally hardcode the functions but give us params
Wait....
please no kayla
Yeah that's what I was thinking would happen
Or they just don't make those parts data driven
Like instead of adding a custom component for durability loss to the tools, they just make the rest of it data driven and let creators figure how they want to handle the durability loss
Durability still should be a component thing...there's damage change for a reason
You mean the durability decreasing automatically being a component? Or the current component we have
I meant the current component, it has damage chance
I think that's only taken into account for armor
Tangentially, it doesn't get talked about enough just how weird custom item durability loss is with vanilla components.
What would you want, @sinful stump? Customizable classes for custom components? Custom events/named entries on the object?
Did you know that giving a min chance of 0 for damage on durability does nothing
It still takes durability damage ๐
Are we referring to durability damage or vanilla events?
The former: Just implicitly damage the durability
The latter: Customizable classes would be amazing since we can just extend it as well. Not sure what you mean by the latter option? Got an example
๐ My current implementation isnt the best
class onStepOff implements BlockCustomComponent {
constructor() {
this.onStepOff = this.onStepOff.bind(this);
}
onStepOff(_componentData: BlockComponentStepOffEvent) {}
}
export class sayHi extends onStepOff {
onStepOff(componentData: BlockComponentStepOffEvent) {
componentData.dimension.runCommand(
`say D: don't leave me!!! from ${componentData.block.typeId} at ${componentData.block.x}, ${componentData.block.y}, ${componentData.block.z}`
);
}
}
``` but if we had something like this for vanilla events that would be great
Why is everything it's own class
this looks like too much work
bc...im importing it into my main file
Bump
Its probably not the ideal but it does help me organize
inb4 cici rants about how i just comitted a war crime atrocity or something
Good to know...if it overflows it goes back to the default ๐
If what overflows? The block state?
Yeah
There's no way to know all the vallues from a block state though 
Ignore above
Hmmm nvm
Nvm
Let's see if this owrks!
IT WORKS
RAHHH
What does
@compact epoch do you have a plant block v1.20.60 i could borrow? Preferabbly that changes model
Yea
One sec, lemme get to my pc
With model you mean bones or literally model
Because I have both
Which ever one uses bone visibility
Okay first one then
I will make a quick new geo because I didn't made the geo
or u just need the code
Both would be preferrable
I stopped the plant from reverting to it's original state now
Nice!
meanwhile
๐๏ธ nice content log
I am interested to know how you pulled the "Intentional Game Design" kill, or does that automatically happen (as it is only possible to do that with beds afaik)
and respawn anchord
That's a nice explosion
it's what it says if you use createExplosion
customEvent.blockTypeRegistry.registerCustomComponent('runecraft:self_destruct', {
onStepOn: (eventData) => {
eventData.entity?.dimension.createExplosion(eventData.entity?.location, 3, { allowUnderwater: true, breaksBlocks: true, causesFire: true })
}
})```
createExplosion is still ridiculous since damage is tied to radius size, but is nearly exponential
a radius of 3 one shots players..
๐
I wonder
if you know
that was very smooth if it was because you even moved the camera when stepping on it
look at me
Thats pretty awesome
Is it always one tick (after), or is there beforeEvent options?
Does that make sense? What's the delay
it's just using onStepOn
I think there is a forced delay though
because onStepOn changes a players actor property and runs a permutation to change scale
that's why it's not instant
Oh wack
If two blocks use the same name for block states but have different values then BlockStates.get('kai:growth').validValues will just choose a random state it seems
Or...scratch that, not random, just the first block that uses that state determined by the alphabetical of the identifeir
This sucks
I could use trySetPermutation I guess? But that wont really work for what I want. I really thought you could just get a block's state's valid values using BlockStates
oh yeah got another bug ๐
shameless bump
๐ not shameless. I provided context
These scripting methods are actually big. I have a lot of NPCs that do "RTS-style" work (woodcutters, miners, smelters) and they have to "find blocks" in certain volumes. Currently using "flood-fill" TypeScript impl., but these methods are god-send.
Now if we can just get the pathfinding API exposed into the JS side...
๐ yeah, we joke about navigation scripting api
Has anyone tried the unloadedChunks bit?
I mean we did have .getNavigationResult() for a while but I think that was for the simulated player only?
Ah, so it seems to already be in the JS API then - just not exposed as a stand-alone API.