mirror of
https://github.com/GTNewHorizons/Draconic-Evolution.git
synced 2026-11-21 20:52:19 +00:00
Added config options for Energy Infuser
This commit is contained in:
1 parent
2e8f0eb1e0
commit
81fcbdd35b
2 files changed
+19
-11
No files matched your search
+6
@@ -42,6 +42,8 @@ public class BalanceConfigHandler
|
||||
public static int draconicFireEnergyCostMultiptier = 30;
|
||||
public static int draconiumBlockEnergyToChange = 100000000;
|
||||
public static int draconiumBlockChargingSpeed = 10000000;
|
||||
public static int energyInfuserStorage = 10000000;
|
||||
public static int energyInfuserMaxTransfer = 10000000;
|
||||
public static int grinderInternalEnergyBufferSize = 20000;
|
||||
public static int grinderExternalEnergyBufferSize = 100000;
|
||||
public static int grinderMaxReceive = 32000;
|
||||
@@ -153,6 +155,10 @@ public class BalanceConfigHandler
|
||||
draconiumBlockEnergyToChange);
|
||||
draconiumBlockChargingSpeed =
|
||||
getInteger("energy.misc", "Draconium Block: Maximum charging speed (RF/t)", draconiumBlockChargingSpeed);
|
||||
energyInfuserStorage =
|
||||
getInteger("energy.machines", "Energy Infuser: Energy buffer size (RF)", energyInfuserStorage);
|
||||
energyInfuserMaxTransfer = getInteger("energy.machines", "Energy Infuser: Maximum energy transfer rate (RF/t)",
|
||||
energyInfuserMaxTransfer);
|
||||
grinderInternalEnergyBufferSize = getInteger("energy.machines", "Mob Grinder: Internal energy buffer size (RF)",
|
||||
grinderInternalEnergyBufferSize);
|
||||
grinderExternalEnergyBufferSize =
|
||||
|
||||
+13
-11
@@ -1,9 +1,12 @@
|
||||
package com.brandon3055.draconicevolution.common.tileentities;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import cofh.api.energy.IEnergyContainerItem;
|
||||
import cofh.api.energy.IEnergyReceiver;
|
||||
import com.brandon3055.draconicevolution.client.handler.ParticleHandler;
|
||||
import com.brandon3055.draconicevolution.client.render.particle.ParticleEnergy;
|
||||
import com.brandon3055.draconicevolution.common.handler.BalanceConfigHandler;
|
||||
import com.brandon3055.draconicevolution.common.lib.References;
|
||||
import com.brandon3055.draconicevolution.common.utills.EnergyStorage;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
@@ -17,15 +20,12 @@ import net.minecraft.network.Packet;
|
||||
import net.minecraft.network.play.server.S35PacketUpdateTileEntity;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
/**
|
||||
* Created by Brandon on 27/06/2014.
|
||||
*/
|
||||
public class TileEnergyInfuser extends TileObjectSync implements IEnergyReceiver, ISidedInventory {
|
||||
ItemStack[] items = new ItemStack[1];
|
||||
public EnergyStorage energy = new EnergyStorage(10000000);
|
||||
public int maxInput = 10000000;
|
||||
public EnergyStorage energy = new EnergyStorage(BalanceConfigHandler.energyInfuserStorage, BalanceConfigHandler.energyInfuserMaxTransfer);
|
||||
public boolean running = false;
|
||||
public boolean runningCach = false;
|
||||
private int tick = 0;
|
||||
@@ -38,15 +38,17 @@ public class TileEnergyInfuser extends TileObjectSync implements IEnergyReceiver
|
||||
|
||||
@Override
|
||||
public void updateEntity() {
|
||||
if (worldObj.isRemote && running) {
|
||||
rotation += 0.5F;
|
||||
if (rotation > 360F) rotation = 0;
|
||||
spawnParticles();
|
||||
if (worldObj.isRemote) {
|
||||
if (running) {
|
||||
rotation += 0.5F;
|
||||
if (rotation > 360F) {
|
||||
rotation = 0;
|
||||
}
|
||||
spawnParticles();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
if(worldObj.isRemote) return;
|
||||
|
||||
if (tick % 100 == 0) tryStartOrStop();
|
||||
if (tick % 400 == 0) detectAndSendChanges(true);
|
||||
|
||||
@@ -136,7 +138,7 @@ public class TileEnergyInfuser extends TileObjectSync implements IEnergyReceiver
|
||||
|
||||
@Override
|
||||
public int receiveEnergy(ForgeDirection from, int maxReceive, boolean simulate) {
|
||||
return this.energy.receiveEnergy(Math.min(maxInput, maxReceive), simulate);
|
||||
return this.energy.receiveEnergy(maxReceive, simulate);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user