Package survivalcraft.entity

Examples of survivalcraft.entity.TileEntityCampFire


  /**
   * Returns a new instance of a block's tile entity class. Called on placing
   * the block.
   */
  public TileEntity createNewTileEntity(World par1World) {
    return new TileEntityCampFire();
  }
View Full Code Here


   * ejects contained items into the world, and notifies neighbours of an
   * update, as appropriate
   */
  public void breakBlock(World par1World, int x, int y, int z, int par5, int par6) {
    if (!keepFurnaceInventory) {
      TileEntityCampFire tileEntity = (TileEntityCampFire) par1World.getBlockTileEntity(x, y, z);

      if (tileEntity != null) {
        for (int var8 = 0; var8 < tileEntity.getSizeInventory(); ++var8) {
          ItemStack var9 = tileEntity.getStackInSlot(var8);

          if (var9 != null) {
            float var10 = this.furnaceRand.nextFloat() * 0.8F + 0.1F;
            float var11 = this.furnaceRand.nextFloat() * 0.8F + 0.1F;
            float var12 = this.furnaceRand.nextFloat() * 0.8F + 0.1F;
View Full Code Here

    return (side == ForgeDirection.UP && hasFuel(world, x, y, z));
   
  }

  private boolean hasFuel(World world, int x, int y, int z) {
    TileEntityCampFire tileEntity = (TileEntityCampFire) world.getBlockTileEntity(x, y, z);
    return tileEntity.isBurning() || tileEntity.isItemFuel(tileEntity.getStackInSlot(1));
  }
View Full Code Here

TOP

Related Classes of survivalcraft.entity.TileEntityCampFire

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.