예제 #1
0
  /**
   * Gets a list of parameters used for the creation of a mob spawn message
   *
   * @param controller - The controller controller to obtain the parameters from
   * @return a list of parameters
   */
  public List<Parameter<?>> getSpawnParameters(Controller controller) {
    List<Parameter<?>> parameters = new ArrayList<Parameter<?>>(1);
    if (controller instanceof Creature) {
      Creature creature = (Creature) controller;
      parameters.add(
          new Parameter<Integer>(Parameter.TYPE_INT, 12, (int) creature.getTimeUntilAdult() * -1));
    }

    return parameters;
  }
예제 #2
0
파일: Squid.java 프로젝트: nallar/Vanilla
 @Override
 public void onAttached() {
   setHealth(10, HealthChangeReason.SPAWN);
   setMaxHealth(10);
   super.onAttached();
 }
예제 #3
0
 @Override
 public void onAttached() {
   super.onAttached();
   getParent().setData(ControllerType.KEY, ControllerType.SNOWGOLEM.id);
 }