Update ChestGenHooks for new Dungeon chest strcture.

This commit is contained in:
LexManos 2013-07-02 02:37:05 -07:00
parent e57886e05a
commit 2b61ea417b
3 changed files with 11 additions and 21 deletions

View File

@ -84,6 +84,7 @@ public ahr.a #FD:ComponentStrongholdChestCorridor/field_75003_a #strongholdChest
public ahv.b #FD:ComponentStrongholdLibrary/field_75007_b #strongholdLibraryChestContents
public aia.c #FD:ComponentStrongholdRoomCrossing/field_75014_c #strongholdCorridorChestContents
public ajb.a #FD:ComponentVillageHouse2/field_74918_a #villageBlacksmithChestContents
public afk.a #FD:WorldGenDungeons/field_111189_a #chestContents
# AnvilChunkLoader.chunkSaveLocation
public adz.d #FD:AnvilChunkLoader/field_75825_d
# ChunkProviderServer.currentChunkLoader

View File

@ -7,6 +7,7 @@ import net.minecraft.item.ItemStack;
import net.minecraft.util.WeightedRandom;
import net.minecraft.util.WeightedRandomChestContent;
import net.minecraft.world.WorldServer;
import net.minecraft.world.gen.feature.WorldGenDungeons;
import net.minecraft.world.gen.structure.*;
import net.minecraftforge.oredict.OreDictionary;
@ -49,6 +50,7 @@ public class ChestGenHooks
addInfo(STRONGHOLD_CROSSING, ComponentStrongholdRoomCrossing.strongholdRoomCrossingChestContents, 1, 5);
addInfo(VILLAGE_BLACKSMITH, ComponentVillageHouse2.villageBlacksmithChestContents, 3, 9);
addInfo(BONUS_CHEST, WorldServer.bonusChestContent, 10, 10);
addInfo(DUNGEON_CHEST, WorldGenDungeons.field_111189_a, 8, 8);
ItemStack book = new ItemStack(Item.enchantedBook, 1, 0);
WeightedRandomChestContent tmp = new WeightedRandomChestContent(book, 1, 1, 1);
@ -58,25 +60,7 @@ public class ChestGenHooks
getInfo(STRONGHOLD_CORRIDOR ).addItem(tmp);
getInfo(STRONGHOLD_LIBRARY ).addItem(new WeightedRandomChestContent(book, 1, 5, 2));
getInfo(STRONGHOLD_CROSSING ).addItem(tmp);
//Wish Dungeons would get on the same wave length as other world gen...
ChestGenHooks d = new ChestGenHooks(DUNGEON_CHEST);
d.countMin = 8;
d.countMax = 8;
chestInfo.put(DUNGEON_CHEST, d);
addDungeonLoot(d, new ItemStack(Item.saddle), 100, 1, 1);
addDungeonLoot(d, new ItemStack(Item.ingotIron), 100, 1, 4);
addDungeonLoot(d, new ItemStack(Item.bread), 100, 1, 1);
addDungeonLoot(d, new ItemStack(Item.wheat), 100, 1, 4);
addDungeonLoot(d, new ItemStack(Item.gunpowder), 100, 1, 4);
addDungeonLoot(d, new ItemStack(Item.silk), 100, 1, 4);
addDungeonLoot(d, new ItemStack(Item.bucketEmpty), 100, 1, 1);
addDungeonLoot(d, new ItemStack(Item.appleGold), 1, 1, 1);
addDungeonLoot(d, new ItemStack(Item.redstone), 50, 1, 4);
addDungeonLoot(d, new ItemStack(Item.record13), 5, 1, 1);
addDungeonLoot(d, new ItemStack(Item.recordCat), 5, 1, 1);
addDungeonLoot(d, new ItemStack(Item.dyePowder, 1, 3), 100, 1, 1);
addDungeonLoot(d, book, 100, 1, 1);
getInfo(DUNGEON_CHEST ).addItem(tmp);
}
static void addDungeonLoot(ChestGenHooks dungeon, ItemStack item, int weight, int min, int max)

View File

@ -9,7 +9,12 @@
public class WorldGenDungeons extends WorldGenerator
{
@@ -127,7 +129,8 @@
@@ -122,12 +124,12 @@
if (k2 == 1)
{
par1World.setBlock(i2, par4, j2, Block.chest.blockID, 0, 2);
- WeightedRandomChestContent[] aweightedrandomchestcontent = WeightedRandomChestContent.func_92080_a(field_111189_a, new WeightedRandomChestContent[] {Item.enchantedBook.func_92114_b(par2Random)});
TileEntityChest tileentitychest = (TileEntityChest)par1World.getBlockTileEntity(i2, par4, j2);
if (tileentitychest != null)
{
@ -19,7 +24,7 @@
}
break label101;
@@ -169,7 +172,6 @@
@@ -169,7 +171,6 @@
*/
private String pickMobSpawner(Random par1Random)
{