and some more fixes

This commit is contained in:
Boblet 2024-04-18 14:56:08 +02:00
parent d25a350efa
commit 3460e8dcef
7 changed files with 111 additions and 50 deletions

View File

@ -1,4 +1,7 @@
## Changed
* Large models no longer use display lists, instead their rendering makes use of the more modern VBO system
* Models using VBOs should now render slightly faster
* This also fixes an issue with Angelica where certain parts of the model would render transparently
* All pylons and electrical connectors are now dyeable, using any dye (even modded ones, based on ore dict) to change the color of the cable
* Colors are based on the connecting pylon, not the cables themselves, meaning that using one dye will change all wires connected to that pylon right up to the half way point
* Glyphid behemoths now spew sulfuric acid instead of hydrogen peroxide
@ -12,8 +15,16 @@
* Emeralds can now be mined as bedrock ores with a weight of 50 (half as common as iron, as common as redstone)
* Tritium lamps are now substantially cheaper
* Glyphid scouts can now spawn during the day when rampant glyphid spawning is enabled (artificial light however will still prevent them from spawning, keeping them out of bases)
* Balefire now has a much higher ignition radius
* Balefire becomes darker the more it spreads, making it possible to gauge how much further or if at all the balefire will spread
* The comparator output range of the pile fuel rods has been adjusted, allowing rods to be ejected exactly when they turn into bred uranium rods
## Fixed
* Fixed rocket artillery turret not saving loaded ammo type/count
* Fixed crash caused by custom missile launchers operating without designator
* Fixed meltdown elementals rendering their beam in the NEI spawner screen, causing extreme lag or the game to freeze
* Fixed meltdown elementals rendering their beam in the NEI spawner screen, causing extreme lag or the game to freeze
* Fixed certain incompatibilities with Angelica, like machine models being transparent and connected texture blocks not rendering at all
* (Hopefully) fixed the issue of balefire spreading forever for good
* Fixed stirling engines not outputting into cables
* Power buffers (i.e. things that act as both providers and receivers in the same network) now have the lowest sending priority (sending priority didn't exist until now), preventing them from wasting transfer capacity by ping-ponging before all other relevant parts of the network are done transferring
* Fixed potential issue causing diodes to consume negative energy

View File

@ -1,21 +1,48 @@
mod_version=1.0.27
# Empty build number makes a release type
mod_build_number=4936
mod_build_number=4939
credits=HbMinecraft, rodolphito (explosion algorithms), grangerave (explosion algorithms),\
\ Hoboy (textures, models), Doctor17 (russian localization), Drillgon200 (effects, models,\
\ porting), UFFR (RTGs, guns, casings, euphemium capacitor), Pu-238 (Tom impact effects), Bismarck\
\ (chinese localization), Frooz (models), Minecreep (models), VT-6/24 (models, textures), Pheo (textures,\
\ various machines, models, weapons), Vær (gas centrifuges, better worldgen, ZIRNOX, CP-1 parts, starter guide),\
\ Adam29 (liquid petroleum, ethanol, electric furnace), Pashtet (russian localization), MartinTheDragon\
\ (calculator, chunk-based fallout, bendable cranes, pipe improvements), haru315 (spiral point algorithm),\
\ Sten89 (models), Pixelguru26 (textures), TheBlueHat (textures), Alcater (GUI textures, porting), impbk2002\
\ (project settings), Nos (models), Burningwater202 (laminate glass), OvermindDL1 (project settings), TehTemmie\
\ (reacher radiation function), Toshayo (satellite loot system, project settings, gradle curse task), Silly541\
\ (config for safe ME drives), Voxelstice (OpenComputers integration, turbine spinup), BallOfEnergy1\
\ (OpenComputers integration), martemen (project settings), Pvndols (thorium fuel recipe, gas turbine),\
\ JamesH2 (blood mechanics, nitric acid, particle emitter), sdddddf80 (recipe configs, chinese localization,\
\ custom machine holograms, I18n improvements), SuperCraftAlex (tooltips) LePeep (coilgun model, BDCL QC),\
\ 70k (textures, glyphid AI, strand caster), Maksymisio (polish localization) Ice-Arrow (research reactor tweaks),\
\ 245tt (anvil GUI improvements), MellowArpeggiation (new animation system, turbine sounds, sound fixes,\
\ industrial lights, better particle diodes), FOlkvangrField (custom machine parts), KoblizekXD (doors)
credits=HbMinecraft,\
\ rodolphito (explosion algorithms),\
\ grangerave (explosion algorithms),\
\ Hoboy (textures, models),\
\ Drillgon200 (effects, models, porting),\
\ MartinTheDragon (calculator, chunk-based fallout, bendable cranes, pipe improvements, PWR sounds),\
\ Alcater (GUI textures, porting),\
\ MellowArpeggiation (new animation system, turbine sounds, sound fixes, industrial lights, better particle diodes),\
\ Pheo (textures, various machines, models, weapons),\
\ Vær (gas centrifuges, better worldgen, ZIRNOX, CP-1 parts, starter guide),\
\ LePeep (coilgun model, BDCL QC),\
\ Adam29 (liquid petroleum, ethanol, electric furnace),\
\ Pvndols (thorium fuel recipe, gas turbine),\
\ JamesH2 (blood mechanics, nitric acid, particle emitter),\
\ Doctor17 (russian localization)),\
\ Pashtet (russian localization),\
\ Bismarck (chinese localization),\
\ Maksymisio (polish localization)\
\ Pu-238 (Tom impact effects),\
\ UFFR (RTGs, guns, casings, euphemium capacitor),\
\ Frooz (models),\
\ VT-6/24 (models, textures),\
\ Nos (models),\
\ Minecreep (models),\
\ 70k (textures, glyphid AI, strand caster),\
\ haru315 (spiral point algorithm),\
\ Sten89 (models),\
\ Pixelguru26 (textures),\
\ TheBlueHat (textures),\
\ Burningwater202 (laminate glass),\
\ TehTemmie (reacher radiation function),\
\ Silly541 (config for safe ME drives),\
\ Voxelstice (OpenComputers integration, turbine spinup),\
\ BallOfEnergy1 (OpenComputers integration),\
\ martemen (project settings),\
\ sdddddf80 (recipe configs, chinese localization, custom machine holograms),\
\ SuperCraftAlex (tooltips)\
\ Ice-Arrow (research reactor tweaks),\
\ 245tt (anvil GUI improvements),\
\ KoblizekXD (doors),\
\ FOlkvangrField (custom machine parts),\
\ Toshayo (satellite loot system, project settings, gradle curse task),\
\ OvermindDL1 (project settings),\
\ impbk2002 (project settings),\

View File

@ -150,8 +150,19 @@ public class PowerNetMK2 {
if(toTransfer > transferCap) toTransfer = transferCap;
if(toTransfer <= 0) return;
List<IEnergyProviderMK2> providers = new ArrayList() {{ addAll(providerEntries.keySet()); }};
List<IEnergyReceiverMK2> receivers = new ArrayList() {{ addAll(receiverEntries.keySet()); }};
List<IEnergyProviderMK2> buffers = new ArrayList();
List<IEnergyProviderMK2> providers = new ArrayList();
Set<IEnergyReceiverMK2> receiverSet = receiverEntries.keySet();
for(IEnergyProviderMK2 provider : providerEntries.keySet()) {
if(receiverSet.contains(provider)) {
buffers.add(provider);
} else {
providers.add(provider);
}
}
providers.addAll(buffers); //makes buffers go last
List<IEnergyReceiverMK2> receivers = new ArrayList() {{ addAll(receiverSet); }};
receivers.sort(COMP);
int maxIteration = 1000;
@ -237,7 +248,7 @@ public class PowerNetMK2 {
for(IEnergyReceiverMK2 dest : receiverEntries.keySet()) {
long pd = priorityDemand[dest.getPriority().ordinal()];
long toFill = Math.min((long) ((double) (Math.min(dest.getMaxPower() - dest.getPower(), dest.getReceiverSpeed())) * (double) power / (double) pd), dest.getReceiverSpeed());
toFill = Math.min(toFill, power);
toFill = Math.min(toFill, finalRemainder);
long remainder = dest.transferPower(toFill);
long transferred = toFill - remainder;
finalRemainder -= transferred;

View File

@ -7,8 +7,10 @@ import static net.minecraftforge.common.util.ForgeDirection.SOUTH;
import static net.minecraftforge.common.util.ForgeDirection.UP;
import static net.minecraftforge.common.util.ForgeDirection.WEST;
import java.awt.Color;
import java.util.Random;
import com.hbm.blocks.ModBlocks;
import com.hbm.potion.HbmPotion;
import cpw.mods.fml.relauncher.Side;
@ -47,9 +49,9 @@ public class Balefire extends BlockFire {
return icon;
}
@Override
public void updateTick(World world, int x, int y, int z, Random rand) {
if(world.getGameRules().getGameRuleBooleanValue("doFireTick")) {
boolean onNetherrack = world.getBlock(x, y - 1, z).isFireSource(world, x, y - 1, z, UP);
if(!this.canPlaceBlockAt(world, x, y, z)) {
world.setBlockToAir(x, y, z);
@ -57,12 +59,10 @@ public class Balefire extends BlockFire {
int meta = world.getBlockMetadata(x, y, z);
world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world) + rand.nextInt(10));
if(meta < 15) world.scheduleBlockUpdate(x, y, z, this, this.tickRate(world) + rand.nextInt(10));
if(!onNetherrack && !this.canNeighborBurn(world, x, y, z)) {
if(!World.doesBlockHaveSolidTopSurface(world, x, y - 1, z)) {
world.setBlockToAir(x, y, z);
}
if(!this.canNeighborBurn(world, x, y, z) && !World.doesBlockHaveSolidTopSurface(world, x, y - 1, z)) {
world.setBlockToAir(x, y, z);
} else {
if(meta < 15) {
this.tryCatchFire(world, x + 1, y, z, 500, rand, meta, WEST);
@ -71,31 +71,33 @@ public class Balefire extends BlockFire {
this.tryCatchFire(world, x, y + 1, z, 300, rand, meta, DOWN);
this.tryCatchFire(world, x, y, z - 1, 500, rand, meta, SOUTH);
this.tryCatchFire(world, x, y, z + 1, 500, rand, meta, NORTH);
}
int h = 3;
for(int i1 = x - 1; i1 <= x + 1; ++i1) {
for(int j1 = z - 1; j1 <= z + 1; ++j1) {
for(int k1 = y - 1; k1 <= y + 4; ++k1) {
if(i1 != x || k1 != y || j1 != z) {
int l1 = 100;
for(int ix = x - h; ix <= x + h; ++ix) {
for(int iz = z - h; iz <= z + h; ++iz) {
for(int iy = y - 1; iy <= y + 4; ++iy) {
if(ix != x || iy != y || iz != z) {
int fireLimit = 100;
if(k1 > y + 1) {
l1 += (k1 - (y + 1)) * 100;
}
if(iy > y + 1) {
fireLimit += (iy - (y + 1)) * 100;
}
if(world.getBlock(ix, iy, iz) == ModBlocks.balefire && world.getBlockMetadata(ix, iy, iz) > meta + 1) {
world.setBlock(ix, iy, iz, this, meta + 1, 3);
continue;
}
int i2 = this.getChanceOfNeighborsEncouragingFire(world, i1, k1, j1);
int neighborFireChance = this.getChanceOfNeighborsEncouragingFire(world, ix, iy, iz);
if(i2 > 0) {
int j2 = (i2 + 40 + world.difficultySetting.getDifficultyId() * 7) / (meta + 30);
if(neighborFireChance > 0) {
int adjustedFireChance = (neighborFireChance + 40 + world.difficultySetting.getDifficultyId() * 7) / (meta + 30);
if(j2 > 0 && rand.nextInt(l1) <= j2) {
int k2 = meta + rand.nextInt(5) / 4;
if(k2 > 15) {
k2 = 15;
if(adjustedFireChance > 0 && rand.nextInt(fireLimit) <= adjustedFireChance) {
world.setBlock(ix, iy, iz, this, meta + 1, 3);
}
world.setBlock(i1, k1, j1, this, k2, 3);
}
}
}
@ -156,5 +158,15 @@ public class Balefire extends BlockFire {
if(entity instanceof EntityLivingBase) ((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation.id, 5 * 20, 9));
}
@SideOnly(Side.CLIENT)
public int colorMultiplier(IBlockAccess world, int x, int y, int z) {
int meta = world.getBlockMetadata(x, y, z);
return Color.HSBtoRGB(0F, 0F, 1F - meta / 30F);
}
@Override
public int getRenderType() {
return 1;
}
}

View File

@ -47,7 +47,7 @@ public class BlockGraphiteFuel extends BlockGraphiteDrilledTE implements IToolab
@Override
public int getComparatorInputOverride(World world, int x, int y, int z, int side) {
TileEntityPileFuel pile = (TileEntityPileFuel)world.getTileEntity(x, y, z);
return MathHelper.clamp_int((pile.progress * 16) / (pile.maxProgress - 1000), 0, 15); //potentially wip
return MathHelper.clamp_int((pile.progress * 15) / (pile.maxProgress - 1000), 0, 15);
}
@Override

View File

@ -3,7 +3,7 @@ package com.hbm.lib;
public class RefStrings {
public static final String MODID = "hbm";
public static final String NAME = "Hbm's Nuclear Tech Mod";
public static final String VERSION = "1.0.27 BETA (4936)";
public static final String VERSION = "1.0.27 BETA (4939)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version

View File

@ -46,6 +46,7 @@ public class TileEntityStirling extends TileEntityLoadedBase implements INBTPack
if(!worldObj.isRemote) {
if(hasCog) {
this.powerBuffer = 0;
tryPullHeat();
this.powerBuffer = (long) (this.heat * (this.isCreative() ? 1 : this.efficiency));
@ -97,7 +98,6 @@ public class TileEntityStirling extends TileEntityLoadedBase implements INBTPack
for(DirPos pos : getConPos()) {
this.tryProvide(worldObj, pos.getX(), pos.getY(), pos.getZ(), pos.getDir());
}
this.powerBuffer = 0;
} else {
if(this.powerBuffer > 0)