DimDoors/StevenDimDoors/mod_pocketDim/world/pocketGenerator.java

105 lines
2.1 KiB
Java
Raw Normal View History

2013-06-02 03:43:56 +02:00
package StevenDimDoors.mod_pocketDim.world;
2013-05-28 00:58:20 +02:00
import java.util.ArrayList;
import java.util.List;
2013-06-02 03:43:56 +02:00
import StevenDimDoors.mod_pocketDim.DimData;
import StevenDimDoors.mod_pocketDim.helpers.dimHelper;
2013-05-28 00:58:20 +02:00
import StevenDimDoors.mod_pocketDim.ticking.MobObelisk;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.world.ChunkPosition;
import net.minecraft.world.World;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.IChunkProvider;
import net.minecraft.world.gen.ChunkProviderGenerate;
public class pocketGenerator extends ChunkProviderGenerate implements IChunkProvider
{
2013-05-28 00:58:20 +02:00
private World worldObj;
public pocketGenerator(World par1World, long par2, boolean par4)
{
super(par1World, par2, par4);
// TODO Auto-generated constructor stub
2013-05-28 00:58:20 +02:00
this.worldObj=par1World;
}
@Override
public void generateTerrain(int par1, int par2, byte[] par3ArrayOfByte)
{
}
2013-06-10 05:56:31 +02:00
public boolean unloadQueuedChunks()
{
return true;
}
@Override
public Chunk provideChunk(int par1, int par2)
{
byte[] var3 = new byte[32768];
2013-05-28 00:58:20 +02:00
Chunk var4 = new Chunk(this.worldObj, var3, par1, par2);
return var4;
}
@Override
2013-06-02 07:46:31 +02:00
public Chunk loadChunk(int var1, int var2)
{
// TODO Auto-generated method stub
return super.loadChunk(var1, var2);
}
@Override
public void populate(IChunkProvider var1, int var2, int var3) {
// TODO Auto-generated method stub
}
@Override
public List getPossibleCreatures(EnumCreatureType var1, int var2, int var3,
int var4)
{
2013-05-28 00:58:20 +02:00
DimData data = dimHelper.dimList.get(this.worldObj.provider.dimensionId);
if(data!=null)
{
2013-05-29 07:22:50 +02:00
if(data.dungeonGenerator!=null)
2013-05-28 00:58:20 +02:00
{
2013-05-29 07:22:50 +02:00
if(data.isDimRandomRift&&data.isPocket&&!data.dungeonGenerator.isOpen)
{
ArrayList list = new ArrayList();
2013-05-28 00:58:20 +02:00
2013-05-29 07:22:50 +02:00
return this.worldObj.getBiomeGenForCoords(var2, var3).getSpawnableList(var1);
}
2013-05-28 00:58:20 +02:00
}
}
// TODO Auto-generated method stub
return null;
}
@Override
public ChunkPosition findClosestStructure(World var1, String var2,
int var3, int var4, int var5) {
// TODO Auto-generated method stub
return null;
}
}