mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
made bombers use nbt, designators in chest loot, fizz sounds
This commit is contained in:
parent
510994b4f1
commit
0a6eb23fb8
@ -254,10 +254,36 @@ public class EntityBomber extends Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void readEntityFromNBT(NBTTagCompound p_70037_1_) { }
|
protected void readEntityFromNBT(NBTTagCompound nbt) {
|
||||||
|
ticksExisted = nbt.getInteger("ticksExisted");
|
||||||
|
bombStart = nbt.getInteger("bombStart");
|
||||||
|
bombStop = nbt.getInteger("bombStop");
|
||||||
|
bombRate = nbt.getInteger("bombRate");
|
||||||
|
type = nbt.getInteger("type");
|
||||||
|
|
||||||
|
int i = 1;
|
||||||
|
|
||||||
|
int rand = this.rand.nextInt(101);
|
||||||
|
|
||||||
|
if(rand < 50)
|
||||||
|
i = 1;
|
||||||
|
else if(rand > 50)
|
||||||
|
i = 2;
|
||||||
|
else
|
||||||
|
i = 0;
|
||||||
|
|
||||||
|
this.getDataWatcher().updateObject(16, (byte)i);
|
||||||
|
this.setSize(8.0F, 4.0F);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void writeEntityToNBT(NBTTagCompound p_70014_1_) { }
|
protected void writeEntityToNBT(NBTTagCompound nbt) {
|
||||||
|
nbt.setInteger("ticksExisted", ticksExisted);
|
||||||
|
nbt.setInteger("bombStart", bombStart);
|
||||||
|
nbt.setInteger("bombStop", bombStop);
|
||||||
|
nbt.setInteger("bombRate", bombRate);
|
||||||
|
nbt.setInteger("type", type);
|
||||||
|
}
|
||||||
|
|
||||||
protected void rotation() {
|
protected void rotation() {
|
||||||
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
float f2 = MathHelper.sqrt_double(this.motionX * this.motionX + this.motionZ * this.motionZ);
|
||||||
|
|||||||
@ -55,6 +55,7 @@ public class EntityBombletZeta extends EntityThrowable {
|
|||||||
ExplosionChaos.burn(worldObj, (int)posX, (int)posY, (int)posZ, 7);
|
ExplosionChaos.burn(worldObj, (int)posX, (int)posY, (int)posZ, 7);
|
||||||
}
|
}
|
||||||
if(type == 2) {
|
if(type == 2) {
|
||||||
|
worldObj.playSoundEffect((double)(posX + 0.5F), (double)(posY + 0.5F), (double)(posZ + 0.5F), "random.fizz", 5.0F, 2.6F + (rand.nextFloat() - rand.nextFloat()) * 0.8F);
|
||||||
ExplosionChaos.spawnChlorine(worldObj, this.posX + 0.5F - motionX, this.posY + 0.5F - motionY, this.posZ + 0.5F - motionZ, 75, 2, 0);
|
ExplosionChaos.spawnChlorine(worldObj, this.posX + 0.5F - motionX, this.posY + 0.5F - motionY, this.posZ + 0.5F - motionZ, 75, 2, 0);
|
||||||
}
|
}
|
||||||
if(type == 4) {
|
if(type == 4) {
|
||||||
|
|||||||
@ -60,7 +60,8 @@ public class HbmChestContents {
|
|||||||
new WeightedRandomChestContent(ModItems.bottle_nuka, 0, 1, 3, 4),
|
new WeightedRandomChestContent(ModItems.bottle_nuka, 0, 1, 3, 4),
|
||||||
new WeightedRandomChestContent(ModItems.bottle_cherry, 0, 1, 1, 2),
|
new WeightedRandomChestContent(ModItems.bottle_cherry, 0, 1, 1, 2),
|
||||||
new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 1),
|
new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 1),
|
||||||
new WeightedRandomChestContent(ModItems.cap_nuka, 0, 1, 15, 7) };
|
new WeightedRandomChestContent(ModItems.cap_nuka, 0, 1, 15, 7),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 0, 1, 2, 1) };
|
||||||
|
|
||||||
private static WeightedRandomChestContent[] expensive = new WeightedRandomChestContent[] {
|
private static WeightedRandomChestContent[] expensive = new WeightedRandomChestContent[] {
|
||||||
new WeightedRandomChestContent(ModItems.nugget_schrabidium, 0, 1, 1, 1),
|
new WeightedRandomChestContent(ModItems.nugget_schrabidium, 0, 1, 1, 1),
|
||||||
@ -90,7 +91,12 @@ public class HbmChestContents {
|
|||||||
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_barrel), 0, 1, 1, 6),
|
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_barrel), 0, 1, 1, 6),
|
||||||
new WeightedRandomChestContent(ModItems.canister_fuel, 0, 1, 2, 2),
|
new WeightedRandomChestContent(ModItems.canister_fuel, 0, 1, 2, 2),
|
||||||
new WeightedRandomChestContent(ModItems.canister_biofuel, 0, 1, 2, 3),
|
new WeightedRandomChestContent(ModItems.canister_biofuel, 0, 1, 2, 3),
|
||||||
new WeightedRandomChestContent(ModItems.gas_mask_m65, 60, 1, 1, 5) };
|
new WeightedRandomChestContent(ModItems.gas_mask_m65, 60, 1, 1, 5),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 0, 1, 2, 3),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 1, 1, 2, 2),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 2, 1, 2, 2),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 3, 1, 2, 3),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 4, 1, 2, 1) };
|
||||||
|
|
||||||
private static WeightedRandomChestContent[] nukeTrash = new WeightedRandomChestContent[] {
|
private static WeightedRandomChestContent[] nukeTrash = new WeightedRandomChestContent[] {
|
||||||
new WeightedRandomChestContent(ModItems.nugget_u238, 0, 3, 12, 5),
|
new WeightedRandomChestContent(ModItems.nugget_u238, 0, 3, 12, 5),
|
||||||
@ -156,7 +162,11 @@ public class HbmChestContents {
|
|||||||
new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 7),
|
new WeightedRandomChestContent(ModItems.stealth_boy, 0, 1, 1, 7),
|
||||||
new WeightedRandomChestContent(ModItems.crate_caller, 0, 1, 1, 3),
|
new WeightedRandomChestContent(ModItems.crate_caller, 0, 1, 1, 3),
|
||||||
new WeightedRandomChestContent(ModItems.gas_mask_m65, 0, 1, 1, 5),
|
new WeightedRandomChestContent(ModItems.gas_mask_m65, 0, 1, 1, 5),
|
||||||
new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 2, 2) };
|
new WeightedRandomChestContent(ModItems.grenade_nuclear, 0, 1, 2, 2),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 0, 1, 2, 3),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 1, 1, 2, 3),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 2, 1, 2, 2),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 4, 1, 2, 1) };
|
||||||
|
|
||||||
private static WeightedRandomChestContent[] missile = new WeightedRandomChestContent[] {
|
private static WeightedRandomChestContent[] missile = new WeightedRandomChestContent[] {
|
||||||
new WeightedRandomChestContent(ModItems.missile_generic, 0, 1, 1, 4),
|
new WeightedRandomChestContent(ModItems.missile_generic, 0, 1, 1, 4),
|
||||||
@ -177,7 +187,10 @@ public class HbmChestContents {
|
|||||||
new WeightedRandomChestContent(ModItems.fuel_tank_medium, 0, 1, 1, 5),
|
new WeightedRandomChestContent(ModItems.fuel_tank_medium, 0, 1, 1, 5),
|
||||||
new WeightedRandomChestContent(ModItems.fuel_tank_small, 0, 1, 1, 5),
|
new WeightedRandomChestContent(ModItems.fuel_tank_small, 0, 1, 1, 5),
|
||||||
new WeightedRandomChestContent(ModItems.warhead_mirvlet, 0, 1, 1, 1),
|
new WeightedRandomChestContent(ModItems.warhead_mirvlet, 0, 1, 1, 1),
|
||||||
new WeightedRandomChestContent(ModItems.warhead_nuclear, 0, 1, 1, 1) };
|
new WeightedRandomChestContent(ModItems.warhead_nuclear, 0, 1, 1, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 0, 1, 2, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 1, 1, 2, 1),
|
||||||
|
new WeightedRandomChestContent(ModItems.bomb_caller, 2, 1, 2, 1) };
|
||||||
|
|
||||||
private static WeightedRandomChestContent[] spaceship = new WeightedRandomChestContent[] {
|
private static WeightedRandomChestContent[] spaceship = new WeightedRandomChestContent[] {
|
||||||
new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 5),
|
new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 5),
|
||||||
|
|||||||
@ -349,11 +349,11 @@ public class HbmWorldGen implements IWorldGenerator {
|
|||||||
int z = j + rand.nextInt(16);
|
int z = j + rand.nextInt(16);
|
||||||
int y = world.getHeightValue(x, z);
|
int y = world.getHeightValue(x, z);
|
||||||
|
|
||||||
if(world.getBlock(x, y - 1, z).canPlaceTorchOnTop(world, x, y - 1, z))
|
if(world.getBlock(x, y, z).canPlaceTorchOnTop(world, x, y, z))
|
||||||
world.setBlock(x, y, z, ModBlocks.broadcaster_pc, rand.nextInt(4) + 2, 2);
|
world.setBlock(x, y + 1, z, ModBlocks.broadcaster_pc, rand.nextInt(4) + 2, 2);
|
||||||
|
|
||||||
if(MainRegistry.enableDebugMode)
|
if(MainRegistry.enableDebugMode)
|
||||||
MainRegistry.logger.info("[Debug] Successfully spawned corrupted broadcaster at " + x + " " + y +" " + z);
|
MainRegistry.logger.info("[Debug] Successfully spawned corrupted broadcaster at " + x + " " + (y + 1) +" " + z);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (MainRegistry.enableMines && rand.nextInt(MainRegistry.minefreq) == 0) {
|
if (MainRegistry.enableMines && rand.nextInt(MainRegistry.minefreq) == 0) {
|
||||||
@ -361,11 +361,11 @@ public class HbmWorldGen implements IWorldGenerator {
|
|||||||
int z = j + rand.nextInt(16);
|
int z = j + rand.nextInt(16);
|
||||||
int y = world.getHeightValue(x, z);
|
int y = world.getHeightValue(x, z);
|
||||||
|
|
||||||
if(world.getBlock(x, y - 1, z).canPlaceTorchOnTop(world, x, y - 1, z))
|
if(world.getBlock(x, y, z).canPlaceTorchOnTop(world, x, y, z))
|
||||||
world.setBlock(x, y, z, ModBlocks.mine_ap);
|
world.setBlock(x, y + 1, z, ModBlocks.mine_ap);
|
||||||
|
|
||||||
if(MainRegistry.enableDebugMode)
|
if(MainRegistry.enableDebugMode)
|
||||||
MainRegistry.logger.info("[Debug] Successfully spawned landmine at " + x + " " + y +" " + z);
|
MainRegistry.logger.info("[Debug] Successfully spawned landmine at " + x + " " + (y + 1) +" " + z);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,7 +3,7 @@ package com.hbm.lib;
|
|||||||
public class RefStrings {
|
public class RefStrings {
|
||||||
public static final String MODID = "hbm";
|
public static final String MODID = "hbm";
|
||||||
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
public static final String NAME = "Hbm's Nuclear Tech Mod";
|
||||||
public static final String VERSION = "1.0.27 BETA (2870)";
|
public static final String VERSION = "1.0.27 BETA (2875)";
|
||||||
//HBM's Beta Naming Convention:
|
//HBM's Beta Naming Convention:
|
||||||
//V T (X-Y-Z)
|
//V T (X-Y-Z)
|
||||||
//V -> next release version
|
//V -> next release version
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user