Exemplo n.º 1
0
  private static void loadTransformer() {
    for (TransformData data : ConfigRegistry.transformData) {
      ItemStack output = RecipeTransformer.dataToItemStack(data.output, true).get(0);
      Object input = RecipeTransformer.dataToObject(data.input);

      System.out.println("---------------- INPUT -----------------");
      System.out.println("INPUT: " + data.input);
      System.out.println("---------------- OUTPUT -----------------");
      System.out.println(
          "OUTPUT: " + data.output + " -> " + (output == null ? "NULL" : output.toString()));
      System.out.println("CODE: " + data.code);

      transformationContainer.add(new TransformerContainer(input, output, data.code));
    }

    for (TransformerContainer con : transformationContainer) {
      CristalRegistry.register(new WeakCristalTransformation(con));
    }
  }
Exemplo n.º 2
0
  private static void loadEntityTransformer() {
    for (TransformEntityData data : ConfigRegistry.transformEntityData) {
      Class input = (Class) EntityList.stringToClassMapping.get(data.input);
      ItemStack[] output = RecipeTransformer.dataToItemStacks(data.output.split(" "));

      System.out.println("---------------- INPUT -----------------");
      System.out.println(
          "INPUT: " + data.input + " -> " + (input == null ? "NULL" : input.toString()));
      System.out.println("---------------- OUTPUT -----------------");
      System.out.println("OUTPUT: " + data.output + " -> " + (output == null ? "NULL" : output));
      System.out.println("CODE: " + data.code);

      transformationEntityContainer.add(new TransformerEntityContainer(input, data.code, output));
    }

    for (TransformerEntityContainer con : transformationEntityContainer) {
      CristalRegistry.register(new WeakFleshTransformation(con.input, con.code, con.output));
    }
  }