Skip to content

Commit

Permalink
Config Options and Ammo Display
Browse files Browse the repository at this point in the history
Added Depth Nether Nitanium Ore
Added Clean drop destruction
Added Baleonitite
Added UU Mixer fluid ratio config
Added cap loot to GlowingOnes
Added Turret ammo gui display
Added hover tooltips to turret buttons

Changed turret gui and test colors
Changed nuclear creeper advancement radius
Changed plasma grenades to be useable indoors
Changed Bedrock ore processing recipes
Changed fluid burner heat capacity
Changed Chekhov to be able to use flechette ammo

Fixed MASER energy balance
Fixed hazmat rounding errors
Fixed missing bedrock ore config entries
Fixed missing harvest lvl for Depth Rock
Fixed fragment spawn
Fixed Wrench aspect ratio
  • Loading branch information
Alcatergit committed Jun 29, 2023
1 parent 298a341 commit 16d29e0
Show file tree
Hide file tree
Showing 79 changed files with 694 additions and 207 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ apply plugin: 'net.minecraftforge.gradle'
apply plugin: 'eclipse'
apply plugin: 'maven-publish'

version = '1.9.6'
version = '1.9.7'
group = 'com.hbm' // http://maven.apache.org/guides/mini/guide-naming-conventions.html
archivesBaseName = 'NTM-Extended-1.12.2'

Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ org.gradle.daemon=true
org.gradle.configureondemand=true
org.gradle.parallel=true
version_mc=1.12.2
version=1.9.6
version=1.9.7
version_jei=4.16.1.302
version_crafttweaker=4.1.14.521
11 changes: 10 additions & 1 deletion src/main/java/com/hbm/blocks/ModBlocks.java
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ public SoundEvent getBreakSound() {
public static final Block ore_nether_schrabidium = new BlockOre(Material.ROCK, "ore_nether_schrabidium", 3).addRadiation(ItemHazard.ore * ItemHazard.sa326).addBlinding().toBlock().setHardness(15.0F).setResistance(600.0F).setCreativeTab(MainRegistry.resourceTab);
public static final Block stone_depth_nether = new BlockDepth("stone_depth_nether").setCreativeTab(MainRegistry.resourceTab);
public static final Block ore_depth_nether_neodymium = new BlockDepthOre("ore_depth_nether_neodymium").setCreativeTab(MainRegistry.resourceTab);
public static final Block ore_depth_nether_nitan = new BlockDepthOre("ore_depth_nether_nitan").setCreativeTab(MainRegistry.resourceTab);

public static final Block block_meteor = new BlockOre(Material.ROCK, "block_meteor", 3).setCreativeTab(MainRegistry.resourceTab).setHardness(15.0F).setResistance(900.0F);
public static final Block block_meteor_cobble = new BlockOre(Material.ROCK, "block_meteor_cobble", 2).setCreativeTab(MainRegistry.resourceTab).setHardness(15.0F).setResistance(900.0F);
Expand Down Expand Up @@ -659,7 +660,15 @@ public SoundEvent getBreakSound() {
public static final Block sellafield_2 = new BlockHazard(Material.ROCK, SoundType.STONE, "sellafield_2").addRadiation(20.0F).toBlock().setHardness(5.0F).setResistance(6F).setCreativeTab(MainRegistry.resourceTab);
public static final Block sellafield_3 = new BlockHazard(Material.ROCK, SoundType.STONE, "sellafield_3").addRadiation(40.0F).addFire(2).toBlock().setHardness(5.0F).setResistance(7F).setCreativeTab(MainRegistry.resourceTab);
public static final Block sellafield_4 = new BlockHazard(Material.ROCK, SoundType.STONE, "sellafield_4").addRadiation(80.0F).addFire(10).toBlock().setHardness(5.0F).setResistance(8F).setCreativeTab(MainRegistry.resourceTab);
public static final Block sellafield_core = new BlockHazard(Material.ROCK, SoundType.STONE, "sellafield_core").addRadiation(4000.0F).addFire(15).toBlock().setHardness(10.0F).setResistance(9F).setCreativeTab(MainRegistry.resourceTab);
public static final Block sellafield_core = new BlockHazard(Material.ROCK, SoundType.STONE, "sellafield_core").addRadiation(2000.0F).addFire(15).toBlock().setHardness(10.0F).setResistance(9F).setCreativeTab(MainRegistry.resourceTab);

public static final Block baleonitite_slaked = new BlockHazard(Material.ROCK, SoundType.STONE, "baleonitite_slaked").addRadiation(25F).toBlock().setHardness(5.0F).setResistance(6F).setCreativeTab(MainRegistry.resourceTab);
public static final Block baleonitite_0 = new BlockHazard(Material.ROCK, SoundType.STONE, "baleonitite_0").addRadiation(50.0F).toBlock().setHardness(5.0F).setResistance(6F).setCreativeTab(MainRegistry.resourceTab);
public static final Block baleonitite_1 = new BlockHazard(Material.ROCK, SoundType.STONE, "baleonitite_1").addRadiation(100.0F).toBlock().setHardness(5.0F).setResistance(6F).setCreativeTab(MainRegistry.resourceTab);
public static final Block baleonitite_2 = new BlockHazard(Material.ROCK, SoundType.STONE, "baleonitite_2").addRadiation(200.0F).toBlock().setHardness(5.0F).setResistance(6F).setCreativeTab(MainRegistry.resourceTab);
public static final Block baleonitite_3 = new BlockHazard(Material.ROCK, SoundType.STONE, "baleonitite_3").addRadiation(400.0F).addFire(2).toBlock().setHardness(5.0F).setResistance(7F).setCreativeTab(MainRegistry.resourceTab);
public static final Block baleonitite_4 = new BlockHazard(Material.ROCK, SoundType.STONE, "baleonitite_4").addRadiation(800.0F).addFire(10).toBlock().setHardness(5.0F).setResistance(8F).setCreativeTab(MainRegistry.resourceTab);
public static final Block baleonitite_core = new BlockHazard(Material.ROCK, SoundType.STONE, "baleonitite_core").addRadiation(4000.0F).addFire(15).toBlock().setHardness(10.0F).setResistance(9F).setCreativeTab(MainRegistry.resourceTab);

public static final Block geysir_water = new BlockGeysir(Material.ROCK, "geysir_water").setSoundType(SoundType.STONE).setHardness(5.0F).setCreativeTab(MainRegistry.resourceTab);
public static final Block geysir_chlorine = new BlockGeysir(Material.ROCK, "geysir_chlorine").setSoundType(SoundType.STONE).setHardness(5.0F).setCreativeTab(MainRegistry.resourceTab);
Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/hbm/blocks/generic/BlockClean.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
import java.util.List;

import com.hbm.blocks.BlockBase;
import com.hbm.blocks.ModBlocks;
import com.hbm.util.I18nUtil;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.util.math.BlockPos;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;

Expand All @@ -22,4 +25,12 @@ public void addInformation(ItemStack stack, World player, List<String> tooltip,
tooltip.add(" §b"+I18nUtil.resolveKey("trait.cleanroom.desc"));
super.addInformation(stack, player, tooltip, advanced);
}

public static void getUsed(Block b, BlockPos pos, World world){
if(b == ModBlocks.tile_lab && world.rand.nextInt(2000) == 0){
world.setBlockState(pos, ModBlocks.tile_lab_cracked.getDefaultState());
} else if(b == ModBlocks.tile_lab_cracked && world.rand.nextInt(10000) == 0){
world.setBlockState(pos, ModBlocks.tile_lab_broken.getDefaultState());
}
}
}
1 change: 1 addition & 0 deletions src/main/java/com/hbm/blocks/generic/BlockDepth.java
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public BlockDepth(String s){
super(Material.ROCK);
this.setUnlocalizedName(s);
this.setRegistryName(s);
this.setHarvestLevel("pickaxe", 3);
this.setBlockUnbreakable();
this.setResistance(10.0F);

Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/hbm/blocks/generic/BlockDepthOre.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public Item getItemDropped(IBlockState state, Random rand, int fortune){
if(this == ModBlocks.ore_depth_nether_neodymium) {
return ModItems.fragment_neodymium;
}
if(this == ModBlocks.ore_depth_nether_nitan) {
return ModItems.powder_nitan_mix;
}

return super.getItemDropped(state, rand, fortune);
}
Expand All @@ -50,6 +53,9 @@ public int quantityDropped(Random rand) {
if(this == ModBlocks.ore_depth_nether_neodymium) {
return 2 + rand.nextInt(2);
}
if(this == ModBlocks.ore_depth_nether_nitan) {
return 1;
}

return super.quantityDropped(rand);
}
Expand Down
51 changes: 49 additions & 2 deletions src/main/java/com/hbm/blocks/generic/BlockHazard.java
Original file line number Diff line number Diff line change
Expand Up @@ -226,51 +226,98 @@ public void onEntityWalk(World worldIn, BlockPos pos, Entity entity) {
if (entity instanceof EntityLivingBase && this == ModBlocks.frozen_dirt)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(MobEffects.SLOWNESS, 2 * 60 * 20, 2));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.block_trinitite)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 30 * 20, 2));
return;
}

if (entity instanceof EntityLivingBase && this == ModBlocks.sellafield_0)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 30 * 20, 0));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.sellafield_1)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 25 * 20, 1));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.sellafield_2)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 20 * 20, 3));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.sellafield_3)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 15 * 20, 7));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.sellafield_4)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 10 * 20, 15));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.sellafield_core)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 5 * 20, 79));
return;
}

if (entity instanceof EntityLivingBase && this == ModBlocks.baleonitite_0)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 30 * 20, 1));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.baleonitite_1)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 25 * 20, 2));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.baleonitite_2)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 20 * 20, 7));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.baleonitite_3)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 15 * 20, 15));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.baleonitite_4)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 10 * 20, 31));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.baleonitite_core)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 5 * 20, 159));
return;
}

if (entity instanceof EntityLivingBase && this == ModBlocks.block_waste)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 30 * 20, 49));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.brick_jungle_ooze)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.radiation, 15 * 20, 9));
return;
}
if (entity instanceof EntityLivingBase && this == ModBlocks.brick_jungle_mystic)
{
((EntityLivingBase) entity).addPotionEffect(new PotionEffect(HbmPotion.taint, 15 * 20, 2));
return;
}
if(this == ModBlocks.block_meteor_molten || this == ModBlocks.block_au198)
if(this == ModBlocks.block_meteor_molten || this == ModBlocks.block_au198){
entity.setFire(5);
if(this == ModBlocks.brick_jungle_lava)
return;
}
if(this == ModBlocks.brick_jungle_lava){
entity.setFire(10);
}
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/hbm/blocks/generic/BlockOre.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public Item getItemDropped(IBlockState state, Random rand, int fortune) {
case 3: return ModItems.fragment_lanthanium;
case 4: return ModItems.fragment_neodymium;
case 5: return ModItems.fragment_niobium;
case 6: if(rand.nextInt(3) == 0) return ModItems.fragment_actinium;
case 6: return ModItems.fragment_actinium;
}
}
if(this == ModBlocks.block_meteor)
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/com/hbm/config/BedrockOreJsonConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ public static boolean isOreAllowed(int dimID, String ore){
}

public static void setDefaults() {
addEntry(0, 30, Arrays.asList("orePlutonium", "oreQuartz", "oreInfernalCoal", "oreRedPhosphorus", "oreSchrabidium"), false);
addEntry(-1, 60, Arrays.asList("orePlutonium", "oreQuartz", "oreInfernalCoal", "oreRedPhosphorus", "oreSchrabidium"), true);
addEntry(0, 30, Arrays.asList("orePlutonium", "oreQuartz", "oreInfernalCoal", "oreRedPhosphorus", "oreSchrabidium", "oreNeodymium", "oreNitanium"), false);
addEntry(-1, 60, Arrays.asList("orePlutonium", "oreQuartz", "oreInfernalCoal", "oreRedPhosphorus", "oreSchrabidium", "oreNeodymium", "oreNitanium"), true);
}

public static void addEntry(int dimID, int rarity, List<String> ores, Boolean isWhiteList){
Expand Down
6 changes: 4 additions & 2 deletions src/main/java/com/hbm/config/MachineConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ public class MachineConfig {
public static int gasPerBedrockDepositBlockMinFrackingTower = 10;
public static int gasPerBedrockDepositBlockMaxExtraFrackingTower = 50;

public static int uuMixerFluidRatio = 100;
public static boolean uuMixerFluidListIsWhitelist = false;
public static HashSet blacklistedMixerFluids;

Expand Down Expand Up @@ -89,7 +90,8 @@ public static void loadFromConfig(Configuration config) {
gasPerBedrockDepositBlockMinFrackingTower = CommonConfig.createConfigInt(config, CATEGORY_MACHINE, generateConfigName(22, "gasPerBedrockDepositBlockMinFrackingTower"), "Controls how much natrual gas at minimum is extracted per bedrock deposit block for Fracking towers", 10);
gasPerBedrockDepositBlockMaxExtraFrackingTower = CommonConfig.createConfigInt(config, CATEGORY_MACHINE, generateConfigName(23, "gasPerBedrockDepositBlockMaxExtraFrackingTower"), "Controls how much extra natrual gas can be extracted per bedrock deposit block for Fracking towers", 50);

uuMixerFluidListIsWhitelist = CommonConfig.createConfigBool(config, CATEGORY_MACHINE, generateConfigName(24, "uuMixerFluidListIsWhitelist"), "If true then the follwing list of fluids is a whitelist. Otherwise it is a Blacklist", false);
blacklistedMixerFluids = CommonConfig.createConfigHashSet(config, CATEGORY_MACHINE, generateConfigName(25, "blacklistedUUMixerFluids"), "List of fluids that can not be made by UU Mixer. - <fluid> (String)", "String", new String[]{ "liquid_osmiridium" });
uuMixerFluidRatio = CommonConfig.createConfigInt(config, CATEGORY_MACHINE, generateConfigName(24, "uuMixerFluidRatio"), "How much mB of UU-Matter is used per mB of output fluid", 100);
uuMixerFluidListIsWhitelist = CommonConfig.createConfigBool(config, CATEGORY_MACHINE, generateConfigName(25, "uuMixerFluidListIsWhitelist"), "If true then the follwing list of fluids is a whitelist. Otherwise it is a Blacklist", false);
blacklistedMixerFluids = CommonConfig.createConfigHashSet(config, CATEGORY_MACHINE, generateConfigName(26, "blacklistedUUMixerFluids"), "List of fluids that can not be made by UU Mixer. - <fluid> (String)", "String", new String[]{ "liquid_osmiridium" });
}
}
18 changes: 15 additions & 3 deletions src/main/java/com/hbm/entity/mob/EntityGlowingOne.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,19 @@

import java.util.List;

import com.hbm.items.ModItems;
import com.hbm.lib.RefStrings;
import com.hbm.interfaces.IRadiationImmune;
import com.hbm.lib.HBMSoundHandler;
import com.hbm.util.ContaminationUtil;
import com.hbm.render.amlfrom1710.Vec3;

import net.minecraft.entity.EntityAgeable;
import net.minecraft.entity.Entity;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.SharedMonsterAttributes;
import net.minecraft.entity.monster.EntityZombie;
import net.minecraft.util.math.AxisAlignedBB;
import net.minecraft.item.Item;
import net.minecraft.util.DamageSource;
import net.minecraft.util.SoundEvent;
import net.minecraft.world.World;

public class EntityGlowingOne extends EntityZombie implements IRadiationImmune {
Expand Down Expand Up @@ -97,4 +98,15 @@ protected boolean shouldBurnInDay(){
protected boolean isValidLightLevel(){
return false;
}

@Override
public boolean attackEntityAsMob(Entity x){
return true;
}

@Override
protected void dropLoot(boolean wasRecentlyHit, int lootingModifier, DamageSource source) {
super.dropLoot(wasRecentlyHit, lootingModifier, source);
this.dropItem(ModItems.cap_rad, Math.max(1, lootingModifier));
}
}
2 changes: 1 addition & 1 deletion src/main/java/com/hbm/entity/mob/EntityNuclearCreeper.java
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ protected SoundEvent getDeathSound(){
public void onDeath(DamageSource p_70645_1_){
super.onDeath(p_70645_1_);

List<EntityPlayer> players = world.getEntitiesWithinAABB(EntityPlayer.class, this.getEntityBoundingBox().grow(50, 50, 50));
List<EntityPlayer> players = world.getEntitiesWithinAABB(EntityPlayer.class, this.getEntityBoundingBox().grow(10, 10, 10));

for(EntityPlayer player : players) {
AdvancementManager.grantAchievement(player, AdvancementManager.bossCreeper);
Expand Down
16 changes: 8 additions & 8 deletions src/main/java/com/hbm/explosion/ExplosionBalefire.java
Original file line number Diff line number Diff line change
Expand Up @@ -129,17 +129,17 @@ private void breakColumn(int x, int z)
if(b == ModBlocks.block_schrabidium_cluster)
worldObj.setBlockState(new BlockPos(pX, y, pZ), ModBlocks.block_euphemium_cluster.getStateFromMeta(b.getMetaFromState(worldObj.getBlockState(new BlockPos(pX, y, pZ)))), 3);
}
int startDepth = (int)(6 - 6 * dist / radius);
int startDepth = (int)(6 * dist / radius);
for(int i = 0; i <= startDepth; i++) {
if(worldObj.getBlockState(new BlockPos(pX, depth-i, pZ)).getBlock() == Blocks.STONE){
switch(startDepth-i){
case 6: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.sellafield_core.getDefaultState()); break;
case 5: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.sellafield_4.getDefaultState()); break;
case 4: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.sellafield_3.getDefaultState()); break;
case 3: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.sellafield_2.getDefaultState()); break;
case 2: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.sellafield_1.getDefaultState()); break;
case 1: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.sellafield_0.getDefaultState()); break;
case 0: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.sellafield_slaked.getDefaultState()); break;
case 6: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.baleonitite_core.getDefaultState()); break;
case 5: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.baleonitite_4.getDefaultState()); break;
case 4: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.baleonitite_3.getDefaultState()); break;
case 3: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.baleonitite_2.getDefaultState()); break;
case 2: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.baleonitite_1.getDefaultState()); break;
case 1: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.baleonitite_0.getDefaultState()); break;
case 0: worldObj.setBlockState(new BlockPos(pX, depth-i, pZ), ModBlocks.baleonitite_slaked.getDefaultState()); break;
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/hbm/explosion/ExplosionChaos.java
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ public static void plasma(World world, int x, int y, int z, int radius) {
if(ZZ < r22 + world.rand.nextInt(r22 / 2)) {
pos.setPos(X, Y, Z);
Block block =world.getBlockState(pos).getBlock();
if(block.getExplosionResistance(null) > 999) continue;
if(block.getExplosionResistance(null) > 0.1F) continue;
if(block != Blocks.BEDROCK && world.getBlockState(pos).getBlock() != ModBlocks.statue_elb
&& world.getBlockState(pos).getBlock() != ModBlocks.statue_elb_g
&& world.getBlockState(pos).getBlock() != ModBlocks.statue_elb_w
Expand Down
Loading

0 comments on commit 16d29e0

Please sign in to comment.