use of com.creativemd.creativecore.client.rendering.model.CreativeBakedModel in project A-Little-Extra-Tiles by Doc-1.
the class GuiStack method getTexture.
public String getTexture(ItemStack stack) {
Block block = Block.getBlockFromItem(stack.getItem());
Item item = stack.getItem();
int damage = item.getDamage(stack);
int meta = item.getMetadata(damage);
IBlockState state = BlockUtils.getState(block, meta);
Minecraft minecraft = Minecraft.getMinecraft();
if (this.useBlock) {
ResourceLocation reg = block.getRegistryName();
BlockRendererDispatcher ren = minecraft.getBlockRendererDispatcher();
texture = ren.getModelForState(state).getQuads(state, facing, 0).get(0).getSprite().toString();
} else {
RenderItem itemRen = minecraft.getRenderItem();
ItemModelMesher mesher = itemRen.getItemModelMesher();
CreativeBakedModel model;
texture = mesher.getItemModel(stack).getQuads(null, null, 0).get(0).getSprite().toString();
// texture =
// .getQuads(null, null, 0).get(0).getSprite().toString();
}
return texture;
}
Aggregations