This commit is contained in:
Vaern 2022-04-18 19:47:05 -07:00
parent 83d6a8e081
commit 3d80d62f2b
18 changed files with 109 additions and 136 deletions

View File

@ -13,9 +13,7 @@ import net.minecraft.util.WeightedRandomChestContent;
public class HbmChestContents {
static Random rand = new Random();
private static WeightedRandomChestContent[] modGeneric = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] modGeneric = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(Items.bread, 0, 1, 5, 8),
new WeightedRandomChestContent(ModItems.twinkie, 0, 1, 3, 6),
new WeightedRandomChestContent(Items.iron_ingot, 0, 2, 6, 10),
@ -47,7 +45,7 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.gas_mask_m65, 60, 1, 1, 2),
new WeightedRandomChestContent(ModItems.gas_mask_filter, 0, 1, 1, 3) };
private static WeightedRandomChestContent[] antenna = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] antenna = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.twinkie, 0, 1, 3, 4),
new WeightedRandomChestContent(ModItems.ingot_steel, 0, 1, 2, 7),
new WeightedRandomChestContent(ModItems.ingot_red_copper, 0, 1, 1, 4),
@ -73,7 +71,7 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.bomb_caller, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.gas_mask_filter, 0, 1, 1, 2) };
private static WeightedRandomChestContent[] expensive = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] expensive = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.chlorine_pinwheel, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.circuit_targeting_tier3, 0, 1, 1, 4),
new WeightedRandomChestContent(ModItems.circuit_gold, 0, 1, 2, 3),
@ -109,7 +107,7 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.journal_pip, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.journal_bj, 0, 1, 1, 1) };
private static WeightedRandomChestContent[] nukeTrash = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] nukeTrash = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.nugget_u238, 0, 3, 12, 5),
new WeightedRandomChestContent(ModItems.nugget_pu240, 0, 3, 8, 5),
new WeightedRandomChestContent(ModItems.nugget_neptunium, 0, 1, 4, 3),
@ -125,8 +123,22 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.hazmat_kit, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.gas_mask_filter, 0, 1, 1, 5),
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.yellow_barrel), 0, 1, 1, 2) };
public static WeightedRandomChestContent[] nuclearFuel = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.nugget_uranium, 0, 2, 12, 3),
new WeightedRandomChestContent(ModItems.nugget_mox_fuel, 0, 2, 12, 3),
new WeightedRandomChestContent(ModItems.nugget_uranium_fuel, 0, 2, 12, 5),
new WeightedRandomChestContent(ModItems.nugget_plutonium_fuel, 0, 2, 12, 4),
new WeightedRandomChestContent(ModItems.nugget_thorium_fuel, 0, 2, 12, 3),
new WeightedRandomChestContent(ModItems.billet_ra226be, 0, 1, 1, 2),
new WeightedRandomChestContent(ModItems.rod_zirnox_empty, 0, 1, 3, 5),
new WeightedRandomChestContent(ModItems.pile_rod_uranium, 0, 2, 6, 4),
new WeightedRandomChestContent(ModItems.pile_rod_source, 0, 1, 2, 3),
new WeightedRandomChestContent(ModItems.reacher, 0, 1, 1, 4),
new WeightedRandomChestContent(ModItems.screwdriver, 0, 1, 1, 2)
};
private static WeightedRandomChestContent[] nuclear = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] nuclear = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.nugget_u235, 0, 3, 12, 5),
new WeightedRandomChestContent(ModItems.nugget_pu238, 0, 3, 12, 5),
new WeightedRandomChestContent(ModItems.nugget_pu239, 0, 3, 12, 5),
@ -156,7 +168,7 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.gas_mask_filter, 0, 1, 1, 5),
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.yellow_barrel), 0, 1, 3, 3) };
private static WeightedRandomChestContent[] vertibird = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] vertibird = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.t45_helmet, 0, 1, 1, 15),
new WeightedRandomChestContent(ModItems.t45_plate, 0, 1, 1, 15),
new WeightedRandomChestContent(ModItems.t45_legs, 0, 1, 1, 15),
@ -184,7 +196,7 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.bomb_caller, 1, 1, 1, 1),
new WeightedRandomChestContent(ModItems.bomb_caller, 2, 1, 1, 2) };
private static WeightedRandomChestContent[] missile = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] missile = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.missile_generic, 0, 1, 1, 4),
new WeightedRandomChestContent(ModItems.missile_incendiary, 0, 1, 1, 4),
new WeightedRandomChestContent(ModItems.gas_mask_m65, 0, 1, 1, 5),
@ -199,7 +211,7 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.bomb_caller, 3, 1, 1, 1),
new WeightedRandomChestContent(ModItems.bottle_nuka, 0, 1, 3, 10) };
private static WeightedRandomChestContent[] spaceship = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] spaceship = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.battery_advanced, 0, 1, 1, 5),
new WeightedRandomChestContent(ModItems.ingot_advanced_alloy, 0, 2, 16, 5),
new WeightedRandomChestContent(ModItems.wire_advanced_alloy, 0, 8, 32, 5),
@ -216,7 +228,7 @@ public class HbmChestContents {
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_wire_coated), 0, 4, 8, 5),
new WeightedRandomChestContent(Item.getItemFromBlock(ModBlocks.red_cable), 0, 8, 16, 5) };
private static WeightedRandomChestContent[] powder = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] powder = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.powder_neptunium, 0, 1, 32, 1),
new WeightedRandomChestContent(ModItems.powder_iodine, 0, 1, 32, 1),
new WeightedRandomChestContent(ModItems.powder_thorium, 0, 1, 32, 1),
@ -230,7 +242,7 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.powder_tennessine, 0, 1, 32, 1),
new WeightedRandomChestContent(ModItems.powder_cerium, 0, 1, 32, 1) };
private static WeightedRandomChestContent[] vault1 = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] vault1 = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(Items.gold_ingot, 0, 3, 14, 1),
new WeightedRandomChestContent(ModItems.pin, 0, 8, 8, 1),
new WeightedRandomChestContent(ModItems.gun_calamity, 0, 1, 1, 1),
@ -243,7 +255,7 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.grenade_if_incendiary, 0, 1, 1, 1),
new WeightedRandomChestContent(Items.diamond, 0, 1, 2, 1) };
private static WeightedRandomChestContent[] vault2 = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] vault2 = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.ingot_desh, 0, 2, 6, 1),
new WeightedRandomChestContent(ModItems.battery_advanced_cell_4, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.powder_desh_mix, 0, 1, 5, 1),
@ -259,7 +271,7 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.circuit_red_copper, 0, 12, 16, 1),
new WeightedRandomChestContent(ModItems.circuit_gold, 0, 2, 6, 1) };
private static WeightedRandomChestContent[] vault3 = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] vault3 = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.ingot_desh, 0, 6, 16, 1),
new WeightedRandomChestContent(ModItems.battery_lithium, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.powder_power, 0, 1, 5, 1),
@ -278,7 +290,7 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.circuit_red_copper, 0, 18, 32, 1),
new WeightedRandomChestContent(ModItems.circuit_gold, 0, 6, 12, 1) };
private static WeightedRandomChestContent[] vault4 = new WeightedRandomChestContent[] {
public static WeightedRandomChestContent[] vault4 = new WeightedRandomChestContent[] {
new WeightedRandomChestContent(ModItems.ammo_container, 0, 3, 6, 1),
new WeightedRandomChestContent(ModItems.clip_fatman, 0, 2, 3, 1),
new WeightedRandomChestContent(ModItems.gun_mirv_ammo, 0, 2, 3, 1),
@ -293,53 +305,5 @@ public class HbmChestContents {
new WeightedRandomChestContent(ModItems.weaponized_starblaster_cell, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.warhead_mirv, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.battery_schrabidium_cell, 0, 1, 1, 1),
new WeightedRandomChestContent(ModItems.powder_nitan_mix, 0, 16, 32, 1) };
/**
* @param i
* @return WeightedRandomChestContent array with custom loot
*
* case 1: modGeneric loot (ingots, few blocks)
* case 2: antenna loot (spare parts, electronics)
* case 3: expensive loot (revolers, circuits, schrabidium nuggets)
* case 4: nukeTrash loot (U238 and Pu240 nuggets and rods)
* case 5: nuclear loot (U235 and Pu239 nuggets and rods, fuel rods)
* case 6: vertibrid loot (T45 power armor, fusion cores, circuits, nuclear material)
* case 7: missile loot (missiles, designators, missile parts)
* case 8: spaceship loot (reactor elements, super conductors)
* case 9: powder loot (secret chest with the five powders for NITAN)
**/
//what kind of drugs did i take that made me thing this was supposed to be an acceptable way of doing things? what the hell?
public static WeightedRandomChestContent[] getLoot(int i) {
switch (i) {
case 1:
return modGeneric;
case 2:
return antenna;
case 3:
return expensive;
case 4:
return nukeTrash;
case 5:
return nuclear;
case 6:
return vertibird;
case 7:
return missile;
case 8:
return spaceship;
case 9:
return powder;
case 10:
return vault1;
case 11:
return vault2;
case 12:
return vault3;
case 13:
return vault4;
}
return null;
}
new WeightedRandomChestContent(ModItems.powder_nitan_mix, 0, 16, 32, 1) };
}

View File

@ -465,7 +465,7 @@ public class HbmWorldGen implements IWorldGenerator {
((TileEntitySafe)world.getTileEntity(x, y, z)).setPins(rand.nextInt(999) + 1);
((TileEntitySafe)world.getTileEntity(x, y, z)).setMod(1);
((TileEntitySafe)world.getTileEntity(x, y, z)).lock();
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(10), (TileEntitySafe)world.getTileEntity(x, y, z), rand.nextInt(4) + 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.vault1, (TileEntitySafe)world.getTileEntity(x, y, z), rand.nextInt(4) + 3);
break;
case 4:
case 5:
@ -473,20 +473,20 @@ public class HbmWorldGen implements IWorldGenerator {
((TileEntitySafe)world.getTileEntity(x, y, z)).setPins(rand.nextInt(999) + 1);
((TileEntitySafe)world.getTileEntity(x, y, z)).setMod(0.1);
((TileEntitySafe)world.getTileEntity(x, y, z)).lock();
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(11), (TileEntitySafe)world.getTileEntity(x, y, z), rand.nextInt(3) + 2);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.vault2, (TileEntitySafe)world.getTileEntity(x, y, z), rand.nextInt(3) + 2);
break;
case 7:
case 8:
((TileEntitySafe)world.getTileEntity(x, y, z)).setPins(rand.nextInt(999) + 1);
((TileEntitySafe)world.getTileEntity(x, y, z)).setMod(0.02);
((TileEntitySafe)world.getTileEntity(x, y, z)).lock();
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(12), (TileEntitySafe)world.getTileEntity(x, y, z), rand.nextInt(3) + 1);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.vault3, (TileEntitySafe)world.getTileEntity(x, y, z), rand.nextInt(3) + 1);
break;
case 9:
((TileEntitySafe)world.getTileEntity(x, y, z)).setPins(rand.nextInt(999) + 1);
((TileEntitySafe)world.getTileEntity(x, y, z)).setMod(0.0);
((TileEntitySafe)world.getTileEntity(x, y, z)).lock();
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(13), (TileEntitySafe)world.getTileEntity(x, y, z), rand.nextInt(2) + 1);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.vault4, (TileEntitySafe)world.getTileEntity(x, y, z), rand.nextInt(2) + 1);
break;
}
@ -598,7 +598,7 @@ public class HbmWorldGen implements IWorldGenerator {
if (world.getBlock(10000, 250, 10000) == Blocks.air) {
world.setBlock(10000, 250, 10000, Blocks.chest);
if (world.getBlock(10000, 250, 10000) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9),
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.powder,
(TileEntityChest) world.getTileEntity(10000, 250, 10000), 29);
}
}
@ -607,7 +607,7 @@ public class HbmWorldGen implements IWorldGenerator {
if (world.getBlock(0, 250, 10000) == Blocks.air) {
world.setBlock(0, 250, 10000, Blocks.chest);
if (world.getBlock(0, 250, 10000) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9),
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.powder,
(TileEntityChest) world.getTileEntity(0, 250, 10000), 29);
}
}
@ -616,7 +616,7 @@ public class HbmWorldGen implements IWorldGenerator {
if (world.getBlock(-10000, 250, 10000) == Blocks.air) {
world.setBlock(-10000, 250, 10000, Blocks.chest);
if (world.getBlock(-10000, 250, 10000) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9),
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.powder,
(TileEntityChest) world.getTileEntity(-10000, 250, 10000), 29);
}
}
@ -625,7 +625,7 @@ public class HbmWorldGen implements IWorldGenerator {
if (world.getBlock(10000, 250, 0) == Blocks.air) {
world.setBlock(10000, 250, 0, Blocks.chest);
if (world.getBlock(10000, 250, 0) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9),
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.powder,
(TileEntityChest) world.getTileEntity(10000, 250, 0), 29);
}
}
@ -634,7 +634,7 @@ public class HbmWorldGen implements IWorldGenerator {
if (world.getBlock(-10000, 250, 0) == Blocks.air) {
world.setBlock(-10000, 250, 0, Blocks.chest);
if (world.getBlock(-10000, 250, 0) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9),
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.powder,
(TileEntityChest) world.getTileEntity(-10000, 250, 0), 29);
}
}
@ -643,7 +643,7 @@ public class HbmWorldGen implements IWorldGenerator {
if (world.getBlock(10000, 250, -10000) == Blocks.air) {
world.setBlock(10000, 250, -10000, Blocks.chest);
if (world.getBlock(10000, 250, -10000) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9),
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.powder,
(TileEntityChest) world.getTileEntity(10000, 250, -10000), 29);
}
}
@ -652,7 +652,7 @@ public class HbmWorldGen implements IWorldGenerator {
if (world.getBlock(0, 250, -10000) == Blocks.air) {
world.setBlock(0, 250, -10000, Blocks.chest);
if (world.getBlock(0, 250, -10000) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9),
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.powder,
(TileEntityChest) world.getTileEntity(0, 250, -10000), 29);
}
}
@ -661,7 +661,7 @@ public class HbmWorldGen implements IWorldGenerator {
if (world.getBlock(-10000, 250, -10000) == Blocks.air) {
world.setBlock(-10000, 250, -10000, Blocks.chest);
if (world.getBlock(-10000, 250, -10000) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(9),
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.powder,
(TileEntityChest) world.getTileEntity(-10000, 250, -10000), 29);
}
}

View File

@ -90,7 +90,7 @@ public class Antenna extends WorldGenerator
world.setBlock(x + 1, y + 0, z + 2, ModBlocks.steel_poles, 3, 3);
world.setBlock(x + 2, y + 0, z + 2, Blocks.chest, 0, 3);
world.setBlockMetadataWithNotify(x + 2, y + 0, z + 2, 5, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(2), (TileEntityChest)world.getTileEntity(x + 2, y, z + 2), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.antenna, (TileEntityChest)world.getTileEntity(x + 2, y, z + 2), 8);
world.setBlock(x + 0, y + 1, z + 0, Blocks.air, 0, 3);
world.setBlock(x + 1, y + 1, z + 0, ModBlocks.steel_poles, 2, 3);
world.setBlock(x + 2, y + 1, z + 0, Blocks.air, 0, 3);

View File

@ -159,7 +159,7 @@ public class Barrel extends WorldGenerator {
if(world.getBlock(x + 2, y + 1, z + 2) == ModBlocks.crate_steel)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityCrateSteel)world.getTileEntity(x + 2, y + 1, z + 2), 16);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.expensive, (TileEntityCrateSteel)world.getTileEntity(x + 2, y + 1, z + 2), 16);
}
world.setBlock(x + 3, y + 1, z + 2, Block4, 0, 3);

View File

@ -281,7 +281,7 @@ public class Bunker extends WorldGenerator {
world.setBlock(x + 2, y + -24, z + 1, Blocks.chest, 3, 3);
world.setBlockMetadataWithNotify(x + 2, y + -24, z + 1, 3, 3);
if(world.getBlock(x + 2, y + -24, z + 1) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest) world.getTileEntity(x + 2, y + -24, z + 1), rand.nextInt(2) + 6);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.expensive, (TileEntityChest) world.getTileEntity(x + 2, y + -24, z + 1), rand.nextInt(2) + 6);
}
if(world.rand.nextInt(10) > 0) {
@ -303,12 +303,12 @@ public class Bunker extends WorldGenerator {
world.setBlock(x + 1, y + -24, z + 2, Blocks.chest, 5, 3);
world.setBlockMetadataWithNotify(x + 1, y + -24, z + 5, 3, 3);
if(world.getBlock(x + 2, y + -24, z + 1) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest) world.getTileEntity(x + 1, y + -24, z + 2), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest) world.getTileEntity(x + 1, y + -24, z + 2), 8);
}
world.setBlock(x + 3, y + -24, z + 2, Blocks.chest, 4, 3);
world.setBlockMetadataWithNotify(x + 3, y + -24, z + 2, 4, 3);
if(world.getBlock(x + 3, y + -24, z + 2) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest) world.getTileEntity(x + 3, y + -24, z + 2), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest) world.getTileEntity(x + 3, y + -24, z + 2), 8);
}
world.setBlock(x + 4, y + -24, z + 2, Block1, 0, 3);
world.setBlock(x + 11, y + -24, z + 2, Block1, 0, 3);
@ -316,12 +316,12 @@ public class Bunker extends WorldGenerator {
world.setBlock(x + 1, y + -24, z + 3, Blocks.chest, 5, 3);
world.setBlockMetadataWithNotify(x + 1, y + -24, z + 3, 5, 3);
if(world.getBlock(x + 1, y + -24, z + 3) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest) world.getTileEntity(x + 1, y + -24, z + 3), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest) world.getTileEntity(x + 1, y + -24, z + 3), 8);
}
world.setBlock(x + 3, y + -24, z + 3, Blocks.chest, 4, 3);
world.setBlockMetadataWithNotify(x + 3, y + -24, z + 3, 5, 3);
if(world.getBlock(x + 3, y + -24, z + 3) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest) world.getTileEntity(x + 3, y + -24, z + 3), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest) world.getTileEntity(x + 3, y + -24, z + 3), 8);
}
world.setBlock(x + 4, y + -24, z + 3, Block1, 0, 3);
world.setBlock(x + 7, y + -24, z + 3, Block1, 0, 3);
@ -807,7 +807,7 @@ public class Bunker extends WorldGenerator {
world.setBlock(x + 4, y + -20, z + 1, Blocks.chest, 5, 3);
world.setBlockMetadataWithNotify(x + 4, y + -20, z + 1, 5, 3);
if(world.getBlock(x + 4, y + -20, z + 1) == Blocks.chest) {
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(2), (TileEntityChest) world.getTileEntity(x + 4, y + -20, z + 1), 12);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest) world.getTileEntity(x + 4, y + -20, z + 1), 12);
}
world.setBlock(x + 8, y + -20, z + 1, Block4, 0, 3);
world.setBlock(x + 9, y + -20, z + 1, Block4, 0, 3);

View File

@ -160,7 +160,7 @@ public class CrashedVertibird extends WorldGenerator
world.setBlock(x + 6, y + 4 - yOffset, z + 7, Blocks.chest, 2, 3);
if(world.getBlock(x + 6, y + 4 - yOffset, z + 7) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(6), (TileEntityChest)world.getTileEntity(x + 6, y + 4 - yOffset, z + 7), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.vertibird, (TileEntityChest)world.getTileEntity(x + 6, y + 4 - yOffset, z + 7), 8);
}
world.setBlock(x + 7, y + 4 - yOffset, z + 7, Block1, 0, 3);
world.setBlock(x + 4, y + 4 - yOffset, z + 8, Block1, 0, 3);
@ -289,7 +289,7 @@ public class CrashedVertibird extends WorldGenerator
world.setBlock(x + 5, y + 8 - yOffset, z + 6, Blocks.chest, 2, 3);
if(world.getBlock(x + 5, y + 8 - yOffset, z + 6) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 5, y + 8 - yOffset, z + 6), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.expensive, (TileEntityChest)world.getTileEntity(x + 5, y + 8 - yOffset, z + 6), 8);
}
world.setBlock(x + 6, y + 8 - yOffset, z + 6, Block1, 0, 3);
world.setBlock(x + 7, y + 8 - yOffset, z + 6, Block1, 0, 3);

View File

@ -214,7 +214,7 @@ public class DesertAtom001 extends WorldGenerator
world.setBlock(x + 9, y + -4, z + 14, Blocks.chest, 2, 3);
if(world.getBlock(x + 9, y + -4, z + 14) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(5), (TileEntityChest)world.getTileEntity(x + 9, y + -4, z + 14), 10);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.nuclear, (TileEntityChest)world.getTileEntity(x + 9, y + -4, z + 14), 10);
}
world.setBlock(x + 10, y + -4, z + 14, Library.getRandomConcrete(), 0, 3);
world.setBlock(x + 11, y + -4, z + 14, Library.getRandomConcrete(), 0, 3);

View File

@ -1162,7 +1162,7 @@ public class DesertAtom002
world.setBlock(x + 36, y + 0, z + 12, Blocks.chest, 3, 3);
if(world.getBlock(x + 36, y + 0, z + 12) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 36, y + 0, z + 12), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest)world.getTileEntity(x + 36, y + 0, z + 12), 8);
}
world.setBlock(x + 37, y + 0, z + 12, Library.getRandomConcrete(), 0, 3);
world.setBlock(x + 40, y + 0, z + 12, ModBlocks.fence_metal, 0, 3);
@ -1183,7 +1183,7 @@ public class DesertAtom002
world.setBlock(x + 22, y + 0, z + 13, Blocks.chest, 4, 3);
if(world.getBlock(x + 22, y + 0, z + 13) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 22, y + 0, z + 13), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest)world.getTileEntity(x + 22, y + 0, z + 13), 8);
}
world.setBlock(x + 23, y + 0, z + 13, Library.getRandomConcrete(), 0, 3);
world.setBlock(x + 24, y + 0, z + 13, Block9, 5, 3);
@ -1375,7 +1375,7 @@ public class DesertAtom002
world.setBlock(x + 24, y + 0, z + 26, Blocks.chest, 2, 3);
if(world.getBlock(x + 24, y + 0, z + 26) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(4), (TileEntityChest)world.getTileEntity(x + 24, y + 0, z + 26), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.nukeTrash, (TileEntityChest)world.getTileEntity(x + 24, y + 0, z + 26), 8);
}
world.setBlock(x + 25, y + 0, z + 26, Block2, 0, 3);
world.setBlock(x + 30, y + 0, z + 26, Block2, 0, 3);
@ -1754,7 +1754,7 @@ public class DesertAtom002
world.setBlock(x + 18, y + 1, z + 16, ModBlocks.crate_steel, 0, 3);
if(world.getBlock(x + 18, y + 1, z + 16) == ModBlocks.crate_steel)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityCrateSteel)world.getTileEntity(x + 18, y + 1, z + 16), 12);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.expensive, (TileEntityCrateSteel)world.getTileEntity(x + 18, y + 1, z + 16), 12);
}
world.setBlock(x + 19, y + 1, z + 16, Library.getRandomConcrete(), 0, 3);

View File

@ -440,7 +440,7 @@ public class DesertAtom003
world.setBlock(x + 36, y + 4, z + 9, Blocks.chest, 2, 3);
if(world.getBlock(x + 36, y + 4, z + 9) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(5), (TileEntityChest)world.getTileEntity(x + 36, y + 4, z + 9), 12);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.nuclear, (TileEntityChest)world.getTileEntity(x + 36, y + 4, z + 9), 12);
}
world.setBlock(x + 37, y + 4, z + 9, Library.getRandomConcrete(), 0, 3);
world.setBlock(x + 40, y + 4, z + 9, Block5, 0, 3);

View File

@ -601,7 +601,7 @@ public class Factory extends WorldGenerator
world.setBlockMetadataWithNotify(x + 9, y + 0, z + 4, 5, 3);
if(world.getBlock(x + 9, y + 0, z + 4) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 9, y + 0, z + 4), rand.nextInt(2)+ 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest)world.getTileEntity(x + 9, y + 0, z + 4), rand.nextInt(2)+ 8);
}
world.setBlock(x + 13, y + 0, z + 4, Blocks.hopper, 3, 3);
world.setBlock(x + 14, y + 0, z + 4, Blocks.stonebrick, 0, 3);
@ -637,7 +637,7 @@ public class Factory extends WorldGenerator
world.setBlockMetadataWithNotify(x + 9, y + 0, z + 10, 5, 3);
if(world.getBlock(x + 9, y + 0, z + 10) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 9, y + 0, z + 10), rand.nextInt(2)+ 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest)world.getTileEntity(x + 9, y + 0, z + 10), rand.nextInt(2)+ 8);
}
world.setBlock(x + 13, y + 0, z + 10, Blocks.hopper, 3, 3);
world.setBlock(x + 14, y + 0, z + 10, Blocks.stonebrick, 0, 3);
@ -673,7 +673,7 @@ public class Factory extends WorldGenerator
world.setBlockMetadataWithNotify(x + 9, y + 0, z + 16, 5, 3);
if(world.getBlock(x + 9, y + 0, z + 16) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 9, y + 0, z + 16), rand.nextInt(2)+ 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest)world.getTileEntity(x + 9, y + 0, z + 16), rand.nextInt(2)+ 8);
}
world.setBlock(x + 13, y + 0, z + 16, Blocks.hopper, 3, 3);
world.setBlock(x + 14, y + 0, z + 16, Blocks.stonebrick, 0, 3);
@ -736,7 +736,7 @@ public class Factory extends WorldGenerator
world.setBlockMetadataWithNotify(x + 4, y + 0, z + 25, 3, 3);
if(world.getBlock(x + 4, y + 0, z + 25) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 4, y + 0, z + 25), rand.nextInt(2)+ 6);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.expensive, (TileEntityChest)world.getTileEntity(x + 4, y + 0, z + 25), rand.nextInt(2)+ 6);
}
world.setBlock(x + 5, y + 0, z + 25, Blocks.lava, 0, 3);
world.setBlock(x + 6, y + 0, z + 25, Blocks.stonebrick, 0, 3);

View File

@ -499,7 +499,7 @@ public class Radio01 extends WorldGenerator
world.setBlock(x + 5, y + 0, z + 11, Blocks.flower_pot, 0, 3);
world.setBlock(x + 6, y + 0, z + 11, Blocks.chest, 3, 3);
world.setBlockMetadataWithNotify(x + 6, y + 0, z + 11, 5, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 6, y + 0, z + 11), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest)world.getTileEntity(x + 6, y + 0, z + 11), 8);
world.setBlock(x + 7, y + 0, z + 11, Library.getRandomConcrete(), 0, 3);
world.setBlock(x + 8, y + 0, z + 11, Blocks.air, 0, 3);
world.setBlock(x + 9, y + 0, z + 11, Blocks.air, 0, 3);
@ -651,7 +651,7 @@ public class Radio01 extends WorldGenerator
world.setBlock(x + 6, y + 0, z + 24, ModBlocks.deco_steel, 0, 3);
world.setBlock(x + 7, y + 0, z + 24, Blocks.chest, 2, 3);
world.setBlockMetadataWithNotify(x + 7, y + 0, z + 24, 5, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(2), (TileEntityChest)world.getTileEntity(x + 7, y + 0, z + 24), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.antenna, (TileEntityChest)world.getTileEntity(x + 7, y + 0, z + 24), 8);
world.setBlock(x + 8, y + 0, z + 24, ModBlocks.deco_steel, 0, 3);
world.setBlock(x + 9, y + 0, z + 24, ModBlocks.deco_steel, 0, 3);
world.setBlock(x + 10, y + 0, z + 24, Library.getRandomConcrete(), 0, 3);
@ -1607,7 +1607,7 @@ public class Radio01 extends WorldGenerator
world.setBlock(x + 6, y + 4, z + 6, Blocks.air, 0, 3);
world.setBlock(x + 7, y + 4, z + 6, Blocks.chest, 4, 3);
world.setBlockMetadataWithNotify(x + 7, y + 4, z + 6, 5, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 7, y + 4, z + 6), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest)world.getTileEntity(x + 7, y + 4, z + 6), 8);
world.setBlock(x + 8, y + 4, z + 6, ModBlocks.deco_steel, 0, 3);
world.setBlock(x + 9, y + 4, z + 6, ModBlocks.deco_steel, 0, 3);
world.setBlock(x + 10, y + 4, z + 6, Library.getRandomConcrete(), 0, 3);
@ -1697,7 +1697,7 @@ public class Radio01 extends WorldGenerator
world.setBlock(x + 3, y + 4, z + 14, Library.getRandomConcrete(), 0, 3);
world.setBlock(x + 4, y + 4, z + 14, Blocks.chest, 2, 3);
world.setBlockMetadataWithNotify(x + 4, y + 4, z + 14, 5, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 4, y + 4, z + 14), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest)world.getTileEntity(x + 4, y + 4, z + 14), 8);
world.setBlock(x + 5, y + 4, z + 14, Blocks.air, 0, 3);
world.setBlock(x + 6, y + 4, z + 14, ModBlocks.tape_recorder, 4, 3);
world.setBlock(x + 7, y + 4, z + 14, Blocks.oak_stairs, 5, 3);
@ -2817,7 +2817,7 @@ public class Radio01 extends WorldGenerator
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 5, y + 8, z + 11), 16);*/
world.setBlock(x + 5, y + 8, z + 11, ModBlocks.crate_steel, 0, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityCrateSteel)world.getTileEntity(x + 5, y + 8, z + 11), 16);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.expensive, (TileEntityCrateSteel)world.getTileEntity(x + 5, y + 8, z + 11), 16);
world.setBlock(x + 6, y + 8, z + 11, ModBlocks.deco_steel, 0, 3);
world.setBlock(x + 7, y + 8, z + 11, Blocks.air, 0, 3);

View File

@ -655,7 +655,7 @@ public class Relay extends WorldGenerator
world.setBlock(x + 4, y + 0, z + 10, Blocks.brick_block, 0, 3);
world.setBlock(x + 6, y + 0, z + 10, ModBlocks.crate_iron, 0, 3);
world.setBlockMetadataWithNotify(x + 6, y + 0, z + 10, 3, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityCrateIron)world.getTileEntity(x + 6, y + 0, z + 10), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityCrateIron)world.getTileEntity(x + 6, y + 0, z + 10), 8);
if(world.rand.nextInt(5) == 0) {
((TileEntityCrateIron)world.getTileEntity(x + 6, y + 0, z + 10)).setInventorySlotContents(11, new ItemStack(ModItems.morning_glory));
@ -1292,7 +1292,7 @@ public class Relay extends WorldGenerator
world.setBlock(x + 7, y + 14, z + 6, Block4, 2, 3);
world.setBlock(x + 8, y + 14, z + 6, ModBlocks.crate_iron, 0, 3);
world.setBlockMetadataWithNotify(x + 8, y + 14, z + 6, 3, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(2), (TileEntityCrateIron)world.getTileEntity(x + 8, y + 14, z + 6), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.antenna, (TileEntityCrateIron)world.getTileEntity(x + 8, y + 14, z + 6), 8);
world.setBlock(x + 9, y + 14, z + 6, ModBlocks.fence_metal, 0, 3);
world.setBlock(x + 10, y + 14, z + 6, Block6, 0, 3);
world.setBlock(x + 9, y + 14, z + 7, ModBlocks.fence_metal, 0, 3);
@ -1512,7 +1512,7 @@ public class Relay extends WorldGenerator
world.setBlock(x + 5, y + 32, z + 2, Block6, 0, 3);
world.setBlock(x + 6, y + 32, z + 2, ModBlocks.crate_iron, 0, 3);
world.setBlockMetadataWithNotify(x + 6, y + 32, z + 2, 2, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityCrateIron)world.getTileEntity(x + 6, y + 32, z + 2), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.expensive, (TileEntityCrateIron)world.getTileEntity(x + 6, y + 32, z + 2), 8);
world.setBlock(x + 7, y + 32, z + 2, Block6, 0, 3);
world.setBlock(x + 5, y + 32, z + 3, Block4, 3, 3);
world.setBlock(x + 6, y + 32, z + 3, Block2, 0, 3);

View File

@ -972,7 +972,7 @@ public class Satellite extends WorldGenerator
world.setBlock(x + 7, y + 14, z + 19, dSteel, 0, 3);
world.setBlock(x + 10, y + 14, z + 19, Blocks.chest, 3, 3);
world.setBlockMetadataWithNotify(x + 10, y + 14, z + 19, 3, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 10, y + 14, z + 19), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest)world.getTileEntity(x + 10, y + 14, z + 19), 8);
world.setBlock(x + 19, y + 14, z + 19, dSteel, 0, 3);
world.setBlock(x + 20, y + 14, z + 19, dSteel, 0, 3);
world.setBlock(x + 21, y + 14, z + 19, dSteel, 0, 3);
@ -1001,7 +1001,7 @@ public class Satellite extends WorldGenerator
world.setBlock(x + 7, y + 14, z + 27, dSteel, 0, 3);
world.setBlock(x + 16, y + 14, z + 27, Blocks.chest, 2, 3);
world.setBlockMetadataWithNotify(x + 16, y + 14, z + 27, 3, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(2), (TileEntityChest)world.getTileEntity(x + 16, y + 14, z + 27), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.antenna, (TileEntityChest)world.getTileEntity(x + 16, y + 14, z + 27), 8);
world.setBlock(x + 19, y + 14, z + 27, dSteel, 0, 3);
world.setBlock(x + 5, y + 14, z + 28, ModBlocks.fence_metal, 0, 3);
world.setBlock(x + 6, y + 14, z + 28, ModBlocks.fence_metal, 0, 3);
@ -1419,7 +1419,7 @@ public class Satellite extends WorldGenerator
world.setBlock(x + 18, y + 19, z + 12, Library.getRandomConcrete(), 0, 3);
world.setBlock(x + 19, y + 19, z + 12, Blocks.chest, 4, 3);
world.setBlockMetadataWithNotify(x + 19, y + 19, z + 12, 4, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 19, y + 19, z + 12), 12);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.expensive, (TileEntityChest)world.getTileEntity(x + 19, y + 19, z + 12), 12);
world.setBlock(x + 20, y + 19, z + 12, Library.getRandomConcrete(), 0, 3);
world.setBlock(x + 21, y + 19, z + 12, Library.getRandomConcrete(), 0, 3);
world.setBlock(x + 17, y + 19, z + 13, Library.getRandomConcrete(), 0, 3);
@ -2436,7 +2436,7 @@ public class Satellite extends WorldGenerator
//world.setBlock(x + 5, y + 39, z + 12, Block7, 0, 3);
world.setBlock(x + 5, y + 39, z + 12, Blocks.chest, 4, 3);
world.setBlockMetadataWithNotify(x + 5, y + 39, z + 12, 4, 3);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 5, y + 39, z + 12), 12);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.expensive, (TileEntityChest)world.getTileEntity(x + 5, y + 39, z + 12), 12);
world.setBlock(x + 6, y + 39, z + 12, Block7, 0, 3);
world.setBlock(x + 7, y + 39, z + 12, Block4, 0, 3);
world.setBlock(x + 8, y + 39, z + 12, Block4, 0, 3);

View File

@ -390,7 +390,7 @@ public class Silo extends WorldGenerator
world.setBlockMetadataWithNotify(x + 19, y + -20, z + 10, 5, 3);
if(world.getBlock(x + 19, y + -20, z + 10) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 19, y + -20, z + 10), rand.nextInt(2)+ 6);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.expensive, (TileEntityChest)world.getTileEntity(x + 19, y + -20, z + 10), rand.nextInt(2)+ 6);
}
world.setBlock(x + 20, y + -20, z + 10, Library.getRandomConcrete(), 0, 3);
world.setBlock(x + 0, y + -20, z + 11, Library.getRandomConcrete(), 0, 3);
@ -858,7 +858,7 @@ public class Silo extends WorldGenerator
world.setBlockMetadataWithNotify(x + 8, y + -17, z + 2, 3, 3);
if(world.getBlock(x + 8, y + -17, z + 2) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(7), (TileEntityChest)world.getTileEntity(x + 8, y + -17, z + 2), rand.nextInt(2)+ 6);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.missile, (TileEntityChest)world.getTileEntity(x + 8, y + -17, z + 2), rand.nextInt(2)+ 6);
}
world.setBlock(x + 10, y + -17, z + 2, Blocks.air, 0, 3);
world.setBlock(x + 11, y + -17, z + 2, Library.getRandomConcrete(), 0, 3);
@ -1642,7 +1642,7 @@ public class Silo extends WorldGenerator
world.setBlockMetadataWithNotify(x + 8, y + -9, z + 5, 3, 3);
if(world.getBlock(x + 8, y + -9, z + 5) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(1), (TileEntityChest)world.getTileEntity(x + 8, y + -9, z + 5), rand.nextInt(2)+ 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.modGeneric, (TileEntityChest)world.getTileEntity(x + 8, y + -9, z + 5), rand.nextInt(2)+ 8);
}
world.setBlock(x + 8, y + -10, z + 5, Blocks.stone_slab, 8, 3);
world.setBlock(x + 9, y + -9, z + 5, Blocks.planks, 0, 3);

View File

@ -455,7 +455,7 @@ public class Spaceship extends WorldGenerator
world.setBlockMetadataWithNotify(x + 5, y + -2, z + 25, 5, 3);
if(world.getBlock(x + 5, y + -2, z + 25) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(8), (TileEntityChest)world.getTileEntity(x + 5, y + -2, z + 25), 12);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.spaceship, (TileEntityChest)world.getTileEntity(x + 5, y + -2, z + 25), 12);
}
world.setBlock(x + 6, y + -2, z + 25, Blocks.air, 0, 3);
world.setBlock(x + 7, y + -2, z + 25, Blocks.air, 0, 3);
@ -463,7 +463,7 @@ public class Spaceship extends WorldGenerator
world.setBlockMetadataWithNotify(x + 8, y + -2, z + 25, 4, 3);
if(world.getBlock(x + 8, y + -2, z + 25) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(8), (TileEntityChest)world.getTileEntity(x + 8, y + -2, z + 25), 12);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.spaceship, (TileEntityChest)world.getTileEntity(x + 8, y + -2, z + 25), 12);
}
world.setBlock(x + 9, y + -2, z + 25, Block3, 0, 3);
world.setBlock(x + 10, y + -2, z + 25, Block2, 0, 3);
@ -477,7 +477,7 @@ public class Spaceship extends WorldGenerator
world.setBlockMetadataWithNotify(x + 5, y + -2, z + 26, 5, 3);
if(world.getBlock(x + 5, y + -2, z + 26) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(8), (TileEntityChest)world.getTileEntity(x + 5, y + -2, z + 26), 12);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.spaceship, (TileEntityChest)world.getTileEntity(x + 5, y + -2, z + 26), 12);
}
world.setBlock(x + 6, y + -2, z + 26, Blocks.air, 0, 3);
world.setBlock(x + 7, y + -2, z + 26, Blocks.air, 0, 3);
@ -485,7 +485,7 @@ public class Spaceship extends WorldGenerator
world.setBlockMetadataWithNotify(x + 8, y + -2, z + 26, 4, 3);
if(world.getBlock(x + 8, y + -2, z + 26) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(8), (TileEntityChest)world.getTileEntity(x + 8, y + -2, z + 26), 12);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.spaceship, (TileEntityChest)world.getTileEntity(x + 8, y + -2, z + 26), 12);
}
world.setBlock(x + 9, y + -2, z + 26, Block3, 0, 3);
world.setBlock(x + 10, y + -2, z + 26, Block3, 0, 3);
@ -623,7 +623,7 @@ public class Spaceship extends WorldGenerator
world.setBlockMetadataWithNotify(x + 8, y + -2, z + 38, 2, 3);
if(world.getBlock(x + 8, y + -2, z + 38) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 8, y + -2, z + 38), 12);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.expensive, (TileEntityChest)world.getTileEntity(x + 8, y + -2, z + 38), 12);
}
world.setBlock(x + 9, y + -2, z + 38, Block3, 0, 3);
world.setBlock(x + 4, y + -2, z + 39, Block3, 0, 3);

View File

@ -143,7 +143,7 @@ public class Vertibird extends WorldGenerator
world.setBlock(x + 14, y + 2 - yOffset, z + 7, Blocks.chest, 2, 3);
if(world.getBlock(x + 14, y + 2 - yOffset, z + 7) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(6), (TileEntityChest)world.getTileEntity(x + 14, y + 2 - yOffset, z + 7), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.vertibird, (TileEntityChest)world.getTileEntity(x + 14, y + 2 - yOffset, z + 7), 8);
}
world.setBlock(x + 15, y + 2 - yOffset, z + 7, Block2, 0, 3);
world.setBlock(x + 12, y + 2 - yOffset, z + 8, Block2, 0, 3);
@ -393,7 +393,7 @@ public class Vertibird extends WorldGenerator
world.setBlock(x + 13, y + 6 - yOffset, z + 6, Blocks.chest, 2, 3);
if(world.getBlock(x + 13, y + 6 - yOffset, z + 6) == Blocks.chest)
{
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(3), (TileEntityChest)world.getTileEntity(x + 13, y + 6 - yOffset, z + 6), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.vertibird, (TileEntityChest)world.getTileEntity(x + 13, y + 6 - yOffset, z + 6), 8);
}
world.setBlock(x + 14, y + 6 - yOffset, z + 6, Block2, 0, 3);
world.setBlock(x + 15, y + 6 - yOffset, z + 6, Block2, 0, 3);

View File

@ -36,19 +36,20 @@ public class ComponentNTMFeatures {
/** Sandstone Ruin 1 */
public static class NTMHouse1 extends ComponentNTMFeatures.Feature {
private boolean hasPlacedChest = false;
private boolean hasPlacedChest;
private static ComponentNTMFeatures.Sandstone RandomSandstone = new ComponentNTMFeatures.Sandstone();
/** Constructor for this feature; takes coordinates for bounding box */
protected NTMHouse1(Random rand, int minX, int minY, int minZ) {
super(rand, minX, minY, minZ, 9, 4, 6);
this.hasPlacedChest = false;
}
@Override
protected void func_143012_a(NBTTagCompound nbt) {
super.func_143012_a(nbt);
nbt.setBoolean("hasChest", hasPlacedChest);
nbt.setBoolean("hasChest", this.hasPlacedChest);
}
@Override
@ -118,7 +119,7 @@ public class ComponentNTMFeatures {
//Loot/Sand
this.placeBlockAtCurrentPosition(world, ModBlocks.crate_weapon, 0, 1, 0, 1, box);
if(!this.hasPlacedChest)
this.hasPlacedChest = this.generateStructureChestContents(world, box, rand, 3, 0, 1, HbmChestContents.getLoot(1), rand.nextInt(2) + 8); //Make sure to redo that class kek
this.hasPlacedChest = this.generateStructureChestContents(world, box, rand, 3, 0, 1, HbmChestContents.modGeneric, rand.nextInt(2) + 8); //Make sure to redo that class kek
this.fillWithBlocks(world, box, 5, 0, 1, 6, 0, 1, ModBlocks.crate, Blocks.air, false);
this.placeBlockAtCurrentPosition(world, Blocks.sand, 0, 7, 0, 1, box);
if(rand.nextFloat() <= 0.25)
@ -136,18 +137,20 @@ public class ComponentNTMFeatures {
private static ComponentNTMFeatures.ConcreteBricks RandomConcreteBricks = new ComponentNTMFeatures.ConcreteBricks();
private static ComponentNTMFeatures.LabTiles RandomLabTiles = new ComponentNTMFeatures.LabTiles();
private boolean[] hasPlacedLoot = new boolean[]{false, false};
private boolean[] hasPlacedLoot = new boolean[2];
/** Constructor for this feature; takes coordinates for bounding box */
protected NTMLab1(Random rand, int minX, int minY, int minZ) {
super(rand, minX, minY, minZ, 9, 4, 7);
this.hasPlacedLoot[0] = false;
this.hasPlacedLoot[1] = false;
}
@Override
protected void func_143012_a(NBTTagCompound nbt) {
super.func_143012_a(nbt);
nbt.setBoolean("hasLoot1", hasPlacedLoot[0]);
nbt.setBoolean("hasLoot2", hasPlacedLoot[1]);
nbt.setBoolean("hasLoot1", this.hasPlacedLoot[0]);
nbt.setBoolean("hasLoot2", this.hasPlacedLoot[1]);
}
@Override
@ -239,7 +242,7 @@ public class ComponentNTMFeatures {
ItemDoor.placeDoorBlock(world, this.getXWithOffset(3, featureSizeZ - 1), this.getYWithOffset(1), this.getZWithOffset(3, featureSizeZ - 1), doorMeta, ModBlocks.door_office);
int northDecoMeta = this.getMetadataForRotatableDeco(3);
this.fillWithMetadataBlocks(world, box, 5, featureSizeY - 1, 1, featureSizeX - 1, featureSizeY - 1, 1, ModBlocks.steel_scaffold, northDecoMeta, Blocks.air, 0, false);
this.fillWithMetadataBlocks(world, box, 5, featureSizeY - 1, 1, featureSizeX - 1, featureSizeY - 1, 1, ModBlocks.steel_scaffold, westDecoMeta, Blocks.air, 0, false);
this.fillWithMetadataBlocks(world, box, 5, featureSizeY - 1, 2, featureSizeX - 1, featureSizeY - 1, 2, ModBlocks.steel_wall, northDecoMeta, Blocks.air, 0, false);
this.placeBlockAtCurrentPosition(world, ModBlocks.machine_electric_furnace_off, northDecoMeta, 5, 1, 1, box);
this.placeBlockAtCurrentPosition(world, ModBlocks.machine_microwave, northDecoMeta, 5, 2, 1, box);
@ -250,15 +253,15 @@ public class ComponentNTMFeatures {
if(!hasPlacedLoot[0]) {
this.placeBlockAtCurrentPosition(world, ModBlocks.deco_loot, 0, 6, 2, 3, box);
LootGenerator.lootMedicine(world, this.getXWithOffset(6, 3), this.getYWithOffset(2), this.getZWithOffset(6, 3));
hasPlacedLoot[0] = true;
this.hasPlacedLoot[0] = true;
}
this.placeBlockAtCurrentPosition(world, ModBlocks.crate_can, 0, featureSizeX - 1, 1, featureSizeZ - 2, box);
if(!hasPlacedLoot[1]) {
this.placeBlockAtCurrentPosition(world, ModBlocks.crate_iron, 0, featureSizeX - 1, 1, featureSizeZ - 1, box);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(2), (TileEntityCrateIron)world.getTileEntity(this.getXWithOffset(featureSizeX - 1, featureSizeZ - 1),
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.antenna, (TileEntityCrateIron)world.getTileEntity(this.getXWithOffset(featureSizeX - 1, featureSizeZ - 1),
this.getYWithOffset(1), this.getZWithOffset(featureSizeX - 1, featureSizeZ - 1)), 8);
hasPlacedLoot[1] = true;
this.hasPlacedLoot[1] = true;
}
return true;
@ -271,17 +274,19 @@ public class ComponentNTMFeatures {
private static ComponentNTMFeatures.ConcreteBricks RandomConcreteBricks = new ComponentNTMFeatures.ConcreteBricks();
private static ComponentNTMFeatures.LabTiles RandomLabTiles = new ComponentNTMFeatures.LabTiles();
private boolean[] hasPlacedLoot = new boolean[]{false, false};
private boolean[] hasPlacedLoot = new boolean[2];
protected NTMLab2(Random rand, int minX, int minY, int minZ) {
super(rand, minX, minY, minZ, 12, 11, 8);
this.hasPlacedLoot[0] = false;
this.hasPlacedLoot[1] = false;
}
@Override
protected void func_143012_a(NBTTagCompound nbt) {
super.func_143012_a(nbt);
nbt.setBoolean("hasLoot1", hasPlacedLoot[0]);
nbt.setBoolean("hasLoot2", hasPlacedLoot[1]);
nbt.setBoolean("hasLoot1", this.hasPlacedLoot[0]);
nbt.setBoolean("hasLoot2", this.hasPlacedLoot[1]);
}
@Override
@ -428,9 +433,9 @@ public class ComponentNTMFeatures {
this.placeBlockAtCurrentPosition(world, ModBlocks.crate, 0, 4, 1, featureSizeZ - 2, box);
if(!hasPlacedLoot[0]) {
this.placeBlockAtCurrentPosition(world, ModBlocks.crate_iron, 0, 5, 1, featureSizeZ - 2, box);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(5), (TileEntityCrateIron)world.getTileEntity(this.getXWithOffset(5, featureSizeZ - 2),
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.nuclearFuel, (TileEntityCrateIron)world.getTileEntity(this.getXWithOffset(5, featureSizeZ - 2),
this.getYWithOffset(1), this.getZWithOffset(5, featureSizeZ - 2)), 8);
hasPlacedLoot[0] = true;
this.hasPlacedLoot[0] = true;
}
this.fillWithBlocks(world, box, 4, 2, featureSizeZ - 2, 5, 2, featureSizeZ - 2, ModBlocks.crate_lead, Blocks.air, false);
@ -441,8 +446,9 @@ public class ComponentNTMFeatures {
this.fillWithBlocks(world, box, featureSizeX - 4, 3, featureSizeZ - 2, featureSizeX - 2, 3, featureSizeZ - 2, ModBlocks.steel_roof, Blocks.air, false);
if(!hasPlacedLoot[1]) {
this.placeBlockAtCurrentPosition(world, ModBlocks.crate_iron, 0, featureSizeX - 2, 1, 3, box);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.getLoot(4), (TileEntityCrateIron)world.getTileEntity(this.getXWithOffset(featureSizeX - 2, 3),
this.getYWithOffset(1), this.getZWithOffset(featureSizeX - 2, 3)), 8);
WeightedRandomChestContent.generateChestContents(rand, HbmChestContents.nukeTrash, (TileEntityCrateIron)world.getTileEntity(this.getXWithOffset(featureSizeX - 2, 3),
this.getYWithOffset(1), this.getZWithOffset(featureSizeX - 2, 3)), 9);
this.hasPlacedLoot[1] = true;
}
return true;

View File

@ -84,6 +84,9 @@ public class MapGenNTMFeatures extends MapGenStructure {
public Start(World world, Random rand, int chunkX, int chunkZ) {
super(chunkX, chunkZ);
//annoying predetermination angre
rand.setSeed((chunkX + chunkZ) * 31);
BiomeGenBase biomegenbase = world.getBiomeGenForCoords(chunkX * 16 + 8, chunkZ * 16 + 8);
int posY = world.getHeightValue(chunkX * 16 + 8, chunkZ * 16 + 8);
if(posY == 0)
@ -99,7 +102,7 @@ public class MapGenNTMFeatures extends MapGenStructure {
ComponentNTMFeatures.NTMHouse1 house1 = new ComponentNTMFeatures.NTMHouse1(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
this.components.add(house1);
} else {
if(rand.nextInt(2) == 0) {
if(rand.nextBoolean()) {
ComponentNTMFeatures.NTMLab2 lab2 = new ComponentNTMFeatures.NTMLab2(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
this.components.add(lab2);
} else {