Skip to content

Commit

Permalink
Fix #18
Browse files Browse the repository at this point in the history
Conflicts:
	src/main/java/net/boatcake/MyWorldGen/Schematic.java
  • Loading branch information
impiaaa committed Jan 23, 2015
1 parent 7a08539 commit 480cc99
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
10 changes: 5 additions & 5 deletions src/main/java/net/boatcake/MyWorldGen/Schematic.java
Original file line number Diff line number Diff line change
Expand Up @@ -483,20 +483,20 @@ meta[x][y][z], getTileEntityAt(x, y, z), world,
(int) rotatedCoords.yCoord,
(int) rotatedCoords.zCoord);
if (generateChests && !info.chestType.isEmpty()) {
if ((block == Blocks.chest || block == Blocks.trapped_chest) && (e instanceof TileEntityChest)) {
if (e instanceof TileEntityChest) {
ChestGenHooks hook = ChestGenHooks
.getInfo(info.chestType);
WeightedRandomChestContent.generateChestContents(
rand, hook.getItems(rand),
(TileEntityChest) e, hook.getCount(rand));
} else if (block == Blocks.dispenser && (e instanceof TileEntityDispenser)) {
ChestGenHooks info = ChestGenHooks
} else if (e instanceof TileEntityDispenser) {
ChestGenHooks hook = ChestGenHooks
.getInfo(ChestGenHooks.PYRAMID_JUNGLE_DISPENSER);
WeightedRandomChestContent
.generateDispenserContents(rand,
info.getItems(rand),
hook.getItems(rand),
(TileEntityDispenser) e,
info.getCount(rand));
hook.getCount(rand));
}
}
if (info.generateSpawners && generateSpawners && block == Blocks.mob_spawner && e instanceof TileEntityMobSpawner) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ public abstract class BlockAnchorLogic {
private static Map<String, BlockAnchorLogic> blockNameToLogic = new HashMap<String, BlockAnchorLogic>();

public static BlockAnchorLogic get(String blockName) {
return blockNameToLogic.get(blockName);
return blockNameToLogic.get(blockName.toLowerCase(Locale.ROOT));
}

public static boolean isAnchorBlock(String blockName) {
return blockNameToLogic.containsKey(blockName);
return blockNameToLogic.containsKey(blockName.toLowerCase(Locale.ROOT));
}

public BlockAnchorLogic(String blockName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ public abstract class BlockPlacementLogic {
private static Map<String, BlockPlacementLogic> blockNameToLogic = new HashMap<String, BlockPlacementLogic>();

public static BlockPlacementLogic get(String blockName) {
return blockNameToLogic.get(blockName);
return blockNameToLogic.get(blockName.toLowerCase(Locale.ROOT));
}

public static boolean placementLogicExists(String blockName) {
return blockNameToLogic.containsKey(blockName);
return blockNameToLogic.containsKey(blockName.toLowerCase(Locale.ROOT));
}

public BlockPlacementLogic(String blockName) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import io.netty.buffer.ByteBufOutputStream;

import java.io.IOException;
import java.util.Random;

import net.boatcake.MyWorldGen.BlockPlacementOption;
import net.boatcake.MyWorldGen.Schematic;
Expand Down Expand Up @@ -52,7 +53,7 @@ public IMessage onMessage(MessagePlaceSchem message, MessageContext ctx) {
playerMP.worldObj, message.x, message.y, message.z,
message.direction, message.placementOption.generateChests,
message.placementOption.generateSpawners,
message.placementOption.followPlacementRules, null);
message.placementOption.followPlacementRules, new Random());
}
return null;
}
Expand Down

0 comments on commit 480cc99

Please sign in to comment.