BattleInfoComponent: Update for more accurate module info

This commit is contained in:
noil 2021-10-30 22:09:52 -04:00
parent 3c8bac72ac
commit f309d4fb26
3 changed files with 8 additions and 8 deletions

View File

@ -69,10 +69,10 @@ public final class BattleInfoComponent extends DraggableHudComponent {
} }
} }
if (this.crystalAuraModule.getCurrentAttackEntity() != null) { if (this.crystalAuraModule != null && (this.crystalAuraModule.currentAttackEntity != null && this.crystalAuraModule.currentPlacePosition != null)) {
this.currentOpponent = (AbstractClientPlayer) this.crystalAuraModule.getCurrentAttackPlayer(); this.currentOpponent = (AbstractClientPlayer) this.crystalAuraModule.getCurrentAttackPlayer();
targetType = "crystal aura"; targetType = "crystal aura";
} else if (this.killAuraModule.getCurrentTarget() != null) { } else if (this.killAuraModule != null && this.killAuraModule.currentTarget != null) {
if (this.killAuraModule.getCurrentTarget() instanceof AbstractClientPlayer) { if (this.killAuraModule.getCurrentTarget() instanceof AbstractClientPlayer) {
this.currentOpponent = (AbstractClientPlayer) this.killAuraModule.getCurrentTarget(); this.currentOpponent = (AbstractClientPlayer) this.killAuraModule.getCurrentTarget();
targetType = "kill aura"; targetType = "kill aura";

View File

@ -78,11 +78,11 @@ public final class CrystalAuraModule extends Module {
private final RotationTask placeRotationTask = new RotationTask("CrystalAuraPlaceTask", 6); private final RotationTask placeRotationTask = new RotationTask("CrystalAuraPlaceTask", 6);
private final RotationTask attackRotationTask = new RotationTask("CrystalAuraAttackTask", 7); private final RotationTask attackRotationTask = new RotationTask("CrystalAuraAttackTask", 7);
private BlockPos currentPlacePosition = null; public BlockPos currentPlacePosition = null;
private BlockPos lastPlacePosition = null; public BlockPos lastPlacePosition = null;
private Entity lastAttackEntity = null; public Entity lastAttackEntity = null;
private Entity currentAttackEntity = null; public Entity currentAttackEntity = null;
private Entity currentAttackPlayer = null; public Entity currentAttackPlayer = null;
public CrystalAuraModule() { public CrystalAuraModule() {
super("CrystalAura", new String[]{"AutoCrystal", "Crystal"}, "Automatically places crystals near enemies and detonates them", "NONE", -1, ModuleType.COMBAT); super("CrystalAura", new String[]{"AutoCrystal", "Crystal"}, "Automatically places crystals near enemies and detonates them", "NONE", -1, ModuleType.COMBAT);

View File

@ -44,7 +44,7 @@ public final class KillAuraModule extends Module {
private final RotationTask rotationTask = new RotationTask("KillAuraTask", 5); private final RotationTask rotationTask = new RotationTask("KillAuraTask", 5);
private Entity currentTarget = null; public Entity currentTarget = null;
public KillAuraModule() { public KillAuraModule() {
super("KillAura", new String[]{"Aura"}, "Automatically aims and attacks enemies", "NONE", -1, ModuleType.COMBAT); super("KillAura", new String[]{"Aura"}, "Automatically aims and attacks enemies", "NONE", -1, ModuleType.COMBAT);