Posted May 13, 201411 yr Hello, I'm spawning a lightning bolt when I right click an item, and I know that this method in "Entity" tells the mod how much damage lightning does: public void onStruckByLightning(EntityLightningBolt par1EntityLightningBolt) { this.dealFireDamage(5); ++this.fire; if (this.fire == 0) { this.setFire(; } } So how would I go about changing how much damage the bolt does. Lead DivineRPG Developer
May 13, 201411 yr Author Oh, sorry. I was messing around and copied that from the wrong class. I was trying to make a custom lightning, but I was having issues. I'll try the EntityStruckByLightningEvent. Lead DivineRPG Developer
May 13, 201411 yr Author Okay, so @SubscribeEvent public void onLightningStrike(EntityStruckByLightningEvent e) { e.entity.dealFireDamage(16); } does not work, because dealFireDamage is private. So how would I go about doing this. Lead DivineRPG Developer
May 13, 201411 yr Author I had a total derp and for got about e.entity.attackEntityFrom(DamageSource.onFire, 16); Lead DivineRPG Developer
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.