Package org.spout.api.component.entity

Examples of org.spout.api.component.entity.ModelComponent


  public void handleClient(ClientSession session, EntityAnimationMessage message) {
    Player player = session.getPlayer();

    Entity entity = player.getWorld().getEntity(message.getEntityId());

    ModelComponent models = entity.get(ModelComponent.class);
    if (models == null) {
      return;
    }

    AnimationComponent animations = entity.get(AnimationComponent.class);
    if (animations == null) {
      return;
    }

    //This code launch the first animation finded on the first model
    //TODO : play with animation API

    switch (message.getAnimation()) {
      case SWING_ARM:
        Model model = models.getModels().get(0);//get first model

        if (model == null) {
          return;
        }
View Full Code Here

TOP

Related Classes of org.spout.api.component.entity.ModelComponent

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.