From 9875f5a9c28f88efca727445f8c12f1a62e236bd Mon Sep 17 00:00:00 2001 From: Boblet Date: Mon, 26 Jun 2023 16:12:58 +0200 Subject: [PATCH] small fixes, config options --- changelog | 15 +++++++++------ .../blocks/generic/BlockGlyphidSpawner.java | 11 ++++++----- .../hbm/blocks/machine/MachineExcavator.java | 5 ++++- src/main/java/com/hbm/config/MobConfig.java | 17 +++++++++++++++++ .../com/hbm/entity/mob/EntityFBIDrone.java | 4 ++-- src/main/java/com/hbm/lib/HbmWorldGen.java | 5 +++-- .../textures/gui/fluids/calcium_solution.png | Bin 0 -> 708 bytes 7 files changed, 41 insertions(+), 16 deletions(-) create mode 100644 src/main/resources/assets/hbm/textures/gui/fluids/calcium_solution.png diff --git a/changelog b/changelog index b31f60f2d..57cd7d610 100644 --- a/changelog +++ b/changelog @@ -2,15 +2,16 @@ * Glpyhids * Hives will spawn randomly in the world * Hives will constantly spawn new glyphids - * If explosed to soot, hives will create glyphid scouts, which when far enough from another hive will explode and generate a new hive + * If exposed to soot, hives will create glyphid scouts, which when far enough from another hive will explode and generate a new hive * Higher soot levels create stronger glyphids - * Glyphids possess armor which has a chance of breaking off and fully abrosrbing damage + * Glyphids possess armor which has a chance of breaking off and fully absorbing damage * Each glyphid has five armor plates * Glyphid types include multiple tiers of melee glyphids as well as a few ranged ones, the scout, and a nuclear variant * Compressor * Can compress fluids, turning them into higher pressure variants + * Higher pressure fluid can use the same ducts as regular fluids, connections work the same so long as the input tank can accept the higher pressure type * Can also turn steam into higher pressure types - * Vacuum refning now requires oil at 2 PU + * Vacuum refining now requires oil at 2 PU * Some chemical plant recipes also require compressed fluid, TATB requires sour gas at 1 PU and osmiridic solution requires hydrogen peroxide at 5 PU * A new rocket artillery ammo type that creates volcanic lava on impact * BDCL @@ -27,11 +28,11 @@ * The pollution detector now displays rounded values * More machines and especially destroyed ones now release soot * The iGen has been rebalanced again, delete your machine config file for the changes to take effect - * The lubrican power multiplier has been increased from 1.1 to 1.5 + * The lubricant power multiplier has been increased from 1.1 to 1.5 * The fluid divisor has been lowered from 5,000 to 1,000, meaning the iGen now burns flammable liquids at full efficiency * Removed the config for having an additional keybind for dashing, the keybind is now always active since it no longer conflicts with crouching * Crucible recipes no longer use foundry scraps to visualize the recipes, instead they use a lava-like texture -* Fusion reactors are now made from welded magnets which are created by weling a cast steel plate onto a magnet +* Fusion reactors are now made from welded magnets which are created by welding a cast steel plate onto a magnet * Due to the cost of the cast plates, fusion reactor magnets are now cheaper to compensate * Consequently, particle accelerators are now also cheaper due to being made from mostly fusion reactor magnets * The blowtorch now consumes only 250mB per operation, allowing for up to 16 things to be welded with a single fill @@ -48,4 +49,6 @@ * Fixed missiles leaving behind a 3x3 grid of loaded chunks after being destroyed * Fixed coal ore yielding coal in the crucible instead of making carbon * Fixed a potential issue where BuildCraft generators can't supply the RF to HE converter -* Fixed combustion engine sound sometimes continue playing even when turned off \ No newline at end of file +* Fixed combustion engine sound sometimes continue playing even when turned off +* Fixed large mining drill not properly performing a block check and potentially deleting blocks when placed +* Fixed calcium solution not having a fluid texture \ No newline at end of file diff --git a/src/main/java/com/hbm/blocks/generic/BlockGlyphidSpawner.java b/src/main/java/com/hbm/blocks/generic/BlockGlyphidSpawner.java index 7e9d805f5..8de0979ae 100644 --- a/src/main/java/com/hbm/blocks/generic/BlockGlyphidSpawner.java +++ b/src/main/java/com/hbm/blocks/generic/BlockGlyphidSpawner.java @@ -3,6 +3,7 @@ package com.hbm.blocks.generic; import java.util.List; import java.util.Random; +import com.hbm.config.MobConfig; import com.hbm.entity.mob.EntityGlyphid; import com.hbm.entity.mob.EntityGlyphidBehemoth; import com.hbm.entity.mob.EntityGlyphidBlaster; @@ -49,7 +50,7 @@ public class BlockGlyphidSpawner extends BlockContainer { this.worldObj.spawnEntityInWorld(glyphid); } - if(worldObj.rand.nextInt(20) == 0 && soot > 0) { + if(worldObj.rand.nextInt(20) == 0 && soot >= MobConfig.scoutThreshold) { EntityGlyphidScout scout = new EntityGlyphidScout(worldObj); scout.setLocationAndAngles(xCoord + 0.5, yCoord + 1, zCoord + 0.5, worldObj.rand.nextFloat() * 360.0F, 0.0F); this.worldObj.spawnEntityInWorld(scout); @@ -60,10 +61,10 @@ public class BlockGlyphidSpawner extends BlockContainer { public EntityGlyphid createGlyphid(float soot) { Random rand = new Random(); - if(soot < 1) return rand.nextInt(5) == 0 ? new EntityGlyphidBombardier(worldObj) : new EntityGlyphid(worldObj); - if(soot < 10) return rand.nextInt(5) == 0 ? new EntityGlyphidBombardier(worldObj) : new EntityGlyphidBrawler(worldObj); - if(soot < 50) return rand.nextInt(5) == 0 ? new EntityGlyphidBlaster(worldObj) : new EntityGlyphidBehemoth(worldObj); - if(soot < 100) return rand.nextInt(5) == 0 ? new EntityGlyphidBlaster(worldObj) : new EntityGlyphidBrenda(worldObj); + if(soot < MobConfig.tier2Threshold) return rand.nextInt(5) == 0 ? new EntityGlyphidBombardier(worldObj) : new EntityGlyphid(worldObj); + if(soot < MobConfig.tier3Threshold) return rand.nextInt(5) == 0 ? new EntityGlyphidBombardier(worldObj) : new EntityGlyphidBrawler(worldObj); + if(soot < MobConfig.tier4Threshold) return rand.nextInt(5) == 0 ? new EntityGlyphidBlaster(worldObj) : new EntityGlyphidBehemoth(worldObj); + if(soot < MobConfig.tier5Threshold) return rand.nextInt(5) == 0 ? new EntityGlyphidBlaster(worldObj) : new EntityGlyphidBrenda(worldObj); return rand.nextInt(3) == 0 ? new EntityGlyphidBlaster(worldObj) : new EntityGlyphidNuclear(worldObj); } diff --git a/src/main/java/com/hbm/blocks/machine/MachineExcavator.java b/src/main/java/com/hbm/blocks/machine/MachineExcavator.java index 0d27866a6..c91d6bb16 100644 --- a/src/main/java/com/hbm/blocks/machine/MachineExcavator.java +++ b/src/main/java/com/hbm/blocks/machine/MachineExcavator.java @@ -51,7 +51,10 @@ public class MachineExcavator extends BlockDummyable { y += dir.offsetY * o; z += dir.offsetZ * o; - return MultiblockHandlerXR.checkSpace(world, x, y, z, getDimensions(), x, y, z, dir); + return MultiblockHandlerXR.checkSpace(world, x, y, z, getDimensions(), x, y, z, dir) && + MultiblockHandlerXR.checkSpace(world, x, y, z, new int[] {-1, 3, 3, -2, 3, -2}, x, y, z, dir) && + MultiblockHandlerXR.checkSpace(world, x, y, z, new int[] {-1, 3, 3, -2, -2, 3}, x, y, z, dir) && + MultiblockHandlerXR.checkSpace(world, x, y, z, new int[] {-1, 3, -2, 3, 3, 3}, x, y, z, dir); } @Override diff --git a/src/main/java/com/hbm/config/MobConfig.java b/src/main/java/com/hbm/config/MobConfig.java index 5232b8351..1fce6249f 100644 --- a/src/main/java/com/hbm/config/MobConfig.java +++ b/src/main/java/com/hbm/config/MobConfig.java @@ -28,6 +28,15 @@ public class MobConfig { public static boolean enableDucks = true; public static boolean enableMobGear = true; + public static boolean enableHives = true; + public static int hiveSpawn = 128; + public static double scoutThreshold = 0.1; + public static double tier2Threshold = 1; + public static double tier3Threshold = 10; + public static double tier4Threshold = 50; + public static double tier5Threshold = 100; + + public static void loadFromConfig(Configuration config) { final String CATEGORY = CommonConfig.CATEGORY_MOBS; @@ -55,5 +64,13 @@ public class MobConfig { enableDucks = CommonConfig.createConfigBool(config, CATEGORY, "12.D00_enableDucks", "Whether pressing O should allow the player to duck", true); enableMobGear = CommonConfig.createConfigBool(config, CATEGORY, "12.D01_enableMobGear", "Whether zombies and skeletons should have additional gear when spawning", true); + + enableHives = CommonConfig.createConfigBool(config, CATEGORY, "12.G00_enableHives", "Whether glyphid hives should spawn", true); + hiveSpawn = CommonConfig.createConfigInt(config, CATEGORY, "12.G01_hiveSpawn", "The average amount of chunks per hive", 128); + scoutThreshold = CommonConfig.createConfigDouble(config, CATEGORY, "12.G02_scoutThreshold", "Minimum amount of soot for scouts to spawn", 0.1); + tier2Threshold = CommonConfig.createConfigDouble(config, CATEGORY, "12.G03_tier2Threshold", "Minimum amount of soot for tier 2 glyphids to spawn", 1); + tier3Threshold = CommonConfig.createConfigDouble(config, CATEGORY, "12.G04_tier3Threshold", "Minimum amount of soot for tier 3 glyphids to spawn", 10); + tier4Threshold = CommonConfig.createConfigDouble(config, CATEGORY, "12.G05_tier4Threshold", "Minimum amount of soot for tier 4 glyphids to spawn", 50); + tier5Threshold = CommonConfig.createConfigDouble(config, CATEGORY, "12.G06_tier5Threshold", "Minimum amount of soot for tier 5 glyphids to spawn", 100); } } diff --git a/src/main/java/com/hbm/entity/mob/EntityFBIDrone.java b/src/main/java/com/hbm/entity/mob/EntityFBIDrone.java index b773cd3ff..97110b54f 100644 --- a/src/main/java/com/hbm/entity/mob/EntityFBIDrone.java +++ b/src/main/java/com/hbm/entity/mob/EntityFBIDrone.java @@ -1,6 +1,6 @@ package com.hbm.entity.mob; -import com.hbm.entity.grenade.EntityGrenadeGeneric; +import com.hbm.entity.grenade.EntityGrenadeStrong; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.util.Vec3; @@ -29,7 +29,7 @@ public class EntityFBIDrone extends EntityUFOBase { Vec3 vec = Vec3.createVectorHelper(posX - target.posX, posY - target.posY, posZ - target.posZ); if(Math.abs(vec.xCoord) < 5 && Math.abs(vec.zCoord) < 5 && vec.yCoord > 3) { attackCooldown = 60; - EntityGrenadeGeneric grenade = new EntityGrenadeGeneric(worldObj); + EntityGrenadeStrong grenade = new EntityGrenadeStrong(worldObj); grenade.setPosition(posX, posY, posZ); worldObj.spawnEntityInWorld(grenade); } diff --git a/src/main/java/com/hbm/lib/HbmWorldGen.java b/src/main/java/com/hbm/lib/HbmWorldGen.java index 04c41da43..6d2af30ab 100644 --- a/src/main/java/com/hbm/lib/HbmWorldGen.java +++ b/src/main/java/com/hbm/lib/HbmWorldGen.java @@ -7,6 +7,7 @@ import com.hbm.blocks.ModBlocks; import com.hbm.blocks.generic.BlockMotherOfAllOres; import com.hbm.blocks.generic.BlockNTMFlower.EnumFlowerType; import com.hbm.config.GeneralConfig; +import com.hbm.config.MobConfig; import com.hbm.config.WorldConfig; import com.hbm.items.ModItems; import com.hbm.main.MainRegistry; @@ -218,11 +219,11 @@ public class HbmWorldGen implements IWorldGenerator { if(GeneralConfig.enableDungeons && world.provider.isSurfaceWorld()) { - if(rand.nextInt(1000) == 0) { + if(MobConfig.enableHives && rand.nextInt(MobConfig.hiveSpawn) == 0) { int x = i + rand.nextInt(16) + 8; int z = j + rand.nextInt(16) + 8; int y = world.getHeightValue(x, z); - GlyphidHive.generate(world, x, y, z, rand); + if(world.getBlock(x, y - 1, z).isNormalCube()) GlyphidHive.generate(world, x, y, z, rand); } if(biome == BiomeGenBase.plains || biome == BiomeGenBase.desert) { diff --git a/src/main/resources/assets/hbm/textures/gui/fluids/calcium_solution.png b/src/main/resources/assets/hbm/textures/gui/fluids/calcium_solution.png new file mode 100644 index 0000000000000000000000000000000000000000..f1ebd5aba4619ce2699a1d0678639c73f5345e78 GIT binary patch literal 708 zcmV;#0z3VQP)>_ zij)$i)R3;OYgVfj0A1G+LLjQDYDkbI2|@_IzP>1mf~IK@LJ&m}08P^jcv+SK5D6hr zO3`&4o6Uwej=8(Lqby7Q@Qg7CApkJOu;1^|T2oaOVmuzBwPrjX56i&+F!DU7ZCjL5 zIOoW+3}XyhYlIMjzVA^=v0kqUAt0rsX&Rh!%;$525R_$!b8a~9-xNhrkR-`anNo@@ z%UCQHlx4~5>npq64(~mO!-3Ig#N~1!j$GnmG)-~NvET36Y&NV`E4r>@ zyWNuK`5=ukhOX=I-cwc8e=RgkgZG|4j3|nDd3m9#D)KzXT8oqtDJ5OkQ4|GADe^og ziXx&UNod;^tu<}ivREvz)-oQCvDOX_D5WThVo*KLb3zD+5CYa(wAO?W0GLjv)OG!5 q8UW|>nYXt$K0ZDGI2;ZLA@~O#o<1iFE_aXs0000