mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
Merge pull request #580 from Vaern/master
Generator for small- to medium-sized structures based on MapGenStructure
This commit is contained in:
commit
22aa659299
@ -5,6 +5,7 @@ import static com.hbm.items.ModItems.*;
|
||||
import static com.hbm.inventory.OreDictManager.*;
|
||||
|
||||
import com.hbm.blocks.ModBlocks;
|
||||
import com.hbm.config.GeneralConfig;
|
||||
import com.hbm.hazard.modifier.*;
|
||||
import com.hbm.hazard.transformer.*;
|
||||
import com.hbm.hazard.type.*;
|
||||
@ -333,6 +334,10 @@ public class HazardRegistry {
|
||||
registerRTGPellet(pellet_rtg_americium, am241 * rtg, 0);
|
||||
HazardSystem.register(new ItemStack(pellet_rtg_depleted, 1, DepletedRTGMaterial.NEPTUNIUM.ordinal()), makeData(RADIATION, np237 * rtg));
|
||||
|
||||
HazardSystem.register(pile_rod_uranium, makeData(RADIATION, u * billet * 3));
|
||||
HazardSystem.register(pile_rod_plutonium, makeData(RADIATION, !GeneralConfig.enable528 ? purg * billet * 3 : purg * billet * 2 + wst * billet));
|
||||
HazardSystem.register(pile_rod_source, makeData(RADIATION, rabe * billet * 3));
|
||||
|
||||
registerBreedingRodRadiation(BreedingRodType.TRITIUM, 0.001F);
|
||||
registerBreedingRodRadiation(BreedingRodType.CO60, co60);
|
||||
registerBreedingRodRadiation(BreedingRodType.RA226, ra226);
|
||||
|
||||
@ -247,21 +247,11 @@ public class SILEXRecipes {
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_balefire), 90 - i * 20))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 10 + 20 * i)) );
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_balefire, 1, i + 5), new SILEXRecipe(400, 100, 3)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_balefire), 89 - i * 20))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nuclear_waste_tiny), 10 + 20 * i)) );
|
||||
|
||||
// FLASHGOLD //
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_balefire_gold, 1, i), new SILEXRecipe(600, 100, 2)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 90 - 20 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_balefire), 10 + 20 * i)) );
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_balefire_gold, 1, i + 5), new SILEXRecipe(600, 100, 2)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 89 - 20 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_balefire), 10 + 20 * i)) );
|
||||
|
||||
// FLASHLEAD //
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_flashlead, 1, i), new SILEXRecipe(600, 100, 2)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 44 - 10 * i))
|
||||
@ -270,14 +260,6 @@ public class SILEXRecipes {
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_mercury), 1 + 6 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_gh336), 10 + 8 * i)) ); //Reimumunch
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_flashlead, 1, i + 5), new SILEXRecipe(600, 100, 2)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 2)) //literal how
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_au198), 43 - 10 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pb209), 43 - 10 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_bismuth), 1 + 6 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_mercury), 1 + 6 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_gh336), 10 + 8 * i)) );
|
||||
|
||||
// POBE //
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_po210be, 1, i), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_polonium), 45 - 10 * i))
|
||||
@ -285,13 +267,6 @@ public class SILEXRecipes {
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 5 + 10 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 5 + 10 * i)) );
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_po210be, 1, i + 5), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_polonium), 44 - 10 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_beryllium), 45 - 10 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 5 + 10 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 5 + 10 * i)) );
|
||||
|
||||
// PUBE //
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_pu238be, 1, i), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_pu238), 45 - 10 * i))
|
||||
@ -316,15 +291,7 @@ public class SILEXRecipes {
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_polonium), 2 + 5 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 5 + 10 * i)) );
|
||||
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_ra226be, 1, i + 5), new SILEXRecipe(600, 100, 1)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_xe135_tiny), 1))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_ra226), 44 - 10 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_beryllium), 45 - 10 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_lead), 3 + 5 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.nugget_polonium), 2 + 5 * i))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.powder_coal_tiny), 5 + 10 * i)) );
|
||||
|
||||
// FLASHGOLD //
|
||||
// DRX //
|
||||
recipes.put(new ComparableStack(ModItems.rbmk_pellet_drx, 1, i), new SILEXRecipe(600, 100, 4)
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.undefined), 1))
|
||||
.addOut(new WeightedRandomObject(new ItemStack(ModItems.undefined), 1))
|
||||
|
||||
@ -3630,12 +3630,12 @@ public class ModItems {
|
||||
rbmk_pellet_hes = (ItemRBMKPellet) new ItemRBMKPellet("Highly Enriched Schrabidium-326").setUnlocalizedName("rbmk_pellet_hes").setTextureName(RefStrings.MODID + ":rbmk_pellet_hes");
|
||||
rbmk_pellet_leaus = (ItemRBMKPellet) new ItemRBMKPellet("Low Enriched Australium (Tasmanite)").setUnlocalizedName("rbmk_pellet_leaus").setTextureName(RefStrings.MODID + ":rbmk_pellet_leaus");
|
||||
rbmk_pellet_heaus = (ItemRBMKPellet) new ItemRBMKPellet("Highly Enriched Australium (Ayerite)").setUnlocalizedName("rbmk_pellet_heaus").setTextureName(RefStrings.MODID + ":rbmk_pellet_heaus");
|
||||
rbmk_pellet_po210be = (ItemRBMKPellet) new ItemRBMKPellet("Polonium-210 & Beryllium Neutron Source").setUnlocalizedName("rbmk_pellet_po210be").setTextureName(RefStrings.MODID + ":rbmk_pellet_po210be");
|
||||
rbmk_pellet_ra226be = (ItemRBMKPellet) new ItemRBMKPellet("Radium-226 & Beryllium Neutron Source").setUnlocalizedName("rbmk_pellet_ra226be").setTextureName(RefStrings.MODID + ":rbmk_pellet_ra226be");
|
||||
rbmk_pellet_po210be = (ItemRBMKPellet) new ItemRBMKPellet("Polonium-210 & Beryllium Neutron Source").disableXenon().setUnlocalizedName("rbmk_pellet_po210be").setTextureName(RefStrings.MODID + ":rbmk_pellet_po210be");
|
||||
rbmk_pellet_ra226be = (ItemRBMKPellet) new ItemRBMKPellet("Radium-226 & Beryllium Neutron Source").disableXenon().setUnlocalizedName("rbmk_pellet_ra226be").setTextureName(RefStrings.MODID + ":rbmk_pellet_ra226be");
|
||||
rbmk_pellet_pu238be = (ItemRBMKPellet) new ItemRBMKPellet("Plutonium-238 & Beryllium Neutron Source").setUnlocalizedName("rbmk_pellet_pu238be").setTextureName(RefStrings.MODID + ":rbmk_pellet_pu238be");
|
||||
rbmk_pellet_balefire_gold = (ItemRBMKPellet) new ItemRBMKPellet("Antihydrogen in a Magnetized Gold-198 Lattice").setUnlocalizedName("rbmk_pellet_balefire_gold").setTextureName(RefStrings.MODID + ":rbmk_pellet_balefire_gold");
|
||||
rbmk_pellet_flashlead = (ItemRBMKPellet) new ItemRBMKPellet("Antihydrogen confined by a Magnetized Gold-198 and Lead-209 Lattice").setUnlocalizedName("rbmk_pellet_flashlead").setTextureName(RefStrings.MODID + ":rbmk_pellet_flashlead");
|
||||
rbmk_pellet_balefire = (ItemRBMKPellet) new ItemRBMKPellet("Draconic Flames").setUnlocalizedName("rbmk_pellet_balefire").setTextureName(RefStrings.MODID + ":rbmk_pellet_balefire");
|
||||
rbmk_pellet_balefire_gold = (ItemRBMKPellet) new ItemRBMKPellet("Antihydrogen in a Magnetized Gold-198 Lattice").disableXenon().setUnlocalizedName("rbmk_pellet_balefire_gold").setTextureName(RefStrings.MODID + ":rbmk_pellet_balefire_gold");
|
||||
rbmk_pellet_flashlead = (ItemRBMKPellet) new ItemRBMKPellet("Antihydrogen confined by a Magnetized Gold-198 and Lead-209 Lattice").disableXenon().setUnlocalizedName("rbmk_pellet_flashlead").setTextureName(RefStrings.MODID + ":rbmk_pellet_flashlead");
|
||||
rbmk_pellet_balefire = (ItemRBMKPellet) new ItemRBMKPellet("Draconic Flames").disableXenon().setUnlocalizedName("rbmk_pellet_balefire").setTextureName(RefStrings.MODID + ":rbmk_pellet_balefire");
|
||||
rbmk_pellet_zfb_bismuth = (ItemRBMKPellet) new ItemRBMKPellet("Zirconium Fast Breeder - LEU/HEP-241#Bi").setUnlocalizedName("rbmk_pellet_zfb_bismuth").setTextureName(RefStrings.MODID + ":rbmk_pellet_zfb_bismuth");
|
||||
rbmk_pellet_zfb_pu241 = (ItemRBMKPellet) new ItemRBMKPellet("Zirconium Fast Breeder - HEU-235/HEP-240#Pu-241").setUnlocalizedName("rbmk_pellet_zfb_pu241").setTextureName(RefStrings.MODID + ":rbmk_pellet_zfb_pu241");
|
||||
rbmk_pellet_zfb_am_mix = (ItemRBMKPellet) new ItemRBMKPellet("Zirconium Fast Breeder - HEP-241#MEA").setUnlocalizedName("rbmk_pellet_zfb_am_mix").setTextureName(RefStrings.MODID + ":rbmk_pellet_zfb_am_mix");
|
||||
@ -3775,18 +3775,21 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(30)
|
||||
.setFunction(EnumBurnFunc.SIGMOID)
|
||||
.setXenon(0.05D, 50D)
|
||||
.setHeat(1.5D)
|
||||
.setMeltingPoint(7029).setUnlocalizedName("rbmk_fuel_leaus").setTextureName(RefStrings.MODID + ":rbmk_fuel_leaus");
|
||||
rbmk_fuel_heaus = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_heaus)
|
||||
.setYield(100000000D)
|
||||
.setStats(35)
|
||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||
.setXenon(0.05D, 50D)
|
||||
.setHeat(2D)
|
||||
.setMeltingPoint(5211).setUnlocalizedName("rbmk_fuel_heaus").setTextureName(RefStrings.MODID + ":rbmk_fuel_heaus");
|
||||
rbmk_fuel_po210be = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_po210be)
|
||||
.setYield(25000000D)
|
||||
.setStats(15, 40)
|
||||
.setFunction(EnumBurnFunc.SQUARE_ROOT)
|
||||
.setXenon(0.0D, 50D)
|
||||
.setHeat(0.1D)
|
||||
.setDiffusion(0.05D)
|
||||
.setMeltingPoint(1287)
|
||||
@ -3795,6 +3798,7 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(0D, 20)
|
||||
.setFunction(EnumBurnFunc.PASSIVE)
|
||||
.setXenon(0.0D, 50D)
|
||||
.setHeat(0.035D)
|
||||
.setDiffusion(0.5D)
|
||||
.setMeltingPoint(700)
|
||||
@ -3811,18 +3815,21 @@ public class ModItems {
|
||||
.setYield(100000000D)
|
||||
.setStats(50, 10)
|
||||
.setFunction(EnumBurnFunc.ARCH)
|
||||
.setXenon(0.0D, 50D)
|
||||
.setMeltingPoint(2000)
|
||||
.setUnlocalizedName("rbmk_fuel_balefire_gold").setTextureName(RefStrings.MODID + ":rbmk_fuel_balefire_gold");
|
||||
rbmk_fuel_flashlead = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_flashlead)
|
||||
.setYield(250000000D)
|
||||
.setStats(40, 50)
|
||||
.setFunction(EnumBurnFunc.ARCH)
|
||||
.setXenon(0.0D, 50D)
|
||||
.setMeltingPoint(2050)
|
||||
.setUnlocalizedName("rbmk_fuel_flashlead").setTextureName(RefStrings.MODID + ":rbmk_fuel_flashlead");
|
||||
rbmk_fuel_balefire = (ItemRBMKRod) new ItemRBMKRod(rbmk_pellet_balefire)
|
||||
.setYield(100000000D)
|
||||
.setStats(100, 35)
|
||||
.setFunction(EnumBurnFunc.LINEAR)
|
||||
.setXenon(0.0D, 50D)
|
||||
.setHeat(3D)
|
||||
.setMeltingPoint(3652)
|
||||
.setUnlocalizedName("rbmk_fuel_balefire").setTextureName(RefStrings.MODID + ":rbmk_fuel_balefire");
|
||||
|
||||
@ -18,6 +18,7 @@ import net.minecraft.util.IIcon;
|
||||
public class ItemRBMKPellet extends ItemNuclearWaste {
|
||||
|
||||
public String fullName = "";
|
||||
protected boolean hasXenon = true;
|
||||
|
||||
public ItemRBMKPellet(String fullName) {
|
||||
this.fullName = fullName;
|
||||
@ -25,11 +26,16 @@ public class ItemRBMKPellet extends ItemNuclearWaste {
|
||||
this.setMaxDamage(0);
|
||||
this.setCreativeTab(MainRegistry.controlTab);
|
||||
}
|
||||
|
||||
public ItemRBMKPellet disableXenon() {
|
||||
this.hasXenon = false;
|
||||
return this;
|
||||
}
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getSubItems(Item item, CreativeTabs tabs, List list) {
|
||||
for(int i = 0; i < 10; ++i) {
|
||||
for(int i = 0; i < (this.hasXenon ? 10 : 5); ++i) {
|
||||
list.add(new ItemStack(item, 1, i));
|
||||
}
|
||||
}
|
||||
@ -42,16 +48,17 @@ public class ItemRBMKPellet extends ItemNuclearWaste {
|
||||
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void registerIcons(IIconRegister p_94581_1_) {
|
||||
super.registerIcons(p_94581_1_);
|
||||
public void registerIcons(IIconRegister iconRegister) {
|
||||
super.registerIcons(iconRegister);
|
||||
|
||||
this.enrichmentOverlays = new IIcon[5];
|
||||
|
||||
for(int i = 0; i < enrichmentOverlays.length; i++) {
|
||||
enrichmentOverlays[i] = p_94581_1_.registerIcon("hbm:rbmk_pellet_overlay_e" + i);
|
||||
enrichmentOverlays[i] = iconRegister.registerIcon("hbm:rbmk_pellet_overlay_e" + i);
|
||||
}
|
||||
|
||||
xenonOverlay = p_94581_1_.registerIcon("hbm:rbmk_pellet_overlay_xenon");
|
||||
if(this.hasXenon)
|
||||
xenonOverlay = iconRegister.registerIcon("hbm:rbmk_pellet_overlay_xenon");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -92,6 +92,12 @@ public class ItemRBMKRod extends Item {
|
||||
this.depFunc = func;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemRBMKRod setXenon(double gen, double burn) {
|
||||
this.xGen = gen;
|
||||
this.xBurn = burn;
|
||||
return this;
|
||||
}
|
||||
|
||||
public ItemRBMKRod setHeat(double heat) {
|
||||
this.heat = heat;
|
||||
|
||||
@ -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),
|
||||
@ -46,8 +44,30 @@ public class HbmChestContents {
|
||||
new WeightedRandomChestContent(ModItems.canister_full, Fluids.BIOFUEL.getID(), 1, 2, 3),
|
||||
new WeightedRandomChestContent(ModItems.gas_mask_m65, 60, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.gas_mask_filter, 0, 1, 1, 3) };
|
||||
|
||||
public static WeightedRandomChestContent[] machineParts = new WeightedRandomChestContent[] {
|
||||
new WeightedRandomChestContent(ModItems.plate_steel, 0, 1, 5, 5),
|
||||
new WeightedRandomChestContent(ModItems.hull_big_steel, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.hull_small_steel, 0, 1, 3, 3),
|
||||
new WeightedRandomChestContent(ModItems.plate_polymer, 0, 1, 6, 5),
|
||||
new WeightedRandomChestContent(ModItems.bolt_tungsten, 0, 1, 4, 3),
|
||||
new WeightedRandomChestContent(ModItems.board_copper, 0, 1, 2, 4),
|
||||
new WeightedRandomChestContent(ModItems.coil_tungsten, 0, 1, 2, 5),
|
||||
new WeightedRandomChestContent(ModItems.motor, 0, 1, 2, 4),
|
||||
new WeightedRandomChestContent(ModItems.tank_steel, 0, 1, 2, 3),
|
||||
new WeightedRandomChestContent(ModItems.coil_copper, 0, 1, 3, 4),
|
||||
new WeightedRandomChestContent(ModItems.coil_copper_torus, 0, 1, 2, 3),
|
||||
new WeightedRandomChestContent(ModItems.wire_red_copper, 0, 1, 8, 5),
|
||||
new WeightedRandomChestContent(ModItems.piston_selenium, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.battery_advanced_cell, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.circuit_raw, 0, 1, 3, 5),
|
||||
new WeightedRandomChestContent(ModItems.circuit_aluminium, 0, 1, 2, 4),
|
||||
new WeightedRandomChestContent(ModItems.circuit_copper, 0, 1, 1, 3),
|
||||
new WeightedRandomChestContent(ModItems.circuit_red_copper, 0, 1, 1, 2),
|
||||
new WeightedRandomChestContent(ModItems.blade_titanium, 0, 1, 8, 1)
|
||||
};
|
||||
|
||||
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 +93,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 +129,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 +145,29 @@ 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.billet_uranium, 0, 1, 4, 4),
|
||||
new WeightedRandomChestContent(ModItems.billet_pu_mix, 0, 1, 2, 4),
|
||||
new WeightedRandomChestContent(ModItems.billet_th232, 0, 1, 3, 3),
|
||||
new WeightedRandomChestContent(ModItems.billet_uranium_fuel, 0, 1, 3, 5),
|
||||
new WeightedRandomChestContent(ModItems.billet_mox_fuel, 0, 1, 3, 5),
|
||||
new WeightedRandomChestContent(ModItems.billet_plutonium_fuel, 0, 1, 3, 4),
|
||||
new WeightedRandomChestContent(ModItems.billet_thorium_fuel, 0, 1, 3, 3),
|
||||
new WeightedRandomChestContent(ModItems.billet_ra226be, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.billet_beryllium, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.nugget_u233, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.nugget_u235, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.nugget_pu239, 0, 1, 1, 1),
|
||||
new WeightedRandomChestContent(ModItems.rod_zirnox_empty, 0, 1, 3, 3),
|
||||
new WeightedRandomChestContent(ModItems.ingot_graphite, 0, 1, 4, 3),
|
||||
new WeightedRandomChestContent(ModItems.pile_rod_uranium, 0, 2, 5, 3),
|
||||
new WeightedRandomChestContent(ModItems.pile_rod_source, 0, 1, 2, 2),
|
||||
new WeightedRandomChestContent(ModItems.reacher, 0, 1, 1, 3),
|
||||
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 +197,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 +225,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 +240,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 +257,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 +271,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 +284,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 +300,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 +319,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 +334,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) };
|
||||
}
|
||||
|
||||
@ -3,6 +3,9 @@ package com.hbm.lib;
|
||||
import com.hbm.world.test.StructureComponentTest;
|
||||
import com.hbm.world.test.StructureStartTest;
|
||||
import com.hbm.world.test.WorldGenTest;
|
||||
import com.hbm.world.worldgen.ComponentNTMFeatures;
|
||||
import com.hbm.world.worldgen.MapGenNTMFeatures;
|
||||
import com.hbm.world.worldgen.NTMWorldGenerator;
|
||||
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
import cpw.mods.fml.common.registry.GameRegistry;
|
||||
@ -16,10 +19,13 @@ public class HbmWorld {
|
||||
|
||||
public static void initWorldGen() {
|
||||
|
||||
MapGenStructureIO.registerStructure(StructureStartTest.class, "HFR_STRUCTURE");
|
||||
MapGenStructureIO.func_143031_a(StructureComponentTest.class, "HFR_COMPONENT");
|
||||
//MapGenStructureIO.registerStructure(StructureStartTest.class, "HFR_STRUCTURE");
|
||||
//MapGenStructureIO.func_143031_a(StructureComponentTest.class, "HFR_COMPONENT");
|
||||
MapGenStructureIO.registerStructure(MapGenNTMFeatures.Start.class, "NTMFeatures");
|
||||
ComponentNTMFeatures.registerNTMFeatures();
|
||||
|
||||
registerWorldGen(new HbmWorldGen(), 1);
|
||||
registerWorldGen(new NTMWorldGenerator(), 1); //Ideally, move everything over from HbmWorldGen to NTMWorldGenerator
|
||||
//registerWorldGen(new WorldGenTest(), 1);
|
||||
}
|
||||
|
||||
|
||||
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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);
|
||||
|
||||
1277
src/main/java/com/hbm/world/worldgen/ComponentNTMFeatures.java
Normal file
1277
src/main/java/com/hbm/world/worldgen/ComponentNTMFeatures.java
Normal file
File diff suppressed because it is too large
Load Diff
148
src/main/java/com/hbm/world/worldgen/MapGenNTMFeatures.java
Normal file
148
src/main/java/com/hbm/world/worldgen/MapGenNTMFeatures.java
Normal file
@ -0,0 +1,148 @@
|
||||
package com.hbm.world.worldgen;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.biome.BiomeGenBase;
|
||||
import net.minecraft.world.biome.BiomeGenMesa;
|
||||
import net.minecraft.world.gen.structure.ComponentScatteredFeaturePieces;
|
||||
import net.minecraft.world.gen.structure.MapGenStructure;
|
||||
import net.minecraft.world.gen.structure.StructureStart;
|
||||
|
||||
public class MapGenNTMFeatures extends MapGenStructure {
|
||||
|
||||
private static List biomelist = Arrays.asList(new BiomeGenBase[] {BiomeGenBase.ocean, BiomeGenBase.river, BiomeGenBase.frozenOcean, BiomeGenBase.frozenRiver, BiomeGenBase.deepOcean});
|
||||
/** Maximum distance between structures */
|
||||
private int maxDistanceBetweenScatteredFeatures;
|
||||
/** Minimum distance between structures */
|
||||
private int minDistanceBetweenScatteredFeatures;
|
||||
|
||||
public MapGenNTMFeatures() {
|
||||
this.maxDistanceBetweenScatteredFeatures = 24;
|
||||
this.minDistanceBetweenScatteredFeatures = 8;
|
||||
}
|
||||
|
||||
/** String ID for this MapGen */
|
||||
@Override
|
||||
public String func_143025_a() {
|
||||
return "NTMFeatures";
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if a structure can be spawned at coords, based off of chance and biome
|
||||
* (Good approach would probably be to only exclude ocean biomes through biomelist and rely on temperature and rainfall instead of biomegenbase, would allow for biomes o' plenty compat)
|
||||
*/
|
||||
@Override
|
||||
protected boolean canSpawnStructureAtCoords(int chunkX, int chunkZ) {
|
||||
|
||||
int k = chunkX;
|
||||
int l = chunkZ;
|
||||
|
||||
if(chunkX < 0)
|
||||
chunkX -= this.maxDistanceBetweenScatteredFeatures - 1;
|
||||
if(chunkZ < 0)
|
||||
chunkZ -= this.maxDistanceBetweenScatteredFeatures - 1;
|
||||
|
||||
int i1 = chunkX / this.maxDistanceBetweenScatteredFeatures;
|
||||
int j1 = chunkZ / this.maxDistanceBetweenScatteredFeatures;
|
||||
Random random = this.worldObj.setRandomSeed(i1, j1, 14357617);
|
||||
i1 *= this.maxDistanceBetweenScatteredFeatures;
|
||||
j1 *= this.maxDistanceBetweenScatteredFeatures;
|
||||
i1 += random.nextInt(this.maxDistanceBetweenScatteredFeatures - this.minDistanceBetweenScatteredFeatures);
|
||||
j1 += random.nextInt(this.maxDistanceBetweenScatteredFeatures - this.minDistanceBetweenScatteredFeatures);
|
||||
|
||||
if(k == i1 && l == j1) {
|
||||
BiomeGenBase biomegenbase = this.worldObj.getWorldChunkManager().getBiomeGenAt(k * 16 + 8, l * 16 + 8);
|
||||
Iterator iterator = biomelist.iterator();
|
||||
|
||||
while(iterator.hasNext()) {
|
||||
BiomeGenBase biomegenbase1 = (BiomeGenBase)iterator.next();
|
||||
|
||||
if(biomegenbase == biomegenbase1)
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
//StructureStart Methods Class
|
||||
|
||||
/** Returns new StructureStart if structure can be spawned at coords */
|
||||
@Override
|
||||
protected StructureStart getStructureStart(int chunkX, int chunkZ) {
|
||||
return new MapGenNTMFeatures.Start(this.worldObj, this.rand, chunkX, chunkZ);
|
||||
}
|
||||
|
||||
public static class Start extends StructureStart {
|
||||
|
||||
public Start(World world, Random rand, int chunkX, int chunkZ) {
|
||||
super(chunkX, chunkZ);
|
||||
|
||||
BiomeGenBase biome = world.getBiomeGenForCoords(chunkX * 16 + 8, chunkZ * 16 + 8);
|
||||
int posY = world.getHeightValue(chunkX * 16 + 8, chunkZ * 16 + 8);
|
||||
if(posY == 0)
|
||||
posY = world.getTopSolidOrLiquidBlock(chunkX * 16 + 8, chunkZ * 16 + 8);
|
||||
|
||||
/*
|
||||
* Probably want to use nextInt() to increase the structures of rarity here. As a fallback, you could have generic stone brick/useless block ruins that will always be chosen if the
|
||||
* chance/location fails for all other structures. Might not even be necessary, but whatever.
|
||||
* Rainfall & Temperature Check
|
||||
*/
|
||||
|
||||
if(rand.nextBoolean()) { //Empty Ruin Structures
|
||||
switch(rand.nextInt(4)) {
|
||||
case 0:
|
||||
ComponentNTMFeatures.NTMRuin1 ruin1 = new ComponentNTMFeatures.NTMRuin1(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
this.components.add(ruin1);
|
||||
break;
|
||||
case 1:
|
||||
ComponentNTMFeatures.NTMRuin2 ruin2 = new ComponentNTMFeatures.NTMRuin2(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
this.components.add(ruin2);
|
||||
break;
|
||||
case 2:
|
||||
ComponentNTMFeatures.NTMRuin3 ruin3 = new ComponentNTMFeatures.NTMRuin3(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
this.components.add(ruin3);
|
||||
break;
|
||||
case 3:
|
||||
ComponentNTMFeatures.NTMRuin4 ruin4 = new ComponentNTMFeatures.NTMRuin4(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
this.components.add(ruin4);
|
||||
}
|
||||
|
||||
} else if(biome.temperature >= 1.0 && biome.rainfall == 0 && !(biome instanceof BiomeGenMesa)) { //Desert & Savannah
|
||||
if(rand.nextBoolean()) {
|
||||
ComponentNTMFeatures.NTMHouse1 house1 = new ComponentNTMFeatures.NTMHouse1(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
this.components.add(house1);
|
||||
} else {
|
||||
ComponentNTMFeatures.NTMHouse2 house2 = new ComponentNTMFeatures.NTMHouse2(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
this.components.add(house2);
|
||||
}
|
||||
} else if(biome.temperature >= 0.25 && biome.temperature <= 0.3 && biome.rainfall >= 0.6 && biome.rainfall <= 0.9) { //Taiga & Mega Taiga
|
||||
if(rand.nextBoolean()) {
|
||||
ComponentNTMFeatures.NTMWorkshop1 workshop1 = new ComponentNTMFeatures.NTMWorkshop1(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
this.components.add(workshop1);
|
||||
}
|
||||
} else { //Everything else
|
||||
if(rand.nextBoolean()) {
|
||||
ComponentNTMFeatures.NTMLab2 lab2 = new ComponentNTMFeatures.NTMLab2(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
this.components.add(lab2);
|
||||
} else {
|
||||
ComponentNTMFeatures.NTMLab1 lab1 = new ComponentNTMFeatures.NTMLab1(rand, chunkX * 16 + 8, posY, chunkZ * 16 + 8);
|
||||
this.components.add(lab1);
|
||||
}
|
||||
}
|
||||
|
||||
if(GeneralConfig.enableDebugMode)
|
||||
System.out.print("[Debug] StructureStart at " + (chunkX * 16 + 8) + ", " + posY + ", " + (chunkZ * 16 + 8) + "\n");
|
||||
|
||||
this.updateBoundingBox();
|
||||
}
|
||||
}
|
||||
}
|
||||
66
src/main/java/com/hbm/world/worldgen/NTMWorldGenerator.java
Normal file
66
src/main/java/com/hbm/world/worldgen/NTMWorldGenerator.java
Normal file
@ -0,0 +1,66 @@
|
||||
package com.hbm.world.worldgen;
|
||||
|
||||
import java.util.Random;
|
||||
|
||||
import com.hbm.config.GeneralConfig;
|
||||
|
||||
import cpw.mods.fml.common.IWorldGenerator;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.chunk.IChunkProvider;
|
||||
import net.minecraftforge.event.terraingen.ChunkProviderEvent.ReplaceBiomeBlocks;
|
||||
import net.minecraftforge.event.terraingen.InitMapGenEvent.EventType;
|
||||
import net.minecraftforge.event.terraingen.PopulateChunkEvent;
|
||||
import net.minecraftforge.event.terraingen.TerrainGen;
|
||||
|
||||
public class NTMWorldGenerator implements IWorldGenerator {
|
||||
|
||||
private MapGenNTMFeatures NTMFeatureGenerator = new MapGenNTMFeatures();
|
||||
|
||||
{
|
||||
NTMFeatureGenerator = (MapGenNTMFeatures) TerrainGen.getModdedMapGen(NTMFeatureGenerator, EventType.CUSTOM);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void generate(Random rand, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider) {
|
||||
|
||||
switch (world.provider.dimensionId) {
|
||||
case -1:
|
||||
generateNether(world, rand, chunkGenerator, chunkX, chunkZ); break;
|
||||
case 0:
|
||||
generateSurface(world, rand, chunkGenerator, chunkX, chunkZ); break;
|
||||
case 1:
|
||||
generateEnd(world, rand, chunkGenerator, chunkX, chunkZ); break;
|
||||
}
|
||||
}
|
||||
|
||||
private void generateNether(World world, Random rand, IChunkProvider chunkGenerator, int chunkX, int chunkZ) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
private void generateSurface(World world, Random rand, IChunkProvider chunkGenerator, int chunkX, int chunkZ) {
|
||||
Block[] ablock = new Block[65536];
|
||||
|
||||
//WorldConfig.enableStructures
|
||||
/** Spawns structure starts. Utilizes canSpawnStructureAtCoords() + if else checks in Start constructor */
|
||||
if(GeneralConfig.enableDungeons) {
|
||||
this.NTMFeatureGenerator.func_151539_a(chunkGenerator, world, chunkX, chunkZ, ablock);
|
||||
}
|
||||
|
||||
/** Actually generates structures in a given chunk. */
|
||||
if(GeneralConfig.enableDungeons) {
|
||||
this.NTMFeatureGenerator.generateStructuresInChunk(world, rand, chunkX, chunkZ);
|
||||
}
|
||||
}
|
||||
|
||||
private void generateEnd(World world, Random rand, IChunkProvider chunkGenerator, int chunkX, int chunkZ) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user