I stopped modding a year ago due to exams and the 1.7 update meaning that the way i generate schematics no longer works due to the fact that schematics store block ID's which as i understand are not relevant to forge post 1.6
After a few hours of searching i have been unable to find a solution and as my mod uses hundreds of schematic files i am not sure what to do. I am an amateur and a year away from modding has not helped so any help or light you may be able to shed on the issue would be greatly appreciated.
This is the code used to generate the schematic files:
public class Loader {
public byte[] blocks;
public byte[] datablocks;
public short width;
public short length;
public short height;
public short[] sizes;
public Loader(String path) {
blocks = null;
datablocks = null;
width = 0;
length = 0;
height = 0;
load(path);
}
public void load(String path) {
try {
InputStream inputstream = Loader.class.getResourceAsStream("/assets/warsmod/structures/" + path);
NBTTagCompound nbt = CompressedStreamTools.readCompressed(inputstream);
blocks = nbt.getByteArray("Blocks");
datablocks = nbt.getByteArray("Data");
width = nbt.getShort("Width");
length = nbt.getShort("Length");
height = nbt.getShort("Height");
sizes = new short[] { width, length, height };
} catch (Exception e) {
e.printStackTrace();
}
}
public void generate(World world, int posX, int posY, int posZ, boolean spawnairblocks) {
try {
int xnum = 0;
int ynum = 0;
int znum = 0;
for (int i = 0; i < blocks.length; i++) {
int blockId = UnsignedBytes.toInt(blocks);
if (((blocks != 0) && (!spawnairblocks)) || (spawnairblocks == true)) {
world.setBlock(posX + xnum, posY + ynum, posZ + znum, blockId, datablocks, 2);
}
if (xnum < width - 1) {
xnum++;
} else if ((xnum >= width - 1) && (znum < length - 1)) {
xnum = 0;
znum++;
} else if ((xnum >= width - 1) && (znum >= length - 1) && (ynum < height - 1)) {
xnum = 0;
znum = 0;
ynum++;
}
}
} catch (Exception e) {
e.printStackTrace();
}
}
}