Package org.terasology.network

Examples of org.terasology.network.ClientComponent


        if (characterComponent == null) {
            return "?";
        }
        EntityRef controller = characterComponent.controller;

        ClientComponent clientComponent =  controller.getComponent(ClientComponent.class);
        if (characterComponent == null) {
            return "?";
        }
        EntityRef clientInfo = clientComponent.clientInfo;
View Full Code Here


    }

    @ReceiveEvent(components = {CharacterComponent.class, CharacterMovementComponent.class, LocationComponent.class})
    public void onDestroy(final BeforeDeactivateComponent event, final EntityRef entity) {
        CharacterComponent character = entity.getComponent(CharacterComponent.class);
        ClientComponent controller = character.controller.getComponent(ClientComponent.class);
        if (controller != null && controller.local) {
            predictedState = null;
            authoritiveState = null;
            inputs.clear();
        }
View Full Code Here

        ComponentSystemManager componentSystemManager = CoreRegistry.get(ComponentSystemManager.class);
        for (UpdateSubscriberSystem updater : componentSystemManager.iterateUpdateSubscribers()) {
            updater.update(0.0f);
        }
        LocalPlayer localPlayer = CoreRegistry.get(LocalPlayer.class);
        ClientComponent client = localPlayer.getClientEntity().getComponent(ClientComponent.class);
        if (client != null && client.character.exists()) {
            worldRenderer.setPlayer(CoreRegistry.get(LocalPlayer.class));
            return true;
        } else {
            worldRenderer.getChunkProvider().completeUpdate();
View Full Code Here

    private void addMesh(EntityRef entity) {
        MeshComponent meshComp = entity.getComponent(MeshComponent.class);
        // Don't render if hidden from owner (need to improve for third person)
        if (meshComp.hideFromOwner) {
            ClientComponent owner = network.getOwnerEntity(entity).getComponent(ClientComponent.class);
            if (owner != null && owner.local) {
                return;
            }
        }
        if (meshComp.material != null) {
View Full Code Here

TOP

Related Classes of org.terasology.network.ClientComponent

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.