use of net.minecraft.client.renderer.block.statemap.BlockStateMapper in project MinecraftForge by MinecraftForge.
the class ModelLoader method loadBlocks.
@Override
protected void loadBlocks() {
List<Block> blocks = Lists.newArrayList(Iterables.filter(Block.REGISTRY, new Predicate<Block>() {
public boolean apply(Block block) {
return block.getRegistryName() != null;
}
}));
Collections.sort(blocks, new Comparator<Block>() {
public int compare(Block b1, Block b2) {
return b1.getRegistryName().toString().compareTo(b2.getRegistryName().toString());
}
});
ProgressBar blockBar = ProgressManager.push("ModelLoader: blocks", blocks.size());
BlockStateMapper mapper = this.blockModelShapes.getBlockStateMapper();
for (Block block : blocks) {
blockBar.step(block.getRegistryName().toString());
for (ResourceLocation location : mapper.getBlockstateLocations(block)) {
loadBlock(mapper, block, location);
}
}
ProgressManager.pop(blockBar);
}
Aggregations