Chomp Chomp and let’s add a custom attack animation to our entity all right we found ourselves back until everyone’s more and in this tutorial we’re going to be adding a custom attack animation to our entity now despite what I said in the last video we’re actually Not going to do this via a custom goal because within the last minute so to speak of this tutorial coming out it’s not quite that it’s sort of like one day ago or like one day before the video comes out something like that someone actually same different uh all credits Go to them because they actually said you know this is way too over complicated of doing it and there’s a way that is much much easier to add this attack animation so this is why we’re now going to use well this way to do it And you’re going to say this is this is actually fairly easy indeed so what we’re going to need is we’re just going to need a new animation controller right here so we’re just going to duplicate this one right so just select it press Ctrl D to D duplicate it I’m going to Call this the attack controller and then this one it’s not going to actually uh Point towards the predicate but I want to make a new predicate called attack predicate there you go and then let’s just hover over this read that method let’s just move it up here And now we have this method right here now how do we then actually get the attack animation to work well let’s just for the sake of argument copy over this part right here right because this part is always what the animation is that plays and there’s always going to be the Same usually right we would just want to make this attack and then this is extremely important we want this to not Loop so we want should Loop is false very interesting and then here we need an if statement that’s going to look very very strange and that is the if This dot swinging and event.getcontroller that get animation state that equals and if this equals the animation state of stopped then we can proceed and then we want to actually get this controller animation right here inside of this if statement but this is not all that we need in this if Statement the first thing in this if statement is event dot getcontroller dot Mark needs reload and then after the animation has been set we also want to set swinging to false now this is all that we need for our attack attack animation to work as long as you you Have an attack animation that is called animation dot whatever the name of your entity is that attack then this will work absolutely no worries right with a custom controller and this and that is all that we need no you know no needed actual attack goal custom attack or none Of that basically we can just proceed with this so I guess let’s just go into the game and see if it works alright so we find yourself back in Minecraft and let’s just spawn a chomper now you can see the walking animation still works the other animation right idle animation The ego still works and if I spawn a villager you’re gonna see that as soon as it attacks you can see the attack animation plays and actually it will not play as long as you know only it will basically only play when it actually attacks the other entity which is Exactly what you want so it doesn’t play continuously while uh while it’s basically pursuing the target which is exactly what you want to see as you can see it’s not playing it’s not playing and then it’s playing when the actual hit basically hits so this is why Swinging is so great so the so they you know swinging um Boolean is so great and there you go so this is pretty much how you can add a custom attack animation to your gecko lip entity right so once again biggest thank you to same different for pointing this out Because this is much much easier than the version I had before but that will be it for this tutorial all of the code of course as always in the description below get a positive individual just as well and I’ll see you all next time so yeah Video Information
This video, titled ‘Minecraft 1.19.2 Forge Modding Tutorial | GECKOLIB ATTACK ANIMATION | #29’, was uploaded by Modding by Kaupenjoe on 2022-09-15 13:59:49. It has garnered 7403 views and 110 likes. The duration of the video is 00:03:46 or 226 seconds.
In this Minecraft Modding Tutorial, we add a custom Goal to get the Geckolib Attack Animation to work for Forge in Minecraft 1.19.2
== SUPPORT ME ON PATREON == ▶️ https://www.patreon.com/Kaupenjoe
== ASSETS & DOWNLOAD LINKS == GitHub Repo: https://github.com/Tutorials-By-Kaupenjoe/Forge-Tutorial-1.19/tree/29-hostileAttackAnimation Gist: https://url.kaupenjoe.net/yt424/gist
== TIMESTAMPS == N/A
== 25% OFF FOR GAMING SERVERS == ▶️ https://www.bisecthosting.com/Kaupenjoe
== TAKE A LOOK AT MY COURSES WITH COUPON CODES == ▶️ NEW Forge Modding with Minecraft 1.20.X: https://url.kaupenjoe.net/CourseForge120X ▶️ Learn Forge Modding with Minecraft 1.18: https://url.kaupenjoe.net/CourseForge118 * ▶️ Learn Fabric Modding with Minecraft 1.18: https://url.kaupenjoe.net/CourseFabric118 * ▶️ Complete and Roblox Lua Game Development: https://url.kaupenjoe.net/RobloxCoupon *
== SUPPORT ME ON PATREON == ▶️ https://www.patreon.com/Kaupenjoe
== SOCIALS == Discord: https://discord.com/invite/yqxykanpWf Personal Twitter: https://twitter.com/Kaupenjoe
Instagram: https://url.kaupenjoe.net/tutorials/instagram Facebook: https://url.kaupenjoe.net/tutorials/facebook Twitter: https://url.kaupenjoe.net/tutorials/twitter TikTok: https://url.kaupenjoe.net/tutorials/tiktok Written Tutorials: https://url.kaupenjoe.net/tutorials/blog
== LICENSE == Source Code is distributed under the MIT License. Additional Licenses for other assets can be seen below or in the accompanying CREDITS.txt on download.
== ADDITIONAL CREDITS == Outro Musik by Kevin MacLeod: “That’s a Wrap” Kevin MacLeod (incompetech.com) Licensed under Creative Commons: By Attribution 3.0 http://creativecommons.org/licenses/by/3.0
== AFFILIATE DISCLAIMER == * Some of the links and other products that appear in the video description are from companies which I will earn an affiliate commission or referral bonus from or are my own products. This means that if you click on one of the product links, I’ll receive a small commission or additional kickback without any additional cost for you. This helps support the channel and allows me to continue to make videos. Thank you for the support!
== HASHTAGS == #Minecraft #MinecraftModding #MinecraftTutorial #Kaupenjoe