Jump to content

SteamPunk_Devil

Members
  • Posts

    12
  • Joined

  • Last visited

Posts posted by SteamPunk_Devil

  1. now that GameRegistry#findBlock() is deprecated what is the best way to get a block by its modid and name?  

     

     public static void addStructure(String file) {
            JSONParser parser = new JSONParser();
            try {
                Object json = parser.parse(new FileReader(file));
                JSONObject jsonObject = (JSONObject) json;
                String name = (String) jsonObject.get("Name");
                String village = (String) jsonObject.get("Village");
                Map<Integer,Block> legend = new HashMap<Integer,Block>();
                JSONArray Legend = (JSONArray) jsonObject.get("Legend");
                //Iterator<String> iterator = Legend.iterator();
                int i = 1;
                Legend.forEach( (a)-> {
                    String b;
                    b = a.toString();
                    String[] bl = b.split(":");
                    //legend.put(i);
                    String modid = bl[0];
                    String block = bl[1];
                    System.out.println(block + modid);
                    Block bk = GameRegistry.findBlock(modid, block);
                    System.out.println(bk);
                    //i =+ 1;
                });
                System.out.println("Loading Structure: " + name);
                //worldObject newWorldObject = new worldObject(name, village,);
            }catch (Exception e){
                e.printStackTrace();
            }

     

  2.  

    Download https://repo1.maven.org/maven2/io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar
    Download https://repo1.maven.org/maven2/com/google/guava/guava/17.0/guava-17.0.jar
    Download https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar
    Download https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar
    Download https://repo1.maven.org/maven2/commons-codec/commons-codec/1.9/commons-codec-1.9.jar
    Download https://repo1.maven.org/maven2/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar
    Download https://libraries.minecraft.net/com/mojang/authlib/1.5.24/authlib-1.5.24.jar
    Download https://libraries.minecraft.net/com/mojang/realms/1.10.4/realms-1.10.4.jar
    :decompileMc FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':decompileMc'.
    > Could not resolve all dependencies for configuration ':forgeGradleMcDeps'.
       > Could not download realms.jar (com.mojang:realms:1.10.4)
          > Could not get resource 'https://libraries.minecraft.net/com/mojang/realms/1.10.4/realms-1.10.4.jar'.
             > Failed to move file 'C:\Users\b\AppData\Local\Temp\gradle_download4881369023261230786bin' into filestore at 'C:\Users\b\.gradle\caches\modules-2\files-2.1\com.mojang\realms\1.10.4\7e837a5eae3fc08b13d5e1baf5ddf5b5d31aa2ff\realms-1.10.4.jar'
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    
    Total time: 7 mins 3.487 secs

     

  3.  

     

    Download https://repo1.maven.org/maven2/io/netty/netty-all/4.0.23.Final/netty-all-4.0.23.Final.jar
    Download https://repo1.maven.org/maven2/com/google/guava/guava/17.0/guava-17.0.jar
    Download https://repo1.maven.org/maven2/org/apache/commons/commons-lang3/3.3.2/commons-lang3-3.3.2.jar
    Download https://repo1.maven.org/maven2/commons-io/commons-io/2.4/commons-io-2.4.jar
    Download https://repo1.maven.org/maven2/commons-codec/commons-codec/1.9/commons-codec-1.9.jar
    Download https://repo1.maven.org/maven2/net/java/jutils/jutils/1.0.0/jutils-1.0.0.jar
    Download https://libraries.minecraft.net/com/mojang/authlib/1.5.24/authlib-1.5.24.jar
    Download https://libraries.minecraft.net/com/mojang/realms/1.10.4/realms-1.10.4.jar
    :decompileMc FAILED
    
    FAILURE: Build failed with an exception.
    
    * What went wrong:
    Execution failed for task ':decompileMc'.
    > Could not resolve all dependencies for configuration ':forgeGradleMcDeps'.
       > Could not download realms.jar (com.mojang:realms:1.10.4)
          > Could not get resource 'https://libraries.minecraft.net/com/mojang/realms/1.10.4/realms-1.10.4.jar'.
             > Failed to move file 'C:\Users\b\AppData\Local\Temp\gradle_download4881369023261230786bin' into filestore at 'C:\Users\b\.gradle\caches\modules-2\files-2.1\com.mojang\realms\1.10.4\7e837a5eae3fc08b13d5e1baf5ddf5b5d31aa2ff\realms-1.10.4.jar'
    
    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
    
    BUILD FAILED
    
    Total time: 7 mins 3.487 secs

  4. Extra Tools 1.0

    This is a Simple mod that adds currently 2 new tool sets; Ender Pearl and Nether Star.

    The recipes are the same as the default tools

    It requires forge for mc1.7.2

    Download Link

    8isfrRC.png

    There are still a lot of things I want to add to this mod and I hope to update it regularly. Constructive criticism both good and bad would be helpful as this is the first mod I made. 

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.