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

  Рет қаралды 37,910

Conure

Conure

Ай бұрын

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

Пікірлер: 363
@conure512
@conure512 Ай бұрын
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 Ай бұрын
Is there any ways to change fov as well? Like with the spyglass?
@Larkky
@Larkky Ай бұрын
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
@gqc888
@gqc888 Ай бұрын
petrified oak slab prolly or spawn eggs with nbt data to not do anything
@egekahraman8985
@egekahraman8985 Ай бұрын
I think poisonous patatoes may qualify depending on if being eatable messes things up
@404maxnotfound
@404maxnotfound Ай бұрын
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 Ай бұрын
As far as I'm aware the only item like that is the clock.
@Capiosus
@Capiosus Ай бұрын
knowledge book?
@CallMeCarlos1
@CallMeCarlos1 Ай бұрын
Do you really think 1 million seconds is gonna stop me from eating my magic wand?
@Luna5829
@Luna5829 Ай бұрын
68 years will though (java integer limit)
@TheMiningCrafter
@TheMiningCrafter Ай бұрын
@@Luna5829 yes but 1 million seconds is only 11 days
@Luna5829
@Luna5829 Ай бұрын
@@TheMiningCrafter the datapack uses integer limit tho
@TheMiningCrafter
@TheMiningCrafter Ай бұрын
@@Luna5829 yes but if it doesn’t reach said integer limit nothing will happen
@Sabagegah
@Sabagegah Ай бұрын
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 Ай бұрын
FYI this is 11 and a half days lol
@conure512
@conure512 Ай бұрын
@@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 Ай бұрын
@@conure512 Advancement Made: Seriouser Dedication
@alexdanovyt9032
@alexdanovyt9032 Ай бұрын
@@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 Ай бұрын
@@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 Ай бұрын
it’s still kinda funny that if you hold cast for long enough eventually you’ll start eating your wand
@JustVlad1
@JustVlad1 Ай бұрын
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 Ай бұрын
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 Ай бұрын
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 Ай бұрын
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…🤣
@Game_Blox9999
@Game_Blox9999 Ай бұрын
NnNnNeEeEeOoOoOwWwWw!
@mini-prince.1233
@mini-prince.1233 Ай бұрын
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 Ай бұрын
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 Ай бұрын
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 Ай бұрын
Does Swift Sneak affect your speed while eating? If so I did not know that lol
@CaliSPICY
@CaliSPICY Ай бұрын
@@conure512 no it doesn't
@shureee1
@shureee1 Ай бұрын
how about changing generic movement speed while consuming the item?
@Sollace
@Sollace Ай бұрын
@@conure512 I'm not sure, lol, but there's also the speed boost potion effect.
@As1anCr4ck3r
@As1anCr4ck3r Ай бұрын
@@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 Ай бұрын
I’m always glad to find another high-quality datapack channel. This is super cool!
@turmspitzewerk
@turmspitzewerk Ай бұрын
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 👍
@_rubl
@_rubl Ай бұрын
the only advantage coas still have is that you don't slow down while using it
@virtu6607
@virtu6607 Ай бұрын
Now I just need fully implemented component crafting and I will be happy
@thenextdoor696
@thenextdoor696 Ай бұрын
These last few videos convinced me to sub to this channel, great job dude!
@jq1245
@jq1245 Ай бұрын
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!
@j.a.v.mersbergen5443
@j.a.v.mersbergen5443 Ай бұрын
This channel is sooooo underrated!
@SuperBro112Lol
@SuperBro112Lol Ай бұрын
im surprised his videos even appear on my home page
@fgdx
@fgdx Ай бұрын
This is such an incredible way to do the cooldowns, kudos to you.
@As1anCr4ck3r
@As1anCr4ck3r Ай бұрын
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 Ай бұрын
This is possible using custom model data
@As1anCr4ck3r
@As1anCr4ck3r Ай бұрын
@@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
@kuronya3582
@kuronya3582 Ай бұрын
using advancement as tickless trigger is something fascinating for me
@matiera_scape
@matiera_scape Ай бұрын
While I don't know all of these magic words, I did enjoy the video lol Congrats on 1k subs Conure!
@staxpy5729
@staxpy5729 Ай бұрын
Amazing ! Clear and straight to the point. Great explanations ty, that's super useful !
@abraxas2658
@abraxas2658 Ай бұрын
The impulse gem is 90% of the way to charging an effect that occurs on release
@PenelopeNaomi
@PenelopeNaomi Ай бұрын
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 Ай бұрын
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)
@TheiBunny
@TheiBunny Ай бұрын
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 Ай бұрын
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 Ай бұрын
@@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".
@observerdot2107
@observerdot2107 Ай бұрын
This explains why when some mods break, if you right click them it starts the eating animation
@jakeklic
@jakeklic Ай бұрын
this is everything i’ve ever wanted, thank you
@Ruffilicious
@Ruffilicious Ай бұрын
thank you. I hope we see more of the good stuff
@whycantithinkofaname26
@whycantithinkofaname26 Ай бұрын
Congratulations on 1k!
@FACS01
@FACS01 Ай бұрын
@minecraft please add an food component tag to set a custom walking speed while eating
@Izzythemaker127
@Izzythemaker127 Ай бұрын
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.
@FriedMonkey362
@FriedMonkey362 Ай бұрын
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
@KarachoBolzen
@KarachoBolzen Ай бұрын
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.
@henrycgs
@henrycgs Ай бұрын
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 Ай бұрын
hey man if they just straight-up add right click detection, I would not complain for a second hahaha
@henrycgs
@henrycgs Ай бұрын
@@conure512 I know right!! and with the new components system I think we might be heading in that direction
@arcanine_enjoyer
@arcanine_enjoyer Ай бұрын
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
@austinlinco
@austinlinco Ай бұрын
How has no one thought of this… oml
@Cat-pv6yx
@Cat-pv6yx Ай бұрын
There was a post on this being the ultimate click detection method on Reddit
@NathanHaaren
@NathanHaaren Ай бұрын
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
@Gameatronic9000
@Gameatronic9000 Ай бұрын
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
@heckerhecker8246
@heckerhecker8246 Ай бұрын
this is cursed
@the_rahn
@the_rahn Ай бұрын
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!
@Samstercraft77
@Samstercraft77 Ай бұрын
thats game-changing btw vscode has extensions for syntax highlighting for mcfunction format if you're interested in that, might be easier than notepad
@IwrsTheKing007
@IwrsTheKing007 Ай бұрын
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 Ай бұрын
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 Ай бұрын
@@conure512 right, didn't think of that, makes sense
@Pillow_
@Pillow_ Ай бұрын
Huh, very interesting! I should really get into datapacks
@Nicky_T
@Nicky_T Ай бұрын
Hell yeah. Makes me want to get back into datapack coding
@myboyaks8065
@myboyaks8065 Ай бұрын
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)
@Kirisame_Soup
@Kirisame_Soup Ай бұрын
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 Ай бұрын
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 Ай бұрын
@@conure512 Oh yeah, that's indeed, hmm
@rx97_mc
@rx97_mc Ай бұрын
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`)
@krispyking2450
@krispyking2450 Ай бұрын
they should add a component saying how slow the player should move when active
@jamesharding7536
@jamesharding7536 Ай бұрын
Use the movement speed attribute to offset the eating slow
@justanicemelon9963
@justanicemelon9963 Ай бұрын
Never knew minecraft eating would be this game changing
@IkaSternenlicht
@IkaSternenlicht 28 күн бұрын
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 28 күн бұрын
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 28 күн бұрын
@@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.
@tom.h2060
@tom.h2060 7 күн бұрын
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 7 күн бұрын
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.
@Raccoon5
@Raccoon5 Ай бұрын
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)
@user-hf6se3qt5r
@user-hf6se3qt5r Ай бұрын
how did you get the custom items like the flame wand and the nether start thing like how did you make it spawn particles that arent food particles
@lysibee
@lysibee Ай бұрын
Fun fact, but resetting a scoreboard is actually more laggy, than /set 0
@live_destin-3408
@live_destin-3408 Ай бұрын
*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*
@Pikatscha
@Pikatscha Ай бұрын
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
@mainwilly
@mainwilly Ай бұрын
are you slowing down your walk while right clicking the item as foods like you eat regular foods?
@funnydotyes
@funnydotyes Ай бұрын
you could create a flamethrower with actual ammo with this due to it being consumed
@SoulPriest
@SoulPriest Ай бұрын
1) possible to make a cooldown version? 2) possible to give speed matching normal speed while eating?
@colevilleproductions
@colevilleproductions 26 күн бұрын
how can I invert the logic for the impulse charm so that it counts down when I'm holding it and resets the timer when I stop? (just realized this could be useful for a tau cannon type thing)
@slimesauce3044
@slimesauce3044 Ай бұрын
Assume I had a tick function in my datapack with ~7 commands, 6 for different types of weapon cooldowns and 1 for right click detection. Performance wise, would it be worth switching from carrots to this new system?
@slimesauce3044
@slimesauce3044 Ай бұрын
Just got to the part of the video where you talk about cooldowns, but my question still stands. How big of a performance impact does this have with only seven ticking commands?
@conure512
@conure512 Ай бұрын
Low amounts of ticking commands really dont have much of an impact. But i've been conditioned to avoid them whenever possible because I once worked on a massive data-pack-pack that used LOTS of people's datapacks - most of them only had a few ticking commands each, but all together, the performance of the pack was abysmal. So that kinda stuff can stack up if used with a bunch of other packs, i guess it just depends if you wanna accomodate that very specific use case or not lol
@Kirisame_Soup
@Kirisame_Soup Ай бұрын
Or, even simpler, you can schedule a function on the advancement ticking to revoke it. I think it should do the trick
@NeunEinser
@NeunEinser Ай бұрын
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.
@SpiritOfTheGalaxy143
@SpiritOfTheGalaxy143 Ай бұрын
Congrats @satwr on getting in a video!
@FakeFurball
@FakeFurball Ай бұрын
Could you add a speed boost effect to the function to negate the "eating" debuff?
@xLTxFire
@xLTxFire Ай бұрын
I actually didn't know about the food thing. I need to keep up with things better.
@Doodle128
@Doodle128 Ай бұрын
Make it apply a speed effect when eating
@ScientificallyImprobable
@ScientificallyImprobable Ай бұрын
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)?
@christian_do
@christian_do Ай бұрын
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.
@Keleksos
@Keleksos Ай бұрын
to prevent the speed loss from holding right click with this method, could you increase the player's movement speed to compensate while they're using the item?
@Blazecaster
@Blazecaster Ай бұрын
In theory could you create an overheating system utilizing the eating function returning a temporary item upon completing the eating animation?
@404maxnotfound
@404maxnotfound Ай бұрын
Nice no more eye of ender trick.
@firstnamelastname442
@firstnamelastname442 Ай бұрын
why don’t they add a new item component that contains the name of a function to run when the item is right clicked and another for left click?
@hasantopcu556
@hasantopcu556 Ай бұрын
clever and perfect!
@MadelynofHell
@MadelynofHell Ай бұрын
Can you not just give the player speed while they're using the wand ro avoid the issue wutg eating slowing you down?
@SeriousGamer42
@SeriousGamer42 Ай бұрын
How did you make the recipe output include additional components?
@toughtntman37doesanimations
@toughtntman37doesanimations Ай бұрын
Can you make the eat time 0 and the chorus-style delay to 20 or whatever?
@WillF-wi9iw
@WillF-wi9iw 24 күн бұрын
is there a way to visualize the delay like in actual weapons and consumables?
@scratchbeginner2954
@scratchbeginner2954 Ай бұрын
9:49 or while you're using the item set your base attribute speed to the normal speed to cancel out the slowdown
@404maxnotfound
@404maxnotfound Ай бұрын
Sorry bit confused what is the purpose of having a second advancement? Since you can have a cooldown that gets added on right click and subtract it till it reaches zero on a mcfunction connected to the tick.json file. That mcfunction file and cooldown I thought would be tick accurate am I wrong? Is this method more performant since not always running that check command every tick?
@conure512
@conure512 Ай бұрын
Putting it in the tick.mcfunction tag will cause whatever command it is to run every tick no matter what. With advancements, you can totally turn off the ticking by granting the advancement and not revoking it.
@apersimmon
@apersimmon Ай бұрын
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 Ай бұрын
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 Ай бұрын
@@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".
@maxanimator9547
@maxanimator9547 Ай бұрын
What's wrong with interactions ?
@helohel5915
@helohel5915 Ай бұрын
1.20.5 is already out ;) cant wait to see what you can do with the new stuff
@conure512
@conure512 Ай бұрын
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 Ай бұрын
@@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.
@dojelnotmyrealname4018
@dojelnotmyrealname4018 Ай бұрын
Hey, since bowl items return their bowl when you eat them, could you A: set the return item to something useful and B: Use an instant eat time, to detect right clicks that way?
@conure512
@conure512 Ай бұрын
You can indeed set instant eat time, but you can't inherently change the returned item. You'd need to set up an advancement or something that detects when you eat that item, then clears 1 bowl from your inventory and gives you the item you want instead.
@KwikBR
@KwikBR Ай бұрын
isn't there a way to change player speed without changing the FOV? on lots of non-modded servers i've been in there's a walkspeed command, which changes playerspeed without changing the fov, isn't that a datapack?
@conure512
@conure512 Ай бұрын
That's probably done through plugins, not datapacks. Especially if this server had custom commands - those can't be added with datapacks, so the server definitely has plugins on it lol
@KwikBR
@KwikBR Ай бұрын
@@conure512 I had no idea that there was a difference, sorry
@gafoneo3727
@gafoneo3727 Ай бұрын
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?
@ProfessorThock
@ProfessorThock Ай бұрын
Could you fix the movement by increasing movement speed while right clicking?
@Omena0
@Omena0 Ай бұрын
When interaction entity
@bonehomie420
@bonehomie420 Ай бұрын
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 Ай бұрын
9:43
@404maxnotfound
@404maxnotfound Ай бұрын
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.
@CrazyMusicBoy44
@CrazyMusicBoy44 Ай бұрын
for single use right clicking, what happens if you set the eating time to 0?
@conure512
@conure512 Ай бұрын
I'm pretty sure it has to be a positive value, but you can make it really tiny, and then you could feasibly detect it with the consume_item trigger. Only problem is it always displays the eating particles and plays the sound.
@DukkyMC
@DukkyMC Ай бұрын
You can also just use the schedule command instead of making a whole timer to remove the advancement, but nice technique!
@conure512
@conure512 Ай бұрын
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 Ай бұрын
@@conure512 makes sense. could probably force a uuid check
@viewyevening8719
@viewyevening8719 Ай бұрын
What if you give the player speed for 1 for every tick this used. Would it mess with the FOV too much?
@skeletorthebest7204
@skeletorthebest7204 Ай бұрын
I like to use the warped fungus on a stick
@E4tHam
@E4tHam Ай бұрын
Can you make the code window larger in the future?
@emilyhockers1086
@emilyhockers1086 Ай бұрын
idk much about datapacks, but can the horns properties be used for right click detection?
@404maxnotfound
@404maxnotfound Ай бұрын
They can but the game has a pre programmed cooldown for those which I am not sure if we can change, this allows a lot more flexibility.
@neyzzury
@neyzzury Ай бұрын
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 Ай бұрын
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 Ай бұрын
@@conure512 make entity big Also im unfamiliar with advancement stuff, it never worked for me :(
@Pleeze
@Pleeze Ай бұрын
Idk how I got here but I enjoyed the video, not that I'll ever do anything with this knowledge.
Introducing the Instant Kill Hypersonic Claymore
20:14
cubicmetre
Рет қаралды 373 М.
Why Minecraft Players Built a Real Life Supercomputer
23:24
HellCastle & Tylerrrr
Рет қаралды 871 М.
🍕Пиццерия FNAF в реальной жизни #shorts
00:41
🍟Best French Fries Homemade #cooking #shorts
00:42
BANKII
Рет қаралды 58 МЛН
I Built a Shelter House For myself and Сat🐱📦🏠
00:35
TooTool
Рет қаралды 30 МЛН
ИРИНА КАЙРАТОВНА - АЙДАХАР (БЕКА) [MV]
02:51
ГОСТ ENTERTAINMENT
Рет қаралды 1 МЛН
I Made a Neural Network with just Redstone!
17:23
mattbatwings
Рет қаралды 536 М.
Procedural Walking Animation in Minecraft
8:41
Cymaera
Рет қаралды 1,1 МЛН
Shader optimization tips!
17:21
Digvijaysinh Gohil
Рет қаралды 1,3 М.
Arbitrary Code Execution in Animal Crossing
24:22
Hunter R.
Рет қаралды 238 М.
The New and Improved Orbital Strike Cannon
15:43
cubicmetre
Рет қаралды 482 М.
Mods to Consider Using for Every Minecraft Modpack
32:35
Critters Mod Menagerie
Рет қаралды 137 М.
I Fixed the Dungeons In Minecraft!
21:13
CodeNeon
Рет қаралды 538 М.
You can mix 10 marbles until they sort themselves. Why not 100?
28:15
I don't like Gargantuars in PVZ2: Here's Why
18:24
Creeps20
Рет қаралды 837 М.
Why I Split Her Entire World In Half...
1:26:13
Quiff
Рет қаралды 455 М.
РАНГ ЖАНА СЕЗОН  - АДЕЛАЙДА СТРИМ !
5:53:20