Skip to content

Commit

Permalink
修复多人模式下看不见其他玩家动画的Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
CoolLoong committed Oct 22, 2022
1 parent ae3e4c4 commit 7749b73
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>cn.coolloong.amethyst_equipment</groupId>
<artifactId>AmethystEquipment</artifactId>
<version>1.0-SNAPSHOT</version>
<version>1.1-SNAPSHOT</version>

<properties>
<maven.compiler.source>17</maven.compiler.source>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ public boolean onClickAir(Player player, Vector3 directionVector) {
pk.setNextState("default");
pk.setBlendOutTime(0f);
pk.setEntityRuntimeIds(List.of(player.getId()));
player.dataPacket(pk);
for (var pl : AmethystEquipment.instance.getServer().getOnlinePlayers().values()) {
pl.dataPacket(pk);
}
AmethystEquipment.instance.getServer().getScheduler().scheduleDelayedTask(AmethystEquipment.instance, () -> {
var pk2 = new AnimateEntityPacket();
pk2.setAnimation("animation.player.move.arms.stationary");
Expand All @@ -111,7 +113,9 @@ public boolean onClickAir(Player player, Vector3 directionVector) {
pk2.setNextState("default");
pk2.setBlendOutTime(0f);
pk2.setEntityRuntimeIds(List.of(player.getId()));
player.dataPacket(pk2);
for (var pl : AmethystEquipment.instance.getServer().getOnlinePlayers().values()) {
pl.dataPacket(pk2);
}
}, 36);

AmethystEquipment.instance.getServer().getScheduler().scheduleDelayedTask(AmethystEquipment.instance, () -> {
Expand Down

0 comments on commit 7749b73

Please sign in to comment.