Fabric Modding Tutorial - Minecraft 1.20: Custom Blocks | #3

Sdílet
Vložit
  • čas přidán 10. 07. 2023
  • In this Minecraft Modding Tutorial for Fabric, we are adding Custom Blocks to Minecraft 1.20!
    == MODDING COURSES ==
    FORGE ▶️ url.kaupenjoe.net/CourseForge...
    FABRIC ▶️ url.kaupenjoe.net/CourseFabri...
    == COMPATIBILITY ==
    ✅ Compatible with 1.20, 1.20.1, 1.20.2
    == ASSETS & DOWNLOAD LINKS ==
    GitHub Repo: github.com/Tutorials-By-Kaupe...
    Assets Zipped: url.kaupenjoe.net/mbkj51/assets
    == SUPPORT ME ON PATREON ==
    ▶️ / kaupenjoe
    == 25% OFF FOR GAMING SERVERS ==
    ▶️ www.bisecthosting.com/Kaupenjoe
    == TAKE A LOOK AT MY COURSES WITH COUPON CODES ==
    ▶️ NEW Forge Modding with Minecraft 1.20.X:
    url.kaupenjoe.net/CourseForge...
    ▶️ NEW Fabric Modding with Minecraft 1.20.X:
    url.kaupenjoe.net/CourseFabri...
    ▶️ Complete and Roblox Lua Game Development:
    url.kaupenjoe.net/RobloxCoupon *
    ▶️ Learn Forge Modding with Minecraft 1.18:
    url.kaupenjoe.net/CourseForge118 *
    ▶️ Learn Fabric Modding with Minecraft 1.18:
    url.kaupenjoe.net/CourseFabri... *
    == SUPPORT ME ON PATREON ==
    ▶️ / kaupenjoe
    == SOCIALS ==
    Discord: / discord
    Personal Twitter: / kaupenjoe
    Instagram: url.kaupenjoe.net/tutorials/i...
    Facebook: url.kaupenjoe.net/tutorials/f...
    Twitter: url.kaupenjoe.net/tutorials/t...
    TikTok: url.kaupenjoe.net/tutorials/t...
    Written Tutorials: url.kaupenjoe.net/tutorials/blog
    == LICENSE ==
    Source Code is distributed under the MIT License. Additional Licenses for other assets can be seen below or in the accompanying CREDITS.txt on download.
    == AFFILIATE DISCLAIMER ==
    * Some of the links and other products that appear in the video description are from companies which I will earn an affiliate commission or referral bonus from or are my own products. This means that if you click on one of the product links, I’ll receive a small commission or additional kickback without any additional cost for you. This helps support the channel and allows me to continue to make videos. Thank you for the support!
    == HASHTAGS ==
    #Minecraft #MinecraftModding #MinecraftTutorial #Kaupenjoe

Komentáře • 103

  • @camdengenta3040
    @camdengenta3040 Před měsícem +31

    For those following along in 1.20.5 or above, FabricBlockSettings.copyOf is AbstractBlock.Settings.copy instead.

    • @noicthebrave
      @noicthebrave Před měsícem +2

      Big thank you, I was wondering about that myself - been trying to make a mod w/ a friend of mine. Much Appreciated

    • @omegamad
      @omegamad Před měsícem +2

      goat

    • @NiaSwift
      @NiaSwift Před 29 dny +1

      thank you!

    • @Corruptedpuppy
      @Corruptedpuppy Před 12 dny

      @camdengenta3040 can give an example line of code that uses the new AbstractBlock.Settings.copy because I can’t figure out how to use it, I’m trying to make a mod for ores in the end and I need to figure out how to do it in 1.20.6 (sorry for so much yap, I just need help) 😅

    • @camdengenta3040
      @camdengenta3040 Před 12 dny

      @@Corruptedpuppy public static final Block RUBY_BLOCK = registerBlock("ruby_block", new Block(AbstractBlock.Settings.copy(Blocks.IRON_BLOCK).sounds(BlockSoundGroup.AMETHYST_BLOCK)));
      ripped that from my project when I followed this tutorial, so it should work. Lemme know if you have any issues :)

  • @gameo7
    @gameo7 Před 12 dny +3

    I only really needed the first 3 tutorials for the mod I needed (only wanted to add a singular block), but with how thorough and clear you were with these I really wanna watch the rest! Thank you for making these tutorials and for making fabric modding a lot easier :)

  • @drakhooficial
    @drakhooficial Před rokem +25

    I'm into forge but still came to support for fabric videos

  • @4ud170r
    @4ud170r Před 9 měsíci +6

    Thank you so much loving it so far

  • @justinindustries2747
    @justinindustries2747 Před 8 měsíci +19

    Hey, really enjoying the fabric modding series! The content is awesome, but could you please consider explaining the code in a bit more detail? It would be super helpful for understanding the portions of code better. Does your course offer a more detailed explanation?

  • @Satwr
    @Satwr Před 6 měsíci

    Hey, is there a way to read a scoreboard on a server without any plugins or anything else? I would like to build a UI where certain values are automatically taken from the scoreboard and then make stuff with it.

  • @SilentNyan
    @SilentNyan Před 6 dny

    Man, someone just linked a video by Whimzee where he made his first mod in 7 days and credited you as a good teacher, and here I am, went through java basics and starting to learn mc modding basics. Just the first step, if not less, but surprisingly I love it, we'll see where it gets me.
    The only parts where I'm kinda just copying what you're typing is when we're creating and setting up registering in ModBlocks/ModItems files, but maybe you'll explain it later or it's something that's not worth worrying about...? So far I'm hoping that it's just the "template" that everyone uses, but kinda scared that I'm treating it this way. Still, amazing job :). Maybe I'm finally going to be able to create a few mods that have been in my mind for quite some time, I remember how I was trying to make them in mcreator when I was younger and was always hitting a stopping point too soon. You also motivated me to learn how to do pixel art. Had some experience before and even made some great textures, but was never interested in actually learning about it in-depth.
    Just wanted to say thanks for these videos, if even I am able to follow them and understand what's happening, it means you 100% did a great job.

  • @TheMosthorrificLaugh
    @TheMosthorrificLaugh Před 2 měsíci

    Is it the same as adding an block to neo forge?

  • @oriolcubeles620
    @oriolcubeles620 Před rokem +8

    Can you do a video explaining how to add a block entity with vanilla existing functionality, please? For example, adding a new campfire that copies its code from vanilla minecraft's.

    • @migats2160
      @migats2160 Před rokem +1

      You can just copy the code of the campfire block.

    • @jonispatented
      @jonispatented Před rokem +14

      @@migats2160 That's pretty lousy. Doing that, you will have to manually update every feature of the new block to match the campfire every time. Instead, you could just extend the campfire, which is just a way to do exactly this automatically.

  • @scopiomc
    @scopiomc Před 9 měsíci +6

    I quadruple check every jason file and class but when I place the Blocks down they have no Texture
    Edit: found the mistake my blockstates folder was in the assets folder not the namespace folder xD

  • @spzi_
    @spzi_ Před 7 měsíci +2

    is there a specific way to get custom grass blocks to work? no matter how I arrange the jsons for grass blocks it either displays as entirely gray, or checkerboards, I used the vanilla jsons for grass blocks for the correct version and no matter how I edit them, it just displays as gray but only when it's placed, looks fine in my hand and inventory, I hope someone has a json that actually works

    • @deklancoomer9286
      @deklancoomer9286 Před 2 měsíci

      Sorry i'm late and you probably know this by now but blocks like grass and leaves are naturally grey and use biome your in and your coordinates and basically uses them on a color map to find the colors.

    • @Kaivien
      @Kaivien Před měsícem

      ​@@deklancoomer9286 yeah but how to add a custom grass block in the model generator class?

  • @kingstarsearcher2941
    @kingstarsearcher2941 Před rokem

    What do you use to make the textures for the items and blocks?

  • @FiberCrab
    @FiberCrab Před 10 měsíci +2

    May I ask why my ruby block doesn't have a right texture? When in hand, the block looks like a purple and black cube, and it looks larger than normal blocks. However, when placed, it looks nice as it should be.

    • @ModdingByKaupenjoe
      @ModdingByKaupenjoe  Před 10 měsíci +2

      There must be an issue with the item model json file. Double check it's written correctly, without any typos and is in the correct folder 🙏🏻
      Double check from 10:29 again 🙏🏻

    • @FiberCrab
      @FiberCrab Před 10 měsíci +2

      Thanks indeed. Now it has the right look.@@ModdingByKaupenjoe 😘

    • @kyleduncan3017
      @kyleduncan3017 Před 2 měsíci

      @@ModdingByKaupenjoe I am following this series to add all of my favorite gemstones into minecraft and reading this helped me save 2+ hrs of looking through code, thank you!

  • @isaacrenn4727
    @isaacrenn4727 Před 11 měsíci +1

    For some reason when my raw ruby block is placed it has no texture, the item does have a texture just not the block. I copied and paste the json texture file from the ruby block which works and added changed the name to raw ruby so its identically it just doesn't work on raw ruby

    • @ModdingByKaupenjoe
      @ModdingByKaupenjoe  Před 11 měsíci +3

      If it doesn't have a texture in the world, it has to be something wrong with the blockstates json file. Be it a typo of the file name or inside or the folder structure 🙏🏻

    • @isaacrenn4727
      @isaacrenn4727 Před 11 měsíci +1

      Thank you I finally found it, I accidentally typed blocks instead of block

  • @coolermama
    @coolermama Před 28 dny

    So when i launch the mod, the block texture wont work like it shows the purple and black cube, and when its a item it shows up as being invisible , the name and everything works, but just that is wrong with it

  • @Velocivy
    @Velocivy Před 6 měsíci +1

    when i place down my block it
    doesn't show the texture only the black and purple checker patern

    • @emanuelmaciel4951
      @emanuelmaciel4951 Před 3 měsíci

      My problem was in the name of the blockstates directory

  • @LithuanianDreamWasTaken

    Did I miss something, when did you add the ModItemGroups java class?

  • @nei6387
    @nei6387 Před měsícem +2

    i cant open the inventory in creative and the blocks wont show in commands, i get this error when i open inventory then the game crashes Caused by: java.lang.IllegalStateException: This registry can't create intrusive holders

    • @nguyenthuhanguyen6589
      @nguyenthuhanguyen6589 Před měsícem

      me too

    • @enderianthesecond
      @enderianthesecond Před měsícem

      exact same issue, have you solved it? if so, could you please give me your solution? if i find one, ill attach it here! thanks

    • @enderianthesecond
      @enderianthesecond Před měsícem

      add ModBlocks.registerModBlocks();

    • @enderianthesecond
      @enderianthesecond Před měsícem

      @@nguyenthuhanguyen6589 add ModBlocks.registerModBlocks(); to your mod java file

  • @TheSilliestBilly-dz4zd
    @TheSilliestBilly-dz4zd Před měsícem

    Can anyone help me on why I can't start my mod? Whenever I start it, it just crashes immediately.

  • @anthonythompson5225
    @anthonythompson5225 Před 11 měsíci

    I quadruple checked the name of my block in the en_us.json file but for some reason the name is not displaying correctly. Any pointer's Kaupenjoe?

    • @ModdingByKaupenjoe
      @ModdingByKaupenjoe  Před 11 měsíci +1

      Maybe typo in the folder structure 🤔

    • @anthonythompson5225
      @anthonythompson5225 Před 11 měsíci +1

      @@ModdingByKaupenjoe idk what the problem was but i ran it through debug and it seems to have corrected itself.
      Whenever I finish this mod, I'd like you to check it out, I think you'll like it. It's going to renew mushrooms in Minecraft and some will grant the player temporary buffs, while also adding in some new lore behind them. I want it to teach players about real mushrooms because, as it stands, the current mc mushrooms are pretty misleading (the red one is actually a poisonous mushroom that can really mess you up).

    • @iceman4094
      @iceman4094 Před 9 měsíci

      @@anthonythompson5225 that sounds like a great mod idea!! I hope u finish it and get it on curse forge or something!

    • @sirgrem2988
      @sirgrem2988 Před 7 měsíci

      If you're still wondering on the reason, it was probably a trailing comma after each line.
      If the item name/group is the last line and there are no more lines to add, shouldn't add a comma according to JSON structure.

  • @thesqual3085
    @thesqual3085 Před 8 měsíci +19

    my block has no texture, I’m checking the code for 30min, I see the tutorial 3 or 4 times. I want to cry I don’t find the error. I change the .png file four times but nothing.
    edit: I did it! ONE "S" block.json file, i put "parentS" instead of "parent"

    • @SpigotRCE
      @SpigotRCE Před 4 měsíci +1

      I believe u press shift + s instead of ctrl + s
      I can relate Live of devs

    • @imcrime-
      @imcrime- Před 4 měsíci +1

      Welcome to programming, it’s terrible

    • @seddikturtle6800
      @seddikturtle6800 Před 4 měsíci

      he warned about this last video

    • @rcbrudis6796
      @rcbrudis6796 Před 2 měsíci

      Same here!

    • @heckerhecker8246
      @heckerhecker8246 Před 2 měsíci

      Ouch, that had to hurt when you realized

  • @user-nm9dw9ce6y
    @user-nm9dw9ce6y Před 5 měsíci +2

    LOL on block states, i did’t have my block textures and it was actually that i put varients in the block states instead of variants

    • @Derpduck.
      @Derpduck. Před 18 dny +1

      That was me too lmao...

  • @skullcrusher2758
    @skullcrusher2758 Před 11 měsíci +1

    Im getting error when launching minecraft:
    Caused by: java.lang.IllegalArgumentException: Cannot get property EnumProperty{name=axis, clazz=class net.minecraft.util.math.Direction$Axis, values=[x, y, z]} as it does not exist in Block{minecraft:air}
    Any Ideas what could be the reason?

    • @thybattler
      @thybattler Před 11 měsíci

      Sir, the air that you breathe is causing problems.

    • @jackattack4081
      @jackattack4081 Před 10 měsíci +1

      I'm having the same issue. I've triple check my work and even tried starting over but I still get this.

    • @sacad-m
      @sacad-m Před 9 měsíci +2

      Not sure if you resolved this, but I took a look at the source code and realized the following:
      I was trying to create a custom LOG block, which according to the docs, is of type PillarBlock and NOT block.
      I resolved the error by using "new PillarBlock(FabricBlockSettings.copyOf(...))". Hope that helps.

    • @dawn_connor
      @dawn_connor Před 7 měsíci

      @@sacad-m thank you so much, this was exactly it for me

    • @CraftyMCFish
      @CraftyMCFish Před 6 měsíci

      @@sacad-m thanks also, i've been trying to figure this out for an hour lmao

  • @bobisbilly3115
    @bobisbilly3115 Před rokem

    i keep getting this error "Failed to verify authentication" when i try to run the mod

    • @ModdingByKaupenjoe
      @ModdingByKaupenjoe  Před rokem

      I mentioned this in the setup video czcams.com/video/0Pr_iHlVKsI/video.html
      you can ignore the error, that will always come up inside of the dev environment.

  • @stupidsniper5216
    @stupidsniper5216 Před 6 měsíci

    When I go into survival mode it takes ages to break the blocks with a pickaxe even though its directly copied from an iron block.

    • @ModdingByKaupenjoe
      @ModdingByKaupenjoe  Před 6 měsíci

      Yes, it's normal. The fix is done in part 5 of the tutorial series, and I think I mentioned this somewhere during this tutorial 🤔

    • @stupidsniper5216
      @stupidsniper5216 Před 6 měsíci

      @@ModdingByKaupenjoe oops

  • @pepitocalderon462
    @pepitocalderon462 Před měsícem

    for some reason, when I copy the settings of the BAMBOO_BLOCK, everytime I run it just crashes instantly

  • @user-im1fb5eg4i
    @user-im1fb5eg4i Před 7 měsíci

    Why are these blocks not displayed on the minimap . When I play those blocks and use the empty map,i can't see those blocks on map ,just display gray color

    • @Sam-hg4bo
      @Sam-hg4bo Před 3 měsíci

      When copying the block to the Iron Block, it is pulling the .mapColor and setting it to IRON_GRAY. This should be why it looks like an iron block on minimap/maps. If you want to change it, just edit the color the same way he edited the sound!

    • @reihanboo
      @reihanboo Před 3 měsíci

      public static final Block RUBY_BLOCK = registerBlock("ruby_block", new Block(FabricBlockSettings.copy(Blocks.IRON_BLOCK).sounds(BlockSoundGroup.AMETHYST_BLOCK).mapColor(MapColor.RED)));
      for anyone wondering

  • @user-im1fb5eg4i
    @user-im1fb5eg4i Před 8 měsíci +2

    英語はできませんが、これもマスターできます。

  • @renardchanteur9429
    @renardchanteur9429 Před 17 dny

    when i open the inventory the games crash, please help...

  • @althyrios7954
    @althyrios7954 Před rokem

    When do we get video about custom fluids ?
    I'm trying to make a custom fluid using your old videos for 1.19 and 1.19.3 but I'm struggling on the blockstate.
    When I'm activating it the color is correctly rendered but I can't float nor being slowed by fluid (and being inside is just weird because there is no change on screen color)
    But when i'm commenting the fluid just act as water do
    But even if I want it to be like water I want to be able to put it in the nether and also I don't want it to interact with lava
    So this is annoying x)
    Waiting for the video !

  • @boogiehasfun
    @boogiehasfun Před 6 měsíci

    i spent like 30 minutes debugging an error, only to realize i had the block as a block AND as an item with the same name :D

    • @enderianthesecond
      @enderianthesecond Před měsícem

      was it anything related to "Caused by: java.lang.IllegalStateException: This registry can't create intrusive holders"
      if so how did you fix it

    • @boogiehasfun
      @boogiehasfun Před měsícem

      @@enderianthesecond idk this was 5 months ago

    • @enderianthesecond
      @enderianthesecond Před měsícem

      @@boogiehasfun it doesnt really matter i fixed it

    • @enderianthesecond
      @enderianthesecond Před měsícem

      thanks anyways though

  • @sqbany_tv
    @sqbany_tv Před 8 měsíci +1

    Can you help me? If i try to mining the ruby block it takes a lot of time and nothink is dropping.

  • @user-im1fb5eg4i
    @user-im1fb5eg4i Před 8 měsíci

    Beginners are miserable, not knowing where they went wrong

  • @alexander499zero
    @alexander499zero Před 2 měsíci +2

    Thank you so much! Im only 13, but I really understand everything and it's quite easy even though I never touched java in my life before!

  • @danicrafts-m4y
    @danicrafts-m4y Před 22 dny

    5:53 was this an editing mistake

  • @Kabukkafa
    @Kabukkafa Před 5 měsíci +1

    It is so freaking hard Im gonna give up

  • @editssss388
    @editssss388 Před 10 měsíci

    your going so fast this ain’t tutorial 😂

    • @ModdingByKaupenjoe
      @ModdingByKaupenjoe  Před 10 měsíci

      Let me double check the title... It does say tutorial 🤣 But fair, sometimes the video can be a bit too fast for some people. It's very hard to get the speed just right for everyone though, hope it can still be useful to you 🙏🏻🙏🏻

  • @CosmoSmores
    @CosmoSmores Před měsícem

    Could You Please And i Mean PLEASE I'm BEGGING YOU CAN You Make a VSCode One For 1.19 Please i Would appreciate it a lot please

  • @ragoonsgg589
    @ragoonsgg589 Před 2 měsíci

    Why can't you just be a normal coding tutorial.why you gotta do the 1000 days in hardcore vibe

  • @maksiksq
    @maksiksq Před 3 měsíci

    Little tip for others following:
    Autocomplete can sometimes import registry from java.rmi intsead of Minecraft, threw me off for a few minutes. Gotta use import net.minecraft.registry.Registry;

  • @jacoboyzz9813
    @jacoboyzz9813 Před 6 měsíci +1

    is this with an older version of the intelli software? some of the codes it cant find, like net.minecraft.util.Identifier
    it wont find it, same with FabricItemSettings. it just gives me errors.