RadioactiveStud Posted May 13, 2014 Share Posted May 13, 2014 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. Quote Lead DivineRPG Developer Link to comment Share on other sites More sharing options...
RadioactiveStud Posted May 13, 2014 Author Share Posted May 13, 2014 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. Quote Lead DivineRPG Developer Link to comment Share on other sites More sharing options...
RadioactiveStud Posted May 13, 2014 Author Share Posted May 13, 2014 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. Quote Lead DivineRPG Developer Link to comment Share on other sites More sharing options...
RadioactiveStud Posted May 13, 2014 Author Share Posted May 13, 2014 I had a total derp and for got about e.entity.attackEntityFrom(DamageSource.onFire, 16); Quote Lead DivineRPG Developer Link to comment Share on other sites More sharing options...
Recommended Posts
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.