mirror of
https://github.com/GTNewHorizons/Binnie.git
synced 2026-11-20 04:10:07 +00:00
Merge pull request #177 from KorDum/feature/refactoring
Some small refactoring
This commit is contained in:
commit
ce050eaa63
3 files changed
+9
-9
No files matched your search
@@ -164,9 +164,9 @@ public class MachineUtil {
|
||||
return machine.getInterface(IProcess.class);
|
||||
}
|
||||
|
||||
public List<ItemStack> getNonNullStacks(int[] slotAcclimatiser) {
|
||||
List<ItemStack> stacks = new ArrayList<ItemStack>();
|
||||
for (ItemStack stack : getStacks(slotAcclimatiser)) {
|
||||
public List<ItemStack> getNonNullStacks(int[] slot) {
|
||||
List<ItemStack> stacks = new ArrayList<>();
|
||||
for (ItemStack stack : getStacks(slot)) {
|
||||
if (stack != null) {
|
||||
stacks.add(stack);
|
||||
}
|
||||
|
||||
@@ -25,10 +25,10 @@ public abstract class ComponentProcessIndefinate extends MachineComponent implem
|
||||
|
||||
public ComponentProcessIndefinate(IMachine machine, float energyPerTick) {
|
||||
super(machine);
|
||||
this.energyPerTick = energyPerTick;
|
||||
actionPauseProcess = 0.0f;
|
||||
actionCancelTask = 0.0f;
|
||||
clientEnergyPerSecond = 0;
|
||||
this.energyPerTick = energyPerTick;
|
||||
}
|
||||
|
||||
protected IPoweredMachine getPower() {
|
||||
|
||||
@@ -22,7 +22,7 @@ public class GenepoolComponentLogic extends ComponentProcessSetCost implements I
|
||||
|
||||
@Override
|
||||
public ErrorState canWork() {
|
||||
if (getUtil().isSlotEmpty(0)) {
|
||||
if (getUtil().isSlotEmpty(Genepool.SLOT_BEE)) {
|
||||
return new ErrorState.NoItem(
|
||||
I18N.localise("genetics.machine.genepool.error.noIndividual"),
|
||||
Genepool.SLOT_BEE
|
||||
@@ -39,7 +39,7 @@ public class GenepoolComponentLogic extends ComponentProcessSetCost implements I
|
||||
Genepool.TANK_DNA
|
||||
);
|
||||
}
|
||||
if (!getUtil().liquidInTank(1, 1)) {
|
||||
if (!getUtil().liquidInTank(Genepool.TANK_ETHANOL, 1)) {
|
||||
return new ErrorState.InsufficientLiquid(
|
||||
I18N.localise("genetics.machine.genepool.error.noEthanol"),
|
||||
Genepool.TANK_ETHANOL
|
||||
@@ -64,9 +64,9 @@ public class GenepoolComponentLogic extends ComponentProcessSetCost implements I
|
||||
|
||||
private int getDNAAmount(ItemStack stack) {
|
||||
ISpeciesRoot root = AlleleManager.alleleRegistry.getSpeciesRoot(stack);
|
||||
if (root == null
|
||||
|| root != Binnie.Genetics.getBeeRoot()
|
||||
|| Binnie.Genetics.getBeeRoot().isDrone(stack)) {
|
||||
if (root == null ||
|
||||
root != Binnie.Genetics.getBeeRoot() ||
|
||||
Binnie.Genetics.getBeeRoot().isDrone(stack)) {
|
||||
return 10;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user