Search in sources :

Example 6 with NetworkSystemImpl

use of org.terasology.engine.network.internal.NetworkSystemImpl in project Terasology by MovingBlocks.

the class SetupRemotePlayer method step.

@Override
public boolean step() {
    NetworkSystemImpl networkSystem = (NetworkSystemImpl) context.get(NetworkSystem.class);
    EntityRef client = networkSystem.getServer().getClientEntity();
    if (client.exists()) {
        context.get(LocalPlayer.class).setClientEntity(client);
        return true;
    }
    return false;
}
Also used : LocalPlayer(org.terasology.engine.logic.players.LocalPlayer) NetworkSystem(org.terasology.engine.network.NetworkSystem) EntityRef(org.terasology.engine.entitySystem.entity.EntityRef) NetworkSystemImpl(org.terasology.engine.network.internal.NetworkSystemImpl)

Aggregations

NetworkSystemImpl (org.terasology.engine.network.internal.NetworkSystemImpl)6 EngineTime (org.terasology.engine.core.EngineTime)4 EngineEntityManager (org.terasology.engine.entitySystem.entity.internal.EngineEntityManager)3 Test (org.junit.jupiter.api.Test)2 EntityRef (org.terasology.engine.entitySystem.entity.EntityRef)2 EventLibrary (org.terasology.engine.entitySystem.metadata.EventLibrary)2 NetworkSystem (org.terasology.engine.network.NetworkSystem)2 Path (java.nio.file.Path)1 BeforeEach (org.junit.jupiter.api.BeforeEach)1 ComponentSystemManager (org.terasology.engine.core.ComponentSystemManager)1 LoadPrefabs (org.terasology.engine.core.modes.loadProcesses.LoadPrefabs)1 Game (org.terasology.engine.game.Game)1 ConsoleImpl (org.terasology.engine.logic.console.ConsoleImpl)1 LocalPlayer (org.terasology.engine.logic.players.LocalPlayer)1 ReadWriteStorageManager (org.terasology.engine.persistence.internal.ReadWriteStorageManager)1 CharacterStateEventPositionMap (org.terasology.engine.recording.CharacterStateEventPositionMap)1 DirectionAndOriginPosRecorderList (org.terasology.engine.recording.DirectionAndOriginPosRecorderList)1 RecordAndReplayCurrentStatus (org.terasology.engine.recording.RecordAndReplayCurrentStatus)1 RecordAndReplaySerializer (org.terasology.engine.recording.RecordAndReplaySerializer)1 RecordAndReplayUtils (org.terasology.engine.recording.RecordAndReplayUtils)1