No video

Scripting API Tutorial - The Basics (E01)

  Рет қаралды 2,047

Jaden Allen

Jaden Allen

Күн бұрын

Downloads
Bridge: bridge-core.ap...
Visual Studio Code: code.visualstu...
node.js: nodejs.org/en/...
Official Documentation: learn.microsof...
If your experiencing issues or have any questions feel free to join the discord found in the link tree below.
linktr.ee/jade...
0:00 Intro
1:00 Setting up a blank pack
4:43 Setting up Visual Studio Code
6:42 Scripting
#minecraft #minecraftbedrock #scripting

Пікірлер: 55
@Wei_Xia_Eloii
@Wei_Xia_Eloii 3 ай бұрын
8:25 In JavaScript, "==" checks for equality of values, but it doesn't care about the type. It's like saying, "Hey, are these things equal?" whereas "===" checks for equality of values AND types. It's like saying, "Hey, are these things exactly the same, including what type they are?" So, "===" is stricter and often safer to use because it avoids unexpected type coercion. For exemple : 1 == "1" is true, 1 === "1" is false
@JadenAllen
@JadenAllen 3 ай бұрын
This is true however in most situations === is not necessary and is something I tend to avoid because I am almost always working with variables of different types when comparing them. It is something I should've pointed out but it is also something I rarely end up using
@Wei_Xia_Eloii
@Wei_Xia_Eloii 3 ай бұрын
​@@JadenAllen It might seem convenient to skip "===" for brevity ; but it's a good habit to use it to ensure you're getting the results you expect, especially in larger and more complex codebases where variable types might not always be obvious. It's been almost 20 years that I've been dealing with JavaScript's inconsistencies, and more than once I've been caught by this kind of error and lost countless hours just because of a missing "=".
@MrGrapheneREVERB
@MrGrapheneREVERB 7 күн бұрын
999 now I am the 1000th subscriber
@JadenAllen
@JadenAllen 6 күн бұрын
YOOOOO THANK YOU SO MUCH!
@_SnowyPlayz_
@_SnowyPlayz_ 2 ай бұрын
Im trying to figure out how to get custom structures to spawn in my world. Theyre just tiny houses and end ruins, but I want them just for aesthetic to make the end look a little more alive. Is there any way to do that? I have been fiddling with this coding stuff for the past few days with little to no luck. This was my first time ever attempting something like this.
@JadenAllen
@JadenAllen 2 ай бұрын
Ya there's quite a few ways you could do that. One way is by spawning a structure every now and then in your world. Another way is by using features, these are files inside your behavior pack that allows you to spawn structures in the world. Features are designed to be for stuff like the ancient cities, pillager outposts, villages, trees ect. You can find the docs for features here learn.microsoft.com/en-us/minecraft/creator/reference/content/featuresreference/examples/features/minecraftstructure_template_feature?view=minecraft-bedrock-stable
@Zeabos66
@Zeabos66 6 ай бұрын
você explica muito bem gostei, mesmo eu entendendo só algumas palavras que você fala, mais tutorial top 👌
@JadenAllen
@JadenAllen 6 ай бұрын
obrigado, estou usando o Google Tradutor para esta resposta, então me desculpe se o idioma ou a redação estiver errado, mas se houver algo que você gostaria que eu abordasse no próximo vídeo, sinta-se à vontade para me avisar
@Zeabos66
@Zeabos66 6 ай бұрын
@@JadenAllen right language kkk beauty my bro, JadenAllen I'm Brazilian and I really like to mess with minecraft codes and codes like java and html but I know almost nothing and how your video helped me and I like it continues with this type of content that you go beyond my bro you explain very well I liked it, And we Brazilians really like this type of content of very top programming codes, I don't know if you can understand it but I tried to put it in your language
@JadenAllen
@JadenAllen 6 ай бұрын
@@Zeabos66 obrigado, isso significa muito para mim. Provavelmente irei abordar o actionformdata a seguir, que é o menu pop-up com botões. Também abordaremos a questão de dar itens aos jogadores usando os botões de formulário. Isso pode ser útil para algo como um sistema de loja.
@Zeabos66
@Zeabos66 6 ай бұрын
@@JadenAllen Ideia ótima! Muito top esse sistema de loja. Eu imagino algo tipo um menu para logar em um website, onde eu clico e sou redirecionado para uma página web. Ou até mesmo para o Discord, seria bem legal! Eu sou meio louco para esse tipo de coisa kkk JadenAllen só um cara cheio de ideia só falta saber progamar kkkk mais aquestão que minhas ideias vão muito além kkk
@thecasualgamers1403
@thecasualgamers1403 5 ай бұрын
Can you make a tutorial on downloading and setting up bridge and vs code Because I had some troubles on mac doing this the first time I downloaded it
@JadenAllen
@JadenAllen 5 ай бұрын
Add me on discord and I'll try and help get them installed, @jadenallen
@florentinodelarosa1207
@florentinodelarosa1207 5 ай бұрын
Thank you for this video!
@JadenAllen
@JadenAllen 5 ай бұрын
No problem, I hope it helped you learn something new. I'll have another tutorial coming out this week
@mightycrew2538
@mightycrew2538 5 ай бұрын
What about @minecraft/ui stuff? or even custom UIs Super hard to find videos out here showing us who want to learn, new and cool ways to improve our projects.
@JadenAllen
@JadenAllen 5 ай бұрын
I am finishing editing my video on it right now, should be up tomorrow. If you want me to reply to your comment when it comes out just let me know
@JadenAllen
@JadenAllen 5 ай бұрын
In approximately 34 minutes my tutorial for using the actionformdata will be coming out hope it helps :)
@mightycrew2538
@mightycrew2538 5 ай бұрын
I will go look here soon
@fabio_thierry
@fabio_thierry 6 ай бұрын
Your video is very good, congratulations. If possible I would like to see the use of scripts on NPCs. Doing something similar to RPG quests. I'm just learning this, while learning javascript and typescript
@JadenAllen
@JadenAllen 6 ай бұрын
Have you tried using the npc component for entities? I'll be showing how to make pop-up menus in the next video however the npc component handles the rpg aspect way better than the scripts would. It also makes it much easier to work with kzfaq.info/get/bejne/adybqZxelrfRYZc.htmlsi=3mNhq9hxp3MzCWTk
@Enjen_Mage
@Enjen_Mage 3 ай бұрын
Hey thanks for the video! Was wondering if you could make an updated version? I'm still new to the developing scene, but as far as I know Beta API's is not needed for scripting(?) Only when using Beta API Scripting methods. There are alot available for Stable Versions of the game! I think it'd be worth looking into, I just can't, for the life of me, understand how to read the documentation. So a tutorial would be pretty helpful!~
@JadenAllen
@JadenAllen 3 ай бұрын
There is quite a bit being added to the stable side of things however stuff such as playerBreakBlock or playerInteractWithBlock are still in beta and so are alot of the events and functions useful for scripts. As for reading the documentation I could either make a tutorial specifically on reading the documentation and learning how to use it (could take a while for me to get around to making it) or you could add me on discord / join my discord and I could hop in a vc and screen share to give an explanation of everything. Also my newest tutorial may be somewhat helpful when it comes to understanding aspects of java which in return can help reading the docs
@johnsteriman5949
@johnsteriman5949 3 ай бұрын
Awesome tutorial! However, is there any way to do something similar to the knockback stick that applies when you swing the stick or hit an entity with it? I've been trying to make a Newton Stick that applies equal knockback to both the attacker and the victim but cannot for the life of me find out any way to detect what item the player is currently holding.
@JadenAllen
@JadenAllen 3 ай бұрын
There is an event called entityHitEntity and it will pass the damaging entity and the entity being damaged, you can then check if the entity damaging is a type of player and if it is then you can get the inventory component and get the item on the players selected slot and then check if it's typeid is a stick. If it is then you'd apply the knock back to both players
@JadenAllen
@JadenAllen 3 ай бұрын
If you need more of an in depth answer then consider joining my discord and I should be able to help out better, link is in my link tree in my channels description
@johnsteriman5949
@johnsteriman5949 3 ай бұрын
@@JadenAllen I unfortunately don't have Discord, but given the issues I'm experiencing I might just have to get it. But from what I've seen, there no longer seems to be any selectedItem method or property in the current stable version. The only other thing I can find that even vaguely references it is the EquipmentSlot.Mainhand enum, but I can't find any way to use that to access what the player is currently holding.
@RaiderAvian
@RaiderAvian 18 күн бұрын
I followed the steps as best I could with setting up visual studio code, downloaded node.js, installed it, then copied and pasted the powershell. But then am stuck. I dont think the node.js is installed correctly. And the powershell did not load.
@JadenAllen
@JadenAllen 18 күн бұрын
@RaiderAvian what is the issue your experiencing?
@JadenAllen
@JadenAllen 18 күн бұрын
@RaiderAvian also it may be easier for me to help if you add me on discord or join my discord found in the linktree in the about section on my KZfaq channel. KZfaq doesn't always give me notifications for comments so it's more reliable to get help that way
@Aromastoffe
@Aromastoffe 6 ай бұрын
Thanks for a tutorial for this
@JadenAllen
@JadenAllen 6 ай бұрын
If there's any tutorial you'd like to see regarding addon creation, or scripting feel free to let me know and I'll make sure to do my best to explain it in the next video!
@SkySloth
@SkySloth 5 ай бұрын
Cool :)
@JadenAllen
@JadenAllen 5 ай бұрын
🫡
@pokemetel6886
@pokemetel6886 5 ай бұрын
This is great for people just starting out! great work man keep it up! I hate how they've been adding restrictions for some things tho, like the lore restriction, to only 20 lines with only 50 characters per line, they could have just easily added a scroll mechanic to item lore, there was litteraly an addon that did it, which it was just a simple ui change, super easy to do, but nooooooo, anyways, great work, i know alot of people will benefit from these toutorials!
@JadenAllen
@JadenAllen 5 ай бұрын
Thank you, it means alot! I'll be having another tutorial come out sometime this week going over the forms/ menu popups, im curious about the item lore scrolling, was it like a scrollbar or did is just have a constant animation scrolling down?
@JqkePlqyz
@JqkePlqyz 4 ай бұрын
I have put import { world } from “@minecraft/server”; but it still said the main.js is missing, is it because I exported it as a minecraft addon (it wasent showing on my behaviour pack list so I exported it as a addon)
@JadenAllen
@JadenAllen 4 ай бұрын
Do you have the Beta Api experimental toggle on?
@JqkePlqyz
@JqkePlqyz 4 ай бұрын
@@JadenAllenyeah
@JadenAllen
@JadenAllen 4 ай бұрын
@JqkePlqyz what version is the server module in your behavior packs manifest. It should be 1.10.0-beta or 1.9.0, the beta has alot more cool things to work with though
@JqkePlqyz
@JqkePlqyz 4 ай бұрын
@@JadenAllen I put 1.9.0
@JadenAllen
@JadenAllen 4 ай бұрын
@@JqkePlqyz if your still having issues feel free to join my discord, ill be able to respond alot quicker as well as it helps to be able to see the files when trying to fix things (links in the description). But it will only say main.js is missing when the main.js file is empty or if it is not in the scripts folder
@astinbusuego5181
@astinbusuego5181 2 ай бұрын
how to change the maximum stack of an item? like 64 to 100
@JadenAllen
@JadenAllen 2 ай бұрын
In scripts you cannot modify the maxAmount as it is readonly however in the items components you may be able to add the max_stack_size component and set the value to 100. It's not giving me errors when doing this however in game it may not like having it that high. Not sure though, you'd have to test it
@astinbusuego5181
@astinbusuego5181 2 ай бұрын
@@JadenAllen can u give me a sample because I don't know what to put in visual studio (I'm newbie on coding I'm sorry XD)
@JadenAllen
@JadenAllen 2 ай бұрын
@@astinbusuego5181 "minecraft:max_stack_size": 129 that goes in the components of the item
@king-yz1kp
@king-yz1kp 6 ай бұрын
Hi bro
@bonnierobloxrip
@bonnierobloxrip 21 күн бұрын
how to learn to code at all?
@JadenAllen
@JadenAllen 21 күн бұрын
@bonnierobloxrip id suggest maybe looking at part 3 I made on this series for a better introduction to scripting. This tutorial helps with setting up a pack but the part 3 I made was more for learning javascript. If you have any specific questions that you may get stuck on then feel free to join my discord (i think its linked on my linktree in the description if not then in the about section on my channel should have it) and I'll do my best to help out
@king-yz1kp
@king-yz1kp 6 ай бұрын
How to call placeholder api data into script
@JadenAllen
@JadenAllen 6 ай бұрын
I'm not sure if your referring to a bedrock version or the java version but the java version would not work for bedrock as it's a spigot plugin api and bedrocks server is entirely different than java. If there is a bedrock version then you'd need to find the nodejs import for it, something like npm i "@minecraft/server" or if it is only available on github than you can download the package and place it inside of the node modules folder in your behavior pack and then in visual studio, Intellisense should start working with the api
@JadenAllen
@JadenAllen 6 ай бұрын
If your talking about for a java server than you can follow the documentation for installing into your server found here wiki.placeholderapi.com/developers/using-placeholderapi/
@king-yz1kp
@king-yz1kp 6 ай бұрын
Thanks bro
@JadenAllen
@JadenAllen 6 ай бұрын
@@king-yz1kp no problem hope that helps
The Ominous Bottle has a lot of problems right now.
6:20
Phoenix SC
Рет қаралды 476 М.
Scripting API Tutorial - UI Forms (E02)
8:26
Jaden Allen
Рет қаралды 669
If Barbie came to life! 💝
00:37
Meow-some! Reacts
Рет қаралды 55 МЛН
IQ Level: 10000
00:10
Younes Zarou
Рет қаралды 13 МЛН
Son ❤️ #shorts by Leisi Show
00:41
Leisi Show
Рет қаралды 10 МЛН
I'm Excited To see If Kelly Can Meet This Challenge!
00:16
Mini Katana
Рет қаралды 34 МЛН
I Used Code to Go Viral on Social Media
8:54
Green Code
Рет қаралды 201 М.
I Asked AI To Make Redstone For Me
11:16
Purplers
Рет қаралды 7 МЛН
CARPET MOD in Minecraft Bedrock Edition :: Canopy Full Guide Part 1
28:26
Making a Game With C++ and SDL2
8:14
PolyMars
Рет қаралды 1,7 МЛН
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 541 М.
Making Minecraft from scratch in 48 hours (NO GAME ENGINE)
16:38
The Linux Experience
31:00
Bog
Рет қаралды 802 М.
How I Traveled at Lightspeed
24:43
Myles
Рет қаралды 1,4 МЛН
3 Hours vs. 3 Years of Blender
17:44
Isto Inc.
Рет қаралды 4,5 МЛН
Can I Run Youtube Entirely From My Terminal? (No Browser)
15:31
If Barbie came to life! 💝
00:37
Meow-some! Reacts
Рет қаралды 55 МЛН