Add custom Osmium Ore generation rates, generate Copper and Tin ores
This commit is contained in:
parent
3d01d103ae
commit
9290c76c05
4 changed files with 41 additions and 20 deletions
|
@ -170,6 +170,9 @@ public class CommonProxy
|
|||
Mekanism.obsidianTNTDelay = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ObsidianTNTDelay", 100).getInt();
|
||||
Mekanism.obsidianTNTBlastRadius = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ObsidianTNTBlastRadius", 12).getInt();
|
||||
Mekanism.UPDATE_DELAY = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "ClientUpdateDelay", 10).getInt();
|
||||
Mekanism.osmiumGenerationAmount = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "OsmiumGenerationAmount", 8).getInt();
|
||||
Mekanism.copperGenerationAmount = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "CopperGenerationAmount", 12).getInt();
|
||||
Mekanism.tinGenerationAmount = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "TinGenerationAmount", 10).getInt();
|
||||
Mekanism.FROM_IC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToEU", 10).getDouble(10);
|
||||
Mekanism.TO_IC2 = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "EUToJoules", .1).getDouble(.1);
|
||||
Mekanism.FROM_BC = Mekanism.configuration.get(Configuration.CATEGORY_GENERAL, "JoulesToMJ", 25).getDouble(25);
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package mekanism.common;
|
||||
|
||||
|
||||
public interface IUpgradeTile extends IUpgradeManagement
|
||||
{
|
||||
public TileComponentUpgrade getComponent();
|
||||
|
|
|
@ -236,6 +236,9 @@ public class Mekanism
|
|||
public static boolean forceBuildcraft = false;
|
||||
public static boolean overrideUERatios = true;
|
||||
public static int obsidianTNTBlastRadius = 12;
|
||||
public static int osmiumGenerationAmount = 8;
|
||||
public static int copperGenerationAmount = 12;
|
||||
public static int tinGenerationAmount = 10;
|
||||
public static int obsidianTNTDelay = 100;
|
||||
public static int UPDATE_DELAY = 10;
|
||||
public static int VOICE_PORT = 36123;
|
||||
|
@ -1250,24 +1253,24 @@ public class Mekanism
|
|||
@ForgeSubscribe
|
||||
public synchronized void onChunkLoad(ChunkEvent.Load event)
|
||||
{
|
||||
if(event.getChunk() != null && !event.world.isRemote)
|
||||
{
|
||||
Map copy = (Map)((HashMap)event.getChunk().chunkTileEntityMap).clone();
|
||||
if(event.getChunk() != null && !event.world.isRemote)
|
||||
{
|
||||
Map copy = (Map)((HashMap)event.getChunk().chunkTileEntityMap).clone();
|
||||
|
||||
for(Iterator iter = copy.values().iterator(); iter.hasNext();)
|
||||
{
|
||||
Object obj = iter.next();
|
||||
for(Iterator iter = copy.values().iterator(); iter.hasNext();)
|
||||
{
|
||||
Object obj = iter.next();
|
||||
|
||||
if(obj instanceof TileEntity)
|
||||
{
|
||||
TileEntity tileEntity = (TileEntity)obj;
|
||||
if(obj instanceof TileEntity)
|
||||
{
|
||||
TileEntity tileEntity = (TileEntity)obj;
|
||||
|
||||
if(tileEntity instanceof TileEntityElectricBlock)
|
||||
{
|
||||
((TileEntityElectricBlock)tileEntity).register();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(tileEntity instanceof TileEntityElectricBlock)
|
||||
{
|
||||
((TileEntityElectricBlock)tileEntity).register();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -17,13 +17,29 @@ public class OreHandler implements IWorldGenerator
|
|||
{
|
||||
if(!(chunkGenerator instanceof ChunkProviderHell) && !(chunkGenerator instanceof ChunkProviderEnd))
|
||||
{
|
||||
for(int i = 0; i < 8; i++)
|
||||
for(int i = 0; i < Mekanism.osmiumGenerationAmount; i++)
|
||||
{
|
||||
int randPosX = (chunkX*16) + random.nextInt(16);
|
||||
int randPosY = random.nextInt(60);
|
||||
int randPosZ = (chunkZ*16) + random.nextInt(16);
|
||||
new WorldGenMinable(new ItemStack(Mekanism.OreBlock, 1, 0).itemID, 8).generate(world, random, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for(int i = 0; i < Mekanism.copperGenerationAmount; i++)
|
||||
{
|
||||
int randPosX = (chunkX*16) + random.nextInt(16);
|
||||
int randPosY = random.nextInt(60);
|
||||
int randPosZ = (chunkZ*16) + random.nextInt(16);
|
||||
new WorldGenMinable(new ItemStack(Mekanism.OreBlock, 1, 1).itemID, 8).generate(world, random, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
|
||||
for(int i = 0; i < Mekanism.tinGenerationAmount; i++)
|
||||
{
|
||||
int randPosX = (chunkX*16) + random.nextInt(16);
|
||||
int randPosY = random.nextInt(60);
|
||||
int randPosZ = (chunkZ*16) + random.nextInt(16);
|
||||
new WorldGenMinable(new ItemStack(Mekanism.OreBlock, 1, 2).itemID, 8).generate(world, random, randPosX, randPosY, randPosZ);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue