Examples of TileAnimationTablet


Examples of thaumic.tinkerer.common.block.tile.tablet.TileAnimationTablet

  @Override
  public List<String> getWailaBody(ItemStack itemStack,
                                   List<String> currenttip, IWailaDataAccessor accessor,
                                   IWailaConfigHandler config) {
    if (accessor.getBlock() == ThaumicTinkerer.registry.getFirstBlockFromClass(BlockAnimationTablet.class)) {
      TileAnimationTablet tileAn = (TileAnimationTablet) accessor.getTileEntity();
      String currentTool;
      ItemStack stack = tileAn.getStackInSlot(0);
      if (stack == null) {
        currentTool = StatCollector.translateToLocal("ttwaila.nothing");
      } else {
        currentTool = stack.getDisplayName();
      }
View Full Code Here

Examples of thaumic.tinkerer.common.block.tile.tablet.TileAnimationTablet

    //}
  }

  @Override
  public void breakBlock(World par1World, int par2, int par3, int par4, Block par5, int par6) {
    TileAnimationTablet tablet = (TileAnimationTablet) par1World.getTileEntity(par2, par3, par4);

    if (tablet != null) {
      if (tablet.getIsBreaking()) {
        //ChunkCoordinates coords = tablet.getTargetLoc();
        //par1World.destroyBlockInWorldPartially(tablet.getFakePlayer().entityId, coords.posX, coords.posY, coords.posZ, -1);
      }

      for (int j1 = 0; j1 < tablet.getSizeInventory(); ++j1) {
        ItemStack itemstack = tablet.getStackInSlot(j1);

        if (itemstack != null) {
          float f = random.nextFloat() * 0.8F + 0.1F;
          float f1 = random.nextFloat() * 0.8F + 0.1F;
          EntityItem entityitem;
View Full Code Here

Examples of thaumic.tinkerer.common.block.tile.tablet.TileAnimationTablet

  @Override
  public void updateTick(World par1World, int par2, int par3, int par4, Random par5Random) {
    TileEntity tile = par1World.getTileEntity(par2, par3, par4);
    if (tile != null && tile instanceof TileAnimationTablet) {
      TileAnimationTablet tablet = (TileAnimationTablet) tile;
      if (tablet.redstone && tablet.swingProgress == 0) {
        tablet.findEntities(tablet.getTargetLoc());
        tablet.initiateSwing();
        par1World.addBlockEvent(par2, par3, par4, ThaumicTinkerer.registry.getFirstBlockFromClass(BlockAnimationTablet.class), 0, 0);
      }
    }
  }
View Full Code Here

Examples of thaumic.tinkerer.common.block.tile.tablet.TileAnimationTablet

  @Override
  public boolean onBlockActivated(World par1World, int par2, int par3, int par4, EntityPlayer par5EntityPlayer, int par6, float par7, float par8, float par9) {
    if (!par1World.isRemote) {
      TileEntity tile = par1World.getTileEntity(par2, par3, par4);
      if (tile != null) {
        TileAnimationTablet tablet = (TileAnimationTablet) tile;
        if (par5EntityPlayer.getCurrentEquippedItem() != null && par5EntityPlayer.getCurrentEquippedItem().getItem() instanceof ItemWandCasting) {
          int meta = par1World.getBlockMetadata(par2, par3, par4);
          boolean activated = (meta & 8) != 0;
          if (!activated && !tablet.getIsBreaking() && tablet.swingProgress == 0) {
            par1World.setBlockMetadataWithNotify(par2, par3, par4, meta == 5 ? 2 : meta + 1, 1 | 2);
            par1World.playSoundEffect(par2, par3, par4, "thaumcraft:tool", 0.6F, 1F);
          } else
            par5EntityPlayer.addChatMessage(new ChatComponentTranslation("ttmisc.animationTablet.notRotatable"));
          // Rare chance this might happen, but better to cope for it.
View Full Code Here

Examples of thaumic.tinkerer.common.block.tile.tablet.TileAnimationTablet

    return false;
  }

  @Override
  public TileEntity createNewTileEntity(World world, int par2) {
    return new TileAnimationTablet();
  }
View Full Code Here

Examples of thaumic.tinkerer.common.block.tile.tablet.TileAnimationTablet

      { -1F, 0F, -1F }
  };

  @Override
  public void renderTileEntityAt(TileEntity tileentity, double d0, double d1, double d2, float partialTicks) {
    TileAnimationTablet tile = (TileAnimationTablet) tileentity;

    int meta = tile.getBlockMetadata() & 7;
    if (meta < 2)
      meta = 2; // Just in case

    int rotation = meta == 2 ? 270 : meta == 3 ? 90 : meta == 4 ? 0 : 180;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.