Posted September 27, 20223 yr I would like that when the player wears a piece of armour from my mod, that he then gets Jump boost, is that possible and if so how?
September 27, 20223 yr Jump Boost is a potion effect, it doesn't apply to items. The correct way to do this is to add your own net.minecraft.world.entity.ai.attributes.Attribute for this (unfortunately for you, Jump Boost doesn't use an Attribute). There is one for horse jumping. The quick and dirty alternate is to subscribe to LivingEquipmentChangeEvent and add/remove the mob effect yourself. Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
September 28, 20223 yr Author Thanks, Warjort, but my problem is that I don't know how to add/remove an effect and I dont know how the LivingEquipmentChangeEvent works.
September 28, 20223 yr https://forge.gemwire.uk/wiki/Mob_Effects For an example look at WitherSkeleton.doHurtTarget() Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
September 28, 20223 yr And events are explained on that same wiki: https://forge.gemwire.uk/wiki/Main_Page Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
September 29, 20223 yr Author Tanks warjort and now I know how to apply effects to the player and how to check if the player wears armor, but to apply an effect to the player I need to get the player object I saw a Declaration to this but It doesn't work in 1.19. Sorry for so many questions as you see I'm a beginner. And sorry if my english is bad I'm from germany
September 29, 20223 yr All LivingEntityEvents have a getEntity() Boilerplate: If you don't post your logs/debug.log we can't help you. For curseforge you need to enable the forge debug.log in its minecraft settings. You should also post your crash report if you have one. If there is no error in the log file and you don't have a crash report then post the launcher_log.txt from the minecraft folder. Again for curseforge this will be in your curseforge/minecraft/Install Large files should be posted to a file sharing site like https://gist.github.com You should also read the support forum sticky post.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.