IMachineSlot

A Machine slot is a slot that either accepts Items or liquids.
You need them when creating a machine using the IMachineRegistry later on.

Importing the package

If you want to shorten method calls or encounter any issues you might need to import the package.
You can do so using

import extrautilities2.Tweaker.IMachineSlot;

Creating a new IMachineSlot

The IMachineSlot package offers methods to create new IMachineSlot objects:

extrautilities2.Tweaker.IMachineSlot.newItemStackSlot(name);
extrautilities2.Tweaker.IMachineSlot.newItemStackSlot(name, isOptional);
extrautilities2.Tweaker.IMachineSlot.newItemStackSlot(name, stackCapacity);
extrautilities2.Tweaker.IMachineSlot.newItemStackSlot(name, isOptional, stackCapacity);
extrautilities2.Tweaker.IMachineSlot.newItemStackSlot(name, color, isOptional, backgroundTexture, stackCapacity);


newFluidSlot(name);
newFluidSlot(name, stackCapacity);
newFluidSlot(name, stackCapacity, filterLiquidStack);
newFluidSlot(name, stackCapacity, isOptional, filterLiquidStack);
newFluidSlot(name, stackCapacity, color, isOptional, filterLiquidStack);

All these methods will return the new Slot as IMachineSlot object.

The parameters are:

Name Type
name string
isOptional bool
stackCapacity int
color int
backgroundTexture string
filterLiquidStack ILiquidStack

What the parameters do:

Getters

You can get basic information from an IMachineSlot as well.
Don’t expect these getters to magically return something different from what you set the slot when creating it, though.

Name Type
name string
optional bool
stackCapacity int