Examples of copyInventory()


Examples of net.minecraft.entity.player.InventoryPlayer.copyInventory()

   
  public void craftDriveable(EntityPlayer player, DriveableType type)
  {
    //Create a temporary copy of the player inventory for backup purposes
    InventoryPlayer temporaryInventory = new InventoryPlayer(null);
    temporaryInventory.copyInventory(player.inventory);
   
    //This becomes false if some recipe element is not found on the player
    boolean canCraft = true;
    //Iterate over rows then columns
    for(ItemStack recipeStack : type.recipe)
View Full Code Here

Examples of net.minecraft.entity.player.InventoryPlayer.copyInventory()

        return;
    }
   
    //Create a temporary copy of the player inventory for backup purposes
    InventoryPlayer temporaryInventory = new InventoryPlayer(null);
    temporaryInventory.copyInventory(driver.inventory);
   
    //This becomes false if some recipe element is not found on the player
    boolean canRepair = true;
   
    //Get the array of stacks needed
View Full Code Here

Examples of net.minecraft.entity.player.InventoryPlayer.copyInventory()

      //If the part is damaged, draw the parts required to fix it
      if(broken)
      {
        //Create a temporary copy of the player inventory in order to work out whether the player has each of the itemstacks required
        InventoryPlayer temporaryInventory = new InventoryPlayer(null);
        temporaryInventory.copyInventory(driver.inventory);
       
        ArrayList<ItemStack> stacksNeeded = driving.getDriveableType().getItemsRequired(part, driving.getDriveableData().engine);
        //Draw the stacks that should be in each slot
        for(int n = 0; n < 7; n++)
        {
View Full Code Here

Examples of net.minecraft.entity.player.InventoryPlayer.copyInventory()

      drawString(fontRendererObj, "Guns : " + (selectedType.ammoSlots()), guiOriginX + 82, guiOriginY + 104, 0xffffff);
      drawString(fontRendererObj, selectedType.numEngines() + "x", guiOriginX + 100, guiOriginY + 141, 0xffffff);
     
      //Create a temporary copy of the player inventory in order to work out whether the player has each of the itemstacks required
      InventoryPlayer temporaryInventory = new InventoryPlayer(null);
      temporaryInventory.copyInventory(inventory);
     
      //Draw the recipe items
      //Iterate over rows then columns
      for(int r = 0; r < 3; r++)
      {
View Full Code Here

Examples of net.minecraft.src.InventoryPlayer.copyInventory()

      craftableRecipes.clearRecipes();
      recipeList = Collections.unmodifiableList(recipeList);
      InventoryPlayer Temp = new InventoryPlayer( thePlayer );
 
      for(int i = 0; i < Zeldo.ValidOutput.size(); i++) { // Zeldo.ValidOutput.size()
        Temp.copyInventory(thePlayer.inventory);
        //System.out.println("RecipeCheck: " + i + "/" + Zeldo.ValidOutput.size() + " - " + Zeldo.ValidOutput.get(i).ItemID + "@" + Zeldo.ValidOutput.get(i).ItemDamage);
        if ((Boolean)Zeldo.canPlayerCraft(Temp, (ItemDetail)Zeldo.ValidOutput.get(i), theTile, i)[0])
        {
          craftableRecipes.addRecipe(((ItemDetail)Zeldo.ValidOutput.get(i)).iRecipe, i);
        }
View Full Code Here

Examples of net.minecraft.src.InventoryPlayer.copyInventory()

    {
      mod_CraftingTableIII.getInstance().SendCraftingPacket(irecipe.getRecipeOutput().copy(), false, Internal.xCoord, Internal.yCoord, Internal.zCoord, RecipeIndex);
    }
   
    InventoryPlayer Temp = new InventoryPlayer( thePlayer );
    Temp.copyInventory(thePlayer.inventory);
   
    InventoryPlayer inventoryPlayer = thePlayer.inventory;
    Object[] iTemp = Zeldo.canPlayerCraft(inventoryPlayer, Internal, new ItemDetail(irecipe.getRecipeOutput()), 0, true, null, null, RecipeIndex);
    Internal.theInventory = ((TileEntityCraftingTableII)iTemp[3]).theInventory;
    thePlayer.inventory.copyInventory((InventoryPlayer) iTemp[1]) ;
View Full Code Here

Examples of net.minecraft.src.InventoryPlayer.copyInventory()

    {
      mod_CraftingTableIII.getInstance().SendCraftingPacket(irecipe.getRecipeOutput().copy(), true, Internal.xCoord, Internal.yCoord, Internal.zCoord, RecipeIndex);
    }
   
    InventoryPlayer Temp = new InventoryPlayer( thePlayer );
    Temp.copyInventory(thePlayer.inventory);
   
    InventoryPlayer inventoryPlayer = thePlayer.inventory;
    int GoTo = 64;
    if (irecipe.getRecipeOutput().getMaxStackSize() > 1) {
      GoTo = irecipe.getRecipeOutput().getMaxStackSize() / irecipe.getRecipeOutput().stackSize ;
View Full Code Here

Examples of net.minecraft.src.InventoryPlayer.copyInventory()

    if (Level > MaxLevel)
      return new Object[] {false, ThePlayer, SlotCount, Internal};

    //Copys to prevent bugs
    InventoryPlayer ThePlayerBefore = new InventoryPlayer(ThePlayer.player);
    ThePlayerBefore.copyInventory(ThePlayer);
    TileEntityCraftingTableII InternalBefore = ((TileEntityCraftingTableII)Internal).getCopy();
   
    int recipeIndex = ForcedIndex;
   
    if (recipeIndex == -1) {
View Full Code Here

Examples of net.minecraft.src.InventoryPlayer.copyInventory()

    if (Level > MaxLevel)
      return new Object[] {false, ThePlayer, SlotCount, Internal};

    //Copys to prevent bugs
    InventoryPlayer ThePlayerBefore = new InventoryPlayer(ThePlayer.player);
    ThePlayerBefore.copyInventory(ThePlayer);
    TileEntityCraftingTableII InternalBefore = ((TileEntityCraftingTableII)Internal).getCopy();
   
    int recipeIndex = ForcedIndex;
   
    if (recipeIndex == -1) {
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.