mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-03-10 03:35:36 +00:00
Meteorite configs, AGP support for diesel gen, selenium functionality
This commit is contained in:
parent
6e9ebe5d52
commit
52ee2538d0
@ -31,7 +31,7 @@ public class GUIMachineDiesel extends GuiInfoContainer {
|
||||
super.drawScreen(mouseX, mouseY, f);
|
||||
|
||||
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 69 - 52, 16, 52);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 69 - 52, 16, 52, diFurnace.power, diFurnace.maxPower);
|
||||
this.drawElectricityInfo(this, mouseX, mouseY, guiLeft + 152, guiTop + 69 - 52, 16, 52, diFurnace.power, diFurnace.powerCap);
|
||||
|
||||
String[] text = new String[] { "Accepted Fuels:",
|
||||
" Diesel (500 HE/t)",
|
||||
|
||||
@ -395,6 +395,8 @@ public class MainRegistry
|
||||
public static boolean enableMeteorStrikes = true;
|
||||
public static boolean enableMeteorShowers = true;
|
||||
public static boolean enableMeteorTails = true;
|
||||
public static boolean enableSpecialMeteors = true;
|
||||
|
||||
public static int uraniumSpawn = 7;
|
||||
public static int titaniumSpawn = 8;
|
||||
public static int sulfurSpawn = 5;
|
||||
@ -1248,6 +1250,7 @@ public class MainRegistry
|
||||
enableMeteorStrikes = config.get(Configuration.CATEGORY_GENERAL, "1.09_enableMeteorStrikes", true).getBoolean(true);
|
||||
enableMeteorShowers = config.get(Configuration.CATEGORY_GENERAL, "1.10_enableMeteorShowers", true).getBoolean(true);
|
||||
enableMeteorTails = config.get(Configuration.CATEGORY_GENERAL, "1.11_enableMeteorTails", true).getBoolean(true);
|
||||
enableSpecialMeteors = config.get(Configuration.CATEGORY_GENERAL, "1.12_enableSpecialMeteors", true).getBoolean(true);
|
||||
|
||||
Property PuraniumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.00_uraniumSpawnrate", 7);
|
||||
PuraniumSpawn.comment = "Ammount of uranium ore veins per chunk";
|
||||
|
||||
@ -7,6 +7,7 @@ import com.hbm.tileentity.bomb.TileEntityTurretCheapo;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSBase;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
||||
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
||||
import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine;
|
||||
|
||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||
@ -105,7 +106,15 @@ public class AuxGaugePacket implements IMessage {
|
||||
if (te instanceof TileEntityMachineSeleniumEngine) {
|
||||
TileEntityMachineSeleniumEngine selenium = (TileEntityMachineSeleniumEngine)te;
|
||||
|
||||
if(m.id == 0)
|
||||
selenium.pistonCount = m.value;
|
||||
if(m.id == 1)
|
||||
selenium.powerCap = m.value;
|
||||
}
|
||||
if (te instanceof TileEntityMachineDiesel) {
|
||||
TileEntityMachineDiesel selenium = (TileEntityMachineDiesel)te;
|
||||
|
||||
selenium.powerCap = m.value;
|
||||
}
|
||||
|
||||
} catch (Exception x) { }
|
||||
|
||||
@ -14,6 +14,7 @@ import com.hbm.items.ModItems;
|
||||
import com.hbm.items.special.ItemBattery;
|
||||
import com.hbm.lib.Library;
|
||||
import com.hbm.packet.AuxElectricityPacket;
|
||||
import com.hbm.packet.AuxGaugePacket;
|
||||
import com.hbm.packet.PacketDispatcher;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@ -238,6 +239,7 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento
|
||||
generate();
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, (int)powerCap, 0));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -31,8 +31,8 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
||||
|
||||
public long power;
|
||||
public int soundCycle = 0;
|
||||
public static final long maxPower = 100000;
|
||||
public long powerCap = 100000;
|
||||
public static final long maxPower = 250000;
|
||||
public long powerCap = 250000;
|
||||
public int age = 0;
|
||||
public List<IConsumer> list = new ArrayList();
|
||||
public FluidTank tank;
|
||||
@ -230,10 +230,12 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
||||
// Battery Item
|
||||
power = Library.chargeItemsFromTE(slots, 13, power, powerCap);
|
||||
|
||||
if(this.pistonCount > 2)
|
||||
generate();
|
||||
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, pistonCount, 0));
|
||||
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, (int)powerCap, 1));
|
||||
}
|
||||
}
|
||||
|
||||
@ -286,21 +288,18 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
||||
|
||||
if (soundCycle >= 3)
|
||||
soundCycle = 0;
|
||||
//if (this.superTimer > 0)
|
||||
// soundCycle = 0;
|
||||
|
||||
tank.setFill(tank.getFill() - 10);
|
||||
tank.setFill(tank.getFill() - this.pistonCount * 10);
|
||||
if (tank.getFill() < 0)
|
||||
tank.setFill(0);
|
||||
|
||||
if (power + getHEFromFuel() <= powerCap) {
|
||||
power += getHEFromFuel();
|
||||
} else {
|
||||
power += getHEFromFuel() * Math.pow(this.pistonCount, 1.15D);
|
||||
|
||||
if(power > powerCap)
|
||||
power = powerCap;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void ffgeua(int x, int y, int z, boolean newTact) {
|
||||
|
||||
@ -34,6 +34,7 @@ public class Meteorite {
|
||||
e.attackEntityFrom(ModDamageSource.meteorite, 1000);
|
||||
}
|
||||
|
||||
if(MainRegistry.enableSpecialMeteors)
|
||||
switch(rand.nextInt(300)) {
|
||||
case 0:
|
||||
//Meteor-only tiny meteorite
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user