/* The MIT License Copyright (c) 2021 Teeto Kaziim: Permission is hereby 
granted, free of charge, to any person obtaining a copy of this software and 
associated documentation files (the "Software"), to deal in the Software 
without restriction, including without limitation the rights to use, copy, 
modify, merge, publish, distribute, sublicense, and/or sell copies of the 
Software, and to permit persons to whom the Software is furnished to do so, 
subject to the following conditions: The above copyright notice and this 
permission notice shall be included in all copies or substantial portions of 
the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO 
EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES 
OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
DEALINGS IN THE SOFTWARE. */

import mods.requious.ComponentFace;
import mods.requious.GaugeDirection;
import mods.requious.SlotVisual;
import mods.requious.Assembly;
import crafttweaker.item.IItemStack;

val machineBuilding = <assembly:skyblock_machine> as Assembly;

var buildingThings = machineBuilding.setItemSlot(3,2,ComponentFace.all(), 1).setAccess(false,false).setHandAccess(true,true).setGroup("input");
	buildingThings = machineBuilding.setDurationSlot(4,2).setVisual(SlotVisual.createGauge("requious:textures/gui/assembly_gauges.png",0, 0, 9, 0, GaugeDirection.up(), false)).setGroup("waiting");
	buildingThings = machineBuilding.setItemSlot(5,2,ComponentFace.all(),1000000).setAccess(false,true).setHandAccess(false,true).pushItem(1000000).setGroup("output_a").noDrop();
	
	
	machineBuilding.setJEIItemSlot(3,2,"input");
	machineBuilding.setJEIDurationSlot(4,2,"waiting", SlotVisual.create(1,1).addPart("requious:textures/gui/assembly_gauges.png", 9, 0));
	machineBuilding.setJEIItemSlot(5,2,"output_a");
	
var lootBagRecipe = mods.requious.AssemblyRecipe.create( 
	function(container) {
		container.addItemOutput("output_a", <lootbags:itemlootbag:0>); 
					}
				)
				.requireItem("input", <contenttweaker:tier_0_skyblock_machine>, 0, 0)
				.requireDuration("waiting", 1800);
			<assembly:skyblock_machine>.addRecipe(lootBagRecipe);
			<assembly:skyblock_machine>.addJEIRecipe(lootBagRecipe);
			
var lootBagRecipeOne = mods.requious.AssemblyRecipe.create( 
	function(container) {
		container.addItemOutput("output_a", <lootbags:itemlootbag:1>); 
					}
				)
				.requireItem("input", <contenttweaker:tier_1_skyblock_machine>, 0, 0)
				.requireDuration("waiting", 1650);
			<assembly:skyblock_machine>.addRecipe(lootBagRecipeOne);
			<assembly:skyblock_machine>.addJEIRecipe(lootBagRecipeOne);
			
var lootBagRecipeTwo = mods.requious.AssemblyRecipe.create( 
	function(container) {
		container.addItemOutput("output_a", <lootbags:itemlootbag:2>); 
					}
				)
				.requireItem("input", <contenttweaker:tier_2_skyblock_machine>, 0, 0)
				.requireDuration("waiting", 1500);
			<assembly:skyblock_machine>.addRecipe(lootBagRecipeTwo);
			<assembly:skyblock_machine>.addJEIRecipe(lootBagRecipeTwo);
			
var lootBagRecipeThree = mods.requious.AssemblyRecipe.create( 
	function(container) {
		container.addItemOutput("output_a", <lootbags:itemlootbag:3>); 
					}
				)
				.requireItem("input", <contenttweaker:tier_3_skyblock_machine>, 0, 0)
				.requireDuration("waiting", 1350);
			<assembly:skyblock_machine>.addRecipe(lootBagRecipeThree);
			<assembly:skyblock_machine>.addJEIRecipe(lootBagRecipeThree);
			
var lootBagRecipeFour = mods.requious.AssemblyRecipe.create( 
	function(container) {
		container.addItemOutput("output_a", <lootbags:itemlootbag:4>); 
					}
				)
				.requireItem("input", <contenttweaker:tier_4_skyblock_machine>, 0, 0)
				.requireDuration("waiting", 1200);
			<assembly:skyblock_machine>.addRecipe(lootBagRecipeFour);
			<assembly:skyblock_machine>.addJEIRecipe(lootBagRecipeFour);
			
