Doors dont close on items, have short cooldown
readded decay and rift regen Signed-off-by: StevenRS11 <stevenrs11@aol.com>
This commit is contained in:
parent
9951581fb0
commit
2d6d430277
3 changed files with 23 additions and 6 deletions
|
@ -14,6 +14,7 @@ public class CommonTickHandler implements ITickHandler
|
|||
Random rand= new Random();
|
||||
public int tickCount=0;
|
||||
public int tickCount2=0;
|
||||
|
||||
|
||||
@Override
|
||||
public void tickStart(EnumSet<TickType> type, Object... tickData) {}
|
||||
|
@ -40,7 +41,7 @@ public class CommonTickHandler implements ITickHandler
|
|||
//replaces rifts in game that have been destroyed/have blocks placed over them.
|
||||
private void onTickInGame()
|
||||
{
|
||||
/**
|
||||
|
||||
try
|
||||
{
|
||||
|
||||
|
@ -50,13 +51,13 @@ public class CommonTickHandler implements ITickHandler
|
|||
int i=0;
|
||||
|
||||
|
||||
while (i<15&&dimHelper.instance.linksForRendering.size()>0&&FMLCommonHandler.instance().getEffectiveSide()==Side.SERVER)
|
||||
while (i<15&&FMLCommonHandler.instance().getEffectiveSide()==Side.SERVER)
|
||||
{
|
||||
i++;
|
||||
LinkData link;
|
||||
|
||||
//actually gets the random rift based on the size of the list
|
||||
link = (LinkData) dimHelper.instance.linksForRendering.get(rand.nextInt(dimHelper.instance.linksForRendering.size()));
|
||||
link = (LinkData) dimHelper.instance.getRandomLinkData(true);
|
||||
|
||||
|
||||
|
||||
|
@ -73,7 +74,6 @@ public class CommonTickHandler implements ITickHandler
|
|||
{
|
||||
if(dimHelper.instance.getLinkDataFromCoords(link.locXCoord, link.locYCoord, link.locZCoord, link.locDimID)==null)
|
||||
{
|
||||
dimHelper.instance.linksForRendering.remove(link);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -157,7 +157,12 @@ public class CommonTickHandler implements ITickHandler
|
|||
}
|
||||
|
||||
tickCount2++;
|
||||
**/
|
||||
|
||||
if(mod_pocketDim.teleTimer>0)
|
||||
{
|
||||
mod_pocketDim.teleTimer--;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -341,6 +341,15 @@ public class dimHelper extends DimensionManager
|
|||
this.generatePocket(linkData);
|
||||
this.generateDoor(world,linkData);
|
||||
|
||||
|
||||
if(mod_pocketDim.teleTimer==0||entity instanceof EntityPlayer)
|
||||
{
|
||||
mod_pocketDim.teleTimer=2+rand.nextInt(2);
|
||||
}
|
||||
else
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
@ -354,7 +363,8 @@ public class dimHelper extends DimensionManager
|
|||
GameRegistry.onPlayerChangedDimension((EntityPlayer)entity);
|
||||
}
|
||||
|
||||
entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
entity.worldObj.playSoundEffect(entity.posX, entity.posY, entity.posZ, "mob.endermen.portal", 1.0F, 1.0F);
|
||||
|
||||
|
||||
int playerXCoord=MathHelper.floor_double(entity.posX);
|
||||
int playerYCoord=MathHelper.floor_double(entity.posY);
|
||||
|
|
|
@ -636,4 +636,6 @@ public class mod_pocketDim
|
|||
}
|
||||
|
||||
|
||||
public static int teleTimer=0;
|
||||
|
||||
}
|
Loading…
Reference in a new issue