Search in sources :

Example 1 with IChargedSlots

use of binnie.core.machines.inventory.IChargedSlots in project Binnie by ForestryMC.

the class IsolatorLogic method onTickTask.

@Override
protected void onTickTask() {
    IChargedSlots chargedSlots = this.getMachine().getInterface(IChargedSlots.class);
    chargedSlots.alterCharge(Isolator.SLOT_ENZYME, -ENZYME_PER_PROCESS * this.getProgressPerTick() / 100.0f);
}
Also used : IChargedSlots(binnie.core.machines.inventory.IChargedSlots)

Example 2 with IChargedSlots

use of binnie.core.machines.inventory.IChargedSlots in project Binnie by ForestryMC.

the class GenepoolLogic method onTickTask.

@Override
protected void onTickTask() {
    MachineUtil util = getUtil();
    ItemStack individual = util.getStack(Genepool.SLOT_BEE);
    this.ethanolDrain += getDNAAmount(individual) * 1.2f * this.getProgressPerTick() / 100.0f;
    if (this.ethanolDrain >= 1.0f) {
        util.drainTank(Genepool.TANK_ETHANOL, 1);
        --this.ethanolDrain;
    }
    IChargedSlots chargedSlots = this.getMachine().getInterface(IChargedSlots.class);
    chargedSlots.alterCharge(Genepool.SLOT_ENZYME, -ENZYME_PER_PROCESS * this.getProgressPerTick() / 100.0f);
}
Also used : MachineUtil(binnie.core.machines.MachineUtil) IChargedSlots(binnie.core.machines.inventory.IChargedSlots) ItemStack(net.minecraft.item.ItemStack)

Aggregations

IChargedSlots (binnie.core.machines.inventory.IChargedSlots)2 MachineUtil (binnie.core.machines.MachineUtil)1 ItemStack (net.minecraft.item.ItemStack)1