Skip to content
This repository has been archived by the owner on Jan 10, 2023. It is now read-only.

Commit

Permalink
Advancementの再生成回避のためFakePlayerのGameProfileを使いまわすよう変更
Browse files Browse the repository at this point in the history
  • Loading branch information
SistrScarlet committed Mar 3, 2021
1 parent 0841abc commit 6f127e7
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,17 @@
import javax.annotation.Nullable;
import java.util.List;
import java.util.Optional;
import java.util.UUID;

//エンティティをプレイヤーにラップするクラス
//基本的にサーバーオンリー
//アイテムの使用/アイテム回収/その他
public abstract class FakePlayerWrapperEntity extends FakePlayer {
private static final GameProfile profile = new GameProfile(UUID.fromString("8eabd891-5b4a-44f5-8ea4-89b04100baf6"),
"fake_player_name");

public FakePlayerWrapperEntity(LivingEntity origin) {
super((ServerWorld) origin.world, new GameProfile(origin.getUniqueID(),
origin.getType().getName().getString() + "_player_wrapper"));
super((ServerWorld) origin.world, profile);
setEntityId(origin.getEntityId());
connection = new FakePlayNetHandler(getServer(), this);
}
Expand Down

0 comments on commit 6f127e7

Please sign in to comment.