Beispiel #1
0
  public static void dropItems(World var0, IInventory var1, int var2, int var3, int var4) {
    for (int var5 = 0; var5 < var1.getSize(); ++var5) {
      ItemStack var6 = var1.getItem(var5);

      if (var6 != null && var6.count > 0) {
        dropItems(var0, var1.getItem(var5).cloneItemStack(), var2, var3, var4);
        var1.setItem(var5, null);
      }
    }
  }
Beispiel #2
0
  public static void preDestroyBlock(World var0, int var1, int var2, int var3) {
    TileEntity var4 = var0.getTileEntity(var1, var2, var3);

    if (var4 instanceof IInventory && !APIProxy.isClient(var0)) {
      dropItems(var0, (IInventory) var4, var1, var2, var3);
    }

    if (var4 instanceof TileBuildCraft) {
      ((TileBuildCraft) var4).destroy();
    }
  }
Beispiel #3
0
 public void dropFacade(Orientations direction) {
   if (this.worldObj.isRemote) return;
   if (!hasFacade(direction)) return;
   Utils.dropItems(
       worldObj,
       new ItemStack(
           BuildCraftTransport.facadeItem,
           1,
           ItemFacade.encode(
               this.facadeBlocks[direction.ordinal()], this.facadeMeta[direction.ordinal()])),
       this.xCoord,
       this.yCoord,
       this.zCoord);
   this.facadeBlocks[direction.ordinal()] = 0;
   this.facadeMeta[direction.ordinal()] = 0;
   scheduleRenderUpdate();
   // refreshRenderState();
 }