Skip to content

Commit

Permalink
之前的代码缩进有问题
Browse files Browse the repository at this point in the history
  • Loading branch information
亡灵暴龙大帝 committed Jul 2, 2024
1 parent f5d81d8 commit 6ef6480
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/main/java/emu/grasscutter/game/entity/EntityAvatar.java
Original file line number Diff line number Diff line change
Expand Up @@ -70,17 +70,17 @@ public EntityAvatar(Scene scene, Avatar avatar) {
Grasscutter.getLogger().error("Unable to create EntityAvatar instance; provided scene is null.");
}

var world = scene.getWorld();
this.id = world.getNextEntityId(EntityIdType.AVATAR);

var weapon = this.getAvatar().getWeapon();
if (weapon != null) {
if (!(weapon.getWeaponEntity() != null && weapon.getWeaponEntity().getScene() == scene)) {
weapon.setWeaponEntity(
new EntityWeapon(this.getPlayer().getScene(), weapon.getItemData().getGadgetId()));
scene.getWeaponEntities().put(weapon.getWeaponEntity().getId(), weapon.getWeaponEntity());
}
var world = scene.getWorld();
this.id = world.getNextEntityId(EntityIdType.AVATAR);

var weapon = this.getAvatar().getWeapon();
if (weapon != null) {
if (!(weapon.getWeaponEntity() != null && weapon.getWeaponEntity().getScene() == scene)) {
weapon.setWeaponEntity(
new EntityWeapon(this.getPlayer().getScene(), weapon.getItemData().getGadgetId()));
scene.getWeaponEntities().put(weapon.getWeaponEntity().getId(), weapon.getWeaponEntity());
}
}

this.initAbilities();

Expand Down

0 comments on commit 6ef6480

Please sign in to comment.