#1.20.40.21 - Preview
1 messages Β· Page 2 of 1
So you're just, not gonna say it?..
@tall spindle hello! :)
We said who it was a little over a week ago
wait what
iβm late apparently
i still donβt know how lmao
How did I not notice that conversation.
Hi, nice to meet you! π
does this look good
hey, why do you lurk in this discord and then post stuff from here on your twitter account lol
Does this rectangle move with the camera?
nope
it's a painting bug in deferred
Oh ok
where the paintings are invisible
Nice to meet you too! :D
Will Mojang ever fix the /fill command with portals?
It used to work just fine but after I think was the 1.19 or 1.20 update the portals now break everytime you try to fill them in.
Just thought it was weird that this used to be a working feature and is now broken.
so cute
What does plausible mean in this situation
I would think it means it's been looked over by a mod/helper but they haven't been able to reproduce it yet
really cool stuff! is it playable? or does it just "spoof" the existence of a realm?
it doesnβt spoof the existence of a realm, itβs playable
also that one thatβs in the worlds tab connects me to the hive
meaning you can make it connect to your own server, hosted without the restrictions of realms
correct
that is awesome
but you mentioned something about modifying the hosts file, meaning it's not so user friendly is it?
itβs not lol
itβs alright
its working ?
it seems to be yss not offical
damn
official fix is coming soon
iirc should be coming in the next preview?
not quite sure as they are also fixing the render dragon engine
But it will be coming in 40.XX versions
Yeah we were promised that first mali and PowerVR fixes should arrive in the next preview
no, i'm using the YSS Shader Fix that Smasher mentioned..
honestly, why PowerVR
I mean like, that's one was for low-end devices. can't be guaranteed if it'll run on deferred
how will you start an item event if they remove the on_use? like shoot projectile?
Scripting
ye but trying it on script is not triggering the event
const item = event.itemStack;
item.triggerEvent('awp:throw_item');
what lol
That doesn't look like the right syntax π€
but this is the same way I do to execute entities events, unless for items is different, anyway I opened a thread on API just in case
looks like item.triggerEvent is broken at least that was the answer from Remember M9 on the thread, so I guess before the preview will come out to beta the triggerEvent will be fixed, right? otherwise it will just broke a lot of custom items that uses on_use + events
its versioned, just dont use format_version 1.20.40
Their goal is to completely remove item events from the Json. Instead, you should be using scripts.
I m also curious to see how will it look like in API, projectile events carry the owner of the projectile information, if you simple spawn the projectile using API I guess it wont carry the owner, or at least, on my tests I was not able to track the source that fired the projectile, so if you want to do something more complex I have no idea how to do it without the events from the item itself
Well, as long they don't remove item events themselves there's no problem
I was finally considering to learn to make custom items, but after reading everything in this thread so far, it's sounds like I'll have to learn an entirely new language just to do basic things. I don't even know where to go to learn to script.
is run_command in entity json going to be depracate?
that is the current plan we've communicated.
well shoot.
why is that happening and what is the alternative for people who use json only and dont wanna go to script
animation controller maybe?
Suffer
Jokes aside, BP AC is the other alternative that people have been using for a while
BP AC my beloved
ok, i'll try to learn that
incompatibility
but I dont like this trend of killing off features and forcing other alternatives
And run_command isn't?
makes bedrock development volatile
no, run_command in items is compatible with other addons
It is what it is
We're talking about entities
We don't like it either. Which is why we don't take these decisions lightly. Even when we change experimental features like runcommand
-_-
true
is compatible too (not for player)
-_- what?
But your development experience will be the most volatile if you use experimental features, and much less volatile if you only use stable ones.
maybe so
if I use a custom entity with run_command it works with other custom entities with run_command from another addon
i need to see how to move my thing to animation controller from run_command event
π Fortunately, you and your team have learned from HCF seeing Scripting and Camera being in experimental for a short amount
How?
We're trying to get better!
we are talking about run_command on entity events right?
thats what we are talking about yes
Very grateful for that, I cant fathom scripting being experimental for 3 years
for some reason its being remove, maybe I hear that its buggy on clients or something
It started behind experimental 2.5 years ago π And it only took 1.5 years to start getting stable APIs. π
well, its compatible with any addon xd
Mojang say mojang do
I have mobs with more than 5k code lines using run_command
idk my friend
deleting run_command it hurts a lot
It is what it is
i know how u feel
Just programatically remove them
wdym?
do it now early on before they are gone gone
I though was item run_command, but its entity run_command
._.
tbf, ACs are pretty performant
true, but kinda complex for noobs
the next evolutionary step after AC's is scripting though
they removed run command from entities?
it isnt
its on mojang plans
i don't know how to trigger ac from event firing
anyway - run_command is still behind experimental. we have no plans to bring it out of experimental, so at some point it will be deprecated. but I'll try to give ya'll a heads up before that happens.
how much do we need to pay for that not to happen
the problem now is the time to execute commands now, imagine doing a AC from every time you need to execute a command
painful
i know lol
its like how they murdered the way items bigger than 16x16 are added to the game
1 sec before the preview releases
In that case, I would prefer to leave it as is.
Use scripting
ill prepare Kayla a cielito lindo every single day for a year if mojang dont get rid of run command
come on... I've been doing better with item component informs
Looks at bundles experiment in Java
conditional_list π
What exactly is going to happen with /scriptEvent with run_command being deprecated from everything? Is it meant to just be used for troubleshooting?
its true, but if something has been in the game for so long, when is it not considered just a normal feature and not "experimental"
scriptevent is still useful
just wondering, is there a way that we can use entities to trigger a scriptevent command without run_command
It doesn't depend on run_command
you don't need run_command to use /scriptEvent?
animation controllers
you could probably look at the entity's property
thats not the solution
I could just deprecate it today then π That way you don't get more used to it π
not what I'm talking about, that's a given
odd response
It is A solution π
On a Friday???

I'm feeling DANGEROUS!
animations
I like run_command as much as everyone else here
Toxic relationship with run_command
Listen for changes in actor properties? Hmm maybe
They should at least provide a better solution than animation controllers
I am in great marriage with run_command
I know! Like some sort of "run_command" feature!
never had an issue with it, all good experiences
Not sure what the hatred of using scripting is
but in seriousness... run_command is still a very contentious topic. and there's work we need to do to improve entity logic firing.
besides that...
They don't want to be spoiled
Not everyone wants to make an entire script (and deal with mojang's changes with the API and updates etc...) when they can use a simple component. Seems very obvious to me.
the API gets stable too
You don't have to deal with constant changes
"An entire script" though?
there is no way in hell i am dealing with that.
Not everyone wants to make an entire json file (and deal with mojang's changes with the API and updates etc...) when they can use a simple script. Seems very obvious to me.
I just wish Minecraft Addon development dont turns into 10% json and 90% scripting because JSON is fun
Actually now that I mention it, there's an event to detect event triggers right?
json files rarely change or update, I have been using a 1.16.0 file since... well 1.16.0
import { Dimension, system, world } from "@minecraft/server";
const unpushableBlocksArray = [
"runecraft:chaos_altar"
]
world.beforeEvents.pistonActivate.subscribe((eventData) => {
let attachedBlocks = eventData.piston.getAttachedBlocks()
for(let i = 0; i < attachedBlocks.length; i++) {
if( eventData.dimension.getBlock(attachedBlocks[i]).typeId == "runecraft:chaos_altar") eventData.cancel = true;
}
})``` here is my entire script..? took maybe 10 minutes
no thanks.
and it can account for all blocks
-_- they change every update
Use scripting 
vs before having to go into every single block and changing components
The Scripting API is becoming stable. You don't have to worry about change as long as you stick to the stable API versions
"learn to code"
That's what all the cool kids always say, right?
no
Me in my early 20s
run_command will save a lot of development time, it would be a shame if it were removed
9 mins to find the docs
real cool kids copy and paste "stick to JSON"
I know how convenient it is. I'm just giving the current information.
Speaking of docs, the server module page is taking a long time to load now
In reality, I have a random server scripting section bookmarked, I open it up, ctrl+f the keyword and boom! 70 results and then I give up and scroll for it
Guys. Something tells me they don't want to remove it and make us mad on purpose
And why is run_command getting removed exactly?
Because scripting or is there any other reason
I think they want to make us mad!
something about issues with it firing on clients or something idk.
and run_command has the "target" option very useful
AC doesnt have that
I think it's ordering issues
true... this is the biggest thing imo.
I think it's an elaborate plan to make more people interested in scripts
You can target them with scripting
I have trully never experienced a single issue with run_command and I have used it everywhere in my whole addon development journey from time to time
I need to have the player teleport when they punch/interact with an entity, target helped with that.
entityHit / entityInteract events: bonjour
Scripting shills again... smh.
people have to be interested in seeing the benefits of script, not force them
timing complexities and how those complexities can lead to very unpredictable and untestable situations. this makes it dangerous for us to support.
I'm not going to learn an entire language just to run a command.
same
mobs with more than 5k code lines xd
no issues
same here
You can do so much more than just running a command though
How can I replicate these?
Then programatically remove it
Why if I can just run a command!
the bar for entry for creating addons is being made higher and higher, not everyone wants, has the time, or cares to learn script api + javascript.
I dont have much time, let me enjoy it
wdym?
Use python to read your json file and remove all instances of run command
guess i'll use @p in an animation controller.
im happy I just have 1 entity with run command
._.
sometimes I think you are joking
Or just use the event for no loss in accuracy
but im having serious mental issues with my blocks right now.
But im not. Yiure complaining that its too much work to remove it right?
true! I can use run_command in the event!
entityInteract / entityHurt
Its like they don't read... they can joke and laugh because they don't depend on the features we use. Elitist scripting users, laughable even.
you lack reading comprehension
I love run_command too, but move on
So did you?
Removing the run_command from the code is the least of the problems, replacing it is the biggest problem, developing very complex entities would now take twice as long.
If you don't know what you're doing
run_command is probably one of the most used experimental features
Shouldn't it be a no-brainer to want to use whatever tools you have at your disposal to make the best add-on you can?
Just the ability to communicate between the world & JSONs with ease makes it very powerful
I understand that, but what can be done? It's not becoming stable. That we know
i'm going to move on eventually, but i'm sure everyone will be complaining when... they need to make a block bigger than the bounds, create an entity that can run a command, create an item bigger than 16x16... sure you can still do these things... but now its harder, for what? "they were experimental, suck it up and deal with it" no matter how long its been in the game and used for...
Yeah π
That's what experimental means
insanity lmao
I don't really understand what the issue is with scripting? The mojang team is trying to make addons more powerful and remove the limitations of json. I mean, there's a reason java edition mods are written in java and not yaml. Of course there's a learning curve for someone not familiar with programming but so is any other modding tool for other games. I think it's definitely the right decision going forward.
I will agree that kayla amd her team were very new and didnt know the long term effects of keeping something experimental for 3 years. But theyre learning and have learned from their past mistakes
I seriously would love nothing more than to ship run_command tomorrow.
what become stable means? I don't know much about the Minecraft Bedrock code, but if the functionality is done, why would removing it from experimental break something in the code?
guys just learn javascript
Learn JavaScript from scratch by solving over a hundred different coding challenges. Go here for the interactive browser version: https://scrimba.com/learn/learnjavascript
βοΈ Code βοΈ
Two versions:
π Interactive version: https://scrimba.com/learn/learnjavascript
π GitHub repo: https://github.com/scrimba/learn-javascript
βοΈ Created by Per Harald...
Because the point is to experiment with. There's no guarantee in it staying
"just learn javascript"
Yeah? Its like us saying just learn json to someone who wants to make addons
Didn't you have to learn how to navigate your way through JSON? what's the difference
Animation controllers are another learning experience
JSON isn't a language lmao
rude
It doesn't matter, you still have to learn things
It still takes knowledge to work with
tbf.. HCF started before I joined, so I'm only responsible for the last 3 years π not the few months of decisions before that!
its all your fault
javascript has nuance, performance, learning how to use the API and navigate the docs.
Kayla when she inherited a dumpster fire
I mean, without run_command, how would communicating between entities & the world (even just scripts) be? Extremely long ACs? script events checking every tick for behaviour components? Those all are not great options, imo.
If someone has a good alternative, please, let me know
there is a lot of difference bro...
don't you have to navigate the docs for JSON too?
You didn't just know about everything
the alternative is "Suck it up and use scripts like everyone else sheep"
we have ideas on how we'll improve this. but there's still more work to do.
average bridge user π
animations can also be used, but..
None of us have called you sheep? Why so rude now?
I know JSON...
Isn't there a scripting event for entity running events?
Ok, but I do use bridge
bridge has clear text JSON editing, outside of the odd JSON formatter thing.
ew
I like bridge because template plugins, and its similar to the blockception plugin in VScode
I move between the two frequently
ok well, I gotta run. Glad I didn't start a controversial topic in here π
Thanks
I do use scripts, that's not the point
oh that explains much
Nice pun
We'll continue "discussing" how to adapt to this
I was being hyperbolic
Have a good run, remember, 150 minutes of cardio is the recommended amount for cardiovascular health!
scripts right?
I guess you could have entity events & use beforeEntityDataDrivenTrigger script event.. but scriptEventRecieve is a much cleaner alternative imo.
no, a new experimental feature we can use which will be deprecated in 3 years
I think we'll invent something new for you all to learn. π
Molang pt. 2
The mistake was to leave it experimental for so long
Assembly when
indeed that was the mistake
death would be a more welcoming feature
Better late than never much later though
It better be
"this feature adversely effected 10% of our userbase, the feature should be removed."
The alternative would have been to break all of the content ya'll have without having a good answer to "well what else should I use"
I am scared about the removal of run_command, but sounds like fun
I hope it has the same advantages
Stockholm Syndrome (colorized)
Have you had any thoughts on alternatives
Or still need to cook
They said they are working on coming up with alternatives, but its a long road.
Yes. But they arenβt all ready yet.
well good luck
So for now, hold tight. Keep using runcommand if you want.
Upcoming Holiday Creator Features
Mojang really changed the definition of upcoming
every preview update is a holiday with mojang
i like the deferred renderer stuff thats cool
and we got mali support which is nice
long road ahead for deferred
sean make me phyton script to update all my blocks to .30 thanks
There's a lot on my wish list
I have not even finished updating them to .20 π
πͺ Me using ADK to programatically make JSON files
true, but the road is paved with good intentions and hopefully good opportunities
I wanna see stuff similar to the core shaders in java
a man can dream
we got stuff that aren't even common in Java shaders
introduce me your friend
Thanks for the free script
true but the vanilla shader system in java is cool
Do you know C++?
go ahead and use it, it's great for stopping blocks from being moved by pistons lol
not yet
did not know it was possible
a block property for this would be nice
or block tag
or idk
That being said. the script is broken lol
I think it's funny.
Java: customizable shaders but requires mods for more advanced lighting
Bedrock: has advanced lighting but requires mods for custom shaders
I don't know what I was doing when I made this script
they look nice, but clearly fake and screen space
import { world } from "@minecraft/server";
const unpushableBlocksArray = [
"runecraft:chaos_altar"
]
world.beforeEvents.pistonActivate.subscribe((eventData) => {
let attachedBlocks = eventData.piston.getAttachedBlocks()
for(let i = 0; i < attachedBlocks.length; i++) {
for(let x = 0; x < unpushableBlocksArray.length; x++) {
if( eventData.dimension.getBlock(attachedBlocks[i]).typeId == unpushableBlocksArray[x]) eventData.cancel = true;
}
}
})``` π
Was the previous one broken or something?
I wasn't even using the array LOL
I must have been half asleep
Can someone please make a custom piston
I know it's possible with current features
No worries. Just supply us with free scripts like this and fix them everytime they break.
it costs internet service
Cool, make a script that checks custom blocks to see if there's air beneath them and to break the block if that happens
Speedrun π
Actually I think a tag would be better
easy
here we go again
a custom tag
create a GH for me and gravel with your free provided scripts
Hmmm some sort of "air tag"
Idk, it's just my add-on
you'll win two thanks with every script
only provided to contributors and people who say they will contribute but never contribute π
I'll give you $1 per script
$1 is cheap
I am a contributor
Why giving that when you can just say thanks
Bendy piston addon like the java datapack when
lol
Gravel new free script dropping incoming
yay
Free scripts? Yippee!
free custom mob head script! 10 left in stock
can you give me a script that detects if there is power 1 or more of redstone in any faces of the custom block and if so, change states in it
least obvious virus be like:
Do my air one first
that will get us iron trapdoor in wiki gravel
Cool. Sadly I don't require custom mob heads at this time.
Oh no...custom doors moment
darn, can I interest you in a custom fishing script?
No
bip bup
bip bop custom doors suck
is your hithox two blocks high?
import { world } from "@minecraft/server";
const unpushableBlocksArray = [
"runecraft:chaos_altar"
]
world.beforeEvents.pistonActivate.subscribe((eventData) => {
const blocks = eventData.piston.getAttachedBlocks();
for (let i = 0; i < blocks.length; i++)
if (unpushableBlocksArray.includes(eventData.dimension.getBlock(blocks[i]).typeId)) return eventData.cancel = true;
})

nope
suckz
just using two blocks
:(
Theif
bro copied from runescape
I want to be as basic as possible in my implementations π
this .includes thing is ridiculous!
Would you rather another for loop?
don't you dare tell me that embedding for loops inside of each other makes it look more confusing
It do
I would use a forEach, but it runs regardless of returns, so a for loop for the top isn't actually that bad
and a script that acts exactly like on_interact and run_command
and you can insert molang as conditions
lol
easy js world.afterEvents.playerInteractWithBlock.subscribe((eventData) => { eventData.player.runCommandAsync("say hi") }
done
I think your missing the command part
done
It's not running a command
HAHA
I knew it was gonna be say hi
Literally every Add-On creators go to test command
does it works in the block
wdym
yeah
yikes
on interact? There's an event for that:tm:
(In preview)
brand new
ye
but Block.getRedstonePower(); 
π€―
A script that detects if there is redstone power above 1 in any of the faces of a any custom block, and changes a state value on it if so.
I am concerned about one block crawling working with the use of a bug as a feature
I created a basic script that replaces the functionality of run_command if anyone would like to use it. I think it works pretty well for my usecase. It uses the latest beta for 1.20.30 (1.4.0-beta @minecraft-server)
Thank you @nova olive for helping me setup a script api environment with all the typings and stuff and sending me the docs
if you have a feature you would like me to add to it let me know π
wow, from a damage_sensor and a run_command with 3 lines to that.
Yeah, it sucks, but we have an alternative which is very malleable for people who are more experienced with the script api
its basically copy paste for anyone who doesn't care to do anything else with it besides edit the config
all you need to touch is this part:
const entityConfig = {
entitiesThatCanHit: [
{
entity: 'minecraft:player', // The entity that can hit others (leave blank to allow any entity)
entitiesToHit: [
{ entityType: 'minecraft:pig', command: 'say I hit a pig!' },
{ entityType: 'minecraft:cow', command: 'say I hit a cow!' },
// Add more entities and commands as needed
]
},
// You can define additional entities that can hit with their own targets and commands like below
{
entity: 'minecraft:herobrine', // The entity that can hit others (leave blank to allow any entity)
entitiesToHit: [
{ entityType: 'minecraft:pig', command: 'say I hit a pig!' },
{ entityType: 'minecraft:cow', command: 'say I hit a cow!' },
// Add more entities and commands as needed (like above)
]
},
]
};```
it also means that all hit interactions between any entity can be handled in a single file
which is good in my opinion
i'll try and add a right click interaction too, but we don't have a great way of doing that right now... especially without the little mobile button that pops up
Absolute win, all your events in one file
praise the sun
what about events triggered by timers?
I can add that, you mean commands triggered by a timer?
in ticks
or a delay when a command is executed when an entity hits another entity
I can add both I think
by minecraft:timer
I see, I can add that to the file
another convert
I looked into script api more, and I thought it was like gametest where it always breaks every update, it can do that but it depends on what you use in the script.
most of the "breaking stuff" is renaming functions
What a rubbish π€’
π₯± Nuh uh
all my entities with various execution commands incompatible for future versions, the future looks very innovative bro
π
ππ»
Update your addon bro
yeah, that's what's left when you know that there are incompetents working on the game in which you create content.
Very inclusive

Or is it incompetent for you to rely on experimental features and lazy to update your addon?
There was a real reason the feature was removed, I have no idea what that reason was, nor did I ever experience the bugs that said feature supposedly introduced, but we just have to trust that Mojang had a good reason to do it.
Doing anything else is futile, because nothing will change.
Yes, that's for sure, who doesn't like to waste their time writing a thousand commands and other codes when you already had it done in an easier way and with much less text?

I disagree with this take, the same could be said for quasi-connectivity which is a bug in java edition and by deffinition an experimental accident that was left to stay because the community used it so much.
It wasnt introduced as experimental at all. Its just a bug which Mojang seems to have a weird tendency to cave to whatever Java players want since theyre more sensitive to change
It worked so badly that all the commands I wrote worked correctly. But hey, what can we do.
Thats how I feel man, but we can't do anything about it
π°
Why do people not use guard clauses. 
my script is flawless π
Without the less
what's wrong with it
wdym
running .getBlock multiple times is not good
Whose gonna stop me
it will make the script slower
I concede that one
π€ also I wonder why do people not use Vector.add
Vector's aren't real
fair
Looked them up, they just seem like they're for people that are afraid else statements
//explosion item drop
world.beforeEvents.explosion.subscribe((eventData) => {
const impactedBlocksArray = eventData.getImpactedBlocks();
const dimension = eventData.dimension;
for (let i = 0; i < impactedBlocksArray.length; i++) {
for(let x = 0; x < mobHeadArray.length; x++) {
const block = dimension.getBlock(impactedBlocksArray[i]);
if(block.hasTag(mobHeadArray[x][2])) {
const blockLocation = ({ x: block.location.x + 0.5, y: block.location.y + 0.4, z: block.location.z + 0.5 });
system.run(() => {
dimension.spawnItem(new ItemStack(mobHeadArray[x][0], 1), blockLocation)
})
break;
}
}
}
});``` happy?
Yes, thank you!
if else is for people who can't decide on ice cream flavours
how do I define the blocks that will run the commands π
Block.setType is better than running the setblock command lol
that's fine
oh okay
I mainly want that to run commands from the block & change block states on interact. Also would be cool to be able to define item as condition
this maybe?
const block = [
"minecraft:grass",
"minecraft:dirt"
];
world.afterEvents.playerInteractWithBlock.subscribe(({ player, block }) => {
if (blocks.include(block.typeId)) {
player.sendMessage( "Hello!" );
};
});
also we should move to #1067535382285135923
lets do that
That was a fun chat to catch up on
hii Thomas!
@shadow stream what do you think? :D
you just initialized everything in the subscribe instead of eventData?
Yeah and just changed some other things
look around, you can will be able to see what got changed
And then how can they make projectiles? (without scripting)
Lua 
