ewewukek's Musket mod

ewewukek's Musket mod

542k Downloads

Team Damage

talhanation opened this issue ยท 3 comments

commented

Minecraft Version

No response

ModLoader

No response

Request information

add friendly fire support, by adding this line to onHitEntityMethod(Hitresult)

Entity hitEntity = hitResult.getEntity();
Entity ownerEntity = this.getOwner();

if(ownerEntity.getTeam() != null && ownerEntity.getTeam().isAlliedTo(hitEntity.getTeam()) && !ownerEntity.getTeam().isAllowFriendlyFire()) return;

Other information

No response

commented

*to be compatible with recruits mod as the entities are not players

commented

sure, that looks reasonable

commented

done.
I also added mobReload helper method to complement mobUse and aimAt that hopefully should make integrating guns in other mods easier. RangedGunAttackGoal can serve as example