Advertisement
Guest User

Untitled

a guest
Feb 16th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 3.08 KB | None | 0 0
  1. import java.awt.Dimension;
  2. import java.awt.GridBagConstraints;
  3. import java.awt.GridBagLayout;
  4. import java.io.BufferedReader;
  5. import java.io.DataOutputStream;
  6. import java.io.File;
  7. import java.io.FileInputStream;
  8. import java.io.IOException;
  9. import java.io.InputStream;
  10. import java.io.InputStreamReader;
  11. import java.io.PrintWriter;
  12. import java.net.HttpURLConnection;
  13. import java.net.MalformedURLException;
  14. import java.net.URL;
  15.  
  16. import javax.swing.JButton;
  17. import javax.swing.JFileChooser;
  18. import javax.swing.JFrame;
  19. import javax.swing.JPanel;
  20. import javax.swing.JScrollPane;
  21. import javax.swing.JTextArea;
  22.  
  23. public class Main
  24. {
  25.     public static void main(String[] args) throws IOException
  26.     {
  27.         File model = new File("C:\\Users\\Georg.DESKTOP-89NHM0N\\AppData\\Roaming\\.minecraft\\resourcepacks\\testpack\\assets\\golf\\models\\block\\ramp.json");
  28.         PrintWriter writer = new PrintWriter(model);
  29.         writer.println("{\r\n" +
  30.                 "    \"display\": {\r\n" +
  31.                 "        \"ground\": {\r\n" +
  32.                 "            \"rotation\": [ 0, 0, 0 ],\r\n" +
  33.                 "            \"translation\": [ 0, 3, 0],\r\n" +
  34.                 "            \"scale\":[ 0.25, 0.25, 0.25 ]\r\n" +
  35.                 "        },\r\n" +
  36.                 "        \"fixed\": {\r\n" +
  37.                 "            \"rotation\": [ 0, 0, 0 ],\r\n" +
  38.                 "            \"translation\": [ 0, 0, 0],\r\n" +
  39.                 "            \"scale\":[ 0.5, 0.5, 0.5 ]\r\n" +
  40.                 "        },\r\n" +
  41.                 "        \"thirdperson_righthand\": {\r\n" +
  42.                 "            \"rotation\": [ 75, 45, 0 ],\r\n" +
  43.                 "            \"translation\": [ 0, 2.5, 0],\r\n" +
  44.                 "            \"scale\": [ 0.375, 0.375, 0.375 ]\r\n" +
  45.                 "        },\r\n" +
  46.                 "        \"firstperson_righthand\": {\r\n" +
  47.                 "            \"rotation\": [ 0, 45, 0 ],\r\n" +
  48.                 "            \"translation\": [ 0, 0, 0 ],\r\n" +
  49.                 "            \"scale\": [ 0.40, 0.40, 0.40 ]\r\n" +
  50.                 "        },\r\n" +
  51.                 "        \"firstperson_lefthand\": {\r\n" +
  52.                 "            \"rotation\": [ 0, 225, 0 ],\r\n" +
  53.                 "            \"translation\": [ 0, 0, 0 ],\r\n" +
  54.                 "            \"scale\": [ 0.40, 0.40, 0.40 ]\r\n" +
  55.                 "        }\r\n" +
  56.                 "    },\r\n" +
  57.                 "    \"elements\": [");
  58.         for(int i = 0; i < 500; i ++)
  59.         {
  60.             writer.println("        {\r\n" +
  61.                     "            \"from\": [" + (i / 31.25) + ",0,0],\r\n" +
  62.                     "            \"to\": [" + ((i + 1) / 31.25) + "," + ((i + 1) / 31.25) + ",16],\r\n" +
  63.                     "            \"faces\": {\r\n" +
  64.                     "                \"up\":    { \"tintindex\": 0, \"texture\": \"#up\"},\r\n" +
  65.                     "                \"down\": { \"tintindex\": 0, \"texture\": \"#down\"},\r\n" +
  66.                     "                \"north\": { \"tintindex\": 0, \"texture\": \"#north\"},\r\n" +
  67.                     "                \"east\": { \"tintindex\": 0, \"texture\": \"#east\"},\r\n" +
  68.                     "                \"south\": { \"tintindex\": 0, \"texture\": \"#south\"},\r\n" +
  69.                     "                \"west\": { \"tintindex\": 0, \"texture\": \"west\"}\r\n" +
  70.                     "            }\r\n" +
  71.                     "        " + ((i < 499) ? "}," : "}"));
  72.         }
  73.         writer.println("    ]\r\n}");
  74.         writer.flush();
  75.         writer.close();
  76.     }
  77. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement