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:
@@ -15,6 +15,7 @@ public class CommonTickHandler implements ITickHandler
|
|||||||
public int tickCount=0;
|
public int tickCount=0;
|
||||||
public int tickCount2=0;
|
public int tickCount2=0;
|
||||||
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void tickStart(EnumSet<TickType> type, Object... tickData) {}
|
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.
|
//replaces rifts in game that have been destroyed/have blocks placed over them.
|
||||||
private void onTickInGame()
|
private void onTickInGame()
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -50,13 +51,13 @@ public class CommonTickHandler implements ITickHandler
|
|||||||
int i=0;
|
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++;
|
i++;
|
||||||
LinkData link;
|
LinkData link;
|
||||||
|
|
||||||
//actually gets the random rift based on the size of the list
|
//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)
|
if(dimHelper.instance.getLinkDataFromCoords(link.locXCoord, link.locYCoord, link.locZCoord, link.locDimID)==null)
|
||||||
{
|
{
|
||||||
dimHelper.instance.linksForRendering.remove(link);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -157,7 +157,12 @@ public class CommonTickHandler implements ITickHandler
|
|||||||
}
|
}
|
||||||
|
|
||||||
tickCount2++;
|
tickCount2++;
|
||||||
**/
|
|
||||||
|
if(mod_pocketDim.teleTimer>0)
|
||||||
|
{
|
||||||
|
mod_pocketDim.teleTimer--;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -342,6 +342,15 @@ public class dimHelper extends DimensionManager
|
|||||||
this.generateDoor(world,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);
|
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 playerXCoord=MathHelper.floor_double(entity.posX);
|
||||||
int playerYCoord=MathHelper.floor_double(entity.posY);
|
int playerYCoord=MathHelper.floor_double(entity.posY);
|
||||||
|
|||||||
@@ -636,4 +636,6 @@ public class mod_pocketDim
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static int teleTimer=0;
|
||||||
|
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user