Hi, I was wondering if anyone could help me. When hit by a certain weapon, I want my custom mob to not flash red and to take less knockback than normal. I'm already cancelling LivingHurtEvent when the damage source is the weapon to make the mob not take damage, but I don't know how to do the other things. If I cancel LivingAttackEvent, it removes the damage, red flash, and knockback, which isn't what I want.
Thanks!
Hi, could anyone tell me how to set entity attributes for my custom mob, please? I copied the code that most of the vanilla mobs use, but judging from the log, it doesn't seem to be working. I found this post, but it appears to be out of date.
Thanks.
I could be wrong, but I think you might need to add this code in the constructor:
FMLJavaModLoadingContext.get().getModEventBus().addListener(this::setup);
And you may need to change the setup method to non-static.
Hi, I'm trying to make a dust-like block for my mod, so I copied the redstone dust class and assets (don't attack me, I'll change them) to a new class. However, when I place my block in the world, the texture glitches, as if the block is clipping. It's not z fighting, because I raised the model way off the ground and it still glitched. The vanilla redstone dust isn't glitched either.
This is what the block looks like:
Thanks.
Sorry I didn't reply sooner, I was busy. I'm glad you got the problem sorted out. I had a look at the code, but I can't find the new problem, sorry.
Oh, and I didn't steal your code, don't worry. Although, I couldn't have used it, since like ChampionAsh said, your code is All Rights Reserved by default.