mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +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);
|
super.drawScreen(mouseX, mouseY, f);
|
||||||
|
|
||||||
diFurnace.tank.renderTankInfo(this, mouseX, mouseY, guiLeft + 80, guiTop + 69 - 52, 16, 52);
|
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:",
|
String[] text = new String[] { "Accepted Fuels:",
|
||||||
" Diesel (500 HE/t)",
|
" Diesel (500 HE/t)",
|
||||||
|
|||||||
@ -395,6 +395,8 @@ public class MainRegistry
|
|||||||
public static boolean enableMeteorStrikes = true;
|
public static boolean enableMeteorStrikes = true;
|
||||||
public static boolean enableMeteorShowers = true;
|
public static boolean enableMeteorShowers = true;
|
||||||
public static boolean enableMeteorTails = true;
|
public static boolean enableMeteorTails = true;
|
||||||
|
public static boolean enableSpecialMeteors = true;
|
||||||
|
|
||||||
public static int uraniumSpawn = 7;
|
public static int uraniumSpawn = 7;
|
||||||
public static int titaniumSpawn = 8;
|
public static int titaniumSpawn = 8;
|
||||||
public static int sulfurSpawn = 5;
|
public static int sulfurSpawn = 5;
|
||||||
@ -1248,6 +1250,7 @@ public class MainRegistry
|
|||||||
enableMeteorStrikes = config.get(Configuration.CATEGORY_GENERAL, "1.09_enableMeteorStrikes", true).getBoolean(true);
|
enableMeteorStrikes = config.get(Configuration.CATEGORY_GENERAL, "1.09_enableMeteorStrikes", true).getBoolean(true);
|
||||||
enableMeteorShowers = config.get(Configuration.CATEGORY_GENERAL, "1.10_enableMeteorShowers", 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);
|
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);
|
Property PuraniumSpawn = config.get(Configuration.CATEGORY_GENERAL, "2.00_uraniumSpawnrate", 7);
|
||||||
PuraniumSpawn.comment = "Ammount of uranium ore veins per chunk";
|
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.TileEntityAMSBase;
|
||||||
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
import com.hbm.tileentity.machine.TileEntityAMSEmitter;
|
||||||
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
import com.hbm.tileentity.machine.TileEntityAMSLimiter;
|
||||||
|
import com.hbm.tileentity.machine.TileEntityMachineDiesel;
|
||||||
import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine;
|
import com.hbm.tileentity.machine.TileEntityMachineSeleniumEngine;
|
||||||
|
|
||||||
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
import cpw.mods.fml.common.network.simpleimpl.IMessage;
|
||||||
@ -104,8 +105,16 @@ public class AuxGaugePacket implements IMessage {
|
|||||||
}
|
}
|
||||||
if (te instanceof TileEntityMachineSeleniumEngine) {
|
if (te instanceof TileEntityMachineSeleniumEngine) {
|
||||||
TileEntityMachineSeleniumEngine selenium = (TileEntityMachineSeleniumEngine)te;
|
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.pistonCount = m.value;
|
selenium.powerCap = m.value;
|
||||||
}
|
}
|
||||||
|
|
||||||
} catch (Exception x) { }
|
} catch (Exception x) { }
|
||||||
|
|||||||
@ -14,6 +14,7 @@ import com.hbm.items.ModItems;
|
|||||||
import com.hbm.items.special.ItemBattery;
|
import com.hbm.items.special.ItemBattery;
|
||||||
import com.hbm.lib.Library;
|
import com.hbm.lib.Library;
|
||||||
import com.hbm.packet.AuxElectricityPacket;
|
import com.hbm.packet.AuxElectricityPacket;
|
||||||
|
import com.hbm.packet.AuxGaugePacket;
|
||||||
import com.hbm.packet.PacketDispatcher;
|
import com.hbm.packet.PacketDispatcher;
|
||||||
|
|
||||||
import net.minecraft.entity.player.EntityPlayer;
|
import net.minecraft.entity.player.EntityPlayer;
|
||||||
@ -238,6 +239,7 @@ public class TileEntityMachineDiesel extends TileEntity implements ISidedInvento
|
|||||||
generate();
|
generate();
|
||||||
|
|
||||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
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 long power;
|
||||||
public int soundCycle = 0;
|
public int soundCycle = 0;
|
||||||
public static final long maxPower = 100000;
|
public static final long maxPower = 250000;
|
||||||
public long powerCap = 100000;
|
public long powerCap = 250000;
|
||||||
public int age = 0;
|
public int age = 0;
|
||||||
public List<IConsumer> list = new ArrayList();
|
public List<IConsumer> list = new ArrayList();
|
||||||
public FluidTank tank;
|
public FluidTank tank;
|
||||||
@ -230,10 +230,12 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
|||||||
// Battery Item
|
// Battery Item
|
||||||
power = Library.chargeItemsFromTE(slots, 13, power, powerCap);
|
power = Library.chargeItemsFromTE(slots, 13, power, powerCap);
|
||||||
|
|
||||||
generate();
|
if(this.pistonCount > 2)
|
||||||
|
generate();
|
||||||
|
|
||||||
PacketDispatcher.wrapper.sendToAll(new AuxElectricityPacket(xCoord, yCoord, zCoord, power));
|
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, pistonCount, 0));
|
||||||
|
PacketDispatcher.wrapper.sendToAll(new AuxGaugePacket(xCoord, yCoord, zCoord, (int)powerCap, 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -286,18 +288,15 @@ public class TileEntityMachineSeleniumEngine extends TileEntity implements ISide
|
|||||||
|
|
||||||
if (soundCycle >= 3)
|
if (soundCycle >= 3)
|
||||||
soundCycle = 0;
|
soundCycle = 0;
|
||||||
//if (this.superTimer > 0)
|
|
||||||
// soundCycle = 0;
|
|
||||||
|
|
||||||
tank.setFill(tank.getFill() - 10);
|
tank.setFill(tank.getFill() - this.pistonCount * 10);
|
||||||
if (tank.getFill() < 0)
|
if (tank.getFill() < 0)
|
||||||
tank.setFill(0);
|
tank.setFill(0);
|
||||||
|
|
||||||
if (power + getHEFromFuel() <= powerCap) {
|
power += getHEFromFuel() * Math.pow(this.pistonCount, 1.15D);
|
||||||
power += getHEFromFuel();
|
|
||||||
} else {
|
if(power > powerCap)
|
||||||
power = powerCap;
|
power = powerCap;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,121 +34,122 @@ public class Meteorite {
|
|||||||
e.attackEntityFrom(ModDamageSource.meteorite, 1000);
|
e.attackEntityFrom(ModDamageSource.meteorite, 1000);
|
||||||
}
|
}
|
||||||
|
|
||||||
switch(rand.nextInt(300)) {
|
if(MainRegistry.enableSpecialMeteors)
|
||||||
case 0:
|
switch(rand.nextInt(300)) {
|
||||||
//Meteor-only tiny meteorite
|
case 0:
|
||||||
List<ItemStack> list0 = new ArrayList<ItemStack>();
|
//Meteor-only tiny meteorite
|
||||||
list0.add(new ItemStack(ModBlocks.block_meteor));
|
List<ItemStack> list0 = new ArrayList<ItemStack>();
|
||||||
generateBox(world, rand, x, y, z, list0);
|
list0.add(new ItemStack(ModBlocks.block_meteor));
|
||||||
return;
|
generateBox(world, rand, x, y, z, list0);
|
||||||
case 1:
|
return;
|
||||||
//Large ore-only meteorite
|
case 1:
|
||||||
List<ItemStack> list1 = new ArrayList<ItemStack>();
|
//Large ore-only meteorite
|
||||||
list1.addAll(this.getRandomOre(rand));
|
List<ItemStack> list1 = new ArrayList<ItemStack>();
|
||||||
int i = list1.size();
|
list1.addAll(this.getRandomOre(rand));
|
||||||
for(int j = 0; j < i; j++)
|
int i = list1.size();
|
||||||
list1.add(new ItemStack(Blocks.stone));
|
for(int j = 0; j < i; j++)
|
||||||
generateSphere7x7(world, rand, x, y, z, list1);
|
list1.add(new ItemStack(Blocks.stone));
|
||||||
return;
|
generateSphere7x7(world, rand, x, y, z, list1);
|
||||||
case 2:
|
return;
|
||||||
//Medium ore-only meteorite
|
case 2:
|
||||||
List<ItemStack> list2 = new ArrayList<ItemStack>();
|
//Medium ore-only meteorite
|
||||||
list2.addAll(this.getRandomOre(rand));
|
List<ItemStack> list2 = new ArrayList<ItemStack>();
|
||||||
int k = list2.size() / 2;
|
list2.addAll(this.getRandomOre(rand));
|
||||||
for(int j = 0; j < k; j++)
|
int k = list2.size() / 2;
|
||||||
list2.add(new ItemStack(Blocks.stone));
|
for(int j = 0; j < k; j++)
|
||||||
generateSphere5x5(world, rand, x, y, z, list2);
|
list2.add(new ItemStack(Blocks.stone));
|
||||||
return;
|
generateSphere5x5(world, rand, x, y, z, list2);
|
||||||
case 3:
|
return;
|
||||||
//Small pure ore meteorite
|
case 3:
|
||||||
List<ItemStack> list3 = new ArrayList<ItemStack>();
|
//Small pure ore meteorite
|
||||||
list3.addAll(this.getRandomOre(rand));
|
List<ItemStack> list3 = new ArrayList<ItemStack>();
|
||||||
generateBox(world, rand, x, y, z, list3);
|
list3.addAll(this.getRandomOre(rand));
|
||||||
return;
|
generateBox(world, rand, x, y, z, list3);
|
||||||
case 4:
|
return;
|
||||||
//Bamboozle
|
case 4:
|
||||||
world.createExplosion(null, x + 0.5, y + 0.5, z + 0.5, 15F, true);
|
//Bamboozle
|
||||||
ExplosionLarge.spawnRubble(world, x, y, z, 25);
|
world.createExplosion(null, x + 0.5, y + 0.5, z + 0.5, 15F, true);
|
||||||
return;
|
ExplosionLarge.spawnRubble(world, x, y, z, 25);
|
||||||
case 5:
|
return;
|
||||||
//Large treasure-only meteorite
|
case 5:
|
||||||
List<ItemStack> list4 = new ArrayList<ItemStack>();
|
//Large treasure-only meteorite
|
||||||
list4.add(new ItemStack(ModBlocks.block_meteor_treasure));
|
List<ItemStack> list4 = new ArrayList<ItemStack>();
|
||||||
list4.add(new ItemStack(ModBlocks.block_meteor_broken));
|
list4.add(new ItemStack(ModBlocks.block_meteor_treasure));
|
||||||
generateSphere7x7(world, rand, x, y, z, list4);
|
list4.add(new ItemStack(ModBlocks.block_meteor_broken));
|
||||||
return;
|
generateSphere7x7(world, rand, x, y, z, list4);
|
||||||
case 6:
|
return;
|
||||||
//Medium treasure-only meteorite
|
case 6:
|
||||||
List<ItemStack> list5 = new ArrayList<ItemStack>();
|
//Medium treasure-only meteorite
|
||||||
list5.add(new ItemStack(ModBlocks.block_meteor_treasure));
|
List<ItemStack> list5 = new ArrayList<ItemStack>();
|
||||||
list5.add(new ItemStack(ModBlocks.block_meteor_treasure));
|
list5.add(new ItemStack(ModBlocks.block_meteor_treasure));
|
||||||
list5.add(new ItemStack(ModBlocks.block_meteor_broken));
|
list5.add(new ItemStack(ModBlocks.block_meteor_treasure));
|
||||||
generateSphere5x5(world, rand, x, y, z, list5);
|
list5.add(new ItemStack(ModBlocks.block_meteor_broken));
|
||||||
return;
|
generateSphere5x5(world, rand, x, y, z, list5);
|
||||||
case 7:
|
return;
|
||||||
//Small pure treasure meteorite
|
case 7:
|
||||||
List<ItemStack> list6 = new ArrayList<ItemStack>();
|
//Small pure treasure meteorite
|
||||||
list6.add(new ItemStack(ModBlocks.block_meteor_treasure));
|
List<ItemStack> list6 = new ArrayList<ItemStack>();
|
||||||
generateBox(world, rand, x, y, z, list6);
|
list6.add(new ItemStack(ModBlocks.block_meteor_treasure));
|
||||||
return;
|
generateBox(world, rand, x, y, z, list6);
|
||||||
case 8:
|
return;
|
||||||
//Large nuclear meteorite
|
case 8:
|
||||||
List<ItemStack> list7 = new ArrayList<ItemStack>();
|
//Large nuclear meteorite
|
||||||
list7.add(new ItemStack(ModBlocks.block_meteor_treasure));
|
List<ItemStack> list7 = new ArrayList<ItemStack>();
|
||||||
List<ItemStack> list8 = new ArrayList<ItemStack>();
|
list7.add(new ItemStack(ModBlocks.block_meteor_treasure));
|
||||||
list8.add(new ItemStack(ModBlocks.toxic_block));
|
List<ItemStack> list8 = new ArrayList<ItemStack>();
|
||||||
generateSphere7x7(world, rand, x, y, z, list7);
|
list8.add(new ItemStack(ModBlocks.toxic_block));
|
||||||
generateSphere5x5(world, rand, x, y, z, list8);
|
generateSphere7x7(world, rand, x, y, z, list7);
|
||||||
return;
|
generateSphere5x5(world, rand, x, y, z, list8);
|
||||||
case 9:
|
return;
|
||||||
//Giant ore meteorite
|
case 9:
|
||||||
List<ItemStack> list9 = new ArrayList<ItemStack>();
|
//Giant ore meteorite
|
||||||
list9.add(new ItemStack(ModBlocks.block_meteor_broken));
|
List<ItemStack> list9 = new ArrayList<ItemStack>();
|
||||||
generateSphere9x9(world, rand, x, y, z, list9);
|
list9.add(new ItemStack(ModBlocks.block_meteor_broken));
|
||||||
generateSphere7x7(world, rand, x, y, z, this.getRandomOre(rand));
|
generateSphere9x9(world, rand, x, y, z, list9);
|
||||||
return;
|
generateSphere7x7(world, rand, x, y, z, this.getRandomOre(rand));
|
||||||
case 10:
|
return;
|
||||||
//Tainted Meteorite
|
case 10:
|
||||||
List<ItemStack> list10 = new ArrayList<ItemStack>();
|
//Tainted Meteorite
|
||||||
list10.add(new ItemStack(ModBlocks.block_meteor_broken));
|
List<ItemStack> list10 = new ArrayList<ItemStack>();
|
||||||
generateSphere5x5(world, rand, x, y, z, list10);
|
list10.add(new ItemStack(ModBlocks.block_meteor_broken));
|
||||||
world.setBlock(x, y, z, ModBlocks.taint);
|
generateSphere5x5(world, rand, x, y, z, list10);
|
||||||
return;
|
world.setBlock(x, y, z, ModBlocks.taint);
|
||||||
case 11:
|
return;
|
||||||
//Atomic meteorite
|
case 11:
|
||||||
EntityNukeExplosionMK3 entity0 = new EntityNukeExplosionMK3(world);
|
//Atomic meteorite
|
||||||
entity0.posX = x + 0.5D;
|
EntityNukeExplosionMK3 entity0 = new EntityNukeExplosionMK3(world);
|
||||||
entity0.posY = y + 0.5D;
|
entity0.posX = x + 0.5D;
|
||||||
entity0.posZ = z + 0.5D;
|
entity0.posY = y + 0.5D;
|
||||||
entity0.destructionRange = MainRegistry.fatmanRadius;
|
entity0.posZ = z + 0.5D;
|
||||||
entity0.speed = MainRegistry.blastSpeed;
|
entity0.destructionRange = MainRegistry.fatmanRadius;
|
||||||
entity0.coefficient = 10.0F;
|
entity0.speed = MainRegistry.blastSpeed;
|
||||||
|
entity0.coefficient = 10.0F;
|
||||||
world.spawnEntityInWorld(entity0);
|
|
||||||
if(MainRegistry.polaroidID == 11)
|
world.spawnEntityInWorld(entity0);
|
||||||
if(rand.nextInt(100) >= 0)
|
if(MainRegistry.polaroidID == 11)
|
||||||
{
|
if(rand.nextInt(100) >= 0)
|
||||||
ExplosionParticleB.spawnMush(world, x, y - 3, z);
|
{
|
||||||
} else {
|
ExplosionParticleB.spawnMush(world, x, y - 3, z);
|
||||||
ExplosionParticle.spawnMush(world, x, y - 3, z);
|
} else {
|
||||||
}
|
ExplosionParticle.spawnMush(world, x, y - 3, z);
|
||||||
else
|
}
|
||||||
if(rand.nextInt(100) == 0)
|
else
|
||||||
{
|
if(rand.nextInt(100) == 0)
|
||||||
ExplosionParticleB.spawnMush(world, x, y - 3, z);
|
{
|
||||||
} else {
|
ExplosionParticleB.spawnMush(world, x, y - 3, z);
|
||||||
ExplosionParticle.spawnMush(world, x, y - 3, z);
|
} else {
|
||||||
}
|
ExplosionParticle.spawnMush(world, x, y - 3, z);
|
||||||
return;
|
}
|
||||||
case 12:
|
return;
|
||||||
//Star Blaster
|
case 12:
|
||||||
world.createExplosion(null, x + 0.5, y + 0.5, z + 0.5, 10F, true);
|
//Star Blaster
|
||||||
ItemStack stack = new ItemStack(ModItems.gun_b92);
|
world.createExplosion(null, x + 0.5, y + 0.5, z + 0.5, 10F, true);
|
||||||
stack.setStackDisplayName("§9Star Blaster§r");
|
ItemStack stack = new ItemStack(ModItems.gun_b92);
|
||||||
EntityItem blaster = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, stack);
|
stack.setStackDisplayName("§9Star Blaster§r");
|
||||||
world.spawnEntityInWorld(blaster);
|
EntityItem blaster = new EntityItem(world, x + 0.5, y + 0.5, z + 0.5, stack);
|
||||||
return;
|
world.spawnEntityInWorld(blaster);
|
||||||
}
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
switch(rand.nextInt(3)) {
|
switch(rand.nextInt(3)) {
|
||||||
case 0:
|
case 0:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user