The ability to create a block with theoretically infinite layers.
Example
package net.Pinary_Pi.pinaryslib.data.client;
import java.util.ArrayList;
import java.util.List;
import com.google.gson.JsonElement;
import net.Pinary_Pi.pinaryslib.pinaryslib;
import net.Pinary_Pi.pinaryslib.lib.PinarysModelProvider;
import net.minecraft.data.DataGenerator;
public class ModModelProvider extends PinarysModelProvider {
private String modid = pinaryslib.MOD_ID;
public ModModelProvider(DataGenerator generator) {
super(examplemod.MOD_ID, generator);
}
@Override
@SuppressWarnings("unchecked")
protected List<JsonElement>[] registerModels() {
List<String> test_block = new ArrayList<>();
test_block.add("examplemod:block/texture_1");
test_block.add("examplemod:block/texture_0");
@SuppressWarnings("rawtypes")
List[] array = {
simpleLayeredBlock("test_block", test_block, modid, "examplemod:block/particle")
};
return array;
}
}
Now works with Java 8
A function for creating slab models with theoretically infinite layers.
Makes it easier to provide textures for model generating functions.
Example:
package net.Pinary_Pi.pinaryslib.data.client;
import java.util.List;
import com.google.gson.JsonElement;
import net.Pinary_Pi.pinaryslib.pinaryslib;
import net.Pinary_Pi.pinaryslib.lib.PinarysModelProvider;
import net.minecraft.data.DataGenerator;
public class ModModelProvider extends PinarysModelProvider {
private String modid = pinaryslib.MOD_ID;
public ModModelProvider(DataGenerator generator) {
super(pinaryslib.MOD_ID, generator);
}
@Override
@SuppressWarnings("unchecked")
protected List<JsonElement>[] registerModels() {
@SuppressWarnings("rawtypes")
List[] array = {
simpleLayeredBlock("test_block", textures("mortar", "brick"), modid, "mortar"),
simpleLayeredSlab("test_slab", textures("mortar", "brick"), modid, "mortar")
};
return array;
}
}
A function for generating stair models with theoretically infinite layers.
It works the same way as the other functions and has the name simpleLayeredStairs()
.
A function for generating wall models with theoretically infinite layers.
It works the same way as the other model generating functions and has the name simpleLayeredWall()
Stair model generator will no longer try to generate base models more than once.
You no longer need to provide a modid for the model functions.
You can now generate blockstates!
Java documentation has also been added, so I will no longer show examples in the changelog.