Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.awt.Dimension;
- import java.awt.GridBagConstraints;
- import java.awt.GridBagLayout;
- import java.io.BufferedReader;
- import java.io.DataOutputStream;
- import java.io.File;
- import java.io.FileInputStream;
- import java.io.IOException;
- import java.io.InputStream;
- import java.io.InputStreamReader;
- import java.io.PrintWriter;
- import java.net.HttpURLConnection;
- import java.net.MalformedURLException;
- import java.net.URL;
- import javax.swing.JButton;
- import javax.swing.JFileChooser;
- import javax.swing.JFrame;
- import javax.swing.JPanel;
- import javax.swing.JScrollPane;
- import javax.swing.JTextArea;
- public class Main
- {
- public static void main(String[] args) throws IOException
- {
- File model = new File("C:\\Users\\Georg.DESKTOP-89NHM0N\\AppData\\Roaming\\.minecraft\\resourcepacks\\testpack\\assets\\golf\\models\\block\\ramp.json");
- PrintWriter writer = new PrintWriter(model);
- writer.println("{\r\n" +
- " \"display\": {\r\n" +
- " \"ground\": {\r\n" +
- " \"rotation\": [ 0, 0, 0 ],\r\n" +
- " \"translation\": [ 0, 3, 0],\r\n" +
- " \"scale\":[ 0.25, 0.25, 0.25 ]\r\n" +
- " },\r\n" +
- " \"fixed\": {\r\n" +
- " \"rotation\": [ 0, 0, 0 ],\r\n" +
- " \"translation\": [ 0, 0, 0],\r\n" +
- " \"scale\":[ 0.5, 0.5, 0.5 ]\r\n" +
- " },\r\n" +
- " \"thirdperson_righthand\": {\r\n" +
- " \"rotation\": [ 75, 45, 0 ],\r\n" +
- " \"translation\": [ 0, 2.5, 0],\r\n" +
- " \"scale\": [ 0.375, 0.375, 0.375 ]\r\n" +
- " },\r\n" +
- " \"firstperson_righthand\": {\r\n" +
- " \"rotation\": [ 0, 45, 0 ],\r\n" +
- " \"translation\": [ 0, 0, 0 ],\r\n" +
- " \"scale\": [ 0.40, 0.40, 0.40 ]\r\n" +
- " },\r\n" +
- " \"firstperson_lefthand\": {\r\n" +
- " \"rotation\": [ 0, 225, 0 ],\r\n" +
- " \"translation\": [ 0, 0, 0 ],\r\n" +
- " \"scale\": [ 0.40, 0.40, 0.40 ]\r\n" +
- " }\r\n" +
- " },\r\n" +
- " \"elements\": [");
- for(int i = 0; i < 500; i ++)
- {
- writer.println(" {\r\n" +
- " \"from\": [" + (i / 31.25) + ",0,0],\r\n" +
- " \"to\": [" + ((i + 1) / 31.25) + "," + ((i + 1) / 31.25) + ",16],\r\n" +
- " \"faces\": {\r\n" +
- " \"up\": { \"tintindex\": 0, \"texture\": \"#up\"},\r\n" +
- " \"down\": { \"tintindex\": 0, \"texture\": \"#down\"},\r\n" +
- " \"north\": { \"tintindex\": 0, \"texture\": \"#north\"},\r\n" +
- " \"east\": { \"tintindex\": 0, \"texture\": \"#east\"},\r\n" +
- " \"south\": { \"tintindex\": 0, \"texture\": \"#south\"},\r\n" +
- " \"west\": { \"tintindex\": 0, \"texture\": \"west\"}\r\n" +
- " }\r\n" +
- " " + ((i < 499) ? "}," : "}"));
- }
- writer.println(" ]\r\n}");
- writer.flush();
- writer.close();
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement