Package org.spout.api.component.entity

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


    holder.add(Digging.class);
    setEntityProtocol(new HumanEntityProtocol());
    if (getAttachedCount() == 1) {
      holder.add(Health.class).setSpawnHealth(20);
    }
    TextModelComponent textModel = getOwner().get(TextModelComponent.class);
    if (textModel != null) {
      textModel.setSize(0.5f);
      textModel.setTranslation(new Vector3f(0, 3f, 0));
    }
    //holder.getPhysics().activate(1, new BoxShape(1f, 2.3f, 1f), false, true);

    // Add metadata associated with the amount of arrows attached to the body
    holder.add(MetadataComponent.class).addMeta(Metadata.TYPE_BYTE, 10, VanillaData.ARROWS_IN_BODY);
View Full Code Here


    return getData().get(Data.NAME);
  }

  public void setName(String name) {
    getData().put(Data.NAME, name);
    TextModelComponent textModel = getOwner().get(TextModelComponent.class);
    if (textModel != null) {
      textModel.setText(name);
    }
  }
View Full Code Here

TOP

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

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.