EIO capacitor fix (#58)

* EIO capacitor fix

fix new capacitor behave in some machine

* Update TilePoweredSpawner.java

* Update TilePoweredSpawner.java
This commit is contained in:
Pnc6lx authored and GitHub committed 2022-03-04 16:10:13 +01:00
1 parent 07152aaee0
commit d46289b0e1
6 files changed
+253 -22

No files matched your search

@@ -386,6 +386,13 @@ public final class Config {
public static int poweredSpawnerLevelOnePowerPerTickRF = 160;
public static int poweredSpawnerLevelTwoPowerPerTickRF = 500;
public static int poweredSpawnerLevelThreePowerPerTickRF = 1500;
public static int poweredSpawnerLevelFourPowerPerTickRF = 4500;
public static int poweredSpawnerLevelFivePowerPerTickRF = 2000;
public static int poweredSpawnerLevelSixPowerPerTickRF = 1000;
public static int poweredSpawnerLevelSevenPowerPerTickRF = 500;
public static int poweredSpawnerLevelEightPowerPerTickRF = 160;
public static int poweredSpawnerLevelNinePowerPerTickRF = 500;
public static int poweredSpawnerLevelTenPowerPerTickRF = 1500;
public static int poweredSpawnerMaxPlayerDistance = 0;
public static int poweredSpawnerDespawnTimeSeconds = 120;
public static int poweredSpawnerSpawnCount = 4;
@@ -439,6 +446,13 @@ public final class Config {
public static int soulBinderLevelOnePowerPerTickRF = 500;
public static int soulBinderLevelTwoPowerPerTickRF = 1000;
public static int soulBinderLevelThreePowerPerTickRF = 2000;
public static int soulBinderLevelFourPowerPerTickRF = 4000;
public static int soulBinderLevelFivePowerPerTickRF = 8000;
public static int soulBinderLevelSixPowerPerTickRF = 16000;
public static int soulBinderLevelSevenPowerPerTickRF = 32000;
public static int soulBinderLevelEightPowerPerTickRF = 500;
public static int soulBinderLevelNinePowerPerTickRF = 1000;
public static int soulBinderLevelTenPowerPerTickRF = 2000;
public static int soulBinderBrokenSpawnerRF = 2500000;
public static int soulBinderBrokenSpawnerLevels = 15;
public static int soulBinderReanimationRF = 100000;
@@ -463,6 +477,13 @@ public final class Config {
public static int sliceAndSpliceLevelOnePowerPerTickRF = 80;
public static int sliceAndSpliceLevelTwoPowerPerTickRF = 160;
public static int sliceAndSpliceLevelThreePowerPerTickRF = 320;
public static int sliceAndSpliceLevelFourPowerPerTickRF = 640;
public static int sliceAndSpliceLevelFivePowerPerTickRF = 1280;
public static int sliceAndSpliceLevelSixPowerPerTickRF = 2560;
public static int sliceAndSpliceLevelSevenPowerPerTickRF = 5120;
public static int sliceAndSpliceLevelEightPowerPerTickRF = 80;
public static int sliceAndSpliceLevelNinePowerPerTickRF = 160;
public static int sliceAndSpliceLevelTenPowerPerTickRF = 320;
public static boolean soulBinderRequiresEndermanSkull = true;
@@ -1231,6 +1252,27 @@ public final class Config {
poweredSpawnerLevelThreePowerPerTickRF = config.get(sectionSpawner.name, "poweredSpawnerLevelThreePowerPerTickRF",
poweredSpawnerLevelThreePowerPerTickRF,
"RF per tick for a level 3 spawner").getInt(poweredSpawnerLevelThreePowerPerTickRF);
poweredSpawnerLevelFourPowerPerTickRF = config.get(sectionSpawner.name, "poweredSpawnerLevelFourPowerPerTickRF",
poweredSpawnerLevelFourPowerPerTickRF,
"RF per tick for a level 4 spawner").getInt(poweredSpawnerLevelFourPowerPerTickRF);
poweredSpawnerLevelFivePowerPerTickRF = config.get(sectionSpawner.name, "poweredSpawnerLevelFivePowerPerTickRF",
poweredSpawnerLevelFivePowerPerTickRF,
"RF per tick for a level 5 spawner").getInt(poweredSpawnerLevelFivePowerPerTickRF);
poweredSpawnerLevelSixPowerPerTickRF = config.get(sectionSpawner.name, "poweredSpawnerLevelSixPowerPerTickRF",
poweredSpawnerLevelSixPowerPerTickRF,
"RF per tick for a level 6 spawner").getInt(poweredSpawnerLevelSixPowerPerTickRF);
poweredSpawnerLevelSevenPowerPerTickRF = config.get(sectionSpawner.name, "poweredSpawnerLevelSevenPowerPerTickRF",
poweredSpawnerLevelSevenPowerPerTickRF,
"RF per tick for a level 7 spawner").getInt(poweredSpawnerLevelSevenPowerPerTickRF);
poweredSpawnerLevelEightPowerPerTickRF = config.get(sectionSpawner.name, "poweredSpawnerLevelEightPowerPerTickRF",
poweredSpawnerLevelEightPowerPerTickRF,
"RF per tick for a level 1 spawner").getInt(poweredSpawnerLevelEightPowerPerTickRF);
poweredSpawnerLevelNinePowerPerTickRF = config.get(sectionSpawner.name, "poweredSpawnerLevelNinePowerPerTickRF",
poweredSpawnerLevelNinePowerPerTickRF,
"RF per tick for a level 2 spawner").getInt(poweredSpawnerLevelNinePowerPerTickRF);
poweredSpawnerLevelTenPowerPerTickRF = config.get(sectionSpawner.name, "poweredSpawnerLevelTenPowerPerTickRF",
poweredSpawnerLevelTenPowerPerTickRF,
"RF per tick for a level 3 spawner").getInt(poweredSpawnerLevelTenPowerPerTickRF);
poweredSpawnerMaxPlayerDistance = config.get(sectionSpawner.name, "poweredSpawnerMaxPlayerDistance", poweredSpawnerMaxPlayerDistance,
"Max distance of the closest player for the spawner to be active. A zero value will remove the player check").getInt(poweredSpawnerMaxPlayerDistance);
poweredSpawnerDespawnTimeSeconds = config.get(sectionSpawner.name, "poweredSpawnerDespawnTimeSeconds" , poweredSpawnerDespawnTimeSeconds,
@@ -1303,9 +1345,23 @@ public final class Config {
soulBinderLevelOnePowerPerTickRF = config.get(sectionSoulBinder.name, "soulBinderLevelOnePowerPerTickRF", soulBinderLevelOnePowerPerTickRF,
"The number of RF/t consumed by an unupgraded soul binder.").getInt(soulBinderLevelOnePowerPerTickRF);
soulBinderLevelTwoPowerPerTickRF = config.get(sectionSoulBinder.name, "soulBinderLevelTwoPowerPerTickRF", soulBinderLevelTwoPowerPerTickRF,
"The number of RF/t consumed by a soul binder with a double layer capacitor upgrade.").getInt(soulBinderLevelTwoPowerPerTickRF);
"The number of RF/t consumed by a soul binder with a double layer capacitor or a endergetic capacitor upgrade.").getInt(soulBinderLevelTwoPowerPerTickRF);
soulBinderLevelThreePowerPerTickRF = config.get(sectionSoulBinder.name, "soulBinderLevelThreePowerPerTickRF", soulBinderLevelThreePowerPerTickRF,
"The number of RF/t consumed by a soul binder with an octadic capacitor upgrade.").getInt(soulBinderLevelThreePowerPerTickRF);
"The number of RF/t consumed by a soul binder with an octadic capacitor or a endergised upgrade.").getInt(soulBinderLevelThreePowerPerTickRF);
soulBinderLevelFourPowerPerTickRF = config.get(sectionSoulBinder.name, "soulBinderLevelFourPowerPerTickRF", soulBinderLevelFourPowerPerTickRF,
"The number of RF/t consumed by a soul binder with an crystalline capacitor upgrade.").getInt(soulBinderLevelFourPowerPerTickRF);
soulBinderLevelFivePowerPerTickRF = config.get(sectionSoulBinder.name, "soulBinderLevelFivePowerPerTickRF", soulBinderLevelFivePowerPerTickRF,
"The number of RF/t consumed by a soul binder with an melodic capacitor upgrade.").getInt(soulBinderLevelFivePowerPerTickRF);
soulBinderLevelSixPowerPerTickRF = config.get(sectionSoulBinder.name, "soulBinderLevelSixPowerPerTickRF", soulBinderLevelSixPowerPerTickRF,
"The number of RF/t consumed by a soul binder with an stellar capacitor upgrade.").getInt(soulBinderLevelSixPowerPerTickRF);
soulBinderLevelSevenPowerPerTickRF = config.get(sectionSoulBinder.name, "soulBinderLevelSevenPowerPerTickRF", soulBinderLevelSevenPowerPerTickRF,
"The number of RF/t consumed by a soul binder with an totemic capacitor upgrade.").getInt(soulBinderLevelSevenPowerPerTickRF);
soulBinderLevelEightPowerPerTickRF = config.get(sectionSoulBinder.name, "soulBinderLevelEightPowerPerTickRF", soulBinderLevelEightPowerPerTickRF,
"The number of RF/t consumed by a soul binder with an silver capacitor upgrade.").getInt(soulBinderLevelEightPowerPerTickRF);
soulBinderLevelNinePowerPerTickRF = config.get(sectionSoulBinder.name, "soulBinderLevelNinePowerPerTickRF", soulBinderLevelNinePowerPerTickRF,
"The number of RF/t consumed by a soul binder with an endergetic capacitor upgrade.").getInt(soulBinderLevelNinePowerPerTickRF);
soulBinderLevelTenPowerPerTickRF = config.get(sectionSoulBinder.name, "soulBinderLevelTenPowerPerTickRF", soulBinderLevelTenPowerPerTickRF,
"The number of RF/t consumed by a soul binder with an endergised capacitor upgrade.").getInt(soulBinderLevelTenPowerPerTickRF);
soulBinderBrokenSpawnerRF = config.get(sectionSoulBinder.name, "soulBinderBrokenSpawnerRF", soulBinderBrokenSpawnerRF,
"The number of RF required to change the type of a broken spawner.").getInt(soulBinderBrokenSpawnerRF);
soulBinderReanimationRF = config.get(sectionSoulBinder.name, "soulBinderReanimationRF", soulBinderReanimationRF,
@@ -1341,6 +1397,21 @@ public final class Config {
"The number of RF/t consumed by a Slice'N'Splice with a double layer capacitor upgrade.").getInt(sliceAndSpliceLevelTwoPowerPerTickRF);
sliceAndSpliceLevelThreePowerPerTickRF = config.get(sectionPower.name, "sliceAndSpliceLevelThreePowerPerTickRF", sliceAndSpliceLevelThreePowerPerTickRF,
"The number of RF/t consumed by a Slice'N'Splice with an octadic capacitor upgrade.").getInt(sliceAndSpliceLevelThreePowerPerTickRF);
sliceAndSpliceLevelFourPowerPerTickRF = config.get(sectionPower.name, "sliceAndSpliceLevelFourPowerPerTickRF", sliceAndSpliceLevelFourPowerPerTickRF,
"The number of RF/t consumed by a Slice'N'Splice with an crystalline capacitor upgrade.").getInt(sliceAndSpliceLevelFourPowerPerTickRF);
sliceAndSpliceLevelFivePowerPerTickRF = config.get(sectionPower.name, "sliceAndSpliceLevelFivePowerPerTickRF", sliceAndSpliceLevelFivePowerPerTickRF,
"The number of RF/t consumed by a Slice'N'Splice with an melodic capacitor upgrade.").getInt(sliceAndSpliceLevelFivePowerPerTickRF);
sliceAndSpliceLevelSixPowerPerTickRF = config.get(sectionPower.name, "sliceAndSpliceLevelSixPowerPerTickRF", sliceAndSpliceLevelSixPowerPerTickRF,
"The number of RF/t consumed by a Slice'N'Splice with an stellar capacitor upgrade.").getInt(sliceAndSpliceLevelSixPowerPerTickRF);
sliceAndSpliceLevelSevenPowerPerTickRF = config.get(sectionPower.name, "sliceAndSpliceLevelSevenPowerPerTickRF", sliceAndSpliceLevelSevenPowerPerTickRF,
"The number of RF/t consumed by a Slice'N'Splice with an totemic capacitor upgrade.").getInt(sliceAndSpliceLevelSevenPowerPerTickRF);
sliceAndSpliceLevelEightPowerPerTickRF = config.get(sectionPower.name, "sliceAndSpliceLevelEightPowerPerTickRF", sliceAndSpliceLevelEightPowerPerTickRF,
"The number of RF/t consumed by a Slice'N'Splice with an silver capacitor upgrade.").getInt(sliceAndSpliceLevelEightPowerPerTickRF);
sliceAndSpliceLevelNinePowerPerTickRF = config.get(sectionPower.name, "sliceAndSpliceLevelNinePowerPerTickRF", sliceAndSpliceLevelNinePowerPerTickRF,
"The number of RF/t consumed by a Slice'N'Splice with an endergetic capacitor upgrade.").getInt(sliceAndSpliceLevelNinePowerPerTickRF);
sliceAndSpliceLevelTenPowerPerTickRF = config.get(sectionPower.name, "sliceAndSpliceLevelTenPowerPerTickRF", sliceAndSpliceLevelTenPowerPerTickRF,
"The number of RF/t consumed by a Slice'N'Splice with an endergised capacitor upgrade.").getInt(sliceAndSpliceLevelTenPowerPerTickRF);
attractorRangeLevelOne = config.get(sectionAttractor.name, "attractorRangeLevelOne", attractorRangeLevelOne,
"The range of the mob attractor with no upgrades").getInt(attractorRangeLevelOne);
@@ -92,16 +92,20 @@ public class TileAttractor extends AbstractPowerConsumerEntity implements IRange
@Override
public void onCapacitorTypeChange() {
switch (getCapacitorType()) {
case ACTIVATED_CAPACITOR:
switch (getCapacitor().getTier()) {
case 2:
range = Config.attractorRangeLevelTwo;
powerPerTick = Config.attractorPowerPerTickLevelTwo;
break;
case ENDER_CAPACITOR:
case 3:
case 4:
case 5:
case 6:
case 7:
range = Config.attractorRangeLevelThree;
powerPerTick = Config.attractorPowerPerTickLevelThree;
break;
case BASIC_CAPACITOR:
case 1:
default:
range = Config.attractorRangeLevelOne;
powerPerTick = Config.attractorPowerPerTickLevelOne;
@@ -70,16 +70,20 @@ public class TileAversionObelisk extends AbstractPowerConsumerEntity implements
@Override
public void onCapacitorTypeChange() {
switch (getCapacitorType()) {
case BASIC_CAPACITOR:
switch (getCapacitor().getTier()) {
case 1:
range = Config.spawnGuardRangeLevelOne;
powerPerTick = Config.spawnGuardPowerPerTickLevelOne;
break;
case ACTIVATED_CAPACITOR:
case 2:
range = Config.spawnGuardRangeLevelTwo;
powerPerTick = Config.spawnGuardPowerPerTickLevelTwo;
break;
case ENDER_CAPACITOR:
case 3:
case 4:
case 5:
case 6:
case 7:
range = Config.spawnGuardRangeLevelThree;
powerPerTick = Config.spawnGuardPowerPerTickLevelThree;
break;
@@ -39,6 +39,48 @@ public class TileSliceAndSplice extends AbstractPoweredTaskEntity {
Capacitors.ENDER_CAPACITOR.capacitor.getMaxEnergyStored(),
POWER_PER_TICK_THREE);
public static final int POWER_PER_TICK_FOUR = Config.sliceAndSpliceLevelFourPowerPerTickRF;
private static final BasicCapacitor CAP_FOUR = new BasicCapacitor(0,
POWER_PER_TICK_FOUR * 2,
Capacitors.CRYSTALLINE_CAPACITOR.capacitor.getMaxEnergyStored(),
POWER_PER_TICK_FOUR);
public static final int POWER_PER_TICK_FIVE = Config.sliceAndSpliceLevelFivePowerPerTickRF;
private static final BasicCapacitor CAP_FIVE = new BasicCapacitor(0,
POWER_PER_TICK_FIVE * 2,
Capacitors.ENDER_CAPACITOR.capacitor.getMaxEnergyStored(),
POWER_PER_TICK_FIVE);
public static final int POWER_PER_TICK_SIX = Config.sliceAndSpliceLevelSixPowerPerTickRF;
private static final BasicCapacitor CAP_SIX = new BasicCapacitor(0,
POWER_PER_TICK_SIX * 2,
Capacitors.STELLAR_CAPACITOR.capacitor.getMaxEnergyStored(),
POWER_PER_TICK_SIX);
public static final int POWER_PER_TICK_SEVEN = Config.sliceAndSpliceLevelSevenPowerPerTickRF;
private static final BasicCapacitor CAP_SEVEN = new BasicCapacitor(0,
POWER_PER_TICK_SEVEN * 2,
Capacitors.TOTEMIC_CAPACITOR.capacitor.getMaxEnergyStored(),
POWER_PER_TICK_SEVEN);
public static final int POWER_PER_TICK_EIGHT = Config.sliceAndSpliceLevelEightPowerPerTickRF;
private static final BasicCapacitor CAP_EIGHT = new BasicCapacitor(0,
POWER_PER_TICK_EIGHT * 2,
Capacitors.SILVER_CAPACITOR.capacitor.getMaxEnergyStored(),
POWER_PER_TICK_EIGHT);
public static final int POWER_PER_TICK_NINE = Config.sliceAndSpliceLevelNinePowerPerTickRF;
private static final BasicCapacitor CAP_NINE = new BasicCapacitor(0,
POWER_PER_TICK_NINE * 2,
Capacitors.ENDERGETIC_CAPACITOR.capacitor.getMaxEnergyStored(),
POWER_PER_TICK_NINE);
public static final int POWER_PER_TICK_TEN = Config.sliceAndSpliceLevelTenPowerPerTickRF;
private static final BasicCapacitor CAP_TEN = new BasicCapacitor(0,
POWER_PER_TICK_TEN * 2,
Capacitors.ENDERGISED_CAPACITOR.capacitor.getMaxEnergyStored(),
POWER_PER_TICK_TEN);
private final int axeIndex = 6;
private final int shearsIndex = 7;
private EntityLivingBase fakePlayer;
@@ -67,6 +109,27 @@ public class TileSliceAndSplice extends AbstractPoweredTaskEntity {
setCapacitor(CAP_TWO);
break;
case ENDER_CAPACITOR:
setCapacitor(CAP_THREE);
break;
case CRYSTALLINE_CAPACITOR:
setCapacitor(CAP_FOUR);
break;
case MELODIC_CAPACITOR:
setCapacitor(CAP_FIVE);
break;
case STELLAR_CAPACITOR:
setCapacitor(CAP_SIX);
break;
case TOTEMIC_CAPACITOR:
setCapacitor(CAP_SEVEN);
break;
case SILVER_CAPACITOR:
setCapacitor(CAP_ONE);
break;
case ENDERGETIC_CAPACITOR:
setCapacitor(CAP_TWO);
break;
case ENDERGISED_CAPACITOR:
setCapacitor(CAP_THREE);
break;
default:
@@ -43,6 +43,35 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
private static final BasicCapacitor CAP_THREE = new BasicCapacitor(0,POWER_PER_TICK_THREE * 2,
Capacitors.ENDER_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_THREE);
public static final int POWER_PER_TICK_FOUR = Config.soulBinderLevelFourPowerPerTickRF;
private static final BasicCapacitor CAP_FOUR = new BasicCapacitor(0,POWER_PER_TICK_FOUR * 2,
Capacitors.CRYSTALLINE_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_FOUR);
public static final int POWER_PER_TICK_FIVE = Config.soulBinderLevelFivePowerPerTickRF;
private static final BasicCapacitor CAP_FIVE = new BasicCapacitor(0,POWER_PER_TICK_FIVE * 2,
Capacitors.MELODIC_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_FIVE);
public static final int POWER_PER_TICK_SIX = Config.soulBinderLevelSixPowerPerTickRF;
private static final BasicCapacitor CAP_SIX = new BasicCapacitor(0,POWER_PER_TICK_SIX * 2,
Capacitors.STELLAR_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_SIX);
public static final int POWER_PER_TICK_SEVEN = Config.soulBinderLevelSevenPowerPerTickRF;
private static final BasicCapacitor CAP_SEVEN = new BasicCapacitor(0,POWER_PER_TICK_SEVEN * 2,
Capacitors.TOTEMIC_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_SEVEN);
public static final int POWER_PER_TICK_EIGHT = Config.soulBinderLevelEightPowerPerTickRF;
private static final BasicCapacitor CAP_EIGHT = new BasicCapacitor(0,POWER_PER_TICK_EIGHT * 2,
Capacitors.SILVER_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_EIGHT);
public static final int POWER_PER_TICK_NINE = Config.soulBinderLevelNinePowerPerTickRF;
private static final BasicCapacitor CAP_NINE = new BasicCapacitor(0,POWER_PER_TICK_NINE * 2,
Capacitors.ENDERGETIC_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_NINE);
public static final int POWER_PER_TICK_TEN = Config.soulBinderLevelTenPowerPerTickRF;
private static final BasicCapacitor CAP_TEN = new BasicCapacitor(0,POWER_PER_TICK_TEN * 2,
Capacitors.ENDERGISED_CAPACITOR.capacitor.getMaxEnergyStored(), POWER_PER_TICK_TEN);
private final ExperienceContainer xpCont = new ExperienceContainer(XpUtil.getExperienceForLevel(Config.soulBinderMaxXpLevel));
public TileSoulBinder() {
@@ -170,18 +199,25 @@ public class TileSoulBinder extends AbstractPoweredTaskEntity implements IHaveEx
setCapacitor(CAP_THREE);
break;
case CRYSTALLINE_CAPACITOR:
break;
case ENDERGETIC_CAPACITOR:
break;
case ENDERGISED_CAPACITOR:
setCapacitor(CAP_FOUR);
break;
case MELODIC_CAPACITOR:
break;
case SILVER_CAPACITOR:
setCapacitor(CAP_FIVE);
break;
case STELLAR_CAPACITOR:
setCapacitor(CAP_SIX);
break;
case TOTEMIC_CAPACITOR:
setCapacitor(CAP_SEVEN);
break;
case SILVER_CAPACITOR:
setCapacitor(CAP_EIGHT);
break;
case ENDERGETIC_CAPACITOR:
setCapacitor(CAP_NINE);
break;
case ENDERGISED_CAPACITOR:
setCapacitor(CAP_TEN);
break;
default:
break;
@@ -25,7 +25,8 @@ public class TilePoweredSpawner extends AbstractPoweredTaskEntity {
public static final int MAX_SPAWN_DELAY_BASE = Config.poweredSpawnerMaxDelayTicks;
public static final int POWER_PER_TICK_ONE = Config.poweredSpawnerLevelOnePowerPerTickRF;
private static final BasicCapacitor CAP_ONE = new BasicCapacitor(0, (int) (POWER_PER_TICK_ONE * 1.25), Capacitors.BASIC_CAPACITOR.capacitor.getMaxEnergyStored());
private static final BasicCapacitor CAP_ONE = new BasicCapacitor(0, (int) (POWER_PER_TICK_ONE * 1.25),
Capacitors.BASIC_CAPACITOR.capacitor.getMaxEnergyStored());
public static final int POWER_PER_TICK_TWO = Config.poweredSpawnerLevelTwoPowerPerTickRF;
private static final BasicCapacitor CAP_TWO = new BasicCapacitor(0,(int) (POWER_PER_TICK_TWO * 1.25),
@@ -35,6 +36,34 @@ public class TilePoweredSpawner extends AbstractPoweredTaskEntity {
private static final BasicCapacitor CAP_THREE = new BasicCapacitor(0,(int) (POWER_PER_TICK_THREE * 1.25),
Capacitors.ENDER_CAPACITOR.capacitor.getMaxEnergyStored());
public static final int POWER_PER_TICK_FOUR = Config.poweredSpawnerLevelFourPowerPerTickRF;
private static final BasicCapacitor CAP_FOUR = new BasicCapacitor(0,(int) (POWER_PER_TICK_FOUR * 1.25),
Capacitors.CRYSTALLINE_CAPACITOR.capacitor.getMaxEnergyStored());
public static final int POWER_PER_TICK_FIVE = Config.poweredSpawnerLevelFivePowerPerTickRF;
private static final BasicCapacitor CAP_FIVE = new BasicCapacitor(0,(int) (POWER_PER_TICK_FIVE * 1.25),
Capacitors.MELODIC_CAPACITOR.capacitor.getMaxEnergyStored());
public static final int POWER_PER_TICK_SIX = Config.poweredSpawnerLevelSixPowerPerTickRF;
private static final BasicCapacitor CAP_SIX = new BasicCapacitor(0,(int) (POWER_PER_TICK_SIX * 1.25),
Capacitors.STELLAR_CAPACITOR.capacitor.getMaxEnergyStored());
public static final int POWER_PER_TICK_SEVEN = Config.poweredSpawnerLevelSevenPowerPerTickRF;
private static final BasicCapacitor CAP_SEVEN = new BasicCapacitor(0,(int) (POWER_PER_TICK_SEVEN * 1.25),
Capacitors.TOTEMIC_CAPACITOR.capacitor.getMaxEnergyStored());
public static final int POWER_PER_TICK_EIGHT = Config.poweredSpawnerLevelEightPowerPerTickRF;
private static final BasicCapacitor CAP_EIGHT = new BasicCapacitor(0,(int) (POWER_PER_TICK_EIGHT * 1.25),
Capacitors.SILVER_CAPACITOR.capacitor.getMaxEnergyStored());
public static final int POWER_PER_TICK_NINE = Config.poweredSpawnerLevelNinePowerPerTickRF;
private static final BasicCapacitor CAP_NINE = new BasicCapacitor(0,(int) (POWER_PER_TICK_NINE * 1.25),
Capacitors.ENDERGETIC_CAPACITOR.capacitor.getMaxEnergyStored());
public static final int POWER_PER_TICK_TEN = Config.poweredSpawnerLevelTenPowerPerTickRF;
private static final BasicCapacitor CAP_TEN = new BasicCapacitor(0,(int) (POWER_PER_TICK_TEN * 1.25),
Capacitors.ENDERGISED_CAPACITOR.capacitor.getMaxEnergyStored());
public static final int MIN_PLAYER_DISTANCE = Config.poweredSpawnerMaxPlayerDistance;
public static final boolean USE_VANILLA_SPAWN_CHECKS = Config.poweredSpawnerUseVanillaSpawChecks;
@@ -99,6 +128,34 @@ public class TilePoweredSpawner extends AbstractPoweredTaskEntity {
refCap = CAP_THREE;
basePowerUse = POWER_PER_TICK_THREE;
break;
case CRYSTALLINE_CAPACITOR:
refCap = CAP_FOUR;
basePowerUse = POWER_PER_TICK_FOUR;
break;
case MELODIC_CAPACITOR:
refCap = CAP_FIVE;
basePowerUse = POWER_PER_TICK_FIVE;
break;
case STELLAR_CAPACITOR:
refCap = CAP_SIX;
basePowerUse = POWER_PER_TICK_SIX;
break;
case TOTEMIC_CAPACITOR:
refCap = CAP_SEVEN;
basePowerUse = POWER_PER_TICK_SEVEN;
break;
case SILVER_CAPACITOR:
refCap = CAP_EIGHT;
basePowerUse = POWER_PER_TICK_EIGHT;
break;
case ENDERGETIC_CAPACITOR:
refCap = CAP_NINE;
basePowerUse = POWER_PER_TICK_NINE;
break;
case ENDERGISED_CAPACITOR:
refCap = CAP_TEN;
basePowerUse = POWER_PER_TICK_TEN;
break;
}
double multiplier = PoweredSpawnerConfig.getInstance().getCostMultiplierFor(getEntityName());
setCapacitor(new BasicCapacitor((int) (refCap.getMaxEnergyExtracted() * multiplier), refCap.getMaxEnergyStored()));
@@ -211,11 +268,7 @@ public class TilePoweredSpawner extends AbstractPoweredTaskEntity {
} else {
ticksDelay = TilePoweredSpawner.MAX_SPAWN_DELAY_BASE - ((TilePoweredSpawner.MAX_SPAWN_DELAY_BASE - TilePoweredSpawner.MIN_SPAWN_DELAY_BASE) / 2);
}
if(getCapacitorType().ordinal() == 1) {
ticksDelay /= 2;
} else if(getCapacitorType().ordinal() == 2) {
ticksDelay /= 4;
}
ticksDelay >>= Math.min(3, getCapacitor().getTier() - 1);
int powerPerTick = getPowerUsePerTick();
res.setRequiredEnergy(powerPerTick * ticksDelay);
return res;