<commit_before>package com.Pirhotau.ModTutorial.blocks.laserprinter;

import javax.annotation.Nullable;

import com.Pirhotau.Debug.Debug;
import com.Pirhotau.ModTutorial.Energy.EnergyReceiver;
import com.Pirhotau.ModTutorial.items.ModTutorialItems;
import com.Pirhotau.Utils.CustomItemCapabilities.AdvancedItemStackHandler;
import com.Pirhotau.Utils.CustomItemCapabilities.SlotConstraintItem;
import com.Pirhotau.Utils.CustomItemCapabilities.SlotConstraintItemAndQuantity;
import com.Pirhotau.Utils.Enum.EnumHalf;
import com.Pirhotau.Utils.Enum.EnumLRSide;
import com.Pirhotau.Utils.Enum.EnumLaserOperation;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.items.CapabilityItemHandler;

public class TileEntityLaserPrinter extends TileEntity implements ICapabilityProvider, ITickable {
	
	/** Cooldown for the rake - Consume powder & do an animation */
	private static int RAKE_COOLDOWN = 25;
	/** Cooldown for the fusion - Do nothing (idle) */
	private static int FUSION_COOLDOWN = 50;
	/** Needed energy per tick for the rake */
	private static int RAKE_ENERGY = 100; // per game tick, so 200 RF/t in game
	/** Needed energy per tick for the fusion */
	private static int FUSION_ENERGY = 400; // per game tick, so 800 RF/t in game
	
	/** Machine inventory */
	private AdvancedItemStackHandler inventory;
	/** The energy container of the machine */
	private EnergyReceiver energy;
	
	/** If the machine is working */
	private boolean isWorking;
	/** The remaining material needed to build the part, based on the recipe */
	private ItemStack remainingNeededMaterial;
	/** Side of the rake, needed for the animation */
	private EnumLRSide side;
	/** The current operation made in the machine */
	private EnumLaserOperation operation;
	/** The part which is created */
	private ItemStack stackRecipe;
	/** The time which count */
	private int timer;
	
	public TileEntityLaserPrinter() {
		super();
		this.inventory = new AdvancedItemStackHandler(6);
		
		this.inventory.addConstraint(new SlotConstraintItemAndQuantity(ModTutorialItems.laserSource, 1), 0);
		this.inventory.addConstraint(new SlotConstraintItemAndQuantity(ModTutorialItems.heatShield, 1), 1);<commit_msg>Forgot to instantiate the energy in the tile entity<commit_after>package com.Pirhotau.ModTutorial.blocks.laserprinter;

import javax.annotation.Nullable;

import com.Pirhotau.Debug.Debug;
import com.Pirhotau.ModTutorial.Energy.EnergyReceiver;
import com.Pirhotau.ModTutorial.items.ModTutorialItems;
import com.Pirhotau.Utils.CustomItemCapabilities.AdvancedItemStackHandler;
import com.Pirhotau.Utils.CustomItemCapabilities.SlotConstraintItem;
import com.Pirhotau.Utils.CustomItemCapabilities.SlotConstraintItemAndQuantity;
import com.Pirhotau.Utils.Enum.EnumHalf;
import com.Pirhotau.Utils.Enum.EnumLRSide;
import com.Pirhotau.Utils.Enum.EnumLaserOperation;

import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.ITickable;
import net.minecraftforge.common.capabilities.Capability;
import net.minecraftforge.common.capabilities.ICapabilityProvider;
import net.minecraftforge.items.CapabilityItemHandler;

public class TileEntityLaserPrinter extends TileEntity implements ICapabilityProvider, ITickable {
	
	/** Cooldown for the rake - Consume powder & do an animation */
	private static int RAKE_COOLDOWN = 25;
	/** Cooldown for the fusion - Do nothing (idle) */
	private static int FUSION_COOLDOWN = 50;
	/** Needed energy per tick for the rake */
	private static int RAKE_ENERGY = 100; // per game tick, so 200 RF/t in game
	/** Needed energy per tick for the fusion */
	private static int FUSION_ENERGY = 400; // per game tick, so 800 RF/t in game
	
	/** Machine inventory */
	private AdvancedItemStackHandler inventory;
	/** The energy container of the machine */
	private EnergyReceiver energy;
	
	/** If the machine is working */
	private boolean isWorking;
	/** The remaining material needed to build the part, based on the recipe */
	private ItemStack remainingNeededMaterial;
	/** Side of the rake, needed for the animation */
	private EnumLRSide side;
	/** The current operation made in the machine */
	private EnumLaserOperation operation;
	/** The part which is created */
	private ItemStack stackRecipe;
	/** The time which count */
	private int timer;
	
	public TileEntityLaserPrinter() {
		super();
		this.inventory = new AdvancedItemStackHandler(6);
		this.energy = new EnergyReceiver(100000, 600);
		
		this.inventory.addConstraint(new SlotConstraintItemAndQuantity(ModTutorialItems.laserSource, 1), 0);
		this.inventory.addConstraint(new SlotConstraintItemAndQuantity(ModTutorialItems.heatShield, 1), 1);
{'fraction_non_alphanumeric': 0.0860386377215694, 'fraction_numerical': 0.010157339175463055, 'mean_word_length': 5.332912988650693, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1570015', 'n_tokens_mistral': 1594, 'n_tokens_neox': 1482, 'n_words': 409}