Skip to content

Commit

Permalink
Language and Unobtainium Update
Browse files Browse the repository at this point in the history
Added Translations in 70 languages
Added Battery Automation
Added Neoveline and Electronium Dynosynthesis
Added Unobtainium-440 and 439

Changed Euphemium creation
Changed Unobtainium Billet Recipe and Textures
Changed Xe-135 Powder Chances in Silex
Changed Radium creation
Changed Nether Depth Texture

Fixed: FEnSU Charge Rate
  • Loading branch information
Alcatergit committed Dec 2, 2022
1 parent 4de582d commit 4df9d23
Show file tree
Hide file tree
Showing 194 changed files with 243,244 additions and 9,904 deletions.
329 changes: 167 additions & 162 deletions src/main/java/com/hbm/blocks/ModBlocks.java

Large diffs are not rendered by default.

32 changes: 17 additions & 15 deletions src/main/java/com/hbm/blocks/bomb/NukeFleija.java
Original file line number Diff line number Diff line change
Expand Up @@ -115,21 +115,23 @@ public boolean igniteTestBomb(World world, int x, int y, int z, int r)
world.playSound(null, x, y, z, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.BLOCKS, 1.0F, world.rand.nextFloat() * 0.1F + 0.9F);

EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world);
entity.posX = x;
entity.posY = y;
entity.posZ = z;
entity.destructionRange = r;
entity.speed = BombConfig.blastSpeed;
entity.coefficient = 1.0F;
entity.waste = false;

world.spawnEntity(entity);

EntityCloudFleija cloud = new EntityCloudFleija(world, r);
cloud.posX = x;
cloud.posY = y;
cloud.posZ = z;
world.spawnEntity(cloud);
entity.posX = x;
entity.posY = y;
entity.posZ = z;
if(!EntityNukeExplosionMK3.isJammed(world, entity)){
entity.destructionRange = r;
entity.speed = BombConfig.blastSpeed;
entity.coefficient = 1.0F;
entity.waste = false;

world.spawnEntity(entity);

EntityCloudFleija cloud = new EntityCloudFleija(world, r);
cloud.posX = x;
cloud.posY = y;
cloud.posZ = z;
world.spawnEntity(cloud);
}
}

return false;
Expand Down
28 changes: 15 additions & 13 deletions src/main/java/com/hbm/blocks/bomb/NukePrototype.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,21 +114,23 @@ public boolean igniteTestBomb(World world, int x, int y, int z, int r)
world.playSound(null, x, y, z, SoundEvents.ENTITY_GENERIC_EXPLODE, SoundCategory.BLOCKS, 1.0f, world.rand.nextFloat() * 0.1F + 0.9F);

EntityNukeExplosionMK3 entity = new EntityNukeExplosionMK3(world);
entity.posX = x;
entity.posX = x;
entity.posY = y;
entity.posZ = z;
entity.destructionRange = r;
entity.speed = BombConfig.blastSpeed;
entity.coefficient = 1.0F;
entity.waste = false;

world.spawnEntity(entity);

EntityCloudFleija cloud = new EntityCloudFleija(world, r);
cloud.posX = x;
cloud.posY = y;
cloud.posZ = z;
world.spawnEntity(cloud);
if(!EntityNukeExplosionMK3.isJammed(world, entity)){
entity.destructionRange = r;
entity.speed = BombConfig.blastSpeed;
entity.coefficient = 1.0F;
entity.waste = false;

world.spawnEntity(entity);

EntityCloudFleija cloud = new EntityCloudFleija(world, r);
cloud.posX = x;
cloud.posY = y;
cloud.posZ = z;
world.spawnEntity(cloud);
}
}

return false;
Expand Down
6 changes: 6 additions & 0 deletions src/main/java/com/hbm/blocks/generic/WasteEarth.java
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
import com.hbm.main.MainRegistry;
import com.hbm.potion.HbmPotion;
import com.hbm.saveddata.RadiationSavedData;
import com.hbm.util.ContaminationUtil;

import net.minecraft.block.Block;
import net.minecraft.block.BlockMushroom;
Expand Down Expand Up @@ -98,6 +99,11 @@ public void randomDisplayTick(IBlockState stateIn, World worldIn, BlockPos pos,
worldIn.spawnParticle(EnumParticleTypes.TOWN_AURA, pos.getX() + rand.nextFloat(), pos.getY() + 1.1F, pos.getZ() + rand.nextFloat(), 0.0D, 0.0D, 0.0D);
}
}

@Override
public boolean canEntitySpawn(IBlockState state, Entity entityIn){
return ContaminationUtil.isRadImmune(entityIn);
}

@Override
public void updateTick(World world, BlockPos pos1, IBlockState state, Random rand) {
Expand Down
59 changes: 59 additions & 0 deletions src/main/java/com/hbm/blocks/machine/MachineFieldDisturber.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
package com.hbm.blocks.machine;

import java.util.List;
import java.util.Random;

import com.hbm.blocks.ModBlocks;
import com.hbm.entity.logic.EntityNukeExplosionMK3;
import com.hbm.entity.logic.EntityNukeExplosionMK3.ATEntry;

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

public class MachineFieldDisturber extends Block {

public MachineFieldDisturber(Material materialIn, String s) {
super(materialIn);
this.setUnlocalizedName(s);
this.setRegistryName(s);

ModBlocks.ALL_BLOCKS.add(this);
}

@Override
public int tickRate(World world) {
return 20;
}

@Override
public void onBlockAdded(World world, BlockPos pos, IBlockState state) {
if(!world.isRemote)
world.scheduleUpdate(pos, this, this.tickRate(world));
}

@Override
public void breakBlock(World worldIn, BlockPos pos, IBlockState state) {
EntityNukeExplosionMK3.at.remove(new ATEntry(worldIn.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ()));
super.breakBlock(worldIn, pos, state);
}

@Override
public void updateTick(World world, BlockPos pos, IBlockState state, Random rand) {

if(!world.isRemote) {
world.scheduleUpdate(pos, this, this.tickRate(world));
EntityNukeExplosionMK3.at.put(new ATEntry(world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ()), world.getTotalWorldTime() + 100);
}
}

@Override
public void addInformation(ItemStack stack, World player, List<String> tooltip, ITooltipFlag advanced) {
tooltip.add("§3[Anti-Antischrabidium-Field]§r");
tooltip.add("§b Radius: 300m§r");
}
}
19 changes: 12 additions & 7 deletions src/main/java/com/hbm/config/BombConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,16 @@ public class BombConfig {
public static int soliniumRadius = 150;
public static int n2Radius = 200;
public static int missileRadius = 100;
public static int mirvRadius = 100;
public static int mirvRadius = 60;
public static int fatmanRadius = 35;
public static int nukaRadius = 25;
public static int aSchrabRadius = 20;

public static int mk4 = 1024;
public static int blastSpeed = 1024;
public static int falloutRange = 100;
public static int fSpeed = 256;
public static int fChunkSpeed = 6;
public static int oceanHeight = 62;
public static int limitExplosionLifespan = 0;
public static boolean disableNuclear;

Expand Down Expand Up @@ -53,7 +54,7 @@ public static void loadFromConfig(Configuration config) {
Property propMissile = config.get(CATEGORY_NUKES, "3.07_missileRadius", 100);
propMissile.setComment("Radius of the nuclear missile");
missileRadius = propMissile.getInt();
Property propMirv = config.get(CATEGORY_NUKES, "3.08_mirvRadius", 100);
Property propMirv = config.get(CATEGORY_NUKES, "3.08_mirvRadius", 60);
propMirv.setComment("Radius of a MIRV");
mirvRadius = propMirv.getInt();
Property propFatman = config.get(CATEGORY_NUKES, "3.09_fatmanRadius", 35);
Expand Down Expand Up @@ -89,11 +90,15 @@ public static void loadFromConfig(Configuration config) {
falloutRangeProp.setComment("Radius of fallout area (base radius * value in percent)");
falloutRange = falloutRangeProp.getInt();
// new explosion speed
Property falloutSpeed = config.get(CATEGORY_NUKE, "6.04_falloutSpeed", 256);
falloutSpeed.setComment("Blocks processed per tick by the fallout rain");
fSpeed = falloutSpeed.getInt();
Property falloutChunkSpeed = config.get(CATEGORY_NUKE, "6.04_falloutChunkSpeed", 6);
falloutChunkSpeed.setComment("Process a Chunk every nth tick by the fallout rain");
fChunkSpeed = falloutChunkSpeed.getInt();
//Whether fallout and nuclear radiation is enabled at all
Property disableNuclearP = config.get(CATEGORY_NUKE, "6.05_disableNuclear", false);
Property waterHeight = config.get(CATEGORY_NUKE, "6.05_nukeWaterHeight", 62);
waterHeight.setComment("The water height that the nuke fills the crater with if in wet area. Should be ocean height.");
oceanHeight = waterHeight.getInt();
//Whether fallout and nuclear radiation is enabled at all
Property disableNuclearP = config.get(CATEGORY_NUKE, "6.06_disableNuclear", false);
disableNuclearP.setComment("Disable the nuclear part of nukes");
disableNuclear = disableNuclearP.getBoolean();
}
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/com/hbm/config/RadiationConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,7 @@ public class RadiationConfig {
public static int worldRad = 10;
public static int worldRadThreshold = 20;
public static boolean worldRadEffects = true;
public static boolean blocksFall = false;
public static int blocksFallCh = 20;
public static int blocksFallCh = 100;

//Drillgon200: Not sure why I put these here, but oh well.
public static int railgunDamage = 100;
Expand Down Expand Up @@ -47,8 +46,7 @@ public static void loadFromConfig(Configuration config) {
worldRad = CommonConfig.createConfigInt(config, CATEGORY_NUKE, "6.10_worldRadCount", "How many block operations radiation can perform per tick", 10);
worldRadThreshold = CommonConfig.createConfigInt(config, CATEGORY_NUKE, "6.11_worldRadThreshold", "The least amount of RADs required for block modification to happen", 40);
worldRadEffects = CommonConfig.createConfigBool(config, CATEGORY_NUKE, "6.12_worldRadEffects", "Whether high radiation levels should perform changes in the world", true);
blocksFall = CommonConfig.createConfigBool(config, CATEGORY_NUKE, "6.13_blocksFall", "Whether Nukes should make blocks fall down, disabled by default due to lag issues", false);
blocksFallCh = CommonConfig.createConfigInt(config, CATEGORY_NUKE, "6.14_blocksFallCh", "The chance (in percentage form) that a block with low blast resistance will fall down ", 20);
blocksFallCh = CommonConfig.createConfigInt(config, CATEGORY_NUKE, "6.13_blocksFallingChance", "The chance (in percentage form) that a block with low blast resistance will fall down. -1 Disables falling", 100);
// railgun
Property railDamage = config.get(CATEGORY_NUKE, "6.11_railgunDamage", 1000);
railDamage.setComment("How much damage a railgun death blast does per tick");
Expand Down
25 changes: 15 additions & 10 deletions src/main/java/com/hbm/config/WorldConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class WorldConfig {
public static int capsuleStructure = 100;
public static int broadcaster = 5000;
public static int minefreq = 64;
public static int radminefreq = 128;
public static int radfreq = 5000;
public static int vaultfreq = 2500;
public static int arcticStructure = 500;
Expand Down Expand Up @@ -155,26 +156,29 @@ public static void loadFromConfig(Configuration config) {
Property propMines = config.get(CATEGORY_DUNGEON, "4.14_landmineSpawn", 64);
propMines.setComment("Spawn AP landmine on every nTH chunk");
minefreq = propMines.getInt();
Property propRad = config.get(CATEGORY_DUNGEON, "4.15_radHotsoptSpawn", 5000);
Property propRadMines = config.get(CATEGORY_DUNGEON, "4.15_sellafiteChunkSpawn", 128);
propRadMines.setComment("Spawn Sellafite block on every nTH chunk");
minefreq = propRadMines.getInt();
Property propRad = config.get(CATEGORY_DUNGEON, "4.16_radHotsoptSpawn", 5000);
propRad.setComment("Spawn radiation hotspot on every nTH chunk");
radfreq = propRad.getInt();
Property propVault = config.get(CATEGORY_DUNGEON, "4.16_vaultSpawn", 2500);
Property propVault = config.get(CATEGORY_DUNGEON, "4.17_vaultSpawn", 2500);
propVault.setComment("Spawn locked safe on every nTH chunk");
vaultfreq = propVault.getInt();
Property pGW = config.get(CATEGORY_DUNGEON, "4.17_geyserWaterSpawn", 3000);
Property pGW = config.get(CATEGORY_DUNGEON, "4.18_geyserWaterSpawn", 3000);
pGW.setComment("Spawn water geyser on every nTH chunk");
geyserWater = pGW.getInt();
Property pGC = config.get(CATEGORY_DUNGEON, "4.18_geyserChlorineSpawn", 3000);
Property pGC = config.get(CATEGORY_DUNGEON, "4.19_geyserChlorineSpawn", 3000);
pGC.setComment("Spawn poison geyser on every nTH chunk");
geyserChlorine = pGC.getInt();
Property pGV = config.get(CATEGORY_DUNGEON, "4.19_geyserVaporSpawn", 500);
Property pGV = config.get(CATEGORY_DUNGEON, "4.20_geyserVaporSpawn", 500);
pGV.setComment("Spawn vapor geyser on every nTH chunk");
geyserVapor = pGV.getInt();
meteorStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "meteorStructure", "Spawn meteor dungeon on every nTH chunk", 15000);
capsuleStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.21_capsuleSpawn", "Spawn landing capsule on every nTH chunk", 100);
arcticStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.22_arcticVaultSpawn", "Spawn artic code vault on every nTH chunk", 500);
jungleStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.23_jungleDungeonSpawn", "Spawn jungle dungeon on every nTH chunk", 2000);
pyramidStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.24_pyramidSpawn", "Spawn pyramid on every nTH chunk", 4000);
meteorStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.21_meteorStructureSpan", "Spawn meteor dungeon on every nTH chunk", 15000);
capsuleStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.22_capsuleSpawn", "Spawn landing capsule on every nTH chunk", 100);
arcticStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.23_arcticVaultSpawn", "Spawn artic code vault on every nTH chunk", 500);
jungleStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.24_jungleDungeonSpawn", "Spawn jungle dungeon on every nTH chunk", 2000);
pyramidStructure = CommonConfig.createConfigInt(config, CATEGORY_DUNGEON, "4.25_pyramidSpawn", "Spawn pyramid on every nTH chunk", 4000);

final String CATEGORY_METEOR = "05_meteors";
Property propMeteorStrikeChance = config.get(CATEGORY_METEOR, "5.00_meteorStrikeChance", 20 * 60 * 60 * 5);
Expand Down Expand Up @@ -205,6 +209,7 @@ public static void loadFromConfig(Configuration config) {
geyserVapor = CommonConfig.setDefZero(geyserVapor, 1000);
broadcaster = CommonConfig.setDefZero(broadcaster, 1000);
minefreq = CommonConfig.setDefZero(minefreq, 1000);
radminefreq = CommonConfig.setDefZero(radminefreq, 1000);
radfreq = CommonConfig.setDefZero(radfreq, 1000);
vaultfreq = CommonConfig.setDefZero(vaultfreq, 1000);
meteorStructure = CommonConfig.setDefZero(meteorStructure, 15000);
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/hbm/creativetabs/BlockTab.java
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public BlockTab(int index, String label) {
@Override
public ItemStack getTabIconItem() {
if(ModBlocks.ore_uranium != null){
return new ItemStack(Item.getItemFromBlock(ModBlocks.ore_uranium));
return new ItemStack(Item.getItemFromBlock(ModBlocks.brick_concrete));
}
return new ItemStack(Items.IRON_PICKAXE);
}
Expand Down
24 changes: 24 additions & 0 deletions src/main/java/com/hbm/creativetabs/RessourceTab.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package com.hbm.creativetabs;

import com.hbm.blocks.ModBlocks;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;

public class RessourceTab extends CreativeTabs {

public RessourceTab(int index, String label) {
super(index, label);
}

@Override
public ItemStack getTabIconItem() {
if(ModBlocks.ore_uranium != null){
return new ItemStack(Item.getItemFromBlock(ModBlocks.ore_uranium));
}
return new ItemStack(Items.IRON_PICKAXE);
}

}
4 changes: 2 additions & 2 deletions src/main/java/com/hbm/entity/effect/EntityDrying.java
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
import net.minecraft.world.World;

public class EntityDrying extends Entity implements IConstantRenderer, IChunkLoader {
private static final DataParameter<Integer> SCALE = EntityDataManager.createKey(EntityFalloutRain.class, DataSerializers.VARINT);
private static final DataParameter<Integer> SCALE = EntityDataManager.createKey(EntityDrying.class, DataSerializers.VARINT);
public int revProgress;
public int radProgress;
public boolean done=false;
Expand Down Expand Up @@ -176,7 +176,7 @@ private void dry(MutableBlockPos pos) {
}
}
} else {
for(int y = 62; y > 1; y--) {
for(int y = BombConfig.oceanHeight; y > 1; y--) {
pos.setY(y);
if(world.isAirBlock(pos)){
world.setBlockState(pos, Blocks.WATER.getDefaultState());
Expand Down
Loading

0 comments on commit 4df9d23

Please sign in to comment.