public static StructureStart func_143035_a(NBTTagCompound p_143035_0_, World p_143035_1_) {
    StructureStart var2 = null;

    try {
      Class var3 = (Class) field_143040_a.get(p_143035_0_.func_74779_i("id"));
      if (var3 != null) {
        var2 = (StructureStart) var3.newInstance();
      }
    } catch (Exception var4) {
      p_143035_1_
          .func_98180_V()
          .func_98236_b("Failed Start with id " + p_143035_0_.func_74779_i("id"));
      var4.printStackTrace();
    }

    if (var2 != null) {
      var2.func_143020_a(p_143035_1_, p_143035_0_);
    } else {
      p_143035_1_
          .func_98180_V()
          .func_98236_b("Skipping Structure with id " + p_143035_0_.func_74779_i("id"));
    }

    return var2;
  }
Exemplo n.º 2
0
  public boolean isSwampHutAtLocation(BlockPos blockPos) {
    StructureStart structurestart = this.getStructureAt(blockPos);

    if (structurestart != null
        && structurestart instanceof MapGenScatteredFeature.Start
        && !structurestart.getComponents().isEmpty()) {
      StructureComponent structurecomponent =
          Iterables.getFirst(structurestart.getComponents(), null);
      return structurecomponent instanceof ComponentScatteredFeaturePieces.SwampHut;
    } else {
      return false;
    }
  }
 public static String func_143033_a(StructureStart p_143033_0_) {
   return (String) field_143038_b.get(p_143033_0_.getClass());
 }