From 691ff5c1d5fe1fc37b30362af1619d79b15aa3bc Mon Sep 17 00:00:00 2001 From: Boblet Date: Wed, 29 Jan 2025 16:37:12 +0100 Subject: [PATCH] floppotron --- changelog | 62 +------------------ .../machine/TileEntityBlastDoor.java | 3 +- .../machine/TileEntityMachineTurbineGas.java | 27 ++++---- .../machine/TileEntityVaultDoor.java | 5 +- 4 files changed, 18 insertions(+), 79 deletions(-) diff --git a/changelog b/changelog index e8ec49e66..0294b8609 100644 --- a/changelog +++ b/changelog @@ -1,63 +1,5 @@ -## Added -* Perfluoromethyl - * Can be used as a coolant for PWRs, ICFs, and RBMK fluid heaters - * Can be cooled into cold perflyoromethyl using two compressors to be used as coolant for particle accelerators - * Also required for soldering all control units - * Standard coolant will be removed soon in favor of perfloromethyl, however for now it continues to function just the same -# Particle accelerator - * A new and improved version of the old one - * Still a work in progress, the recipes will likely not work, the parts have no recipes and the coil balancing is still not done - * Instead of being assembled block by block with weird rules, the new PA is assembled from six different machine parts, similar to how RBMKs work -* Ammo casing bag - * Can be carried around in the inventory, will fill with empty casings when guns are fired - * Casings have a fixed 50% recovery rate and are based on the recipe - * Can also recover parts of non-standard ammo like plastic from capacitors and lead plates from uranium boxes - * Ammo that is used whole, like rockets and mini nukes, do not leave any casing behind - ## Changed -* The bedrock ore processor now has an NEI handler -* Boilers and crucibles will only consume as much heat from the source as they can actually accept instead of a fixed rate, preventing them from wasting excess heat -* Rockets can now be made with rocket fuel in addition to cordite (only requires one) -* The rocket recipes using cordite now use 3 pieces of smokeless powder instead of 2 -* Iron ore fragments now take 2x longer to process into steal using the rotary furnace, but require only a quarter of the steam per tick - * Little known secret: it is, indeed, possible to increase processing throughput by playing more than one machine. Either people don't know this, or they fear the immense cost of the rotary furnace, that being a few stone bricks, iron ingots and copper plates. Truly a king's ransom. -* Optimized rendering for conveyor belt items, each frame no longer creates a new item stack and item entity instance which need to be removed by the GC right after -* Changed fuel stats for HEAus, it's now a linear fuel with a multiplier of 35 with a heat/flux of 1.5°C -* Digamma RBMK fuel now lasts substantially longer -* RBMK dials now have gamerules for disabling rod depletion and xenon poison -* Changed the way bullet spread is calculated. Instead of the gun's innate inaccuracy being reduced by 75% when using sights, guns now have separate stats for innate inaccuracy (only relevant for things like SMG) as well as a hipfire penalty (roughly the same for all guns) - * This also includes a multiplier for ammo spread, which mainly concerns sawed-off shotguns (dual lever action shotguns, Broken and Sacred Dragon) and amplifies the inaccuracy for things like buckshot while slugs perform the same - * Guns that cannot be aimed (no sights, akimbo) or where aiming is only useful for special effects (missile launcher lockon, quad launcher steering) do not have a hipfire penalty -* Malachite now spawns in large deposits similar to hematite or bauxite, malachite veins are smaller than the others but way more common -* Malachite now drops malachite chunks, 3-4 by default. Malachite drops are subject to fortune, each level adding 1-2 extra chunks -* Malachite obtained by silk touch is now worth 6 ingots -* Malachite can be acidized with sulfuric acid into copper scraps with a 1:1 yield (instead of the crucible's 2:1) -* Limestone veins are now 50% larger -* The compressor now has a NEI handler for any non-generic recipe -* Removed compression recipes for steam, because why would you ever use those? -* Fluid tanks that use pressurized fluids now say "pressurized, use compressor!" to avoid confusion over what "1PU" means -* Damage should no longer register at all when the damage resistance is 100%, similar to how damage is completely nullified by DT (i.e. not even knockback is applied) -* Anvil construction recipes are now configurable via `hbmAnvil.json` -* Arc furnace recipe generation has changed - * Recipe collision should be fixed, since a recipe will now write its valid inputs to a list, if a subsequent recipe has an ingredient already present in the list, it will not be generated - * This means that NTM's custom recipes take precedent, and only some edge cases with vanilla furnace recipes are removed - * This means there is no more ambiguity in the NEI handler over what item smelts into what - * As a consequence, the arc furnace's recipe generator no longer accepts wildcard meta, in practice this likely doesn't matter since ores and ingots generally don't use wildcard recipes anyway - * Recipe lookups should be a tad faster due to a type change -* Foundry outlets will no longer pour material into a channel if any connected channel contains a different material. This means that it's not much harder to clog foundry channels with different materials, as the output (e.g. a crucible) will wait until the channel is clear before the next type of metal is being poured +* Blast doors will now pulverize any block that gets in their way during closing ## Fixed -* Fixed incorrect tooltip in the automatic control rod's GUI -* Fixed recipe autogen creating recipes for nonexistant thorium nether ore -* Fixed FBI agents spawning both the old and new bullet entities when firing -* Fixed dupe concerning one of the weapon abilities -* Fixed crates not sending a block update when the contents change, breaking redstone comparator functionality -* Fixed "unblockable" damage (like afterburn) not being covered by the "other" category of armor resistances, meaning things like DNT nano suits would get wrecked by phosphorus rounds -* Fixed most mini nuke variants not going off when hitting an entity while the nuke has been in the air for less than 3 ticks -* Gun damage now also does 0 points of vanilla damage, ensuring that certain entity events trigger, e.g. neutral mobs targeting the player -* Fixed items being deleted by the crucible when using hotbar shortcuts by disabling hotkey shortcuts entirely - * How about you shift-click like a normal person - * Hotkey shortcuts may return, but this requires a substantial rewrite of the container base code because vanilla's implementation is atrocious -* Fixed legendary crafting causing disconnects on servers -* Fixed a dupe caused by shift clicking -* Added more safeguards and range checks to ReaSim water calculation which might fix the issue of ReaSim water breaking completely +* Fixed the CCGT's steam output breaking as soon as the steam buffer runs full \ No newline at end of file diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityBlastDoor.java b/src/main/java/com/hbm/tileentity/machine/TileEntityBlastDoor.java index 5d52acb62..d3d78294e 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityBlastDoor.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityBlastDoor.java @@ -289,8 +289,7 @@ public class TileEntityBlastDoor extends TileEntityLockableBase { public boolean placeDummy(int x, int y, int z) { - if(!worldObj.getBlock(x, y, z).isReplaceable(worldObj, x, y, z)) - return false; + if(!worldObj.getBlock(x, y, z).isReplaceable(worldObj, x, y, z)) worldObj.func_147480_a(x, y, z, false); worldObj.setBlock(x, y, z, ModBlocks.dummy_block_blast); diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbineGas.java b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbineGas.java index 59081ba7c..2e320fb2e 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbineGas.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityMachineTurbineGas.java @@ -21,6 +21,7 @@ import com.hbm.sound.AudioWrapper; import com.hbm.tileentity.IFluidCopiable; import com.hbm.tileentity.IGUIProvider; import com.hbm.tileentity.TileEntityMachineBase; +import com.hbm.util.BobMathUtil; import com.hbm.util.CompatEnergyControl; import api.hbm.energymk2.IEnergyProviderMK2; @@ -61,6 +62,7 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement public int counter = 0; //used to startup and shutdown public int instantPowerOutput; + public double waterToBoil; public FluidTank[] tanks; @@ -94,6 +96,7 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement if(!worldObj.isRemote) { + waterToBoil = 0; //reset throttle = powerSliderPos * 100 / 60; if(slots[1] != null && slots[1].getItem() instanceof IItemFluidIdentifier) { @@ -344,8 +347,6 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement double fuelToConsume; //used to consume 1 mb of fuel at a time when consumption is <1 mb/tick - double waterToBoil; - double waterPerTick = 0; private void makePower(double consMax, int throttle) { @@ -391,19 +392,17 @@ public class TileEntityMachineTurbineGas extends TileEntityMachineBase implement } this.power += instantPowerOutput; - waterPerTick = (consMax * energy * (temp - tempIdle) / 220000); //it just works fuck you + double waterPerTick = (consMax * energy * (temp - tempIdle) / 220000); //it just works fuck you - if(tanks[2].getFill() >= Math.ceil(waterPerTick)) { //checks if there's enough water to boil - - waterToBoil += waterPerTick; - - if(tanks[3].getFill() <= 160000 - waterToBoil * 10) { //checks if there's room for steam in the tank - - tanks[2].setFill(tanks[2].getFill() - (int) Math.floor(waterToBoil)); - tanks[3].setFill(tanks[3].getFill() + 10 * (int) Math.floor(waterToBoil)); - waterToBoil -= (int) Math.floor(waterToBoil); - } - } + this.waterToBoil = waterPerTick; //caching in a field for the EC compat to use + + int heatCycles = (int) Math.floor(waterToBoil); + int waterCycles = tanks[2].getFill(); + int steamCycles = (tanks[3].getMaxFill() - tanks[3].getFill()) / 10; + int cycles = BobMathUtil.min(heatCycles, waterCycles, steamCycles); + + tanks[2].setFill(tanks[2].getFill() - cycles); + tanks[3].setFill(tanks[3].getFill() + cycles * 10); } ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/main/java/com/hbm/tileentity/machine/TileEntityVaultDoor.java b/src/main/java/com/hbm/tileentity/machine/TileEntityVaultDoor.java index 8fa592af5..90ce287aa 100644 --- a/src/main/java/com/hbm/tileentity/machine/TileEntityVaultDoor.java +++ b/src/main/java/com/hbm/tileentity/machine/TileEntityVaultDoor.java @@ -194,9 +194,8 @@ public class TileEntityVaultDoor extends TileEntityLockableBase { } public boolean placeDummy(int x, int y, int z) { - - if(!worldObj.getBlock(x, y, z).isReplaceable(worldObj, x, y, z)) - return false; + + if(!worldObj.getBlock(x, y, z).isReplaceable(worldObj, x, y, z)) worldObj.func_147480_a(x, y, z, false); worldObj.setBlock(x, y, z, ModBlocks.dummy_block_vault);