I was wrong. Right Click Detection is here. For real.

Sdílet
Vložit
  • čas přidán 21. 04. 2024
  • Ironic that food is used in the "non-consumable" method...
    Tutorial Datapack - drive.google.com/file/d/1V8vz...
    Consumable Right-Clicks - Knowledge Book Method • Knowledge Books are st...
    come hang out on Discord, if you feel brave enough / discord
  • Hry

Komentáře • 370

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

    Some answers for questions I've been getting a LOT of:
    *"Why can't you just set the speed to a higher value when right-clicking?"*
    Short answer: FOV effects. Eating doesn't change your FOV, but attributes and effects do. If you mess with the player's speed while they're eating, their FOV will be increased for the duration, which will look weird. Feel free to do it if you're okay with that - but I personally don't like it. Yes, you can disable this by turning off FOV effects for only yourself, but if you're making a datapack, that would require ALL USERS to do this, which isn't exactly practical.
    *"Can't you just use /schedule instead of those ticking advancements?"*
    No, and there are two main reasons why.
    1. Scheduling causes conflicts in multiplayer. A scheduled function cannot be assigned an executor (it defaults to just being run by the server console), so you'll lose any information about who the cooldown is for. There ARE workarounds for this, but none of them are as clean as the ticking advancements, which act like a personal timer of sorts.
    2. Even if you were able to get around the multiplayer issue, there are issues involved with players disconnecting from the server during their cooldown. A scheduled function would revoke the player's using_item advancement once time is up. The problem is that if the player disconnects from the server before that happens, the function won't have anyone to revoke the advancement from - and when that player reconnects, the schedule will already be over, they'll still have the advancement granted, and they'll effectively be softlocked and unable to use the item again. With the ticking advancements, the player's personal timer also stops when the player leaves, and will resume as normal when the player comes back.

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

      Is there any ways to change fov as well? Like with the spyglass?

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

    Do you really think 1 million seconds is gonna stop me from eating my magic wand?

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

      68 years will though (java integer limit)

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

      @@Luna5829 yes but 1 million seconds is only 11 days

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

      @@TheMiningCrafter the datapack uses integer limit tho

    • @TheMiningCrafter
      @TheMiningCrafter Před měsícem +4

      @@Luna5829 yes but if it doesn’t reach said integer limit nothing will happen

    • @jsabasakapa
      @jsabasakapa Před 12 dny

      Im wondering what -1 do

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

    Minecraft needs a "dummy item" that is not used in any crafting recipe, cannot be crafted, smelted, grinded, etc. and has no use at all. itd be useful for map makers and command blockers

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

      petrified oak slab prolly or spawn eggs with nbt data to not do anything

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

      I think poisonous patatoes may qualify depending on if being eatable messes things up

    • @404maxnotfound
      @404maxnotfound Před 2 měsíci +40

      There are a couple just don't remember them off the top of my head but poisonous potato+this method for rightclick detection could work since there is can't be used in any crafting recipe, etc and it disables the editable function of the normal potato.

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

      As far as I'm aware the only item like that is the clock.

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

      knowledge book?

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

    For extra Silly, use the Continuous Flame Wand for 1000000 seconds anyway. Be the worst wizard in history. “Hey, where’s my wand?” “Sorry, I got hungry.”

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

      FYI this is 11 and a half days lol

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

      @@ezren_7140 In the actual datapack I have the time set to the java integer limit, which is over 2 billion lol. That works out to 68 years.

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

      @@conure512 Advancement Made: Seriouser Dedication

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

      @@conure512 nah bro just leave it at like 10k seconds (3 hours) and make it if you actually eat the item you get an easter egg item 💀

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

      @@conure512 give a man a wand, he'll eat for 68 years
      teach a man to make a wand and he'll eat for a lifetime

  • @uraid
    @uraid Před měsícem +30

    it’s still kinda funny that if you hold cast for long enough eventually you’ll start eating your wand

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

    So basically here you explained, how you made a looped advancement cycles to improve optimization by getting rid out of constant tick and making it once upon use tick. Smart

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

    Aw man! I was trying to solve the delay issue by scheduling and unscheduling functions, but this seems much more robust.
    FWIW, if you still want consumable right click detection, set the time to eat to .05 seconds. Eating is instantaneous (a single tick) and only shows a spray of particles without the eating animation.

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

      Very good to know! I tried that eating trick a while back but I guess I didn't set the time short enough, because the animation was still there. And with that, we'd be able to use consume_item instead of using_item!

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

    yo that's mad! back in 1.19 i figured out how to use a trident to create an item that triggers one effect while you're drawing it back, and another effect when you release. i also made it cancellable by switching offhands :D
    Oh also i resolved the walking speed issue by setting movement speed attribute to 5 times the normal while drawing back the trident, and setting it back to normal on release or cancel. Works every time 90% of the time…🤣

  • @mini-prince.1233
    @mini-prince.1233 Před 2 měsíci +31

    would be rly cool if you did a comparison video showing the pros and cons of each method (carrot/fungus on a stick, eye of ender, food, knowledge book,...)

  • @towers4506
    @towers4506 Před měsícem +6

    This is really cool! You could try giving the player speed when eating, or removing and giving back the item to cancel the eating animation. It could also be cool to have a falling edge wand, that only functions when click is released (like the bow)

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

    Conure: "So, if you need an item that you can use which doesn't slow you down..."
    Swift Sneak Enchantment: "Hold my enchanting table"

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

      Does Swift Sneak affect your speed while eating? If so I did not know that lol

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

      @@conure512 no it doesn't

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

      how about changing generic movement speed while consuming the item?

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

      @@conure512 I'm not sure, lol, but there's also the speed boost potion effect.

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

      @@shureee1 you can change the generic movement speed for the player to combat the slowness but it makes that weird zoom thing on the screen

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

    I’m always glad to find another high-quality datapack channel. This is super cool!

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

    i'm glad you popped up in my reccomended two days in a row, seeing another one of your vids made me realize that you're really good at making cleanly edited, entertaining videos. keep it up 👍

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

    These last few videos convinced me to sub to this channel, great job dude!

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

    This is such an incredible way to do the cooldowns, kudos to you.

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

    the only advantage coas still have is that you don't slow down while using it

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

    While I don't know all of these magic words, I did enjoy the video lol Congrats on 1k subs Conure!

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

    Amazing ! Clear and straight to the point. Great explanations ty, that's super useful !

  • @j.a.v.mersbergen5443
    @j.a.v.mersbergen5443 Před 2 měsíci +9

    This channel is sooooo underrated!

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

      im surprised his videos even appear on my home page

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

    Im currently working on a spellcasting datapack using your knowledge book method! I think I'm going to incorporate these methods too, as wands or staffs. Love your work!

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

    Congratulations on 1k!

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

    using advancement as tickless trigger is something fascinating for me

  • @keiranbrown5816
    @keiranbrown5816 Před 13 dny

    Glad I found your channel! I love this stuff and learning what we can do with just the vanilla game!
    @3:20 - slowing the triggering * hertz can be done through the advancement conditions using: entity_properties -> "periodic_tick" :D

    • @conure512
      @conure512  Před 13 dny +1

      Yes, periodic tick works too! (This video is slightly outdated now, I made it for 1.20.6 and that hadn't been added yet lol)
      I will say though, if the period is long enough, using periodic_tick can make it feel less responsive because there might be a delay between your first click and when you're actually able to use the item. With this method, you're always guaranteed to have it activate as soon as you click.

    • @keiranbrown5816
      @keiranbrown5816 Před 13 dny

      A lot has changed in a month hey!
      @@conure512 I learnt about the resposiveness recently too. I just put together a right-click auto-harvest feature for a hoe! :D
      I used ^ and '..aligned eyes' from this video to do a crude raytrace

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

    You have no idea how amazing this is for me. I have been waiting for right click detection that doesn't involve a carrot on a stick in the offhand or even an eye of ender. All I need now is a way to make the Icon of an item in the hotbar different from how it looks in hand and I can die happy

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

      This is possible using custom model data

    • @As1anCr4ck3r
      @As1anCr4ck3r Před měsícem +1

      @@nonexistentsquare2092 I know how to make custom models already, but you know how the trident or the spyglass has a pixel art icon in the hotbar but shows a 3D model in hand and in POV, I dont know how to do that

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

    Now I just need fully implemented component crafting and I will be happy

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

    thank you. I hope we see more of the good stuff

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

    this is everything i’ve ever wanted, thank you

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

    To expand on the point you kinda make at the end; I dont think this makes other methods obsolete. Moreso just broadens our options for how exactly we want right-clicking with a given item to work.
    Two big drawbacks of this method are:
    - slows player movement while using.
    - item in hand bobs when initially used.
    I can definitely think of some applications where those aspects would be desireable, but I think its fair to raise them as limitations, because depending on what you want to do, they can be.
    The carrot on a stick doesn't bob or slow the player down to use, and can now be given whatever other item components you want it to have to mimic the behaviour of another item(s).
    But because it isn't *actually* that item, it won't natively have the special mechanics/properties some items have, such as; being throwable, used to lure animals with, used on a certain blocks/entities, as fuel or ingredients in recipes, etc... (this is an advantage of using the desired item with a high eating time - however there are workarounds for most situations. It optionally having durability used to be a plus, but thats a non-factor now.)
    Goat horns with a specified custom, blank sound file are another option if you want an item with a built-in cooldown timer before it can be used again, but it has the downside of the subtitle still showing up when enabled (which could cause confusion/"break the magic") + the animation, and it still has the same limitations of the carrot on a stick.
    (of course there are other ways to do cooldowns, and with some custom model data trickery you can have custom cooldowns that look the same as the existing vanilla item cooldowns too - but the benefit here is that its built-in to the item.)
    Teleporting an interaction entity in the player's face constantly is an option if you want to prevent the player from interacting with the environment altogether, and for both right and left click actions to *only* go through whatever systems you've set up instead...
    (only really good for specific custom maps that need it, probably not suitable for add-on style data pack content for any old world)
    Knowledge books are by far the least useful now, but still have a niche... They behave similarly to carrots on sticks, but are consumed when used. (prior to 1.20.5 - before the stack size component was added - this was a perk, but its pretty trivial to delete 1 item now that any of the other methods can be stackable items if you want them to be... Tho I guess if it meets your exact needs in the fewest no. of commands being run then its good for optimization? lol)

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

      Some very good points. Carrot on a stick definitely has some capabilities that other options don't, but to me it will ALWAYS be a last resort because it requires ticking commands. I'm probably going to use the knowledge book method quite a bit from here on out, for stuff that's meant to be consumable.

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

      @@conure512 fair enough!
      I tend to prioritize the look and feel of a mechanic to the player in my packs over exactly how I get there behind the scenes, but the speed and efficiency of knowledge books/"edible" items is a *very* good reason to go with them over the carrot on a stick for projects if you don't mind the few "drawbacks".

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

    I like the slowdown when using it because if it's specifically magic usage it makes it seem like you're focusing when using it.

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

    For the delayed wand you can also do a scheduled command loop on the load function and check for advancement to trigger particle (if that's simpler)

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

    The impulse gem is 90% of the way to charging an effect that occurs on release

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

    I remember when mojang first added advancements. one thing you could do was running commands upon getting an advancement, so obviously people abused it to run commands every tick and get rid of command blocks by moving everything to the advancements. mojang hated that, so they replaced the whole system with functions. it's like i'm seeing history repeat itself... hopefully mojang notices this and adds proper right click detection :)

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

      hey man if they just straight-up add right click detection, I would not complain for a second hahaha

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

      @@conure512 I know right!! and with the new components system I think we might be heading in that direction

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

    If it slows you down and is held that means it would be possible to create a custom bow by using the impulse gem except on hold it does nothing except increase a counter if it isn't maxed out, and then when cooldown ticks down from 2 it would create an arrow projectile.

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

    Huh, very interesting! I should really get into datapacks

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

    gonna be honnest. i love this.
    about 2 years back i was on a vanila server with some friends and wanted to makea fatapack for simple seats. fpr right clicking i needed to make a command to place a display entity on a block, and a rogjt click on that for riding it, and a helper function to easily delete the nearest seat. but i was never fully happy woth it being display entites cause it would block you from building in that spot unless you has an admin run that deletion command. and the only other option i could ever find was carrot on a stick.
    NOW, i could mKe a custon recipie for 2 tools, create seat, and break seat. simple tools than when clicking a block make or break a seat display entity like the impulse gem. alternativly, i could have it be that if click and facing stair block, sit player at stair possition.
    past my own junk, this is revolutionary for a myriad of reasons. caus ethe speed problem is just gove the player a boost by modifying attributes for their speed while clicking and we never have to use carrot on a stick again. blessed be this day, we're no longer a bunch a piggies

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

    Wow using that last bit you can essentially detect button down and button up, which is even hard to do in some programming languages, also you can get the state if your holding it down at any time by checking of the score is 2

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

    thats game-changing
    btw vscode has extensions for syntax highlighting for mcfunction format if you're interested in that, might be easier than notepad

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

    Hell yeah. Makes me want to get back into datapack coding

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

    @minecraft please add an food component tag to set a custom walking speed while eating

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

    The knowledge book method could actually be cool though, imagine it spawned your spellbook in front of you to shoot the spells out of, before returning to your hand. Also a very natural cooldown mechanic.
    I was imagining something like the floating book of an enchanting table, but apparently it doesn't come separate from the table which is pain.

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

    You could make a spell book with this, read the book to cast a spell, like a hailstorm or a firewall, have some rare spell books that you actually completely "eat" to cast

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

    This explains why when some mods break, if you right click them it starts the eating animation

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

    The tick trick is neat. I haven't seen it used in this way, but I generally have done something similar with `schedule` loops. This is nice bc it's per player. I will note, advancements *can* be slower if they are granting every tick so I would make sure that's thought about (a persistent ticking advancement is likely worse than `#minecraft:tick`)

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

    A solution to the slowdown might be to give the item a speed atribute increase while active, but that might mess with the fov... Otherwise, this is a big breakthrough!

  • @tom.h2060
    @tom.h2060 Před 22 dny

    Hey, this is quite impressive. However as a map maker, I pay a lot of attention to the number of lines of code I use to realize a specific ingame function. In terms of the number of code lines, the solution with a carrot on a stick and scoreboard wins. In terms of flexibility, this is definitely the best solution, as you don’t need to make a ressource pack to change the carrot on a stick texture. I'll keep your solution in mind as it is very interesting ;)

    • @conure512
      @conure512  Před 22 dny

      Number of lines is a great place to start, but you've also gotta consider how often that code is being run by the server. With carrot on a stick, you need to have 1 line running every tick (20 times per second), whereas with this method, no code is running at all most of the time. So overall, this method actually runs far fewer commands than the carrot on a stick, even though the number of written lines in the datapack is higher.

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

    How has no one thought of this… oml

    • @Cat-pv6yx
      @Cat-pv6yx Před 2 měsíci

      There was a post on this being the ultimate click detection method on Reddit

  • @IwrsTheKing007
    @IwrsTheKing007 Před měsícem +1

    you can also just check for the data
    food={nutrition:0,saturation:0,can_always_eat:true,eat_seconds:1000000}
    then you don't need the custom data, unless you need it for something else

    • @conure512
      @conure512  Před měsícem +1

      Right, but if you have multiple of them that use the same food mechanism and are the same underlying item, custom data is nice to differentiate! I typically get in the habit of assigning custom data to my items anyway when I'm making a large item datapack, it just helps to keep everything organized.

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

      @@conure512 right, didn't think of that, makes sense

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

    clever and perfect!

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

    For the third wand, you might be able to use the wand's advancement tick to grant another advancement where particles spawn, and on the wand's advancement tick schedule a function that has a 2 ticks delay with the replace type, which revokes the second advancement, so that after a tick when the wand is released the second advancement is revoked and ready to be granted again

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

      Nice idea! I personally try to avoid scheduling wherever possible because scheduled functions tend to cause issues in multiplayer, but im sure theres SOME way around it lol

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

      @@conure512 Oh yeah, that's indeed, hmm

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

    I think this is better than carrot on a stick because more items that can be used and just combine them with resourcepack(custommodeldata for custom item). Also because if someone using someone’s datapack but they dont want to use the rsp, they wont see carrot on a stick instead they will see an item that can be similar to the resourcepack(sword remodel than carrot on a stick remodel as a sword)

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

    this is cursed

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

    Thanks for all your hard work! I think this should be the new standard for datapacks to come! but man, I have to learn to get used to thinking based on granting/revoking advancements because I feel like it's slightly less intuitive compared to actual coding, but hey this feels so much more optimised though!

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

    1.20.5 is already out ;) cant wait to see what you can do with the new stuff

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

      I have a suspicion that they accidentally released it early. (as in like several hours early.) the launcher has 1.20.5 but no announcement for it, SlicedLime has his announcement scheduled to drop in 1 hour... it's like they had the whole thing planned out but accidentally pressed the big red button without realizing it lmaooo

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

      @@conure512 yeah I've been playing the prereleases on my server and got confused why I couldn't connect and checked the updates and boom, 1.20.5 was right there.

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

    Mojang not adding the ability to create custom items, mobs, etc. easily with datapacks is the reason why modded will always be preferred over datapacks

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

    Can you counteract the slowdown using speed potion effect? Maybe you could find optimal level of the effect to have normal movement even during right click (except maybe the FOV shift, but that can be disabled in the video settings)

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

    Sick af

  • @live_destin-3408
    @live_destin-3408 Před 2 měsíci +3

    *Just change the speed multiplyer on the held item as long as the player is holding down right click. If you set it to just the right speed, it will negate the slowness*

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

    Never knew minecraft eating would be this game changing

  • @TrxtaTutto
    @TrxtaTutto Před 5 dny

    I'm not smart enough for this, I'll keep using the carrot on a stick

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

    Use the movement speed attribute to offset the eating slow

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

    this is sick

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

    Looks like I'll have to update some of my datapacks to 1.20.5 when I get the chance. The changes to crafting items and right click detection actually perfectly solve problems I had with both of my current datapacks, crafting broke in one due to multiplayer quirks with Knowledge Book based crafting and the other added custom swords that needed right click detection which was only possible with a carrot on a stick and warped fungus on a stick which can't have their attack speed changed. The latter actually could be improved further with wind charges (once they get added of course) since I need a dash ability and teleporting the player forward is a little jittery though it gets the job done.

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

      This update really did add a ton of new capabilities! Though I will say, it IS possible to change the attack speed of the carrot/fungus... you just have to remember that a player's inherent attack speed is 4, so the weapon needs to have NEGATIVE modifiers (swords have an attack speed of 1.6, so the modifier would have to add -2.4).

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

      @@conure512 Noted. I might have to reformat some things for 1.20.5+ anyway looking at the changelogs but it should make things work a bit better.

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

    What beautiful hack I love it

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

    04:00 you could also simply schedule a function that has the /advancement revoke for the original advancement.
    I am pretty sure the tick advancement is not free, the game internally most likely checks every tick if the advancement is granted, and might have additional overhead from checking if the advancement has conditions, etc. I am not sure if this is better than an execute if in a ticking function, needs benchmarking, and/or code analysis.

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

    oo cool video!

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

    For the movement speed, maybe you could probaby attribute modifier the player with some movement speed to counter them and remove the modifier when they are done using the item.

  • @404maxnotfound
    @404maxnotfound Před 2 měsíci

    Nice no more eye of ender trick.

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

    Fun fact, but resetting a scoreboard is actually more laggy, than /set 0

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

    they should add a component saying how slow the player should move when active

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

    This is AWESOME. Thanks for sharing.

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

      Also, could you do something with /attribute to increase the movement speed while eating?

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

      Maybe? It'd be a bit janky, and it would also boost your FOV as if you were moving super fast (because eating slows you down WITHOUT changing your FOV).

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

      ​@@conure512 true. to mitigate this i just accepted that in my custom map i had to ask the player to set fov effects to none

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

    You can also just use the schedule command instead of making a whole timer to remove the advancement, but nice technique!

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

      Schedule causes issues in multiplayer (no way to determine who called it) and also things can break if the player disconnects during the schedule!

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

      @@conure512 makes sense. could probably force a uuid check

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

    You could change the player's base speed attribute when the item is being used then reset the attribute when the player is no longer right clicking. that way the play could walk at the same speed regardless of if they are useing the spell, to be clear i mean player attribute not speed effect.

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

      Changing speed would also mess with the player's FOV, because eating slows you down WITHOUT changing your FOV. So, still not a perfect solution lol

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

      @@conure512 It my not be perfect but it still could be a be needed for some niche, it may be desired for some use case. An example could be for performance or wanting to change the fov for example a rapid fire bow that increases the players fov to make it feel "manic".

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

    Or, even simpler, you can schedule a function on the advancement ticking to revoke it. I think it should do the trick

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

    7:02 This looks alot like the inverse of a bow, where it fires then needs to charge back up.
    Im a novice so I have no idea, but maybe you could customize the eat animation to make a slingshot or a big kamehameha ball in front of you.

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

    Idk how I got here but I enjoyed the video, not that I'll ever do anything with this knowledge.

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

    I was never into datapack programming. I just clicked the video. But man... This is worse than JavaScript. This may even potentially be worse than C++ template meta-programming. Mojang should really tighten their butts and give you a serious tool (full fledged scripting language) for the job instead of a mix of commands, scoreboard operations, NBT tags (or whatever the new thing is called), advancements, etc.
    Like for real. I feel like every tool they give is not sufficient for it's intended use. They introduced scoreboards, and teams and I don't see them ever used as intended. Small private servers don't use them at all for displaying statistics and setting up teams because they have no GUI and nobody knows, how to set them up. Big servers don't display statistics directly, but use them as display banner for their custom info with the 15 14 13 12 .. 3 2 1 trick.
    They added customizable border back then, but I really seldomly see that used either. It only works horizontally and can only have rectangular shape, and of course you can configure the effects of being outside it, so all the servers use custom borders.
    I wish Mojang either gave easier to use tools (with GUI for example) so that they can be used by small communities with ease, or give more powerful and configurable ones, so that they are actually useful in Player Experience creation.
    (Although they are progressing with display entities and I suppose NBT rework is an enabling change, so maybe we'll slowly get somewhere)

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

    You can also use ender eye in end and nether for this, I guess. Also works in superflat worlds without structures
    Btw can horns somehow be used to do something like this?

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

    Make it apply a speed effect when eating

  • @Ray-uy4ez
    @Ray-uy4ez Před 2 měsíci

    How nice.

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

    I actually didn't know about the food thing. I need to keep up with things better.

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

    FOOD??? thats insane

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

    Nice

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

    Hell yeah! It was only a matter of time before the recent changes mojang made were used for something amazing.

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

    9:49 or while you're using the item set your base attribute speed to the normal speed to cancel out the slowdown

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

    hey i watched the last video but didn’t comment. You said that the problem with knowledge books is that they disappear after use in survival, couldn’t you just have a function that triggers whenever that book is not in your inventory anymore and then gives you an identical one? i don’t know much about datapack development but i think that could be possible, exept if the only way to detect that is to run something every tick that checks your inventory, then it defeats the whole purpose. Great content btw!

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

      9:43

    • @404maxnotfound
      @404maxnotfound Před 2 měsíci

      That's not a great solution, right click it will dispear, the game will give you an item(which needs to be the same data as the orginal so you would probably need to maintain which knowledge book you right clicked on if you have multiple). You can't have it in your offhand because the give command would give the item will never give you an item in that offhand. There is also a small chance you might pick something up when the give command is running so instead of a new knowledge book it would be something else and the knowledge book would appear on the next empty slot.

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

    oh how I miss living next to one of the busiest railroad lines in the state of Ohio. 100% serious, the horn, rumble, and gentle vibration are a source of comfort.
    no strong opinion on the main topic of the video sorry

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

    I like to use the warped fungus on a stick

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

    Congrats @satwr on getting in a video!

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

    Chat, resource packs are going to go absolutely insane in 1.21

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

      What do you mean by "chat resource packs"? Did they add something to respacks that can affect the way chat looks, and I just completely glossed over it?

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

      @@conure512 Slight punctuation error, sorry about that. This is also a joke where people go "hey chat is this real" so I'm more so parodying off of that.

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

      Ohh haha gotcha. Yeah I'm hoping we get some cool stuff for resource packs as well, we havent gotten any major upgrades for those in a while (the focus has been so much on datapacks)

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

    When interaction entity

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

    I'm feeling now very stupid for not knowing, that you can put a return in a function. I never know and used function now for quite a while

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

    you could create a flamethrower with actual ammo with this due to it being consumed

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

    1) possible to make a cooldown version?
    2) possible to give speed matching normal speed while eating?

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

    Take a drink every time he says Tick

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

    In theory could you create an overheating system utilizing the eating function returning a temporary item upon completing the eating animation?

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

    there is also the "interaction" entity
    it was added reciently and is kinda like a marker but i can store player interaction
    i made right clike detection with it some time ago but i cant find the world file. and this method is prettier anyways

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

      Interactions are great for when you want to detect clicking on a specific object in the world (i use them all the time) but for clicking the air, using interactions is annoying and requires a constant tick to tp the entity to your face.

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

      @@conure512 make entity big
      Also im unfamiliar with advancement stuff, it never worked for me :(

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

    Could you give the items a cooldown by switching the them in the player’s inventory multiple times (with different durabilities to imitate a cooldown bar)?

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

    best minecraft update

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

    for slow movement i think you can just modify the movement speed attribute of the player while right click (eating)
    and resetting it when not eating if possible
    * i didn't try it but just a suggestion, it might work *

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

      Changing speed would also mess with the player's FOV, because eating slows you down WITHOUT changing your FOV. So, still not a perfect solution lol

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

      @@conure512 ahhh i see

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

    1k subs!