Scripting API Tutorial - The Basics (E01)

Поделиться
HTML-код
  • Опубликовано: 29 сен 2024

Комментарии • 57

  • @MrGrapheneREVERB
    @MrGrapheneREVERB Месяц назад +3

    999 now
    I am the 1000th subscriber

    • @JadenAllen
      @JadenAllen  Месяц назад +1

      YOOOOO THANK YOU SO MUCH!

  • @JqkePlqyz
    @JqkePlqyz 6 месяцев назад +1

    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  6 месяцев назад +1

      Do you have the Beta Api experimental toggle on?

    • @JqkePlqyz
      @JqkePlqyz 6 месяцев назад +2

      @@JadenAllenyeah

    • @JadenAllen
      @JadenAllen  6 месяцев назад

      @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 6 месяцев назад +2

      @@JadenAllen I put 1.9.0

    • @JadenAllen
      @JadenAllen  6 месяцев назад +1

      @@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

  • @bonnierobloxrip
    @bonnierobloxrip 2 месяца назад +1

    how to learn to code at all?

    • @JadenAllen
      @JadenAllen  2 месяца назад +1

      @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

  • @WhatOfOToldYou
    @WhatOfOToldYou 13 дней назад +1

    When I first put the add on into the world, it gives me a ton of errors for azaleas and stuff like 2.0.0 requested by something

    • @JadenAllen
      @JadenAllen  13 дней назад

      @@WhatOfOToldYou if you show me the exact error I'll be able to help alot better, I have no idea what the azalea thing is but usually you only see that a version is being requested is when your version for the scripts is out of date. The version I've shown in all my tutorials is out of date by now and so you would need to change the server module version to 1.14.0 as that's the most recent stable release

  • @_SnowyPlayz_
    @_SnowyPlayz_ 4 месяца назад +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  4 месяца назад

      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

  • @RaiderAvian
    @RaiderAvian 2 месяца назад +1

    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  2 месяца назад

      @RaiderAvian what is the issue your experiencing?

    • @JadenAllen
      @JadenAllen  2 месяца назад

      @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 RUclips channel. RUclips doesn't always give me notifications for comments so it's more reliable to get help that way

  • @johnsteriman5949
    @johnsteriman5949 4 месяца назад +1

    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  4 месяца назад

      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  4 месяца назад

      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 4 месяца назад

      @@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.

  • @king-yz1kp
    @king-yz1kp 7 месяцев назад +1

    Hi bro

  • @astinbusuego5181
    @astinbusuego5181 3 месяца назад +1

    how to change the maximum stack of an item? like 64 to 100

    • @JadenAllen
      @JadenAllen  3 месяца назад

      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 3 месяца назад

      @@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  3 месяца назад

      @@astinbusuego5181 "minecraft:max_stack_size": 129
      that goes in the components of the item

  • @Enjen_Mage
    @Enjen_Mage 5 месяцев назад +1

    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  5 месяцев назад +1

      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

  • @fabio_thierry
    @fabio_thierry 7 месяцев назад +1

    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  7 месяцев назад

      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
      ruclips.net/video/3vkv9-1Qm1c/видео.htmlsi=3mNhq9hxp3MzCWTk

  • @thecasualgamers1403
    @thecasualgamers1403 6 месяцев назад +1

    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  6 месяцев назад

      Add me on discord and I'll try and help get them installed, @jadenallen

  • @king-yz1kp
    @king-yz1kp 7 месяцев назад +1

    How to call placeholder api data into script

    • @JadenAllen
      @JadenAllen  7 месяцев назад

      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  7 месяцев назад

      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 7 месяцев назад +1

      Thanks bro

    • @JadenAllen
      @JadenAllen  7 месяцев назад

      @@king-yz1kp no problem hope that helps

  • @Aromastoffe
    @Aromastoffe 7 месяцев назад +1

    Thanks for a tutorial for this

    • @JadenAllen
      @JadenAllen  7 месяцев назад

      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!

  • @losing_interest_in_everything
    @losing_interest_in_everything 4 месяца назад +1

    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  4 месяца назад

      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

    • @losing_interest_in_everything
      @losing_interest_in_everything 4 месяца назад

      ​@@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 "=".

  • @florentinodelarosa1207
    @florentinodelarosa1207 7 месяцев назад +2

    Thank you for this video!

    • @JadenAllen
      @JadenAllen  7 месяцев назад

      No problem, I hope it helped you learn something new. I'll have another tutorial coming out this week

  • @mightycrew2538
    @mightycrew2538 7 месяцев назад +1

    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  7 месяцев назад

      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  7 месяцев назад

      In approximately 34 minutes my tutorial for using the actionformdata will be coming out hope it helps :)

    • @mightycrew2538
      @mightycrew2538 7 месяцев назад +1

      I will go look here soon

  • @Zeabos66
    @Zeabos66 7 месяцев назад +1

    você explica muito bem gostei, mesmo eu entendendo só algumas palavras que você fala, mais tutorial top 👌

    • @JadenAllen
      @JadenAllen  7 месяцев назад +1

      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 7 месяцев назад +1

      @@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  7 месяцев назад +1

      @@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 7 месяцев назад

      @@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

  • @SkySloth
    @SkySloth 6 месяцев назад +1

    Cool :)

  • @pokemetel6886
    @pokemetel6886 7 месяцев назад +1

    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  7 месяцев назад +1

      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?