Entities
This commit is contained in:
parent
e7a6bdaa93
commit
4578130799
15 changed files with 308 additions and 44 deletions
42
utilities/paulevs/converter/BlockBenchToFabricJava.java
Normal file
42
utilities/paulevs/converter/BlockBenchToFabricJava.java
Normal file
|
@ -0,0 +1,42 @@
|
|||
package paulevs.converter;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.FileWriter;
|
||||
|
||||
public class BlockBenchToFabricJava {
|
||||
public static void main(String[] args) throws Exception {
|
||||
new BlockBenchToFabricJava("D:/blockbench_models/", "dragonfly.java");
|
||||
}
|
||||
|
||||
private BlockBenchToFabricJava(String path, String nameIn) throws Exception {
|
||||
String string;
|
||||
File in = new File(path + nameIn);
|
||||
File out = new File(path + "out.txt");
|
||||
|
||||
BufferedReader br = new BufferedReader(new FileReader(in));
|
||||
BufferedWriter wr = new BufferedWriter(new FileWriter(out));
|
||||
|
||||
boolean write = false;
|
||||
while ((string = br.readLine()) != null) {
|
||||
string = string
|
||||
.replace("ModelRenderer", "ModelPart")
|
||||
.replace("setRotationPoint", "setPivot")
|
||||
.replace("addBox", "addCuboid");
|
||||
|
||||
if (write)
|
||||
wr.write(string + "\n");
|
||||
|
||||
if (string.contains("{"))
|
||||
write = true;
|
||||
|
||||
if (string.contains("}"))
|
||||
break;
|
||||
}
|
||||
|
||||
wr.close();
|
||||
br.close();
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue