use of net.minecraft.client.renderer.block.model.IBakedModel in project EnderIO by SleepyTrousers.
the class BlockPaintedTrapDoor method mapItemRender.
@Override
@SideOnly(Side.CLIENT)
public List<IBakedModel> mapItemRender(@Nonnull Block block, @Nonnull ItemStack stack) {
IBlockState paintSource = getPaintSource(block, stack);
IBlockState stdOverlay = ModObject.block_machine_base.getBlockNN().getDefaultState().withProperty(EnumRenderPart.SUB, EnumRenderPart.PAINT_OVERLAY);
IBakedModel model1 = PaintRegistry.getModel(IBakedModel.class, "trapdoor_bottom", paintSource, null);
IBakedModel model2 = PaintRegistry.getModel(IBakedModel.class, "trapdoor_bottom", stdOverlay, PaintRegistry.OVERLAY_TRANSFORMATION3);
List<IBakedModel> list = new ArrayList<IBakedModel>();
list.add(model1);
list.add(model2);
return list;
}
use of net.minecraft.client.renderer.block.model.IBakedModel in project EnderIO by SleepyTrousers.
the class BlockPaintedWall method mapItemRender.
@Override
@SideOnly(Side.CLIENT)
public List<IBakedModel> mapItemRender(@Nonnull Block block, @Nonnull ItemStack stack) {
IBlockState paintSource = getPaintSource(block, stack);
IBlockState stdOverlay = ModObject.block_machine_base.getBlockNN().getDefaultState().withProperty(EnumRenderPart.SUB, EnumRenderPart.PAINT_OVERLAY);
IBakedModel model1 = PaintRegistry.getModel(IBakedModel.class, "wall_inventory", paintSource, new UVLock(null));
IBakedModel model2 = PaintRegistry.getModel(IBakedModel.class, "wall_inventory", stdOverlay, PaintRegistry.OVERLAY_TRANSFORMATION2);
List<IBakedModel> list = new ArrayList<IBakedModel>();
list.add(model1);
list.add(model2);
return list;
}
use of net.minecraft.client.renderer.block.model.IBakedModel in project EnderIO by SleepyTrousers.
the class BlockPaintedDoor method mapItemRender.
@Override
@SideOnly(Side.CLIENT)
public List<IBakedModel> mapItemRender(@Nonnull Block block, @Nonnull ItemStack stack) {
IBlockState paintSource = getPaintSource(block, stack);
IBlockState stdOverlay = ModObject.block_machine_base.getBlockNN().getDefaultState().withProperty(EnumRenderPart.SUB, EnumRenderPart.PAINT_OVERLAY);
IBakedModel model1 = PaintRegistry.getModel(IBakedModel.class, "door_inventory", paintSource, null);
IBakedModel model2 = PaintRegistry.getModel(IBakedModel.class, "door_inventory", stdOverlay, PaintRegistry.OVERLAY_TRANSFORMATION3);
List<IBakedModel> list = new ArrayList<IBakedModel>();
list.add(model1);
list.add(model2);
return list;
}
use of net.minecraft.client.renderer.block.model.IBakedModel in project EnderIO by SleepyTrousers.
the class BlockPaintedFence method mapItemRender.
@Override
@SideOnly(Side.CLIENT)
public List<IBakedModel> mapItemRender(@Nonnull Block block, @Nonnull ItemStack stack) {
IBlockState paintSource = getPaintSource(block, stack);
IBlockState stdOverlay = ModObject.block_machine_base.getBlockNN().getDefaultState().withProperty(EnumRenderPart.SUB, EnumRenderPart.PAINT_OVERLAY);
IBakedModel model1 = PaintRegistry.getModel(IBakedModel.class, "fence_inventory", paintSource, new UVLock(null));
IBakedModel model2 = PaintRegistry.getModel(IBakedModel.class, "fence_inventory", stdOverlay, PaintRegistry.OVERLAY_TRANSFORMATION2);
List<IBakedModel> list = new ArrayList<IBakedModel>();
list.add(model1);
list.add(model2);
return list;
}
use of net.minecraft.client.renderer.block.model.IBakedModel in project HorsePower by GoryMoon.
the class TileEntityHPBaseRenderer method renderBaseModel.
protected void renderBaseModel(TileEntityHPBase te, Tessellator tessellator, BufferBuilder buffer, double x, double y, double z) {
// Most of this is blatantly copied from FastTESR
setRenderSettings();
IBlockState blockState = te.getWorld().getBlockState(te.getPos());
BlockRendererDispatcher dispatcher = Minecraft.getMinecraft().getBlockRendererDispatcher();
IBakedModel model = dispatcher.getModelForState(blockState);
buffer.begin(GL11.GL_QUADS, DefaultVertexFormats.BLOCK);
buffer.setTranslation(-te.getPos().getX(), -te.getPos().getY(), -te.getPos().getZ());
dispatcher.getBlockModelRenderer().renderModel(te.getWorld(), model, blockState, te.getPos(), buffer, false);
buffer.setTranslation(0, 0, 0);
GlStateManager.pushMatrix();
GlStateManager.translate(x, y, z);
tessellator.draw();
GlStateManager.popMatrix();
}
Aggregations