Package net.minecraft.entity.player

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


        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

      //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

      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

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.