public void addBlockStates(List<Pair<IBlockState, ItemStack>> states, @Nonnull ItemStack parent, Block parentBlock) {
if (states == null || states.isEmpty()) {
return;
}
BlockModelShapes modelShapes = Minecraft.getMinecraft().getBlockRendererDispatcher().getBlockModelShapes();
for (Pair<IBlockState, ItemStack> pair : states) {
IBlockState state = pair.getLeft();
if (state != null) {
ItemStack stack = pair.getRight();
if (stack == null || Prep.isInvalid(stack)) {
if (state.getBlock() == parentBlock) {
stack = parent;
} else {
stack = new ItemStack(state.getBlock(), 1, state.getBlock().damageDropped(state));
}
}
IBakedModel model = modelShapes.getModelForState(state);
addBakedModel(model, NullHelper.notnullJ(stack, "If you see this, the world will be ending yesterday half past yellow!"));
}
}
}
ItemQuadCollector.java 文件源码
java
阅读 17
收藏 0
点赞 0
评论 0
项目:EnderIO
作者:
评论列表
文章目录