Skip to content

Commit

Permalink
lol fixing bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
Weever1337 committed May 29, 2024
1 parent 8784669 commit 6cbc242
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions src/main/java/com/weever/rotp_cm/entity/CMoonEntity.java
Original file line number Diff line number Diff line change
Expand Up @@ -126,18 +126,17 @@ else if ((user.isAlive() && this.getUserPower().getResolveLevel() == 0)
IStandPower userPower = this.getUserPower();
userPower.toggleSummon();
} else if (this.isAtt()) {
if (this.getCurrentTaskAction() == ModStandsInit.UNSUMMON_STAND_ENTITY.get() && user instanceof PlayerEntity) {
this.setAttOrNot(false);
} else if (this.getCurrentTaskAction() == InitStands.CMOON_BLOCK.get() && user instanceof PlayerEntity) {
this.setAttOrNot(false);
if (this.getCurrentTaskAction() == ModStandsInit.UNSUMMON_STAND_ENTITY.get() && user instanceof PlayerEntity){
PlayerEntity player = (PlayerEntity) this.getUser ();
this.stopTask();
player.displayClientMessage(new TranslationTextComponent("jojo.message.action_condition.cant_control_stand"), true);
}
LivingEntity livingTarget = null;

Entity curTarget = getCurrentTask().map(StandEntityTask::getTarget).orElse(ActionTarget.EMPTY).getEntity();
if (curTarget instanceof LivingEntity && curTarget.isAlive() && curTarget.distanceToSqr(user) < range * range) {
livingTarget = (LivingEntity) curTarget;
}
else {
} else {
List<Entity> entitiesAround = this.level.getEntities(this, user.getBoundingBox().inflate(range),
entity -> (entity instanceof LivingEntity && this.checkTargets(entity)));
if (!entitiesAround.isEmpty()) {
Expand Down Expand Up @@ -187,8 +186,8 @@ else if (livingTarget.isDeadOrDying () && livingTarget.getMaxHealth () >= 20){
if (isManuallyControlled()) {
if (user instanceof PlayerEntity) {
PlayerEntity player = (PlayerEntity) getUser();
StandUtil.setManualControl(player, false, false);
player.displayClientMessage(new TranslationTextComponent("jojo.message.action_condition.cant_control_stand"), true);
//StandUtil.setManualControl(player, false, false);
setAttOrNot(false);
}
}
} else if (this.isBarr()) {
Expand Down

0 comments on commit 6cbc242

Please sign in to comment.