Skip to content

Commit

Permalink
Fixed a game crashing bug; didn't realize that Arrays is from Scala
Browse files Browse the repository at this point in the history
  • Loading branch information
jwosty committed Feb 13, 2015
1 parent 12df572 commit fb859c6
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions src/main/java/jw/spacedistortion/common/SpaceDistortion.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public class SpaceDistortion {
"TTTT");
/** The mapping from template chars to the blocks they represent, and whether or not
* it has a direction (e.g. pistons, furnaces, etc) */
public static HashMap<Character, Pair<Block, Boolean>> templateBlockInfo = null;
public static HashMap<Character, Pair<Block, Boolean>> templateBlockInfo;

@EventHandler
public void serverLoad(FMLServerStartingEvent event) {
Expand Down Expand Up @@ -94,15 +94,14 @@ public void init(FMLInitializationEvent event) {
ChestGenHooks info = ChestGenHooks.getInfo(SpaceDistortion.genGoauldCorridor);
info.setMin(4);
info.setMax(10);
for (Object item : Arrays
.asList(new Object[] {
new WeightedRandomChestContent(SDItem.naquadahIngot, 0, 1, 4, 50), new WeightedRandomChestContent( SDItem.depletedStaffWeapon, 0, 1, 1, 50),
new WeightedRandomChestContent(SDItem.controlCrystal, 0, 1, 1, 10), new WeightedRandomChestContent(SDItem.controlCrystal, 1, 1, 1, 10),
new WeightedRandomChestContent(SDItem.controlCrystal, 2, 1, 1, 10), new WeightedRandomChestContent(SDItem.controlCrystal, 3, 1, 1, 10),
new WeightedRandomChestContent(SDItem.controlCrystal, 4, 1, 1, 10), new WeightedRandomChestContent(SDItem.naquadahCircuit, 0, 1, 2, 50),
new WeightedRandomChestContent(Items.bread, 0, 1, 4, 50), new WeightedRandomChestContent(Items.redstone, 0, 1, 4, 50),
new WeightedRandomChestContent(Items.golden_helmet, 0, 1, 1, 50), new WeightedRandomChestContent(Items.melon_seeds, 0, 1, 4, 50) })) {
info.addItem((WeightedRandomChestContent)item);
for (WeightedRandomChestContent item : new WeightedRandomChestContent[] {
new WeightedRandomChestContent(SDItem.naquadahIngot, 0, 1, 4, 50), new WeightedRandomChestContent( SDItem.depletedStaffWeapon, 0, 1, 1, 50),
new WeightedRandomChestContent(SDItem.controlCrystal, 0, 1, 1, 10), new WeightedRandomChestContent(SDItem.controlCrystal, 1, 1, 1, 10),
new WeightedRandomChestContent(SDItem.controlCrystal, 2, 1, 1, 10), new WeightedRandomChestContent(SDItem.controlCrystal, 3, 1, 1, 10),
new WeightedRandomChestContent(SDItem.controlCrystal, 4, 1, 1, 10), new WeightedRandomChestContent(SDItem.naquadahCircuit, 0, 1, 2, 50),
new WeightedRandomChestContent(Items.bread, 0, 1, 4, 50), new WeightedRandomChestContent(Items.redstone, 0, 1, 4, 50),
new WeightedRandomChestContent(Items.golden_helmet, 0, 1, 1, 50), new WeightedRandomChestContent(Items.melon_seeds, 0, 1, 4, 50) }) {
info.addItem(item);
}
this.oreGen = new GeneratorOre();
this.goauldBaseGen = new GeneratorGoauldBase();
Expand Down

0 comments on commit fb859c6

Please sign in to comment.