Package crazypants.enderio.machine.painter

Examples of crazypants.enderio.machine.painter.TileEntityPaintedBlock


  @Override
  public IIcon getIcon(IBlockAccess world, int x, int y, int z, int blockSide) {
    TileEntity te = world.getTileEntity(x, y, z);
    if(te instanceof TileEntityPaintedBlock) {
      TileEntityPaintedBlock tef = (TileEntityPaintedBlock) te;
      if(tef.getSourceBlock() != null) {
        return tef.getSourceBlock().getIcon(blockSide, tef.getSourceBlockMetadata());
      }
    }
    return super.getIcon(world, x, y, z, blockSide);
  }
View Full Code Here


  @Override
  @SideOnly(Side.CLIENT)
  public int colorMultiplier(IBlockAccess world, int x, int y, int z) {
    TileEntity te = world.getTileEntity(x, y, z);
    if(te instanceof TileEntityPaintedBlock) {
      TileEntityPaintedBlock tef = (TileEntityPaintedBlock) te;
      if(tef.getSourceBlock() != null) {
        return tef.getSourceBlock().colorMultiplier(world, x, y, z);
      }
    }
    return super.colorMultiplier(world, x, y, z);
  }
View Full Code Here

    if(!world.isRemote && world.getGameRules().getGameRuleBooleanValue("doTileDrops")) {
      TileEntity te = world.getTileEntity(x, y, z);

      if(te instanceof TileEntityPaintedBlock) {
        TileEntityPaintedBlock tef = (TileEntityPaintedBlock) te;

        ItemStack itemStack = createItemStackForSourceBlock(world.getBlockMetadata(x, y, z), tef.getSourceBlock(), tef.getSourceBlockMetadata());
        if(itemStack != null) {
          float f = 0.7F;
          double d0 = world.rand.nextFloat() * f + (1.0F - f) * 0.5D;
          double d1 = world.rand.nextFloat() * f + (1.0F - f) * 0.5D;
          double d2 = world.rand.nextFloat() * f + (1.0F - f) * 0.5D;
 
View Full Code Here

  @Override
  public boolean renderWorldBlock(IBlockAccess blockAccess, int x, int y, int z, Block block, int modelId, RenderBlocks renderer) {
    int meta = blockAccess.getBlockMetadata(x, y, z);
    //TODO:1.7 this makes it go splat
    //if((meta == 0 && renderPass != 0) || (meta == 1 && renderPass == 0)) {
    TileEntityPaintedBlock tecb = null;
    TileEntity te = blockAccess.getTileEntity(x, y, z);
    if(te instanceof TileEntityPaintedBlock) {
      tecb = (TileEntityPaintedBlock) te;
    }
    renderFrame(blockAccess, x, y, z, tecb, false, meta);
View Full Code Here

  }

  public void renderFrameItem(ItemStack stack) {
    RenderUtil.bindBlockTexture();
    Tessellator.instance.startDrawingQuads();
    TileEntityPaintedBlock tecb = new TileEntityPaintedBlock();
    tecb.setSourceBlock(PainterUtil.getSourceBlock(stack));
    tecb.setSourceBlockMetadata(PainterUtil.getSourceBlockMetadata(stack));
    renderFrame(null, 0, 0, 0, tecb, true, stack.getItemDamage());
    Tessellator.instance.draw();
  }
View Full Code Here

  @Override
  public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int side, float par8,
      float par9, float par10) {

    if(world.getBlock(x, y, z) == EnderIO.blockFusedQuartz) {
      TileEntityPaintedBlock tecb = (TileEntityPaintedBlock) world.getTileEntity(x, y, z);
      if(tecb == null) {
        return false;
      }
      tecb.setSourceBlock(PainterUtil.getSourceBlock(itemStack));
      tecb.setSourceBlockMetadata(PainterUtil.getSourceBlockMetadata(itemStack));
      world.markBlockForUpdate(x, y, z);
      world.markBlockForUpdate(x, y, z);
      if(!world.isRemote) {
        if(!player.capabilities.isCreativeMode) {
          itemStack.stackSize--;
View Full Code Here

TOP

Related Classes of crazypants.enderio.machine.painter.TileEntityPaintedBlock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.