예제 #1
0
  public FlowerClass init(boolean doublehigh) {
    if (doublehigh) {
      name = "doubleflower";
      blockclass = BlockDoubleFlowerVC.class;
      itemclass = ItemFlowerVC.class;
      hardness = 0.2f;
    } else {
      name = "flower";
      blockclass = BlockFlowerVC.class;
      itemclass = ItemFlowerVC.class;
      hardness = 0.4f;
    }

    for (EnumFlowerGroup group : EnumFlowerGroup.values()) {
      for (EnumFlower flower : group.variants) {
        if (doublehigh == flower.doubleHigh) {
          values.put(
              (IStateEnum) flower,
              new FlowerClassEntry((IStateEnum) flower, flower.doubleHigh, group));
        }
      }
    }

    initBlocks(
        getBlockClassName(),
        getBlockClass(),
        getItemClass(),
        getHardness(),
        getStepSound(),
        getHarvestTool(),
        getHarvestLevel());

    return this;
  }