Skip to content

Commit

Permalink
fallout thunderstorm, more configs and order, recipes
Browse files Browse the repository at this point in the history
  • Loading branch information
HbmMods committed Feb 12, 2019
1 parent 75799a7 commit 82b5203
Show file tree
Hide file tree
Showing 13 changed files with 314 additions and 93 deletions.
1 change: 1 addition & 0 deletions assets/hbm/lang/de_DE.lang
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ container.generator=Atomreaktor
tile.red_wire_coated.name=Geschirmtes rotes Kupferkabel
tile.machine_deuterium.name=Deuteriumextraktor
container.machine_deuterium=Deuteriumextraktor
tile.machine_battery_potato.name=Kartoffelbatterieblock
tile.machine_battery.name=Energiespeicherblock
tile.machine_lithium_battery.name=Li-Ion-Energiespeicherblock
tile.machine_schrabidium_battery.name=Schrabidium-Energiespeicherblock
Expand Down
1 change: 1 addition & 0 deletions assets/hbm/lang/en_US.lang
Original file line number Diff line number Diff line change
Expand Up @@ -340,6 +340,7 @@ container.generator=Nuclear Reactor
tile.red_wire_coated.name=Coated Red Copper Cable
tile.machine_deuterium.name=Deuterium Extractor
container.machine_deuterium=Deuterium Extractor
tile.machine_battery_potato.name=Potato Battery Block
tile.machine_battery.name=Energy Storage Block
tile.machine_lithium_battery.name=Li-Ion Energy Storage Block
tile.machine_schrabidium_battery.name=Schrabidium Energy Storage Block
Expand Down
10 changes: 10 additions & 0 deletions com/hbm/blocks/test/TestEventTester.java
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ public void onNeighborBlockChange(World p_149695_1_, int x1, int y1, int z1, Blo
//RED FLUSHES ALL RAD
//STE PRINTS RAD CHUNKS
//URA PRINTS TOTAL RAD
//THO SETS RAD TO 1000000

if(worldObj.getBlock(x1, y1 - 1, z1) == ModBlocks.block_aluminium) {

Expand Down Expand Up @@ -245,6 +246,15 @@ public void onNeighborBlockChange(World p_149695_1_, int x1, int y1, int z1, Blo
System.out.println(r);
}

if(worldObj.getBlock(x1, y1 - 1, z1) == ModBlocks.block_thorium) {

Chunk chunk = worldObj.getChunkFromBlockCoords(x1, z1);

data.setRadForCoord(chunk.xPosition, chunk.zPosition, 1000000);

System.out.println(data.getRadNumFromCoord(chunk.xPosition, chunk.zPosition));
}

}
}

Expand Down
23 changes: 21 additions & 2 deletions com/hbm/entity/effect/EntityFalloutRain.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@
import com.hbm.blocks.ModBlocks;
import com.hbm.explosion.NukeEnvironmentalEffect;
import com.hbm.lib.Library;
import com.hbm.main.MainRegistry;
import com.hbm.potion.HbmPotion;
import com.hbm.saveddata.AuxSavedData;

import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
Expand All @@ -17,6 +19,7 @@
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.util.Vec3;
import net.minecraft.world.World;
import net.minecraftforge.common.util.ForgeDirection;

public class EntityFalloutRain extends Entity {

Expand All @@ -41,7 +44,7 @@ public void onUpdate() {

if(!worldObj.isRemote) {

for(int i = 0; i < 256; i++) {
for(int i = 0; i < MainRegistry.fSpeed; i++) {

Vec3 vec = Vec3.createVectorHelper(radProgress, 0, 0);
double circum = radProgress * 2 * Math.PI * 2;
Expand All @@ -66,8 +69,19 @@ public void onUpdate() {
radProgress++;
}

if(radProgress > getScale())
if(radProgress > getScale()) {
this.setDead();
}
}

if(this.isDead) {
if(MainRegistry.rain > 0 && getScale() > 150) {
worldObj.getWorldInfo().setRaining(true);
worldObj.getWorldInfo().setThundering(true);
worldObj.getWorldInfo().setRainTime(MainRegistry.rain);
worldObj.getWorldInfo().setThunderTime(MainRegistry.rain);
AuxSavedData.setThunder(worldObj, MainRegistry.rain);
}
}
}
}
Expand All @@ -82,6 +96,11 @@ private void stomp(int x, int z) {
if(b.getMaterial() == Material.air)
continue;

if(b.isFlammable(worldObj, x, y, z, ForgeDirection.UP)) {
if(rand.nextInt(5) == 0)
worldObj.setBlock(x, y + 1, z, Blocks.fire);
}

if (b == Blocks.leaves || b == Blocks.leaves2) {
worldObj.setBlock(x, y, z, Blocks.air);
}
Expand Down
8 changes: 4 additions & 4 deletions com/hbm/entity/logic/EntityNukeExplosionMK4.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public void onUpdate() {
if(explosion == null) {
explosion = new ExplosionNukeRay(worldObj, (int)this.posX, (int)this.posY, (int)this.posZ, this.strength, this.count, this.speed, this.length);

MainRegistry.logger.info("START: " + System.currentTimeMillis());
//MainRegistry.logger.info("START: " + System.currentTimeMillis());

/*if(!worldObj.isRemote)
for(int x = (int) (posX - 1); x <= (int) (posX + 1); x++)
Expand All @@ -83,12 +83,12 @@ public void onUpdate() {
} else if(explosion.getStoredSize() > 0) {
//if(!worldObj.isRemote)
//MainRegistry.logger.info(explosion.getProgress() + " / " + count / length);
explosion.processTip(1024);
explosion.processTip(MainRegistry.mk4);
} else if(fallout) {

MainRegistry.logger.info("STOP: " + System.currentTimeMillis());
//MainRegistry.logger.info("STOP: " + System.currentTimeMillis());

EntityFalloutRain fallout = new EntityFalloutRain(this.worldObj, (int)(this.length * 0.9) * 2 * MainRegistry.falloutDura / 10);
EntityFalloutRain fallout = new EntityFalloutRain(this.worldObj);
fallout.posX = this.posX;
fallout.posY = this.posY;
fallout.posZ = this.posZ;
Expand Down
1 change: 1 addition & 0 deletions com/hbm/items/weapon/ItemAmmo.java
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ public void addInformation(ItemStack stack, EntityPlayer player, List list, bool
if(this == ModItems.ammo_rocket_nuclear) {
list.add(EnumChatFormatting.BLUE + "+ Nuclear");
list.add(EnumChatFormatting.RED + "- Very highly increased wear");
list.add(EnumChatFormatting.RED + "- Decreased projectile speed");
}

//40mm GRENADES
Expand Down
2 changes: 1 addition & 1 deletion com/hbm/lib/RefStrings.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
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 (3043)";
public static final String VERSION = "1.0.27 BETA (3048)";
//HBM's Beta Naming Convention:
//V T (X)
//V -> next release version
Expand Down
2 changes: 2 additions & 0 deletions com/hbm/main/CraftingManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ public static void AddCraftingRec()
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.gas_duct), 16), new Object[] { "SIS", " ", "SIS", 'S', "plateSteel", 'I', "plateCopper" }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_deuterium), 1), new Object[] { "TIT", "RFR", "CCC", 'T', ModItems.tank_steel, 'I', "ingotTitanium", 'R', ModItems.wire_red_copper, 'F', Item.getItemFromBlock(ModBlocks.machine_difurnace_off), 'C', ModItems.coil_tungsten }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_battery), 1), new Object[] { "TST", "RIR", "TLT", 'T', "ingotTungsten", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper, 'S', "blockSulfur", 'L', "blockLead" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_battery_potato, 1), new Object[] { "PCP", "WRW", "PCP", 'P', ItemBattery.getEmptyBattery(ModItems.battery_potato), 'C', "ingotCopper", 'R', Blocks.redstone_block, 'W', "plankWood" }));
//GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(Item.getItemFromBlock(ModBlocks.machine_battery), 1), new Object[] { "TLT", "RIR", "TST", 'T', "ingotTungsten", 'I', "ingotRedstoneAlloy", 'R', ModItems.wire_red_copper, 'S', "blockSulfur", 'L', "blockLead" }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_coal_off, 1), new Object[] { "STS", "SCS", "SFS", 'S', "ingotSteel", 'T', ModItems.tank_steel, 'C', "ingotRedstoneAlloy", 'F', Blocks.furnace }));
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModBlocks.machine_boiler_off, 1), new Object[] { "SPS", "TFT", "SPS", 'S', "ingotSteel", 'P', ModItems.board_copper, 'T', ModItems.tank_steel, 'F', Blocks.furnace }));
Expand Down Expand Up @@ -903,6 +904,7 @@ public static void reg2() {
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_rocket_emp, 1), new Object[] { "G", "R", 'G', "dustDiamond", 'R', ModItems.ammo_rocket }));
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_shrapnel, 1), new Object[] { "G", "R", 'G', ModItems.pellet_buckshot, 'R', ModItems.ammo_rocket });
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_rocket_glare, 1), new Object[] { "GGG", "GRG", "GGG", 'G', Items.redstone, 'R', ModItems.ammo_rocket });
GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_rocket_nuclear, 1), new Object[] { " P ", "NRN", " P ", 'P', ModItems.nugget_pu239, 'N', "plateDenseLead", 'R', ModItems.ammo_rocket }));

GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(ModItems.ammo_grenade, 2), new Object[] { " T ", "GCI", " P ", 'T', Items.gunpowder, 'G', ModItems.cordite, 'C', ModItems.casing_50, 'P', ModItems.primer_50, 'I', "plateIron" }));
GameRegistry.addRecipe(new ItemStack(ModItems.ammo_grenade_he, 2), new Object[] { "GIG", 'G', ModItems.ammo_grenade, 'I', Blocks.tnt });
Expand Down
Loading

0 comments on commit 82b5203

Please sign in to comment.