Search in sources :

Example 1 with WorldComponent

use of org.terasology.engine.world.WorldComponent in project Terasology by MovingBlocks.

the class CreateWorldEntity method createWorldPoolsAndEntity.

private EntityRef createWorldPoolsAndEntity() {
    entityManager.createWorldPools(gameManifest);
    EntityRef worldEntity = entityManager.create();
    worldEntity.addComponent(new WorldComponent());
    NetworkComponent networkComponent = new NetworkComponent();
    networkComponent.replicateMode = NetworkComponent.ReplicateMode.ALWAYS;
    worldEntity.addComponent(networkComponent);
    return worldEntity;
}
Also used : NetworkComponent(org.terasology.engine.network.NetworkComponent) WorldComponent(org.terasology.engine.world.WorldComponent) EntityRef(org.terasology.engine.entitySystem.entity.EntityRef)

Example 2 with WorldComponent

use of org.terasology.engine.world.WorldComponent in project Terasology by MovingBlocks.

the class CreateRemoteWorldEntity method step.

@Override
public boolean step() {
    EntityRef worldEntity = entityManager.create();
    worldEntity.addComponent(new WorldComponent());
    chunkProvider.setWorldEntity(worldEntity);
    return true;
}
Also used : WorldComponent(org.terasology.engine.world.WorldComponent) EntityRef(org.terasology.engine.entitySystem.entity.EntityRef)

Aggregations

EntityRef (org.terasology.engine.entitySystem.entity.EntityRef)2 WorldComponent (org.terasology.engine.world.WorldComponent)2 NetworkComponent (org.terasology.engine.network.NetworkComponent)1