more intuitive foundry tank outlet functionality, higher oil yields

This commit is contained in:
Boblet 2022-12-06 16:56:35 +01:00
parent 7c4031320f
commit f8f31f28d4
11 changed files with 82 additions and 10 deletions

View File

@ -27,7 +27,9 @@ public class FoundryTank extends BlockContainer implements ICrucibleAcceptor {
@SideOnly(Side.CLIENT) public IIcon iconTop;
@SideOnly(Side.CLIENT) public IIcon iconSide;
@SideOnly(Side.CLIENT) public IIcon iconSideOutlet;
@SideOnly(Side.CLIENT) public IIcon iconSideUpper;
@SideOnly(Side.CLIENT) public IIcon iconSideUpperOutlet;
@SideOnly(Side.CLIENT) public IIcon iconBottom;
@SideOnly(Side.CLIENT) public IIcon iconInner;
@SideOnly(Side.CLIENT) public IIcon iconLava;
@ -42,7 +44,9 @@ public class FoundryTank extends BlockContainer implements ICrucibleAcceptor {
super.registerBlockIcons(iconRegister);
this.iconTop = iconRegister.registerIcon(RefStrings.MODID + ":foundry_tank_top");
this.iconSide = iconRegister.registerIcon(RefStrings.MODID + ":foundry_tank_side");
this.iconSideOutlet = iconRegister.registerIcon(RefStrings.MODID + ":foundry_tank_side_outlet");
this.iconSideUpper = iconRegister.registerIcon(RefStrings.MODID + ":foundry_tank_upper");
this.iconSideUpperOutlet = iconRegister.registerIcon(RefStrings.MODID + ":foundry_tank_upper_outlet");
this.iconBottom = iconRegister.registerIcon(RefStrings.MODID + ":foundry_tank_bottom");
this.iconInner = iconRegister.registerIcon(RefStrings.MODID + ":foundry_tank_inner");
this.iconLava = iconRegister.registerIcon(RefStrings.MODID + ":lava_gray");

View File

@ -29,8 +29,8 @@ public class WorldConfig {
public static int gasbubbleSpawn = 4;
public static int explosivebubbleSpawn = 8;
public static int cobaltSpawn = 2;
public static int oilSpawn = 25;
public static int bedrockOilSpawn = 50;
public static int oilSpawn = 100;
public static int bedrockOilSpawn = 200;
public static int ironClusterSpawn = 4;
public static int titaniumClusterSpawn = 2;
@ -119,8 +119,8 @@ public class WorldConfig {
cobaltSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.18_cobaltSpawnRate", "Amount of cobalt ore veins per chunk", 2);
explosivebubbleSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.19_explosiveBubbleSpawnRate", "Spawns an explosive gas bubble every nTH chunk", 8);
alexandriteSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.20_alexandriteSpawnRate", "Spawns an alexandrite vein every nTH chunk", 100);
oilSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.21_oilSpawnRate", "Spawns an oil bubble every nTH chunk", 25);
bedrockOilSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.22_bedrockOilSpawnRate", "Spawns a bedrock oil node every nTH chunk", 50);
oilSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.21_oilSpawnRate", "Spawns an oil bubble every nTH chunk", 100);
bedrockOilSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.22_bedrockOilSpawnRate", "Spawns a bedrock oil node every nTH chunk", 200);
ironClusterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.C00_ironClusterSpawn", "Amount of iron cluster veins per chunk", 4);
titaniumClusterSpawn = CommonConfig.createConfigInt(config, CATEGORY_OREGEN, "2.C01_titaniumClusterSpawn", "Amount of titanium cluster veins per chunk", 2);

View File

@ -582,7 +582,7 @@ public class HbmWorldGen implements IWorldGenerator {
int randPosY = rand.nextInt(25);
int randPosZ = j + rand.nextInt(16);
OilBubble.spawnOil(world, randPosX, randPosY, randPosZ, 7 + rand.nextInt(9));
OilBubble.spawnOil(world, randPosX, randPosY, randPosZ, 10 + rand.nextInt(7));
}
if(WorldConfig.bedrockOilSpawn > 0 && rand.nextInt(WorldConfig.bedrockOilSpawn) == 0) {

View File

@ -6,6 +6,7 @@ import org.lwjgl.opengl.GL11;
import com.hbm.blocks.ModBlocks;
import com.hbm.blocks.machine.FoundryTank;
import com.hbm.lib.Library;
import com.hbm.tileentity.machine.TileEntityFoundryTank;
import cpw.mods.fml.client.registry.ISimpleBlockRenderingHandler;
@ -92,6 +93,11 @@ public class RenderFoundryTank implements ISimpleBlockRenderingHandler {
boolean conNegZ = world.getBlock(x, y, z - 1) == ModBlocks.foundry_tank;
boolean conPosY = world.getBlock(x, y + 1, z) == ModBlocks.foundry_tank;
boolean conNegY = world.getBlock(x, y - 1, z) == ModBlocks.foundry_tank;
boolean outPosX = world.getBlock(x + 1, y, z) == ModBlocks.foundry_outlet && world.getBlockMetadata(x + 1, y, z) == Library.POS_X.ordinal();
boolean outNegX = world.getBlock(x - 1, y, z) == ModBlocks.foundry_outlet && world.getBlockMetadata(x - 1, y, z) == Library.NEG_X.ordinal();
boolean outPosZ = world.getBlock(x, y, z + 1) == ModBlocks.foundry_outlet && world.getBlockMetadata(x, y, z + 1) == Library.POS_Z.ordinal();
boolean outNegZ = world.getBlock(x, y, z - 1) == ModBlocks.foundry_outlet && world.getBlockMetadata(x, y, z - 1) == Library.NEG_Z.ordinal();
boolean doRender = tile != null ? (tile.amount > 0 && tile.type != null) : false;
double max = 0.75D + (conNegY ? 0.125D : 0) + (conPosY ? 0.125D : 0);
@ -120,7 +126,7 @@ public class RenderFoundryTank implements ISimpleBlockRenderingHandler {
if(!conPosX) {
renderer.setRenderBounds(0.875D, 0D, 0D, 1D, 1D, 1D);
tessellator.setColorOpaque_F(r * mulX, g * mulX, b * mulX);
renderer.renderFaceXPos(block, x, y, z, conNegY ? tank.iconSideUpper : tank.iconSide);
renderer.renderFaceXPos(block, x, y, z, conNegY ? (outPosX ? tank.iconSideUpperOutlet : tank.iconSideUpper) : (outPosX ? tank.iconSideOutlet : tank.iconSide));
renderer.renderFaceXNeg(block, x, y, z, conPosY ? tank.iconBottom : tank.iconInner);
tessellator.setColorOpaque_F(r * mulZ, g * mulZ, b * mulZ);
@ -135,7 +141,7 @@ public class RenderFoundryTank implements ISimpleBlockRenderingHandler {
renderer.setRenderBounds(0D, 0D, 0D, 0.125D, 1D, 1D);
tessellator.setColorOpaque_F(r * mulX, g * mulX, b * mulX);
renderer.renderFaceXPos(block, x, y, z, conPosY ? tank.iconBottom : tank.iconInner);
renderer.renderFaceXNeg(block, x, y, z, conNegY ? tank.iconSideUpper : tank.iconSide);
renderer.renderFaceXNeg(block, x, y, z, conNegY ? (outNegX ? tank.iconSideUpperOutlet : tank.iconSideUpper) : (outNegX ? tank.iconSideOutlet : tank.iconSide));
tessellator.setColorOpaque_F(r * mulZ, g * mulZ, b * mulZ);
if(conPosZ) renderer.renderFaceZPos(block, x, y, z, conPosY ? tank.iconBottom : tank.iconInner);
@ -148,7 +154,7 @@ public class RenderFoundryTank implements ISimpleBlockRenderingHandler {
if(!conPosZ) {
renderer.setRenderBounds(0D, 0D, 0.875D, 1D, 1D, 1D);
tessellator.setColorOpaque_F(r * mulZ, g * mulZ, b * mulZ);
renderer.renderFaceZPos(block, x, y, z, conNegY ? tank.iconSideUpper : tank.iconSide);
renderer.renderFaceZPos(block, x, y, z, conNegY ? (outPosZ ? tank.iconSideUpperOutlet : tank.iconSideUpper) : (outPosZ ? tank.iconSideOutlet : tank.iconSide));
renderer.renderFaceZNeg(block, x, y, z, conPosY ? tank.iconBottom : tank.iconInner);
tessellator.setColorOpaque_F(r * mulX, g * mulX, b * mulX);
@ -163,7 +169,7 @@ public class RenderFoundryTank implements ISimpleBlockRenderingHandler {
renderer.setRenderBounds(0D, 0D, 0D, 1D, 1D, 0.125D);
tessellator.setColorOpaque_F(r * mulZ, g * mulZ, b * mulZ);
renderer.renderFaceZPos(block, x, y, z, conPosY ? tank.iconBottom : tank.iconInner);
renderer.renderFaceZNeg(block, x, y, z, conNegY ? tank.iconSideUpper : tank.iconSide);
renderer.renderFaceZNeg(block, x, y, z, conNegY ? (outNegZ ? tank.iconSideUpperOutlet : tank.iconSideUpper) : (outNegZ ? tank.iconSideOutlet : tank.iconSide));
tessellator.setColorOpaque_F(r * mulX, g * mulX, b * mulX);
if(conPosX) renderer.renderFaceXPos(block, x, y, z, conPosY ? tank.iconBottom : tank.iconInner);

View File

@ -25,6 +25,7 @@ public class TileEntityMachineFrackingTower extends TileEntityOilDrillBase imple
protected static int oilPerDepsoit = 1000;
protected static int gasPerDepositMin = 100;
protected static int gasPerDepositMax = 500;
protected static double drainChance = 0.02D;
protected static int oilPerBedrockDepsoit = 100;
protected static int gasPerBedrockDepositMin = 10;
protected static int gasPerBedrockDepositMax = 50;
@ -99,6 +100,10 @@ public class TileEntityMachineFrackingTower extends TileEntityOilDrillBase imple
if(b == ModBlocks.ore_oil) {
oil = oilPerDepsoit;
gas = gasPerDepositMin + worldObj.rand.nextInt(gasPerDepositMax - gasPerDepositMin + 1);
if(worldObj.rand.nextDouble() < drainChance) {
worldObj.setBlock(x, y, z, ModBlocks.ore_oil_empty);
}
}
if(b == ModBlocks.ore_bedrock_oil) {
oil = oilPerBedrockDepsoit;
@ -175,6 +180,7 @@ public class TileEntityMachineFrackingTower extends TileEntityOilDrillBase imple
oilPerDepsoit = IConfigurableMachine.grab(obj, "I:oilPerDeposit", oilPerDepsoit);
gasPerDepositMin = IConfigurableMachine.grab(obj, "I:gasPerDepositMin", gasPerDepositMin);
gasPerDepositMax = IConfigurableMachine.grab(obj, "I:gasPerDepositMax", gasPerDepositMax);
drainChance = IConfigurableMachine.grab(obj, "D:drainChance", drainChance);
oilPerBedrockDepsoit = IConfigurableMachine.grab(obj, "I:oilPerBedrockDeposit", oilPerBedrockDepsoit);
gasPerBedrockDepositMin = IConfigurableMachine.grab(obj, "I:gasPerBedrockDepositMin", gasPerBedrockDepositMin);
gasPerBedrockDepositMax = IConfigurableMachine.grab(obj, "I:gasPerBedrockDepositMax", gasPerBedrockDepositMax);
@ -190,6 +196,7 @@ public class TileEntityMachineFrackingTower extends TileEntityOilDrillBase imple
writer.name("I:oilPerDeposit").value(oilPerDepsoit);
writer.name("I:gasPerDepositMin").value(gasPerDepositMin);
writer.name("I:gasPerDepositMax").value(gasPerDepositMax);
writer.name("D:drainChance").value(drainChance);
writer.name("I:oilPerBedrockDeposit").value(oilPerBedrockDepsoit);
writer.name("I:gasPerBedrockDepositMin").value(gasPerBedrockDepositMin);
writer.name("I:gasPerBedrockDepositMax").value(gasPerBedrockDepositMax);

View File

@ -24,6 +24,7 @@ public class TileEntityMachineOilWell extends TileEntityOilDrillBase {
protected static int oilPerDepsoit = 500;
protected static int gasPerDepositMin = 100;
protected static int gasPerDepositMax = 500;
protected static double drainChance = 0.05D;
@Override
public String getName() {
@ -85,6 +86,10 @@ public class TileEntityMachineOilWell extends TileEntityOilDrillBase {
if(this.tanks[0].getFill() > this.tanks[0].getMaxFill()) this.tanks[0].setFill(tanks[0].getMaxFill());
this.tanks[1].setFill(this.tanks[1].getFill() + (gasPerDepositMin + worldObj.rand.nextInt((gasPerDepositMax - gasPerDepositMin + 1))));
if(this.tanks[1].getFill() > this.tanks[1].getMaxFill()) this.tanks[1].setFill(tanks[1].getMaxFill());
if(worldObj.rand.nextDouble() < drainChance) {
worldObj.setBlock(x, y, z, ModBlocks.ore_oil_empty);
}
}
@Override
@ -137,6 +142,7 @@ public class TileEntityMachineOilWell extends TileEntityOilDrillBase {
oilPerDepsoit = IConfigurableMachine.grab(obj, "I:oilPerDeposit", oilPerDepsoit);
gasPerDepositMin = IConfigurableMachine.grab(obj, "I:gasPerDepositMin", gasPerDepositMin);
gasPerDepositMax = IConfigurableMachine.grab(obj, "I:gasPerDepositMax", gasPerDepositMax);
drainChance = IConfigurableMachine.grab(obj, "D:drainChance", drainChance);
}
@Override
@ -147,5 +153,6 @@ public class TileEntityMachineOilWell extends TileEntityOilDrillBase {
writer.name("I:oilPerDeposit").value(oilPerDepsoit);
writer.name("I:gasPerDepositMin").value(gasPerDepositMin);
writer.name("I:gasPerDepositMax").value(gasPerDepositMax);
writer.name("D:drainChance").value(drainChance);
}
}

View File

@ -25,6 +25,7 @@ public class TileEntityMachinePumpjack extends TileEntityOilDrillBase {
protected static int oilPerDepsoit = 750;
protected static int gasPerDepositMin = 50;
protected static int gasPerDepositMax = 250;
protected static double drainChance = 0.025D;
public float rot = 0;
public float prevRot = 0;
@ -120,6 +121,10 @@ public class TileEntityMachinePumpjack extends TileEntityOilDrillBase {
if(this.tanks[0].getFill() > this.tanks[0].getMaxFill()) this.tanks[0].setFill(tanks[0].getMaxFill());
this.tanks[1].setFill(this.tanks[1].getFill() + (gasPerDepositMin + worldObj.rand.nextInt((gasPerDepositMax - gasPerDepositMin + 1))));
if(this.tanks[1].getFill() > this.tanks[1].getMaxFill()) this.tanks[1].setFill(tanks[1].getMaxFill());
if(worldObj.rand.nextDouble() < drainChance) {
worldObj.setBlock(x, y, z, ModBlocks.ore_oil_empty);
}
}
@Override
@ -187,6 +192,7 @@ public class TileEntityMachinePumpjack extends TileEntityOilDrillBase {
oilPerDepsoit = IConfigurableMachine.grab(obj, "I:oilPerDeposit", oilPerDepsoit);
gasPerDepositMin = IConfigurableMachine.grab(obj, "I:gasPerDepositMin", gasPerDepositMin);
gasPerDepositMax = IConfigurableMachine.grab(obj, "I:gasPerDepositMax", gasPerDepositMax);
drainChance = IConfigurableMachine.grab(obj, "D:drainChance", drainChance);
}
@Override
@ -197,5 +203,6 @@ public class TileEntityMachinePumpjack extends TileEntityOilDrillBase {
writer.name("I:oilPerDeposit").value(oilPerDepsoit);
writer.name("I:gasPerDepositMin").value(gasPerDepositMin);
writer.name("I:gasPerDepositMax").value(gasPerDepositMax);
writer.name("D:drainChance").value(drainChance);
}
}

View File

@ -253,7 +253,6 @@ public abstract class TileEntityOilDrillBase extends TileEntityMachineBase imple
if(worldObj.getBlock(x, y, z) == ModBlocks.ore_oil) {
onSuck(x, y, z);
worldObj.setBlock(x, y, z, ModBlocks.ore_oil_empty);
}
}

View File

@ -380,6 +380,48 @@ book_lore.memo_schrab_nuke.page.1=Our most recent investigation led us to the ef
book_lore.memo_schrab_nuke.page.2=Only our cyclotron has actually created saralloy previously. However, at our underground shot at Everwerpen, miniscule traces of saralloy were found in uranium ore at the site. All pure, metallic uranium nearby had fissioned.
book_lore.memo_schrab_nuke.page.3=As such, given enough uranium ore concentrated around an explosive, or perhaps even a dirty bomb rich in waste containing fissionable material, one could hypothetically create enough saralloy to collect manually.
book_lore.insanity_1.name=Torn Page
book_lore.insanity_1.author=D Ferguson
book_lore.insanity_1.page.1=August 6th $ $ Months, no, years worth of dicking about wrestling with investors and operating the greatest energy hog in the northern hemisphere has finally paid off.
book_lore.insanity_1.page.2=While we aren't entirely sure what exactly we found - given we ran gigavolt collisions on particles that were still poorly documented - the results couldn't have been more exciting.
book_lore.insanity_1.page.3=We haven't found a name for whatever it is we've found, nor are we sure if we're looking at a new type of particle, a wormhole leading into another dimension, or satan's anus, but I'm sure our PR people can come up with something.
book_lore.insanity_2.name=Torn Page
book_lore.insanity_2.author=D Ferguson
book_lore.insanity_2.page.1=August 8th $ $ We've kept "The Thing" (yes that's what we call it for now) in magnetic isolation for the past days. Spectroscopy tests ended up breaking our spectrometer, but we managed to gain some useful data.
book_lore.insanity_2.page.2=For starters, this thing glows like a christmas tree, radiation photons of about every wavelength you could think of enveloped by a powerful infrared corona. The logical conclusion is that looking at it with your naked
book_lore.insanity_2.page.3=eye would most likely kill you. Now that begs the question: How can a particle this tiny radiate such immense energy? What are you hiding, little man?
book_lore.insanity_3.name=Torn Page
book_lore.insanity_3.author=D Ferguson
book_lore.insanity_3.page.1=August 22nd $ $ I haven't slept right in days. Doc said he couldn't find anything. Been on all sorts of medication now, but the headaches only get worse. Lab boys suspect it might be contamination from the incident two weeks ago.
book_lore.insanity_3.page.2=Doc said it's not that likely, ARS is different. I might need to take some time off if this continues. The Thing is still in containment, the lab boys speculate if the field goes down, the entire complex turns into a mushroom cloud.
book_lore.insanity_3.page.3=I'm not sure how administration can keep this calm, but i don't get paid enough to waste thoughts on that.
book_lore.insanity_4.name=Torn Page
book_lore.insanity_4.author=D Ferguson
book_lore.insanity_4.page.1=August 28th $ $ They denied my request for leave and I've been pushing through the past few days. Headaches are getting worse. I'm not the only one who's feeling it, either. Some of the lab boys are in a similar situation.
book_lore.insanity_4.page.2=All the while The Thing has left the complex - GOOD. Some suits came in yesterday and had it shipped off, god knows where. One of the lab boys, Zachary, said they're probably burying the containment vessel in the desert, slowly
book_lore.insanity_4.page.3=trying to "fizzle out" The Thing far off from civilization. I say let's shoot it into space. Needless to say, our investors cut all funding for the time being. I should start looking for another job.
book_lore.insanity_5.name=Torn Page
book_lore.insanity_5.author=D Ferguson
book_lore.insanity_5.page.1=September 11th $ $ I'm having this re-occurring nightmare. I'm walking around in an open space and there's these people everywhere, people in rubber suits and freakishly deformed faces. It's always the same nightmare,
book_lore.insanity_5.page.2=and one of the guys from the lab I've spoken with lately has had the same dream. Meanwhile my post has been rather boring, the accelerator has been shut down, all ongoing projects are on halt and our budget is slowly melting away.
book_lore.insanity_5.page.3=Something is telling me that The Thing is still out there somewhere. I can feel it.
book_lore.insanity_6.name=Torn Page
book_lore.insanity_6.author=D Ferguson
book_lore.insanity_6.page.1=October 3rd $ $ Half the staff is dead, most of the rest is in the ICU. My condition hasn't changed in the past weeks, for better or worse.
book_lore.insanity_6.page.2=Reality is starting to feel less and less real however. Sometimes I look up into the sky at night and hallucinate that thing we discovered all those weeks ago.
book_lore.insanity_6.page.3=That same brilliant sheen of crimson that our spectrometer spat out. My doc says it's delirium and stress caused by the incident, and perhaps hes right, but the meds aren't working at all.
book_lore.insanity_7.name=Torn Page
book_lore.insanity_7.author=D Ferguson
book_lore.insanity_7.page.1=December 12th $ $ I've been out of a job, but to be honest I'm somewhat thankful about it. My old workplace has gone up in flames - or so they say.
book_lore.insanity_7.page.2=The seismological observatory a couple miles south recorded constant earthquakes for days on end, not that anyone else would have noticed this deep in the desert.
book_lore.insanity_7.page.3=I have concluded that this place was cursed, making everyone sick and then descending into hell like some sort of Edgar Allan Poe story. Good riddance.
cannery.f1=[ Press F1 for help ]
cannery.centrifuge=Gas Centrifuge

Binary file not shown.

After

Width:  |  Height:  |  Size: 652 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 686 B