@Override
  public void load() {

    radius = ICUtil.parseRadius(getSign());
    if (getLine(2).contains("=")) {
      location = ICUtil.parseBlockLocation(getSign(), 2);
    } else {
      location = getBackBlock();
    }
  }
Esempio n. 2
0
  @Override
  public void load() {

    if (getLine(3).isEmpty()) offset = getBackBlock().getRelative(0, 1, 0).getLocation();
    else offset = ICUtil.parseBlockLocation(getSign(), 3).getLocation();
    item = ItemUtil.getItem(getLine(2));
  }
Esempio n. 3
0
  @Override
  public void load() {

    radius = ICUtil.parseRadius(getSign());
    String radiusString = radius.getBlockX() + "," + radius.getBlockY() + "," + radius.getBlockZ();
    if (radius.getBlockX() == radius.getBlockY() && radius.getBlockY() == radius.getBlockZ())
      radiusString = String.valueOf(radius.getBlockX());
    if (getLine(2).contains("=")) {
      getSign().setLine(2, radiusString + "=" + RegexUtil.EQUALS_PATTERN.split(getLine(2))[1]);
      centre = ICUtil.parseBlockLocation(getSign(), 2).getLocation();
    } else {
      getSign().setLine(2, radiusString);
      centre = getBackBlock().getLocation();
    }

    include = !getLine(3).startsWith("-");

    for (String bit : getLine(3).replace("-", "").split(",")) {

      filters.add(ItemUtil.getItem(bit));
    }

    chest = getBackBlock().getRelative(0, 1, 0);
  }
  @Override
  public void load() {

    String[] splitLine3 = RegexUtil.ASTERISK_PATTERN.split(getSign().getLine(3).trim());
    type = EntityType.fromName(splitLine3[0].trim().toLowerCase());
    if (type == null) {
      type = EntityType.PIG;
    }

    try {
      amount = Integer.parseInt(splitLine3[1]);
    } catch (Exception e) {
      amount = 1;
    }

    location = ICUtil.parseBlockLocation(getSign(), 2).getLocation();
  }