Fix matter fabricator energy use, adds EU-per-amp config value (#1231)
* Fix matter fabricator energy use, adds EU-per-amp config value should compile, probably... * Also fix the output inventory access was limited to the first slot, now it isn't * oops, to much EU... that's one less 6, sorry...
This commit is contained in:
parent
aa2d15c109
commit
9c07d6fa1c
1 changed files with 8 additions and 5 deletions
|
@ -51,8 +51,10 @@ public class TileMatterFabricator extends TilePowerAcceptor
|
|||
public static int maxInput = 8192;
|
||||
@ConfigRegistry(config = "machines", category = "matter_fabricator", key = "MatterFabricatorMaxEnergy", comment = "Matter Fabricator Max Energy (Value in EU)")
|
||||
public static int maxEnergy = 100000000;
|
||||
@ConfigRegistry(config = "machines", category = "matter_fabricator", key = "MatterFabricatorFabricationRate", comment = "Matter Fabricator Fabrication Rate")
|
||||
@ConfigRegistry(config = "machines", category = "matter_fabricator", key = "MatterFabricatorFabricationRate", comment = "Matter Fabricator Fabrication Rate, amount of amplifier units per UUM")
|
||||
public static int fabricationRate = 10000;
|
||||
@ConfigRegistry(config = "machines", category = "matter_fabricator", key = "MatterFabricatorEnergyPerAmp", comment = "Matter Fabricator EU per amplifier unit, multiply this with the rate for total EU")
|
||||
public static int energyPerAmp = 1666;
|
||||
// @ConfigRegistry(config = "machines", category = "matter_fabricator", key = "MatterFabricatorWrenchDropRate", comment = "Matter Fabricator Wrench Drop Rate")
|
||||
public static float wrenchDropRate = 1.0F;
|
||||
|
||||
|
@ -100,14 +102,14 @@ public class TileMatterFabricator extends TilePowerAcceptor
|
|||
|
||||
@Override
|
||||
public boolean canInsertItem(int slotIndex, ItemStack itemStack, EnumFacing side) {
|
||||
if (slotIndex == 6)
|
||||
if (slotIndex >= 6)
|
||||
return false;
|
||||
return isItemValidForSlot(slotIndex, itemStack);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canExtractItem(int slotIndex, ItemStack itemStack, EnumFacing side) {
|
||||
return slotIndex == 6;
|
||||
return slotIndex >= 6 && slotIndex <= 10;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -119,8 +121,9 @@ public class TileMatterFabricator extends TilePowerAcceptor
|
|||
final ItemStack stack = this.inventory.getStackInSlot(i);
|
||||
if (!stack.isEmpty() && spaceForOutput()) {
|
||||
final int amp = this.getValue(stack);
|
||||
if (amp != 0 && this.canUseEnergy(85)) {
|
||||
this.useEnergy(85);
|
||||
final int euNeeded = amp * energyPerAmp;
|
||||
if (amp != 0 && this.canUseEnergy(euNeeded)) {
|
||||
this.useEnergy(euNeeded);
|
||||
this.amplifier += amp;
|
||||
this.inventory.decrStackSize(i, 1);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue