Files
Binnie/src/main/java/binnie/extratrees/machines/lumbermill/LumbermillPackage.java
T
ah-OOG-ah f0f14bb278 Minor cleanups (#50)
* Finalize, minor alloc reduction

Also enable Jabel and generic injection

* Update dependencies.gradle

* Clean up Machine a bit

* spotless

more enhanced instanceof

* Update ModuleMachine.java

* More clen

* WARN: Removed exception catching

* Many, many tiny patches + birthday fix

* Spotless

* Spotless again

* Fix getLow and clamp tolerance value

* Revert event -> ignored on unused event parameters

* Rename instanceof variables

* Update Machine.java

* Use StringBuilder

* Cache getStack()

* Oops, Jabel can't handle that

* Spotless

* Spotless again

My IDE was fighting with it

* Remove unused elements + scream test success
2024-09-26 16:59:20 +02:00

47 lines
1.9 KiB
Java

package binnie.extratrees.machines.lumbermill;
import binnie.core.craftgui.minecraft.IMachineInformation;
import binnie.core.machines.Machine;
import binnie.core.machines.inventory.ComponentInventorySlots;
import binnie.core.machines.inventory.ComponentTankContainer;
import binnie.core.machines.inventory.InventorySlot;
import binnie.core.machines.inventory.TankSlot;
import binnie.core.machines.inventory.TankValidator;
import binnie.core.machines.power.ComponentPowerReceptor;
import binnie.extratrees.core.ExtraTreeTexture;
import binnie.extratrees.core.ExtraTreesGUID;
import binnie.extratrees.machines.ExtraTreeMachine;
public class LumbermillPackage extends ExtraTreeMachine.PackageExtraTreeMachine implements IMachineInformation {
public LumbermillPackage() {
super("lumbermill", ExtraTreeTexture.lumbermillTexture, true);
}
@Override
public void createMachine(Machine machine) {
new ExtraTreeMachine.ComponentExtraTreeGUI(machine, ExtraTreesGUID.Lumbermill);
ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
InventorySlot woodSlot = inventory.addSlot(Lumbermill.SLOT_WOOD, "input");
woodSlot.setValidator(new LogSlotValidator());
woodSlot.forbidExtraction();
InventorySlot planksSlot = inventory.addSlot(Lumbermill.SLOT_PLANKS, "output");
planksSlot.setReadOnly();
InventorySlot barkSlot = inventory.addSlot(Lumbermill.SLOT_BARK, "byproduct");
barkSlot.setReadOnly();
InventorySlot sawdustSlot = inventory.addSlot(Lumbermill.SLOT_SAWDUST, "byproduct");
sawdustSlot.setReadOnly();
ComponentTankContainer tanks = new ComponentTankContainer(machine);
TankSlot tankSlot = tanks.addTank(Lumbermill.TANK_WATER, "input", 10000);
tankSlot.setValidator(new TankValidator.Basic("water"));
new ComponentPowerReceptor(machine);
new LumbermillComponentLogic(machine);
}
}