Spigot Plugin Development - 79 - Custom Recipes

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 ธ.ค. 2024

ความคิดเห็น • 26

  • @Jmiltxn
    @Jmiltxn 2 ปีที่แล้ว +19

    Man really said "I didn't know they added cigarettes to minecraft" when he hovered over SmokingRecipe 😂😂

    • @KodySimpson
      @KodySimpson  2 ปีที่แล้ว +3

      finally someone caught that hahahah

  • @niksda7078
    @niksda7078 2 ปีที่แล้ว +4

    My idea why the smithing recipe isn't providing the metadata you gave it is, that when you upgrade your gear from diamond to netherite the stats like enchantments are put in the new upgraded item and so it may override the metadata provided by the plugin

  • @JanEnNiek
    @JanEnNiek 2 ปีที่แล้ว +5

    Don't feel bad about your glasses my guy!

  • @JustKatoh
    @JustKatoh 2 ปีที่แล้ว +7

    Bukkit/Spigot are limited and you can not craft custom items, you simply can not do it.
    The only way for fully custom recipes is for you to create the whole thing from scratch, what I have done is added a new custom item for a workbench, when opening it I cancel the event and show a new GUI made by me, which is literally just a crafting square and a result square and the rest is blocked out by glass panes.
    Then you will have to handle every single darn click, and by the way, good luck figuring out how to use NMS to send the inventory update packets to the client, it's a gigantic pain in the ass to do all this.

    • @viorisewastaken
      @viorisewastaken ปีที่แล้ว

      How come he did it then ? Or are you talking about older versions ? Maybe this was added in the latest versions. Thus Hypixel choosing a custom crafting table for skyblock.

  • @arch1ve017
    @arch1ve017 2 ปีที่แล้ว +1

    best explanation out there. thanks:)

    • @KodySimpson
      @KodySimpson  2 ปีที่แล้ว

      Glad it was helpful!

  • @RONiNArcade
    @RONiNArcade 2 ปีที่แล้ว +3

    Again First 🎉

  • @МаксимАндрущенко-х4д
    @МаксимАндрущенко-х4д 2 ปีที่แล้ว +1

    Hooray

  • @glados1222
    @glados1222 ปีที่แล้ว

    does this show up in the recipe book area?

  • @cybermats2004
    @cybermats2004 2 ปีที่แล้ว +4

    you need two iron and one wooden stick for a iron sword

    • @KodySimpson
      @KodySimpson  2 ปีที่แล้ว +1

      thanks!

    • @nery4772
      @nery4772 2 ปีที่แล้ว

      No shit surlock

  • @nodnarb3
    @nodnarb3 2 ปีที่แล้ว

    I'm having trouble where the RecipeChoice.Exact is accepting any item that is the same base material as my customized item. It seems to ignore attempting to match any of the metadata / lore. Has anyone else had this issue? A deep dive in google tells me this doesn't work, but I feel like there has to be an easier way than doing some sketchy logic in the PrepareItemcraftEvent. Anyone have any ideas?

  • @TBT_ZHV
    @TBT_ZHV ปีที่แล้ว

    Me: OH! So simple fucking algebra! GREAT!

  • @Jiroscopio_
    @Jiroscopio_ 2 ปีที่แล้ว

    How can you make it so the recipe requires several of the ingredient in one slot?
    Example: Compact Diamond, requires a 2x2 grid of 16 diamonds per slot.
    But the exact ingredient ignores amount

    • @stray1239
      @stray1239 2 ปีที่แล้ว +2

      Sadly, I do not think this is possible. If you're thinking of Hypixel skyblock in the making, the reason that works is because they completely remade the crafting table GUI, allowing them to make custom recipes without the recipes system.

    • @Krzysztof-vy8or
      @Krzysztof-vy8or 2 ปีที่แล้ว

      u need to make normal recipe,check Crafting inventory for ingredients with amount, next CraftItemEvent, and if they click the recipe, cancel event and if they have ingredients in craftingInventory set item on cursor

  • @Ecks1118
    @Ecks1118 2 ปีที่แล้ว +2

    Hey :)

  • @pietrosedda5158
    @pietrosedda5158 ปีที่แล้ว

    10:43

  • @МаксимАндрущенко-х4д
    @МаксимАндрущенко-х4д 2 ปีที่แล้ว +1

    Yoyotoyooyoyoyoyooyoyoyooyoyooyooyoyoyoyoyooyo

  • @nimainer
    @nimainer 2 ปีที่แล้ว +1

    if you want to do this in a different class use this instead make sure it gets loaded tho
    ShapedRecipe kbs = new ShapedRecipe(NamespacedKey.minecraft("kbs"), Ksword);
    kbs.shape(" A ", " B ", " C ");
    kbs.setIngredient('A', Material.DIAMOND_BLOCK);
    kbs.setIngredient('B', Material.DIAMOND_BLOCK);
    kbs.setIngredient('C', Material.STICK);
    Bukkit.addRecipe(kbs);

    • @streifffaro6227
      @streifffaro6227 2 ปีที่แล้ว

      I had this problem and I didn't know why it wouldn't work. Thank you so much!

    • @sevendj02chantilly
      @sevendj02chantilly ปีที่แล้ว

      @코딩하는 미르 just make a hashmap, put every custom you're creating, and then just hashmap.get(nameOfTheRecipe)