public override void OnStruckByLightning(net.minecraft.src.EntityLightningBolt entitylightningbolt ) { if (worldObj.singleplayerWorld) { return; } else { net.minecraft.src.EntityPigZombie entitypigzombie = new net.minecraft.src.EntityPigZombie (worldObj); entitypigzombie.SetLocationAndAngles(posX, posY, posZ, rotationYaw, rotationPitch ); worldObj.AddEntity(entitypigzombie); SetEntityDead(); return; } }
public override bool AttackEntityFrom(net.minecraft.src.Entity entity, int i) { if (entity is net.minecraft.src.EntityPlayer) { System.Collections.Generic.List <Entity> list = worldObj.GetEntitiesWithinAABBExcludingEntity(this , boundingBox.Expand(32D, 32D, 32D)); for (int j = 0; j < list.Count; j++) { net.minecraft.src.Entity entity1 = (net.minecraft.src.Entity)list[j]; if (entity1 is net.minecraft.src.EntityPigZombie) { net.minecraft.src.EntityPigZombie entitypigzombie = (net.minecraft.src.EntityPigZombie )entity1; entitypigzombie.BecomeAngryAt(entity); } } BecomeAngryAt(entity); } return(base.AttackEntityFrom(entity, i)); }