Package org.spout.api.entity

Examples of org.spout.api.entity.EntityPrefab


    //}
    //TODO ServerEntityPrefab!
    //How about some client support?
    final Entity entity;
    if (getEngine() instanceof Client) {
      final EntityPrefab prefab = getEngine().getFileSystem().getResource("entity://Vanilla/entities/" + clazz.getSimpleName().toLowerCase() + "/" + clazz.getSimpleName().toLowerCase() + ".sep");
      entity = prefab.createEntity(player.getPhysics().getPosition());
    } else {
      entity = player.getWorld().createEntity(player.getPhysics().getPosition(), clazz);
    }
    //Optional param was provided (ie the block material for a falling block).
    if (args.length() == 2) {
View Full Code Here


    // Create a new Player Entity with a Human Entity Component
    Entity entity = w.createEntity(pos, Human.class);
    entity.setSavable(true);
    entity.add(Human.class).setName(message.getName());
    EntityPrefab humanPrefab = session.getEngine().getFileSystem().getResource("entity://Vanilla/entities/human/human.sep");
    entity = humanPrefab.createEntity(pos);

    // Load in Metadata
    MetadataComponent metadata = entity.get(MetadataComponent.class);
    if (metadata != null) {
      metadata.setParameters(message.getParameters());
View Full Code Here

TOP

Related Classes of org.spout.api.entity.EntityPrefab

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.