Minor change to SchematicLoader
Changed SchematicLoader to use DDLoot.DungeonChestInfo instead of requesting a reference to the same data through ChestGenHooks. Exactly the same data is being retrieved, but ChestGenHooks retrieves it by performing a lookup on a map relating loot categories to loot info, so it's slightly slower. No point in doing that if we have access to the reference directly.
This commit is contained in:
@@ -970,8 +970,7 @@ public class SchematicLoader
|
|||||||
if(world.getBlockTileEntity(i+xCooe, j+yCooe, k+zCooe) instanceof TileEntityChest)
|
if(world.getBlockTileEntity(i+xCooe, j+yCooe, k+zCooe) instanceof TileEntityChest)
|
||||||
{
|
{
|
||||||
TileEntityChest chest = (TileEntityChest) world.getBlockTileEntity(i+xCooe, j+yCooe, k+zCooe);
|
TileEntityChest chest = (TileEntityChest) world.getBlockTileEntity(i+xCooe, j+yCooe, k+zCooe);
|
||||||
|
ChestGenHooks info = DDLoot.DungeonChestInfo;
|
||||||
ChestGenHooks info = ChestGenHooks.getInfo(DDLoot.DIMENSIONAL_DUNGEON_CHEST);
|
|
||||||
WeightedRandomChestContent.generateChestContents(rand, info.getItems(rand), (TileEntityChest)world.getBlockTileEntity(i+xCooe, j+yCooe, k+zCooe), info.getCount(rand));
|
WeightedRandomChestContent.generateChestContents(rand, info.getItems(rand), (TileEntityChest)world.getBlockTileEntity(i+xCooe, j+yCooe, k+zCooe), info.getCount(rand));
|
||||||
}
|
}
|
||||||
if(world.getBlockTileEntity(i+xCooe, j+yCooe, k+zCooe) instanceof TileEntityDispenser)
|
if(world.getBlockTileEntity(i+xCooe, j+yCooe, k+zCooe) instanceof TileEntityDispenser)
|
||||||
|
|||||||
Reference in New Issue
Block a user