Integrated Filler NBT and ship generation

This commit is contained in:
LemADEC 2017-05-23 17:54:56 +02:00
parent 6e7aafabcd
commit 90ee55cc81
5 changed files with 280 additions and 311 deletions

View file

@ -84,14 +84,29 @@ public class Filler implements IXmlRepresentableUnit {
public void setBlock(World world, int x, int y, int z) {
JumpBlock.setBlockNoLight(world, x, y, z, block, metadata, 2);
if (nbtTagCompound != null) {
TileEntity tileEntity = world.getTileEntity(x, y, z);
if (tileEntity == null) {
WarpDrive.logger.error("No TileEntity found for Filler %s at (%d %d %d)", getName(), x, y, z);
return;
}
tileEntity.readFromNBT(nbtTagCompound);
NBTTagCompound nbtTagCompoundTileEntity = new NBTTagCompound();
tileEntity.writeToNBT(nbtTagCompoundTileEntity);
for (Object key : nbtTagCompound.func_150296_c()) {
if (key instanceof String) {
nbtTagCompoundTileEntity.setTag((String) key, nbtTagCompound.getTag((String) key));
}
}
tileEntity.onChunkUnload();
tileEntity.readFromNBT(nbtTagCompoundTileEntity);
tileEntity.validate();
tileEntity.markDirty();
JumpBlock.refreshBlockStateOnClient(world, x, y, z);
}
}

View file

@ -310,7 +310,7 @@ public class WorldGenSmallShip extends WorldGenerator {
genStructure.setHullGlass(world, i + 10, j + 5, k + 12);
genStructure.setHullPlain(world, i + 10, j + 6, k + 3);
genStructure.setHullPlain(world, i + 10, j + 6, k + 6);
genStructure.setCable(world, i + 10, j + 6, k + 7);
genStructure.setWiring(world, i + 10, j + 6, k + 7);
genStructure.setHullPlain(world, i + 10, j + 6, k + 8);
genStructure.setHullPlain(world, i + 10, j + 6, k + 11);
genStructure.setHullPlain(world, i + 10, j + 7, k + 4);
@ -356,9 +356,9 @@ public class WorldGenSmallShip extends WorldGenerator {
genStructure.setHullGlass(world, i + 11, j + 5, k + 12);
genStructure.setHullPlain(world, i + 11, j + 6, k + 3);
genStructure.setHullPlain(world, i + 11, j + 6, k + 5);
genStructure.setCable(world, i + 11, j + 6, k + 6);
genStructure.setCable(world, i + 11, j + 6, k + 7);
genStructure.setCable(world, i + 11, j + 6, k + 8);
genStructure.setWiring(world, i + 11, j + 6, k + 6);
genStructure.setWiring(world, i + 11, j + 6, k + 7);
genStructure.setWiring(world, i + 11, j + 6, k + 8);
genStructure.setHullPlain(world, i + 11, j + 6, k + 9);
genStructure.setHullPlain(world, i + 11, j + 6, k + 11);
genStructure.setHullPlain(world, i + 11, j + 7, k + 4);
@ -387,8 +387,8 @@ public class WorldGenSmallShip extends WorldGenerator {
genStructure.setHullPlain(world, i + 12, j + 2, k + 4);
genStructure.setHullPlain(world, i + 12, j + 2, k + 5);
genStructure.setHullPlain(world, i + 12, j + 2, k + 6);
genStructure.setCable(world, i + 12, j + 2, k + 7);
genStructure.setCable(world, i + 12, j + 2, k + 8);
genStructure.setWiring(world, i + 12, j + 2, k + 7);
genStructure.setWiring(world, i + 12, j + 2, k + 8);
if (!isCorrupted || rand.nextBoolean()) {
world.setBlock(i + 12, j + 2, k + 9, WarpDrive.blockLift);
if (isCreative) {// fill with energy
@ -402,7 +402,7 @@ public class WorldGenSmallShip extends WorldGenerator {
genStructure.setHullPlain(world, i + 12, j + 2, k + 11);
genStructure.setHullPlain(world, i + 12, j + 3, k + 2);
genStructure.setHullPlain(world, i + 12, j + 3, k + 6);
genStructure.setCable(world, i + 12, j + 3, k + 7);
genStructure.setWiring(world, i + 12, j + 3, k + 7);
genStructure.setHullPlain(world, i + 12, j + 3, k + 8);
genStructure.setHullPlain(world, i + 12, j + 3, k + 12);
genStructure.setHullGlass(world, i + 12, j + 4, k + 2);
@ -426,7 +426,7 @@ public class WorldGenSmallShip extends WorldGenerator {
genStructure.setHullPlain(world, i + 12, j + 6, k + 3);
genStructure.setHullPlain(world, i + 12, j + 6, k + 4);
genStructure.setHullPlain(world, i + 12, j + 6, k + 5);
genStructure.setCable(world, i + 12, j + 6, k + 7);
genStructure.setWiring(world, i + 12, j + 6, k + 7);
genStructure.setHullPlain(world, i + 12, j + 6, k + 9);
genStructure.setHullPlain(world, i + 12, j + 6, k + 10);
genStructure.setHullPlain(world, i + 12, j + 6, k + 11);
@ -452,33 +452,43 @@ public class WorldGenSmallShip extends WorldGenerator {
genStructure.setHullPlain(world, i + 13, j + 2, k + 10);
genStructure.setHullPlain(world, i + 13, j + 2, k + 11);
genStructure.setHullPlain(world, i + 13, j + 3, k + 2);
genStructure.setHullPlain(world, i + 13, j + 3, k + 3);
if (rand.nextBoolean()) {
genStructure.setHullPlain(world, i + 13, j + 3, k + 3);
genStructure.setHullGlass(world, i + 13, j + 4, k + 3);
} else if (!isCorrupted || rand.nextBoolean()) {
world.setBlock(i + 13, j + 3, k + 3, WarpDrive.blockAirShield);
world.setBlock(i + 13, j + 4, k + 3, WarpDrive.blockAirShield);
}
genStructure.setHullPlain(world, i + 13, j + 3, k + 4);
genStructure.setHullPlain(world, i + 13, j + 3, k + 5);
genStructure.setHullPlain(world, i + 13, j + 3, k + 6);
genStructure.setCable(world, i + 13, j + 3, k + 7);
genStructure.setWiring(world, i + 13, j + 3, k + 7);
genStructure.setHullPlain(world, i + 13, j + 3, k + 8);
genStructure.setHullPlain(world, i + 13, j + 3, k + 9);
genStructure.setHullPlain(world, i + 13, j + 3, k + 10);
world.setBlock(i + 13, j + 3, k + 11, WarpDrive.blockAirShield);
if (rand.nextBoolean()) {
genStructure.setHullPlain(world, i + 13, j + 3, k + 11);
genStructure.setHullGlass(world, i + 13, j + 4, k + 11);
} else if (!isCorrupted || rand.nextBoolean()) {
world.setBlock(i + 13, j + 3, k + 11, WarpDrive.blockAirShield);
world.setBlock(i + 13, j + 4, k + 11, WarpDrive.blockAirShield);
}
genStructure.setHullPlain(world, i + 13, j + 3, k + 12);
genStructure.setHullPlain(world, i + 13, j + 4, k + 2);
genStructure.setHullGlass(world, i + 13, j + 4, k + 3);
genStructure.setHullPlain(world, i + 13, j + 4, k + 4);
genStructure.setHullPlain(world, i + 13, j + 4, k + 5);
genStructure.setHullPlain(world, i + 13, j + 4, k + 6);
genStructure.setCable(world, i + 13, j + 4, k + 7);
genStructure.setWiring(world, i + 13, j + 4, k + 7);
genStructure.setHullPlain(world, i + 13, j + 4, k + 8);
genStructure.setHullPlain(world, i + 13, j + 4, k + 9);
genStructure.setHullPlain(world, i + 13, j + 4, k + 10);
world.setBlock(i + 13, j + 4, k + 11, WarpDrive.blockAirShield);
genStructure.setHullPlain(world, i + 13, j + 4, k + 12);
genStructure.setHullPlain(world, i + 13, j + 5, k + 2);
genStructure.setHullPlain(world, i + 13, j + 5, k + 3);
world.setBlock(i + 13, j + 5, k + 4, Blocks.glowstone);
genStructure.setHullPlain(world, i + 13, j + 5, k + 5);
genStructure.setHullPlain(world, i + 13, j + 5, k + 6);
genStructure.setCable(world, i + 13, j + 5, k + 7);
genStructure.setWiring(world, i + 13, j + 5, k + 7);
genStructure.setHullPlain(world, i + 13, j + 5, k + 8);
genStructure.setHullPlain(world, i + 13, j + 5, k + 9);
world.setBlock(i + 13, j + 5, k + 10, Blocks.glowstone);
@ -488,7 +498,7 @@ public class WorldGenSmallShip extends WorldGenerator {
genStructure.setHullPlain(world, i + 13, j + 6, k + 4);
genStructure.setHullPlain(world, i + 13, j + 6, k + 5);
genStructure.setHullPlain(world, i + 13, j + 6, k + 6);
genStructure.setCable(world, i + 13, j + 6, k + 7);
genStructure.setWiring(world, i + 13, j + 6, k + 7);
genStructure.setHullPlain(world, i + 13, j + 6, k + 8);
genStructure.setHullPlain(world, i + 13, j + 6, k + 9);
genStructure.setHullPlain(world, i + 13, j + 6, k + 10);
@ -508,18 +518,18 @@ public class WorldGenSmallShip extends WorldGenerator {
genStructure.setHullPlain(world, i + 14, j + 3, k + 9);
genStructure.setHullPlain(world, i + 14, j + 3, k + 10);
genStructure.setHullPlain(world, i + 14, j + 4, k + 4);
genStructure.setResource(world, i + 14, j + 4, k + 5);
genStructure.setResource(world, i + 14, j + 4, k + 6);
genStructure.setPropulsion(world, i + 14, j + 4, k + 5);
genStructure.setPropulsion(world, i + 14, j + 4, k + 6);
genStructure.setHullPlain(world, i + 14, j + 4, k + 7);
genStructure.setResource(world, i + 14, j + 4, k + 8);
genStructure.setResource(world, i + 14, j + 4, k + 9);
genStructure.setPropulsion(world, i + 14, j + 4, k + 8);
genStructure.setPropulsion(world, i + 14, j + 4, k + 9);
genStructure.setHullPlain(world, i + 14, j + 4, k + 10);
genStructure.setHullPlain(world, i + 14, j + 5, k + 4);
genStructure.setResource(world, i + 14, j + 5, k + 5);
genStructure.setResource(world, i + 14, j + 5, k + 6);
genStructure.setPropulsion(world, i + 14, j + 5, k + 5);
genStructure.setPropulsion(world, i + 14, j + 5, k + 6);
genStructure.setHullPlain(world, i + 14, j + 5, k + 7);
genStructure.setResource(world, i + 14, j + 5, k + 8);
genStructure.setResource(world, i + 14, j + 5, k + 9);
genStructure.setPropulsion(world, i + 14, j + 5, k + 8);
genStructure.setPropulsion(world, i + 14, j + 5, k + 9);
genStructure.setHullPlain(world, i + 14, j + 5, k + 10);
genStructure.setHullPlain(world, i + 14, j + 6, k + 4);
genStructure.setHullPlain(world, i + 14, j + 6, k + 5);
@ -535,12 +545,12 @@ public class WorldGenSmallShip extends WorldGenerator {
genStructure.setHullPlain(world, i + 15, j + 3, k + 4);
genStructure.setHullPlain(world, i + 15, j + 3, k + 10);
genStructure.setHullPlain(world, i + 15, j + 4, k + 7);
genStructure.setResource(world, i + 15, j + 5, k + 7);
genStructure.setPropulsion(world, i + 15, j + 5, k + 7);
genStructure.setHullPlain(world, i + 15, j + 6, k + 4);
genStructure.setHullPlain(world, i + 15, j + 6, k + 7);
genStructure.setHullPlain(world, i + 15, j + 6, k + 10);
genStructure.setHullPlain(world, i + 16, j + 4, k + 7);
genStructure.setResource(world, i + 16, j + 5, k + 7);
genStructure.setPropulsion(world, i + 16, j + 5, k + 7);
genStructure.setHullPlain(world, i + 16, j + 6, k + 7);
genStructure.setHullPlain(world, i + 17, j + 5, k + 7);
spawnNPC(world, i + 9, j + 3, k + 5);

View file

@ -2,6 +2,7 @@ package cr0s.warpdrive.world;
import cr0s.warpdrive.WarpDrive;
import cr0s.warpdrive.config.Dictionary;
import cr0s.warpdrive.config.Filler;
import cr0s.warpdrive.config.GenericSet;
import cr0s.warpdrive.config.Loot;
import cr0s.warpdrive.config.WarpDriveConfig;
@ -21,171 +22,114 @@ import net.minecraft.world.World;
public class WorldGenStructure {
private Block hullPlain_block;
private int hullPlain_metadata;
private Block hullGlass_block;
private int hullGlass_metadata;
private Block solarPanel_block;
private int solarPanel_metadata;
private Block cable_block;
private int cable_metadata;
private Block resource_block;
private int resource_metadata;
private final boolean corrupted;
private final Random rand;
private final Filler fillerHullPlain;
private final Filler fillerHullGlass;
private final Filler fillerSolarPanel;
private final Filler fillerWiring;
private final Filler fillerPropulsion;
public WorldGenStructure(final boolean corrupted, Random rand) {
public WorldGenStructure(final boolean corrupted, final Random rand) {
this.corrupted = corrupted;
this.rand = rand;
// choose a hull block
switch (rand.nextInt(7)) {
default:
case 0:
case 1:
hullPlain_block = Blocks.stained_hardened_clay;
hullPlain_metadata = rand.nextInt(16);
hullGlass_block = Blocks.stained_glass;
hullGlass_metadata = hullPlain_metadata;
break;
case 2:
case 3:
case 4:
case 5:
hullPlain_block = WarpDrive.blockHulls_plain[0][0];
hullPlain_metadata = rand.nextInt(16);
hullGlass_block = WarpDrive.blockHulls_glass[0];
hullGlass_metadata = hullPlain_metadata;
break;
case 6:
hullPlain_block = WarpDrive.blockHulls_plain[1][0];
hullPlain_metadata = rand.nextInt(16);
hullGlass_block = WarpDrive.blockHulls_glass[1];
hullGlass_metadata = hullPlain_metadata;
break;
case 10: // disabled since it's tier3
if (WarpDriveConfig.isIndustrialCraft2Loaded) {
hullPlain_block = WarpDriveConfig.getModBlock("IC2", "blockAlloy");
hullPlain_metadata = 0;
hullGlass_block = WarpDriveConfig.getModBlock("IC2", "blockAlloyGlass");
hullGlass_metadata = 0;
}
break;
}
// choose a solar panel
if (WarpDriveConfig.isIndustrialCraft2Loaded) {
if (WarpDriveConfig.isAdvancedSolarPanelLoaded) {
solarPanel_block = WarpDriveConfig.getModBlock("AdvancedSolarPanel", "BlockAdvSolarPanel");
solarPanel_metadata = rand.nextInt(2);
} else {
solarPanel_block = WarpDriveConfig.getModBlock("IC2", "blockGenerator");
solarPanel_metadata = 3;
}
} else if (WarpDriveConfig.isEnderIOLoaded) {
solarPanel_block = WarpDriveConfig.getModBlock("EnderIO", "blockSolarPanel");
solarPanel_metadata = 0;
// hull plain and glass are linked by same name
final GenericSet<Filler> fillerSetHull_plain = WarpDriveConfig.FillerManager.getRandomSetFromGroup(rand, "hull_plain");
if (fillerSetHull_plain == null) {
WarpDrive.logger.warn(String.format("No FillerSet found with group %s during world generation: check your configuration",
"hull_plain"));
fillerHullPlain = new Filler();
fillerHullPlain.block = Blocks.stone;
fillerHullGlass = new Filler();
fillerHullGlass.block = Blocks.glass;
} else {
solarPanel_block = Blocks.air;
solarPanel_metadata = 0;
}
// choose a wiring
cable_block = Blocks.air;
cable_metadata = 0;
if (WarpDriveConfig.isIndustrialCraft2Loaded) {
cable_block = WarpDriveConfig.getModBlock("IC2", "blockCable");
cable_metadata = 0;
fillerHullPlain = fillerSetHull_plain.getRandomUnit(rand);
switch (rand.nextInt(4)) {
case 0:
cable_metadata = 0;
break;
case 1:
cable_metadata = 3;
break;
case 2:
cable_metadata = 6;
break;
case 3:
cable_metadata = 9;
break;
default:
break;
final String nameFillerGlass = "hull_glass:" + fillerSetHull_plain.getName();
final GenericSet<Filler> fillerSetHull_glass = WarpDriveConfig.FillerManager.getGenericSet(nameFillerGlass);
if (fillerSetHull_glass == null) {
WarpDrive.logger.warn(String.format("No FillerSet found with group %s during world generation: check your configuration",
nameFillerGlass));
fillerHullGlass = new Filler();
fillerHullGlass.block = Blocks.glass;
} else {
fillerHullGlass = fillerSetHull_glass.getRandomUnit(rand);
}
}
// choose a resource block
resource_block = Blocks.redstone_block;
resource_metadata = 0;
switch (rand.nextInt(10)) {
case 0:
case 1:
case 2:
case 3:
case 4:
case 5:
resource_block = Blocks.redstone_block;
break;
// solarPanel and wiring are linked by same name
final GenericSet<Filler> fillerSetSolarPanel = WarpDriveConfig.FillerManager.getRandomSetFromGroup(rand, "ship_solarPanel");
if (fillerSetSolarPanel == null) {
WarpDrive.logger.warn(String.format("No FillerSet found with group %s during world generation: check your configuration",
"ship_solarPanel"));
fillerSolarPanel = new Filler();
fillerSolarPanel.block = Blocks.sandstone;
fillerWiring = new Filler();
fillerWiring.block = Blocks.fence;
} else {
fillerSolarPanel = fillerSetSolarPanel.getRandomUnit(rand);
final String nameFillerWiring = "ship_wiring:" + fillerSetSolarPanel.getName();
final GenericSet<Filler> fillerSetWiring = WarpDriveConfig.FillerManager.getGenericSet(nameFillerWiring);
if (fillerSetWiring == null) {
WarpDrive.logger.warn(String.format("No FillerSet found with group %s during world generation: check your configuration",
nameFillerWiring));
fillerWiring = new Filler();
fillerWiring.block = Blocks.fence;
} else {
fillerWiring = fillerSetWiring.getRandomUnit(rand);
}
}
case 6:
case 7:
resource_block = Blocks.lapis_block;
break;
case 8:
case 9:
resource_block = Blocks.coal_block;
break;
default:
break;
// propulsion is on it's own
final GenericSet<Filler> fillerSetPropulsion = WarpDriveConfig.FillerManager.getRandomSetFromGroup(rand, "ship_propulsion");
if (fillerSetPropulsion == null) {
WarpDrive.logger.warn(String.format("No FillerSet found with group %s during world generation: check your configuration",
"ship_propulsion"));
fillerPropulsion = new Filler();
fillerPropulsion.block = Blocks.log;
} else {
fillerPropulsion = fillerSetPropulsion.getRandomUnit(rand);
}
}
public void setHullPlain(World world, final int x, final int y, final int z) {
public void setHullPlain(final World world, final int x, final int y, final int z) {
if (corrupted && (rand.nextInt(400) == 1)) {
world.newExplosion(null, x + 0.5D, y + 0.5D, z + 0.5D, 17, false, true);
} else if (corrupted && (rand.nextInt(10) == 1)) {
world.setBlock(x, y, z, Blocks.air, 0, 2);
} else {
world.setBlock(x, y, z, hullPlain_block, hullPlain_metadata, 2);
fillerHullPlain.setBlock(world, x, y, z);
}
}
public void setHullGlass(World world, final int x, final int y, final int z) {
public void setHullGlass(final World world, final int x, final int y, final int z) {
if (corrupted && (rand.nextInt(5) == 1)) {
world.setBlock(x, y, z, Blocks.air, 0, 2);
} else {
world.setBlock(x, y, z, hullGlass_block, hullGlass_metadata, 2);
fillerHullGlass.setBlock(world, x, y, z);
}
}
public void setSolarPanel(World world, final int x, final int y, final int z) {
public void setSolarPanel(final World world, final int x, final int y, final int z) {
if (corrupted && (rand.nextInt(3) == 1)) {
world.setBlock(x, y, z, Blocks.air, 0, 2);
} else {
world.setBlock(x, y, z, solarPanel_block, solarPanel_metadata, 2);
fillerSolarPanel.setBlock(world, x, y, z);
}
}
public void setCable(World world, final int x, final int y, final int z) {
public void setWiring(final World world, final int x, final int y, final int z) {
if (corrupted && (rand.nextInt(3) == 1)) {
world.setBlock(x, y, z, Blocks.air, 0, 2);
} else {
world.setBlock(x, y, z, cable_block, cable_metadata, 2);
fillerWiring.setBlock(world, x, y, z);
}
}
public void setResource(World world, final int x, final int y, final int z) {
world.setBlock(x, y, z, resource_block, resource_metadata, 2);
public void setPropulsion(final World world, final int x, final int y, final int z) {
fillerPropulsion.setBlock(world, x, y, z);
}
public void fillInventoryWithLoot(final World worldObj, final Random rand, final int x, final int y, final int z, final String group) {
@ -193,7 +137,7 @@ public class WorldGenStructure {
if (tileEntity instanceof IInventory) {
final IInventory inventory = (IInventory) tileEntity;
final int size = inventory.getSizeInventory();
final int countLoots = Math.min(3 + rand.nextInt(3), size);
final int countLoots = Math.min(rand.nextInt(3) + rand.nextInt(4), size);
final GenericSet<Loot> lootSet = WarpDriveConfig.LootManager.getRandomSetFromGroup(rand, group);
if (lootSet == null) {

View file

@ -3,14 +3,14 @@
xmlns="WarpDrive"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="WarpDrive WarpDrive.xsd">
<!-- all possible overworld ores, mostly for reference purpose -->
<fillerSet group="overworld_allOres" name="stone">
<import group="overworld_commonOres" name="stone" />
<import group="overworld_uncommonOres" name="stone" />
<import group="overworld_rareOres" name="stone" />
</fillerSet>
<!-- common overworld ores with various base blocks -->
<fillerSet group="overworld_common" name="stone" weight="20">
<import group="overworld_commonOres" name="stone" />
@ -30,7 +30,7 @@
<filler block="minecraft:sandstone" weight="1" />
<filler block="minecraft:clay" weight="1" />
</fillerSet>
<fillerSet group="overworld_commonOres" name="stone">
<import group="overworld_commonOres" name="allButVanilla" />
<filler block="minecraft:coal_ore" ratio=".08" />
@ -47,8 +47,8 @@
<filler block="arsmagica2:vinteumOre" metadata="0" ratio=".001" mods="arsmagica2" /><!-- Vinteum -->
<filler block="icbm:sulfur_ore" ratio=".001" /><!-- to be confirmed -->
</fillerSet>
<!-- uncommon overworld ores with various base blocks -->
<fillerSet group="overworld_uncommon" name="stone" weight="10">
<import group="overworld_uncommonOres" name="stone" />
@ -68,7 +68,7 @@
<filler block="minecraft:sandstone" weight="1" />
<filler block="minecraft:clay" weight="1" />
</fillerSet>
<fillerSet group="overworld_uncommonOres" name="stone">
<import group="overworld_uncommonOres" name="allButVanilla" />
<filler block="minecraft:redstone_ore" ratio=".01" />
@ -81,8 +81,8 @@
<filler block="ImmersiveEngineering:ore" metadata="4" ratio=".02" mods="ImmersiveEngineering" /><!-- Nickel -->
<filler block="arsmagica2:vinteumOre" metadata="1" ratio=".01" mods="arsmagica2" /><!-- Chimerite -->
</fillerSet>
<!-- rare overworld ores with various base blocks -->
<fillerSet group="overworld_rare" name="stone" weight="10">
<import group="overworld_rareOres" name="stone" />
@ -96,7 +96,7 @@
<filler block="minecraft:diamond_ore" weight="10" />
<filler block="minecraft:bedrock" weight="1" />
</fillerSet>
<fillerSet group="overworld_rareOres" name="stone">
<import group="overworld_rareOres" name="allButVanilla" />
<filler block="minecraft:gold_ore" ratio=".004" />
@ -107,16 +107,15 @@
<filler block="IC2:blockOreUran" ratio=".03" mods="IC2,!netherores" />
<filler block="arsmagica2:vinteumOre" metadata="2" ratio=".01" mods="arsmagica2" /><!-- Blue topaz -->
</fillerSet>
<!-- nether ores with simple base block -->
<fillerSet group="nether" name="stone" weight="10">
<import group="nether_ores" name="netherrack" />
<filler block="minecraft:netherrack" weight="100" />
<filler block="minecraft:lava" weight="5" />
</fillerSet>
<fillerSet group="nether_ores" name="netherrack">
<filler block="minecraft:quartz_ore" ratio="0.1" />
<filler block="minecraft:glowstone" ratio="0.01" />
@ -124,24 +123,22 @@
<filler block="arsmagica2:vinteumOre" metadata="4" ratio=".001" mods="arsmagica2" /><!-- Sunstone -->
<filler block="minecraft:bedrock" ratio=".001" />
</fillerSet>
<!-- end ores with simple base block -->
<fillerSet group="end" name="end" weight="10">
<import group="end_ores" name="endstone" />
<filler block="minecraft:netherrack" weight="100" />
<filler block="minecraft:lava" weight="5" />
</fillerSet>
<fillerSet group="end_ores" name="endstone">
<filler block="arsmagica2:vinteumOre" metadata="3" ratio=".001" mods="arsmagica2" /><!-- Moonstone -->
<filler block="ae2:quartz" ratio=".0013" mods="appliedenergistics2" />
<filler block="WarpDrive:blockIridium" ratio=".0001" mods="!netherores" />
</fillerSet>
<!-- assorted overworld surface blocks -->
<fillerSet group="overworld_surface" name="stone" weight="75">
<filler block="minecraft:stone" weight="100" />
@ -168,9 +165,8 @@
<fillerSet group="overworld_surface" name="sandy" weight="10"><!-- close color to endstone -->
<filler block="minecraft:sandstone" weight="100" />
</fillerSet>
<!-- assorted nether surface blocks -->
<fillerSet group="nether_surface" name="netherrack" weight="50">
<filler block="minecraft:netherrack" weight="100" />
@ -184,12 +180,11 @@
<filler block="minecraft:stained_hardened_clay" metadata="%metadata%" weight="5" />
</fillerSet>
</for>
<fillerSet group="nether_surface" name="soulsand" weight="20">
<filler block="minecraft:soul_sand" weight="100" />
</fillerSet>
<fillerSet group="nether_surface" name="soulsand" weight="20">
<filler block="minecraft:soul_sand" weight="100" />
</fillerSet>
<!-- assorted end surface blocks -->
<fillerSet group="end_surface" name="endstone" weight="50">
<filler block="minecraft:end_stone" weight="100" />
@ -209,9 +204,8 @@
<fillerSet group="end_surface" name="sandy" weight="15">
<filler block="minecraft:sandstone" weight="100" />
</fillerSet>
<!-- WarpDrive gases -->
<for variable="gasMetadata" in="0,1,2,3,4,5,6,7,8,9,10,11">
<fillerSet group="gas" name="wd_%gasMetadata%" weight="1">
@ -250,103 +244,108 @@
<!-- ship solar panel -->
<fillerSet group="solar" name="advancedSolarPanel" weight="20" mods="AdvancedSolarPanel">
<filler block="AdvancedSolarPanel:BlockAdvSolarPanel" metadata="0" weight="100" />
</fillerSet>
<fillerSet group="solar" name="advancedSolarPanel" weight="10" mods="AdvancedSolarPanel">
<filler block="AdvancedSolarPanel:BlockAdvSolarPanel" metadata="1" weight="100" />
</fillerSet>
<fillerSet group="solar" name="ic2" weight="10" mods="IC2">
<filler block="IC2:blockGenerator" metadata="3" weight="100" />
</fillerSet>
<fillerSet group="solar" name="enderIO" weight="10" mods="EnderIO">
<filler block="EnderIO:blockSolarPanel" metadata="0" weight="100" />
</fillerSet>
<fillerSet group="solar" name="vanilla" weight="1">
<filler block="minecraft:air" weight="100" />
</fillerSet>
<fillerSet group="ship_solarPanel" name="advancedSolarPanel" weight="20" mods="AdvancedSolarPanel">
<filler block="AdvancedSolarPanel:BlockAdvSolarPanel" nbt="{facing:5}" metadata="0" weight="200" />
<filler block="AdvancedSolarPanel:BlockAdvSolarPanel" nbt="{facing:5}" metadata="1" weight="100" />
</fillerSet>
<fillerSet group="ship_solarPanel" name="ic2" weight="10" mods="IC2">
<filler block="IC2:blockGenerator" metadata="3" nbt="{facing:5}" weight="100" />
</fillerSet>
<fillerSet group="ship_solarPanel" name="enderIO" weight="10" mods="EnderIO,ThermalDynamics">
<filler block="EnderIO:blockSolarPanel" metadata="0" weight="100" />
</fillerSet>
<fillerSet group="ship_solarPanel" name="vanilla" weight="1" mods="!IC2,!EnderIO,!ThermalDynamics">
<filler block="minecraft:daylight_detector" weight="100" />
</fillerSet>
<!-- ship wiring -->
<fillerSet group="cable" name="ic2" weight="10" mods="IC2">
<filler block="IC2:blockCable" metadata="0" weight="100" />
</fillerSet>
<fillerSet group="cable" name="ic2" weight="10" mods="IC2">
<filler block="IC2:blockCable" metadata="3" weight="100" />
</fillerSet>
<fillerSet group="cable" name="ic2" weight="10" mods="IC2">
<filler block="IC2:blockCable" metadata="6" weight="100" />
</fillerSet>
<fillerSet group="cable" name="ic2" weight="10" mods="IC2">
<filler block="IC2:blockCable" metadata="9" weight="100" />
</fillerSet>
<fillerSet group="cable" name="vanilla" weight="5">
<filler block="minecraft:air" weight="100" />
</fillerSet>
<!-- flow variation for moons -->
<fillerSet group="moon.flow" name="lava" weight="5">
<filler block="minecraft:lava" weight="100" />
</fillerSet>
<fillerSet group="moon.flow" name="sand" weight="1">
<filler block="minecraft:sand" weight="100" />
</fillerSet>
<fillerSet group="moon.flow" name="gravel" weight="1">
<filler block="minecraft:gravel" weight="100" />
</fillerSet>
<fillerSet group="moon.flow" name="ice" weight="3">
<filler block="minecraft:ice" weight="100" />
</fillerSet>
<fillerSet group="moon.flow" name="clay" weight="5">
<filler block="minecraft:clay" weight="100" />
</fillerSet>
<fillerSet group="moon.flow" name="water" weight="5">
<filler block="minecraft:water" weight="100" />
</fillerSet>
<fillerSet group="moon.flow" name="empty" ratio="0.35">
<!-- empty fillerSet gives a random chance for the related shell to not exist at all -->
</fillerSet>
<fillerSet group="ship_wiring" name="advancedSolarPanel" weight="10" mods="AdvancedSolarPanel">
<import group="ship_wiring" name="ic2" />
</fillerSet>
<fillerSet group="ship_wiring" name="ic2" weight="10" mods="IC2">
<filler block="IC2:blockCable" metadata="0" weight="100" /><!-- Insulated copper cable -->
<filler block="IC2:blockCable" metadata="3" weight="100" /><!-- Insulated gold cable -->
<filler block="IC2:blockCable" metadata="6" weight="100" /><!-- Glass fiber cable -->
<filler block="IC2:blockCable" metadata="9" weight="100" /><!-- Insulated tin cable -->
</fillerSet>
<fillerSet group="ship_wiring" name="enderIO" weight="5" mods="EnderIO,ThermalDynamics">
<filler block="ThermalDynamics:ThermalDynamics_0" metadata="0" weight="100" /><!-- Leadstone Fluxduct -->
<filler block="ThermalDynamics:ThermalDynamics_0" metadata="1" weight="40" /><!-- Hardened Fluxduct -->
<filler block="ThermalDynamics:ThermalDynamics_0" metadata="2" weight="10" /><!-- Readstone Energy Fluxduct -->
</fillerSet>
<fillerSet group="ship_wiring" name="vanilla" weight="5" mods="!IC2,!EnderIO,!ThermalDynamics">
<filler block="minecraft:fence" weight="100" />
</fillerSet>
<!-- ship propulsion -->
<fillerSet group="ship_propulsion" name="vanilla" weight="5">
<filler block="minecraft:redstone_block" weight="100" />
<filler block="minecraft:lapis_block" ratio="0.2" />
<filler block="minecraft:coal_block" ratio="0.2" />
</fillerSet>
<!-- flow variation for moons -->
<fillerSet group="moon.flow" name="lava" weight="5">
<filler block="minecraft:lava" weight="100" />
</fillerSet>
<fillerSet group="moon.flow" name="sand" weight="1">
<filler block="minecraft:sand" weight="100" />
</fillerSet>
<fillerSet group="moon.flow" name="gravel" weight="1">
<filler block="minecraft:gravel" weight="100" />
</fillerSet>
<fillerSet group="moon.flow" name="ice" weight="3">
<filler block="minecraft:ice" weight="100" />
</fillerSet>
<fillerSet group="moon.flow" name="clay" weight="5">
<filler block="minecraft:clay" weight="100" />
</fillerSet>
<fillerSet group="moon.flow" name="water" weight="5">
<filler block="minecraft:water" weight="100" />
</fillerSet>
<fillerSet group="moon.flow" name="empty" ratio="0.35">
<!-- empty fillerSet gives a random chance for the related shell to not exist at all -->
</fillerSet>
<!-- core variation for moons -->
<fillerSet group="moon.core" name="lava" weight="6">
<filler block="minecraft:lava" weight="100" />
<filler block="arsmagica2:vinteumOre" metadata="4" ratio=".001" mods="arsmagica2" /><!-- Sunstone -->
</fillerSet>
<fillerSet group="moon.core" name="lava" weight="6">
<filler block="minecraft:lava" weight="100" />
<filler block="arsmagica2:vinteumOre" metadata="4" ratio=".001" mods="arsmagica2" /><!-- Sunstone -->
</fillerSet>
<fillerSet group="moon.core" name="stone" weight="5">
<import group="overworld_rare" name="stone" />
</fillerSet>
<fillerSet group="moon.core" name="obsidian" weight="1">
<import group="overworld_rare" name="obsidian" />
</fillerSet>
<fillerSet group="moon.core" name="water" weight="2">
<filler block="minecraft:water" weight="100" />
<filler block="minecraft:ice" ratio="0.05" />
</fillerSet>
<fillerSet group="moon.core" name="ice" weight="1">
<filler block="minecraft:packed_ice" weight="100" />
<filler block="minecraft:lapis_block" ratio="0.02" />
</fillerSet>
<fillerSet group="moon.core" name="diaquartz" weight="1">
<filler block="minecraft:quartz_block" metadata="0" weight="100" />
<filler block="minecraft:quartz_block" metadata="1" weight="100" />
<filler block="minecraft:diamond_block" ratio="0.01" />
</fillerSet>
<fillerSet group="moon.core" name="iriquartz" weight="1">
<filler block="minecraft:quartz_block" metadata="0" weight="100" />
<filler block="WarpDrive:blockIridium" ratio="0.001" />
</fillerSet>
<fillerSet group="moon.core" name="iroquartz" weight="1">
<filler block="minecraft:quartz_block" metadata="2" weight="33" />
<filler block="minecraft:quartz_block" metadata="3" weight="33" />
<filler block="minecraft:quartz_block" metadata="4" weight="33" />
<filler block="minecraft:iron_block" ratio="0.01" />
</fillerSet>
<!-- TODO: add GT granite cores -->
<!-- TODO: add TE/EIO block of sort -->
<fillerSet group="moon.core" name="obsidian" weight="1">
<import group="overworld_rare" name="obsidian" />
</fillerSet>
<fillerSet group="moon.core" name="water" weight="2">
<filler block="minecraft:water" weight="100" />
<filler block="minecraft:ice" ratio="0.05" />
</fillerSet>
<fillerSet group="moon.core" name="ice" weight="1">
<filler block="minecraft:packed_ice" weight="100" />
<filler block="minecraft:lapis_block" ratio="0.02" />
</fillerSet>
<fillerSet group="moon.core" name="diaquartz" weight="1">
<filler block="minecraft:quartz_block" metadata="0" weight="100" />
<filler block="minecraft:quartz_block" metadata="1" weight="100" />
<filler block="minecraft:diamond_block" ratio="0.01" />
</fillerSet>
<fillerSet group="moon.core" name="iriquartz" weight="1">
<filler block="minecraft:quartz_block" metadata="0" weight="100" />
<filler block="WarpDrive:blockIridium" ratio="0.001" />
</fillerSet>
<fillerSet group="moon.core" name="iroquartz" weight="1">
<filler block="minecraft:quartz_block" metadata="2" weight="33" />
<filler block="minecraft:quartz_block" metadata="3" weight="33" />
<filler block="minecraft:quartz_block" metadata="4" weight="33" />
<filler block="minecraft:iron_block" ratio="0.01" />
</fillerSet>
<!-- TODO: add GT granite cores -->
<!-- TODO: add TE/EIO block of sort -->
</worldGeneration>

View file

@ -18,42 +18,43 @@
When used on machines, we'll give a few trials to find a valid slot for each loot, eventually try another loot, eventually skipping it altogether.
-->
<lootSet group="ship" name="legacy" weight="1">
<loot item="IC2:blockNuke" minQuantity="1" maxQuantity="3" weight="7" /> <!-- Nuke -->
<loot item="IC2:blockReactorChamber" minQuantity="1" maxQuantity="1" weight="5" /> <!-- Reactor chamber -->
<loot item="IC2:blockMachine2" damage="3" minQuantity="1" maxQuantity="1" weight="10" /> <!-- Thermal centrifuge -->
<loot item="IC2:blockMachine2" damage="4" minQuantity="1" maxQuantity="1" weight="10" /> <!-- Metal former -->
<loot item="IC2:blockMachine2" damage="5" minQuantity="1" maxQuantity="1" weight="10" /> <!-- Ore washing -->
<loot item="IC2:blockAlloy" minQuantity="7" maxQuantity="20" weight="10" /> <!-- Reinforced stone -->
<loot item="IC2:blockAlloyGlass" minQuantity="5" maxQuantity="12" weight="10" /> <!-- Reinforced glass -->
<loot item="IC2:blockIronScaffold" minQuantity="8" maxQuantity="35" weight="10" /> <!-- Iron scaffolding -->
<loot item="IC2:blockGenerator" damage="0" minQuantity="1" maxQuantity="3" weight="10" /> <!-- Generator -->
<loot item="IC2:blockGenerator" damage="2" minQuantity="1" maxQuantity="3" weight="10" /> <!-- Water mill -->
<loot item="IC2:blockGenerator" damage="3" minQuantity="1" maxQuantity="2" weight="10" /> <!-- Solar generator -->
<loot item="IC2:blockChargePad" damage="0" minQuantity="1" maxQuantity="2" weight="10" /> <!-- ChargePad (BatBox) -->
<loot item="IC2:blockChargePad" damage="1" minQuantity="1" maxQuantity="2" weight="10" /> <!-- ChargePad (CESU) -->
<loot item="IC2:blockChargePad" damage="2" minQuantity="1" maxQuantity="1" weight="5" /> <!-- ChargePad (MFE) -->
<loot item="IC2:blockChargePad" damage="3" minQuantity="1" maxQuantity="1" weight="1" /> <!-- ChargePad (MFSU) -->
<loot item="IC2:blockMachine" damage="0" minQuantity="1" maxQuantity="8" weight="15" /> <!-- Machine casing -->
<loot item="IC2:blockMachine" damage="5" minQuantity="1" maxQuantity="2" weight="15" /> <!-- Compressor -->
<loot item="IC2:blockMachine" damage="14" minQuantity="1" maxQuantity="1" weight="10" /> <!-- Mass fabricator -->
<loot item="IC2:itemArmorRubBoots" damage="20" minQuantity="1" maxQuantity="1" weight="5" /> <!-- Damaged rubber boots -->
<loot item="IC2:itemArmorRubBoots" damage="0" minQuantity="1" maxQuantity="1" weight="5" /> <!-- Rubber boots -->
<loot item="IC2:itemFuelRod" damage="0" minQuantity="1" maxQuantity="4" weight="10" /> <!-- Fuel rod -->
<loot item="IC2:itemRubber" minQuantity="5" maxQuantity="24" weight="15" /> <!-- Rubber -->
<loot item="IC2:itemPartCircuit" minQuantity="1" maxQuantity="5" weight="10" /> <!-- Basic circuit -->
<loot item="IC2:itemBatCrystal" minQuantity="1" maxQuantity="1" weight="12" /> <!-- Energy crytal -->
<loot item="IC2:itemCellEmpty" damage="0" minQuantity="4" maxQuantity="35" weight="15" /> <!-- Empty cell -->
<loot item="IC2:itemCellEmpty" damage="3" minQuantity="2" maxQuantity="16" weight="12" /> <!-- UU matter cell -->
<loot item="IC2:itemCellEmpty" damage="5" minQuantity="1" maxQuantity="18" weight="12" /> <!-- Compressed air -->
<loot item="IC2:itemCable" damage="0" minQuantity="1" maxQuantity="18" weight="15" /> <!-- Insulated copper cable -->
<loot item="IC2:itemCable" damage="1" minQuantity="1" maxQuantity="18" weight="12" /> <!-- Copper cable -->
<loot item="IC2:itemCable" damage="2" minQuantity="1" maxQuantity="18" weight="12" /> <!-- Gold cable -->
<loot item="IC2:itemCable" damage="3" minQuantity="1" maxQuantity="18" weight="13" /> <!-- Insulated gold cable -->
<loot item="IC2:itemCable" damage="5" minQuantity="1" maxQuantity="18" weight="8" /> <!-- HV cable -->
<loot item="IC2:itemCable" damage="6" minQuantity="1" maxQuantity="18" weight="10" /> <!-- Insulated HV cable -->
<loot item="IC2:itemCable" damage="9" minQuantity="1" maxQuantity="18" weight="8" /> <!-- Glass fiber cable -->
<loot item="IC2:itemCable" damage="10" minQuantity="1" maxQuantity="18" weight="15" /> <!-- Tin cable -->
<loot item="IC2:itemCable" damage="13" minQuantity="1" maxQuantity="18" weight="15" /> <!-- Insulated tin cable -->
<loot item="IC2:blockNuke" minQuantity="1" maxQuantity="3" weight="7" /><!-- Nuke -->
<loot item="IC2:blockReactorChamber" minQuantity="1" maxQuantity="1" weight="5" /><!-- Reactor chamber -->
<loot item="IC2:blockMachine2" damage="3" minQuantity="1" maxQuantity="1" weight="10" /><!-- Thermal centrifuge -->
<loot item="IC2:blockMachine2" damage="4" minQuantity="1" maxQuantity="1" weight="10" /><!-- Metal former -->
<loot item="IC2:blockMachine2" damage="5" minQuantity="1" maxQuantity="1" weight="10" /><!-- Ore washing -->
<loot item="IC2:blockAlloy" minQuantity="7" maxQuantity="20" weight="10" /><!-- Reinforced stone -->
<loot item="IC2:blockAlloyGlass" minQuantity="5" maxQuantity="12" weight="10" /><!-- Reinforced glass -->
<loot item="IC2:blockIronScaffold" minQuantity="8" maxQuantity="35" weight="10" /><!-- Iron scaffolding -->
<loot item="IC2:blockGenerator" damage="0" minQuantity="1" maxQuantity="3" weight="10" /><!-- Generator -->
<loot item="IC2:blockGenerator" damage="2" minQuantity="1" maxQuantity="3" weight="10" /><!-- Water mill -->
<loot item="IC2:blockGenerator" damage="3" minQuantity="1" maxQuantity="2" weight="10" /><!-- Solar generator -->
<loot item="IC2:blockChargePad" damage="0" minQuantity="1" maxQuantity="2" weight="10" /><!-- ChargePad (BatBox) -->
<loot item="IC2:blockChargePad" damage="1" minQuantity="1" maxQuantity="2" weight="10" /><!-- ChargePad (CESU) -->
<loot item="IC2:blockChargePad" damage="2" minQuantity="1" maxQuantity="1" weight="5" /><!-- ChargePad (MFE) -->
<loot item="IC2:blockChargePad" damage="3" minQuantity="1" maxQuantity="1" weight="1" /><!-- ChargePad (MFSU) -->
<loot item="IC2:blockMachine" damage="0" minQuantity="1" maxQuantity="8" weight="15" /><!-- Machine casing -->
<loot item="IC2:blockMachine" damage="5" minQuantity="1" maxQuantity="2" weight="15" /><!-- Compressor -->
<loot item="IC2:blockMachine" damage="14" minQuantity="1" maxQuantity="1" weight="10" /><!-- Mass fabricator -->
<loot item="IC2:itemArmorRubBoots" damage="20" minQuantity="1" maxQuantity="1" weight="5" /><!-- Damaged rubber boots -->
<loot item="IC2:itemArmorRubBoots" damage="0" minQuantity="1" maxQuantity="1" weight="5" /><!-- Rubber boots -->
<loot item="IC2:itemFuelRod" damage="0" minQuantity="1" maxQuantity="4" weight="10" /><!-- Fuel rod -->
<loot item="IC2:itemRubber" minQuantity="5" maxQuantity="24" weight="15" /><!-- Rubber -->
<loot item="IC2:itemPartCircuit" minQuantity="1" maxQuantity="5" weight="10" /><!-- Basic circuit -->
<loot item="IC2:itemBatCrystal" minQuantity="1" maxQuantity="1" weight="12" /><!-- Energy crytal -->
<loot item="IC2:itemCellEmpty" damage="0" minQuantity="4" maxQuantity="35" weight="15" /><!-- Empty cell -->
<loot item="IC2:itemCellEmpty" damage="3" minQuantity="2" maxQuantity="16" weight="12" /><!-- UU matter cell -->
<loot item="IC2:itemCellEmpty" damage="5" minQuantity="1" maxQuantity="18" weight="12" /><!-- Compressed air -->
<loot item="IC2:itemCable" damage="0" minQuantity="1" maxQuantity="18" weight="15" /><!-- Insulated copper cable -->
<loot item="IC2:itemCable" damage="1" minQuantity="1" maxQuantity="18" weight="12" /><!-- Copper cable -->
<loot item="IC2:itemCable" damage="2" minQuantity="1" maxQuantity="18" weight="12" /><!-- Gold cable -->
<loot item="IC2:itemCable" damage="3" minQuantity="1" maxQuantity="18" weight="13" /><!-- Insulated gold cable -->
<loot item="IC2:itemCable" damage="5" minQuantity="1" maxQuantity="18" weight="8" /><!-- HV cable -->
<loot item="IC2:itemCable" damage="6" minQuantity="1" maxQuantity="18" weight="10" /><!-- Insulated HV cable -->
<loot item="IC2:itemCable" damage="9" minQuantity="1" maxQuantity="18" weight="8" /><!-- Glass fiber cable -->
<loot item="IC2:itemCable" damage="10" minQuantity="1" maxQuantity="18" weight="15" /><!-- Tin cable -->
<loot item="IC2:itemCable" damage="13" minQuantity="1" maxQuantity="18" weight="15" /><!-- Insulated tin cable -->
<loot item="minecraft:stick" minQuantity="1" maxQuantity="18" weight="1" />
<!-- nano armor? -->
<!-- ICBM rocket launcher platform minQuantity="1" maxQuantity="2" -->