Skip to content

Commit 6eb6aca

Browse files
committed
fix: fix #123
1 parent 62ce3ab commit 6eb6aca

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/legacy/api/SimulatedPlayerAPI.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,7 @@ Local<Value> McClass::spawnSimulatedPlayer(const Arguments& args) {
5858
}
5959
bpos = BlockPos(args[1].toInt(), args[2].toInt(), args[3].toInt()).bottomCenter();
6060
}
61-
if (auto sp = SimulatedPlayer::create(
62-
name,
63-
bpos,
64-
dimid,
65-
ll::service::getMinecraft()->getServerNetworkHandler(),
66-
std::to_string(ll::random_utils::rand<int64>(INT64_MIN, -1))
67-
))
68-
return PlayerClass::newPlayer(sp);
61+
if (auto sp = SimulatedPlayer::create(name, bpos, dimid)) return PlayerClass::newPlayer(sp);
6962
else return Local<Value>();
7063
}
7164
CATCH("Fail in " __FUNCTION__ "!")

0 commit comments

Comments
 (0)