Right so you know the drill onto the functional side so we’re looking predominantly at the stas effect system right cuz I have explained the drop crafting and the multiblock structures before right cuz we are using a fair few of them we’ve got the wax Refinery we have the Deep slate furnace and The Cauldron they all feature in this system right but oh and the grinding station four four multiblock structures to get this system to work but anyway the main thing we want to go over is these too right well I think there’s like 20 21 can’t remember I made I made a lot but Yeah we want to go over how exactly these work and it’s it’s super simple like usual as I keep saying all I’m doing is on a a event right in this case hitting we’re going to tag the nearest entity right so that’s that’s all it is basically we tag them with whatever we Want and then depending on the tag we can run effects at different points right what does that look like well uh let’s go through the function so R enchant functions uh player should be the apply if I remember correctly right it weapon poisons perfect so then we Have the main hand particles which are just the effect going on right so you can see through the text there slightly then we also have the apply and the clear item I did talk about the clear item but I didn’t really go into great detail so I look at that one first so Basically every time the the flask triggers it counts up once it gets to 50 it will the the flask from your inventory now it will select from the top row of the inventory all the way to your selected item and off hand meaning that if you have the same flask uh Multiple times in your inv the first one that gets removed is not the equipped one right which I think is really nice coincidental but nice because it means you can you know stack up a bunch and continuously apply the different sound effects that you want to apply the way This is done though is obviously have to check the every single flask and as you can see there is a lot of them yeah so again super simple just the same event that applies we’re just using that to count up and then once the count gets to A certain amount it will clear the inventory place the particles and sound effects now the apply this is the main one so we have St Supply matches one now St Supply is just using the inbuilt scoreboard system once again so the custom scoreboards that track statistics And all I’m checking is when the player deals damage because that’s when they hit an entity right so any time the player hits an entity this gets pushed to above one and then that will run this effect and eventually will get cleared right should I don’t know if it gets Cleared here or the function before this that runs this one it’s probably the one before this but as you can see again then we have to test for all the flask so both the well actually no sorry only the the offand because that’s how they Function right so if a x flask is in the off hand then it will apply the different status effects there is also that RNG check that we went over last time as you can see here right all the different tags that control the actual statuses so for instance bleed is one That can accumulate so they apply bleed on the first hit and then if they have bleed right uh it will apply bleed 1 and then bleed 2 3 4 5 so all the the stacking status effects work in that range there are some that are just singular so for Instance this one that applies curse okay so all we do is check for a flask with curse in the law tag and then it’s going to apply to the nearest entity that we’ve hit curse so yeah again super simple I’ve chucked in a bunch of other complications uh stuff like this right Wherever I’ve got the the the check if you will multiple times I can really refine right again I’m learning as much as I trying to explain it so what I’ve done is conceptually fine but my execution isn’t completely polished just a fair warning so for instance like this I should really remove the if uh luck check and put it on the function before this one right and that way it wouldn’t even matter about checking this because the only time it will run is when that if function uh is at the point of working so in a way that would actually Gate how often this executes which then would cut down on lag more and yeah that’s the other reason we’re obviously going through them so I can see stuff like this pick it up and go well yep they all doing the same thing and that’s not a good thing to do as I’ve leared But yeah so again all we do is apply a tag to the enemy and then depending on the tag we trigger different effects as you can see here we’ve got add copper flask use there is two and one depending on the flask cuz there is a special Variant of the flask called an enriched copper waxing flask which has uh better effects and more uses right so again it was 50 to clear so this has to trigger 25 times and then this has to trigger those entire 50 times before the flask Is used up so that’s all it is for the the application again using the inbuilt scoreboard to check when the player attacks you can tie it to any uh statistic you want and then it’s just tagging the entities closest to play cuz that’s most likely the one that they are Attacking sometimes you will obviously knock entity back and you’ll have another one to the left or right and they will get tagged but you know this is the best I can do right but in terms of the mob we can then come over and we can find status effects so we have apply And then we have all the different status effects I each have their own function to make it easier on myself to obviously go through edit tweak and and balance them all but we have this apply function and all this is doing is checking the tag now I do have a bunch Of different timers set up so 5 Seconds right there’s different ones that trigger off at 5 Seconds there’s ones that trigger off of three uh tick and 8 12 I think 12 is Max no we do have oh no these are the remove right yeah we’ll Get to that in a second so 12 is the the greatest amount of time so every 12 seconds and they are on different uh tick timers so that they so that ones that have damage effects you can actually stack and hopefully it eats through the entities immunity I think It’s 10 ticks of immunity right so I’ve tried to space them as best as I can so that you know applying multiple status effects will actually trigger all their effects in terms of damage they will do whatevers they do if it’s spawn something in if it’s drop a area effect Cloud all of that will still function but yeah so there’s just a Time gatee on all of them and then it will execute if they have the corresponding tag to the corresponding status effect so for instance anything that gets frostburn will then trigger the frostburn effect Which we can find under F I should really just G with a but frostburn right so if they have frostburn they’re going to gain a attribute in this case it’s a negative attribute that reduces their Max health and it’s also going to damage them only minor so that the uh the Health reduction actually triggers cuz it’s not till the next uh tick update or damage update right that any negative health comes into play and their their health bar shrinks right and then if they have it and we get to the end of the stage of the the tag it will remove It so nice simple again as creative as you want to be with this scenario all it is again attack tag and then execute depending on the tag throw in a timer if you want to you know make you know the usual Clause of stpc where it triggers every now and then rather than Constantly but there are there are some that are a bit worse uh Splinter is the one that comes to mind so Splinter this is doing something a bit more complex so this is checking if the entity is moving so if they’re moving they’re going to constantly take damage on a player all We’re doing is testing if their X is equivalent to their their previous X is that correct should I have Z in there too feel like I should have Z in there too yeah I need to look into this one I mean the scoreboards exist I should say So really it’s just about doing this to make it work in fact jumping should probably be in there as well yeah yeah I don’t see why not so if you move in any direction cuz that’s kind of weird the way it was set so you Only have to you can only not move in one horizontal Direction all right good catch lucky I clicked on this one uh entities it’s a bit easier cuz they obviously have motion so if any of the motion values are greater than zero they’re going to then take the damage Again just as creative as you want to be whatever you can think up and conceptualize in terms of a stat effect go nuts uh the other one of interest is probably in TB under e so in Tomb is similar in fact this one as you can see has all the Checks so X Y and Z and it’s similar to swinter so it’s checking whether or not they’re moving but instead of damaging or or triggering effect when they move this one triggers if they don’t move so as long as the player hasn’t moved or the entity hasn’t gained any motion then It’s going to cycle through its effects which will slowly build up slowness and then eventually encase them in ice right so same for the entity again it’s just that difference of check because checking a entity’s motion is significantly easier than storing obviously all their their coordinate values and then checking that cuz that Is a lot of data to process but yeah again everything I do is is kind of basic it’s just the creativity that lets it Shine right from my perspective at least so again just uh using the inbuilt scoreboard to check when the player attacks then if they have attacked we’re Tagging the closest entity and then off of that we are running X effect depending on what tag that entity has been given so in this case if they have the INB tag it will run the inum effect which then has a more complex effect of checking their motion and then running Effects depending on whether or not they’re not moving yeah that’s pretty much it again simple from my perspective right but you can build off of it you can go nuts with it and you can come up with some really Creative Design right best thing about Minecraft is even the the command stuff And the functions are sandbox basically right whatever you can think of there is a way to do it it just will take some time and steps anyway hope you enjoyed you know I talked about them I might as well show them off right so we’ll come In I fixed up Splinter saved it uh I definitely need to heal myself you can see the particle effects triggering uh effect give us instant Health please so now because it’s in all axes we jump depending on the tick right we take damage we move forward we’re going to Take damage we move to the side we’re going to take damage so that’s Splinter and then I didn’t actually talk about the removal now did I so the way the removal system works is there are three checks so again if you have a decent luck stat then it’s going to remove it Quicker but eventually if none of the previous checks work it will just remove it and all I’m doing is at a timer interval I am again checking that luck score and if your luck score is greater than the RNG value it will remove the stus effects if it’s not then it will Continue and then will’ll get to the next time check in which case it’ll run it again but the the range that the luck check has to be in is a bit better and then if it doesn’t pass that either it’ll get get to the third stage where No matter what it will always clear there’s no other check it’s just a Time base value so they all will clear in I think I think it’s oh why am I guessing we have it so if we go to apply again down the bottom we have the remove so in This case after 240 ticks give or take this is another issue though so it should be 2 minutes right no 20 a second it’s a bit more no oh God yes this is where it gets complicated for me at least right because this is a 30 second timer and Then the minute timer and 2 minute timer so they can be desync so at minimum 30 seconds at maximum uh I think it should be about 4 minutes because for instance the timer could be below or above this and then it has to recount through do that make sense because they can desync Cu the amount of ticks within 30 seconds ver a minute and 2 minutes don’t always even out right the 30 seconds will cycle through x amount of times before it gets on par with the minute and 2 minutes in terms of 239 God I make it sound a lot more Complicated than it needs to be again I hope these are enjoyable and somewhat you know learnable I’m really not great at teaching but yeah nonetheless that’ll do hope you enjoyed see Out Video Information
This video, titled ‘[Runechant] On Hit Status Effect With New Potions, Functional Side Tutorial | Minecraft Data Pack #8’, was uploaded by Kllooooyy on 2023-12-05 14:00:09. It has garnered 21 views and 2 likes. The duration of the video is 00:12:34 or 754 seconds.
Showcases multiple features for my upcoming new Minecraft data pack. Using a bunch of commands I’m trying to alter Vanilla gameplay with an overwhelming number of RPG elements, from mob abilities to bosses and even a new magic system. I give you my work in progress Runechant a World of New Enchantments.
Twitch – https://www.twitch.tv/kllooooyy Twitter – https://twitter.com/klloo_ooyy TikTok – https://www.tiktok.com/@kllooooyy Discord – https://discord.gg/3Ntrh7sywT
#minecraft #datapack #minecraftdatapack #minecraftcreations #minecraftcreative #minecraftcommandblock #commandblock #minecraftshorts