small material test

This commit is contained in:
Boblet 2022-09-12 16:59:29 +02:00
parent 9f30c1c021
commit f608d55f93
3 changed files with 58 additions and 0 deletions

View File

@ -0,0 +1,20 @@
package com.hbm.inventory.material;
public enum MaterialShapes {
QUANTUM(1), // 1/72 of an ingot, allows the ingot to be divisible through 2, 4, 6, 8, 9, 12, 24 and 36
NUGGET(8, "nugget"),
WIRE(9),
INGOT(NUGGET.quantity * 9, "ingot"),
DUST(INGOT.quantity, "dust"),
PLATE(INGOT.quantity, "plate"),
BLOCK(INGOT.quantity * 9, "block");
int quantity;
String[] prefixes;
private MaterialShapes(int quantity, String... prefixes) {
this.quantity = quantity;
this.prefixes = prefixes;
}
}

View File

@ -0,0 +1,5 @@
package com.hbm.inventory.material;
public class Mats {
}

View File

@ -0,0 +1,33 @@
package com.hbm.inventory.material;
/**
* Encapsulates most materials that are currently listed as DictFrames, even vanilla ones.
* @author hbm
*
*/
public class NTMMaterial {
public String[] names;
public MaterialShapes[] shapes = new MaterialShapes[0];
public boolean omitItemGen = false;
public boolean smeltable = false;
public NTMMaterial(String... names) {
this.names = names;
}
public NTMMaterial setShapes(MaterialShapes... shapes) {
this.shapes = shapes;
return this;
}
public NTMMaterial omit() {
this.omitItemGen = true;
return this;
}
public NTMMaterial smeltable() {
this.smeltable = true;
return this;
}
}