more monolith spawning
This commit is contained in:
parent
a24cd87ddb
commit
1f4f38cfe3
2 changed files with 23 additions and 8 deletions
|
@ -122,10 +122,7 @@ public class MobObelisk extends EntityFlying implements IMob
|
||||||
|
|
||||||
if (this.isEntityAlive() && this.isEntityInsideOpaqueBlock())
|
if (this.isEntityAlive() && this.isEntityInsideOpaqueBlock())
|
||||||
{
|
{
|
||||||
this.pushOutOfBlocks(this.posX - (double)this.width * 0.35D, this.boundingBox.minY + 0.5D, this.posZ + (double)this.width * 0.35D);
|
this.setDead();
|
||||||
this.pushOutOfBlocks(this.posX - (double)this.width * 0.35D, this.boundingBox.minY + 0.5D, this.posZ - (double)this.width * 0.35D);
|
|
||||||
this.pushOutOfBlocks(this.posX + (double)this.width * 0.35D, this.boundingBox.minY + 0.5D, this.posZ - (double)this.width * 0.35D);
|
|
||||||
this.pushOutOfBlocks(this.posX + (double)this.width * 0.35D, this.boundingBox.minY + 0.5D, this.posZ + (double)this.width * 0.35D);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -137,7 +134,7 @@ public class MobObelisk extends EntityFlying implements IMob
|
||||||
{
|
{
|
||||||
if(this.soundTime<=0)
|
if(this.soundTime<=0)
|
||||||
{
|
{
|
||||||
this.playSound("mods.DimDoors.sfx.monk", 1.5F, 1F);
|
this.playSound("mods.DimDoors.sfx.monk", 1F, 1F);
|
||||||
this.soundTime=100;
|
this.soundTime=100;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,18 +67,26 @@ public class pocketGenerator extends ChunkProviderGenerate implements IChunkProv
|
||||||
{
|
{
|
||||||
if(dimHelper.dimList.containsKey(worldObj.provider.dimensionId))
|
if(dimHelper.dimList.containsKey(worldObj.provider.dimensionId))
|
||||||
{
|
{
|
||||||
if(!dimHelper.dimList.get(worldObj.provider.dimensionId).isDimRandomRift)
|
if(dimHelper.dimList.get(worldObj.provider.dimensionId).dungeonGenerator==null)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if(dimHelper.dimList.get(worldObj.provider.dimensionId).dungeonGenerator.isOpen)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
int y =0;
|
int y =0;
|
||||||
int x = var2*16 + rand.nextInt(32)-8;
|
int x = var2*16 + rand.nextInt(32)-8;
|
||||||
int z = var3*16 + rand.nextInt(32)-8;
|
int z = var3*16 + rand.nextInt(32)-8;
|
||||||
|
int yTest;
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|
||||||
x = var2*16 + rand.nextInt(32-8);
|
x = var2*16 + rand.nextInt(32)-8;
|
||||||
z = var3*16 + rand.nextInt(32)-8;
|
z = var3*16 + rand.nextInt(32)-8;
|
||||||
|
|
||||||
while(this.worldObj.getBlockId(x, y, z)==0&&y<255)
|
while(this.worldObj.getBlockId(x, y, z)==0&&y<255)
|
||||||
|
@ -87,8 +95,18 @@ public class pocketGenerator extends ChunkProviderGenerate implements IChunkProv
|
||||||
}
|
}
|
||||||
y = yCoordHelper.getFirstUncovered(this.worldObj,x , y+2, z);
|
y = yCoordHelper.getFirstUncovered(this.worldObj,x , y+2, z);
|
||||||
|
|
||||||
|
if(this.worldObj.getBlockId(x, y-1, z)!=mod_pocketDim.blockDimWall.blockID)
|
||||||
|
{
|
||||||
|
y= yCoordHelper.getFirstUncovered(this.worldObj,x , y+4+rand.nextInt(4), z);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(y>245)
|
||||||
|
{
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Entity mob = new MobObelisk(this.worldObj);
|
Entity mob = new MobObelisk(this.worldObj);
|
||||||
mob.setLocationAndAngles(x, y+rand.nextInt(4), z, 1, 1);
|
mob.setLocationAndAngles(x, y, z, 1, 1);
|
||||||
this.worldObj.spawnEntityInWorld(mob);
|
this.worldObj.spawnEntityInWorld(mob);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue