mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-20 20:22:35 +00:00
Update buildscript & spotlessApply
This commit is contained in:
1 parent
e4329e2b8f
commit
8683a345c3
818 files changed
+51123
-49403
No files matched your search
@@ -17,76 +17,80 @@ import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
public class SplicerPackage extends AdvGeneticMachine.PackageAdvGeneticBase implements IMachineInformation {
|
||||
public SplicerPackage() {
|
||||
super("splicer", GeneticsTexture.Splicer, 0xe22235, true);
|
||||
}
|
||||
public SplicerPackage() {
|
||||
super("splicer", GeneticsTexture.Splicer, 0xe22235, true);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void createMachine(Machine machine) {
|
||||
new ComponentGeneticGUI(machine, GeneticsGUI.Splicer);
|
||||
ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
|
||||
SlotValidator serumValid = new SerumSlotValidator();
|
||||
@Override
|
||||
public void createMachine(Machine machine) {
|
||||
new ComponentGeneticGUI(machine, GeneticsGUI.Splicer);
|
||||
ComponentInventorySlots inventory = new ComponentInventorySlots(machine);
|
||||
SlotValidator serumValid = new SerumSlotValidator();
|
||||
|
||||
InventorySlot serumSlot = inventory.addSlot(Splicer.SLOT_SERUM_VIAL, "serum.active");
|
||||
serumSlot.forbidInteraction();
|
||||
serumSlot.setReadOnly();
|
||||
serumSlot.setValidator(serumValid);
|
||||
InventorySlot serumSlot = inventory.addSlot(Splicer.SLOT_SERUM_VIAL, "serum.active");
|
||||
serumSlot.forbidInteraction();
|
||||
serumSlot.setReadOnly();
|
||||
serumSlot.setValidator(serumValid);
|
||||
|
||||
inventory.addSlotArray(Splicer.SLOT_SERUM_RESERVE, "serum.input");
|
||||
for (InventorySlot slot : inventory.getSlots(Splicer.SLOT_SERUM_RESERVE)) {
|
||||
slot.setValidator(serumValid);
|
||||
slot.forbidExtraction();
|
||||
}
|
||||
inventory.addSlotArray(Splicer.SLOT_SERUM_RESERVE, "serum.input");
|
||||
for (InventorySlot slot : inventory.getSlots(Splicer.SLOT_SERUM_RESERVE)) {
|
||||
slot.setValidator(serumValid);
|
||||
slot.forbidExtraction();
|
||||
}
|
||||
|
||||
inventory.addSlotArray(Splicer.SLOT_SERUM_EXPENDED, "serum.output");
|
||||
for (InventorySlot slot : inventory.getSlots(Splicer.SLOT_SERUM_EXPENDED)) {
|
||||
slot.setValidator(serumValid);
|
||||
slot.setReadOnly();
|
||||
}
|
||||
inventory.addSlotArray(Splicer.SLOT_SERUM_EXPENDED, "serum.output");
|
||||
for (InventorySlot slot : inventory.getSlots(Splicer.SLOT_SERUM_EXPENDED)) {
|
||||
slot.setValidator(serumValid);
|
||||
slot.setReadOnly();
|
||||
}
|
||||
|
||||
inventory.addSlotArray(Splicer.SLOT_RESERVE, "input");
|
||||
for (InventorySlot slot : inventory.getSlots(Splicer.SLOT_RESERVE)) {
|
||||
slot.forbidExtraction();
|
||||
slot.setValidator(new IndividualInoculateValidator());
|
||||
}
|
||||
inventory.addSlotArray(Splicer.SLOT_RESERVE, "input");
|
||||
for (InventorySlot slot : inventory.getSlots(Splicer.SLOT_RESERVE)) {
|
||||
slot.forbidExtraction();
|
||||
slot.setValidator(new IndividualInoculateValidator());
|
||||
}
|
||||
|
||||
InventorySlot targetSlot = inventory.addSlot(Splicer.SLOT_TARGET, "process");
|
||||
targetSlot.setValidator(new IndividualInoculateValidator());
|
||||
targetSlot.setReadOnly();
|
||||
targetSlot.forbidInteraction();
|
||||
InventorySlot targetSlot = inventory.addSlot(Splicer.SLOT_TARGET, "process");
|
||||
targetSlot.setValidator(new IndividualInoculateValidator());
|
||||
targetSlot.setReadOnly();
|
||||
targetSlot.forbidInteraction();
|
||||
|
||||
inventory.addSlotArray(Splicer.SLOT_FINISHED, "output");
|
||||
for (InventorySlot slot : inventory.getSlots(Splicer.SLOT_FINISHED)) {
|
||||
slot.setReadOnly();
|
||||
slot.forbidInsertion();
|
||||
slot.setValidator(new IndividualInoculateValidator());
|
||||
}
|
||||
inventory.addSlotArray(Splicer.SLOT_FINISHED, "output");
|
||||
for (InventorySlot slot : inventory.getSlots(Splicer.SLOT_FINISHED)) {
|
||||
slot.setReadOnly();
|
||||
slot.forbidInsertion();
|
||||
slot.setValidator(new IndividualInoculateValidator());
|
||||
}
|
||||
|
||||
ComponentInventoryTransfer transfer = new ComponentInventoryTransfer(machine);
|
||||
transfer.addRestock(Splicer.SLOT_RESERVE, Splicer.SLOT_TARGET, 1);
|
||||
transfer.addRestock(Splicer.SLOT_SERUM_RESERVE, Splicer.SLOT_SERUM_VIAL);
|
||||
transfer.addStorage(Splicer.SLOT_SERUM_VIAL, Splicer.SLOT_SERUM_EXPENDED, new ComponentInventoryTransfer.Condition() {
|
||||
@Override
|
||||
public boolean fufilled(ItemStack stack) {
|
||||
return Engineering.getCharges(stack) == 0;
|
||||
}
|
||||
});
|
||||
transfer.addStorage(Splicer.SLOT_TARGET, Splicer.SLOT_FINISHED, new ComponentInventoryTransfer.Condition() {
|
||||
@Override
|
||||
public boolean fufilled(ItemStack stack) {
|
||||
return stack != null
|
||||
&& transfer.getMachine().getMachineUtil().getStack(Splicer.SLOT_SERUM_VIAL) != null
|
||||
&& transfer.getMachine().getInterface(SplicerComponentLogic.class).isValidSerum() != null;
|
||||
}
|
||||
});
|
||||
ComponentInventoryTransfer transfer = new ComponentInventoryTransfer(machine);
|
||||
transfer.addRestock(Splicer.SLOT_RESERVE, Splicer.SLOT_TARGET, 1);
|
||||
transfer.addRestock(Splicer.SLOT_SERUM_RESERVE, Splicer.SLOT_SERUM_VIAL);
|
||||
transfer.addStorage(
|
||||
Splicer.SLOT_SERUM_VIAL, Splicer.SLOT_SERUM_EXPENDED, new ComponentInventoryTransfer.Condition() {
|
||||
@Override
|
||||
public boolean fufilled(ItemStack stack) {
|
||||
return Engineering.getCharges(stack) == 0;
|
||||
}
|
||||
});
|
||||
transfer.addStorage(Splicer.SLOT_TARGET, Splicer.SLOT_FINISHED, new ComponentInventoryTransfer.Condition() {
|
||||
@Override
|
||||
public boolean fufilled(ItemStack stack) {
|
||||
return stack != null
|
||||
&& transfer.getMachine().getMachineUtil().getStack(Splicer.SLOT_SERUM_VIAL) != null
|
||||
&& transfer.getMachine()
|
||||
.getInterface(SplicerComponentLogic.class)
|
||||
.isValidSerum()
|
||||
!= null;
|
||||
}
|
||||
});
|
||||
|
||||
new ComponentPowerReceptor(machine, Splicer.POWER_CAPACITY);
|
||||
new SplicerComponentLogic(machine);
|
||||
new SplicerComponentFX(machine);
|
||||
}
|
||||
new ComponentPowerReceptor(machine, Splicer.POWER_CAPACITY);
|
||||
new SplicerComponentLogic(machine);
|
||||
new SplicerComponentFX(machine);
|
||||
}
|
||||
|
||||
@Override
|
||||
public TileEntity createTileEntity() {
|
||||
return new TileEntityMachine(this);
|
||||
}
|
||||
@Override
|
||||
public TileEntity createTileEntity() {
|
||||
return new TileEntityMachine(this);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user