Signed-off-by: StevenRS11 <steven.r.stafford.ii.14@dartmouth.edu>

This commit is contained in:
StevenRS11 2013-03-18 18:42:56 -04:00
parent 2d668305cf
commit c4172804d0
9 changed files with 28 additions and 16 deletions

View file

@ -57,8 +57,8 @@ public class BlockDimWallPerm extends Block
{
World world = dimHelper.getWorld(0);
int x = (link.destXCoord + rand.nextInt(100000)-50000);
int z = (link.destZCoord + rand.nextInt(100000)-50000);
int x = (link.destXCoord + rand.nextInt(mod_pocketDim.limboExitRange)-mod_pocketDim.limboExitRange/2);
int z = (link.destZCoord + rand.nextInt(mod_pocketDim.limboExitRange)-mod_pocketDim.limboExitRange/2);
x=x+(x>> 4)+1; //make sure I am in the middle of a chunk, andnot on a boundry, so it doesnt load the chunk next to me
z=z+(z>> 4)+1;

View file

@ -110,7 +110,7 @@ public class BlockRift extends BlockContainer
//function that regulates how many blocks it eats/ how fast it eates them.
public void updateTick(World world, int x, int y, int z, Random random)
{
if(!world.isRemote&&dimHelper.instance.getLinkDataFromCoords(x, y, z, world.provider.dimensionId)!=null)
if(!world.isRemote&&dimHelper.instance.getLinkDataFromCoords(x, y, z, world.provider.dimensionId)!=null&&mod_pocketDim.enableRiftGrief)
{
TileEntityRift rift = (TileEntityRift) world.getBlockTileEntity(x, y, z);
if(rift.isNearRift)

View file

@ -143,13 +143,13 @@ public class ItemRiftBlade extends itemDimDoor
public void onPlayerStoppedUsing(ItemStack par1ItemStack, World par2World, EntityPlayer par3EntityPlayer, int par4)
{
System.out.println(par4);
if(dimHelper.dimList.get(par2World.provider.dimensionId)!=null&&!par2World.isRemote)
{
System.out.println("stopped");
if(par3EntityPlayer.getItemInUseDuration()>15)
System.out.println(par4);
if(this.getMaxItemUseDuration(par1ItemStack)-par4>12)
{
Vec3 var2 = par3EntityPlayer.getLook(1.0F);
@ -166,15 +166,16 @@ public class ItemRiftBlade extends itemDimDoor
int y = MathHelper.floor_double(var7);
int z = MathHelper.floor_double(var9);
System.out.println(x+" "+y+" "+z);
int rotation = (int) (MathHelper.floor_double((double)((par3EntityPlayer.rotationYaw+90) * 4.0F / 360.0F) + 0.5D) & 3);
LinkData link = new LinkData(par2World.provider.dimensionId, 0, x, y, z, x, y, z, true);
if(dimHelper.dimList.get(par2World.provider.dimensionId).depth==0)
{
link.linkOrientation= rotation;
dimHelper.instance.createPocket(link,true, false);
System.out.println("doingDown");
}
else if(dimHelper.dimList.get(par2World.provider.dimensionId).depth==1)
@ -290,7 +291,7 @@ public class ItemRiftBlade extends itemDimDoor
}
// if(dimHelper.dimList.get(par2World.provider.dimensionId)!=null&&!par2World.isRemote&&!didFindThing)
{
System.out.println("using");
par3EntityPlayer.setItemInUse(par1ItemStack, this.getMaxItemUseDuration(par1ItemStack));
}

View file

@ -44,7 +44,7 @@ public class PlayerRespawnTracker implements IPlayerTracker
for(EntityItem drop : mod_pocketDim.limboSpawnInventory)
{
player.inventory.addItemStackToInventory(drop.func_92014_d());
player.inventory.addItemStackToInventory(drop.getEntityItem());
}

View file

@ -139,7 +139,7 @@ public class RiftGenerator implements IWorldGenerator
}
}
if(random.nextInt(120)==0&&world.provider.getDimensionName()!="PocketDim"&&!world.isRemote&&mod_pocketDim.riftsInWorldGen)
if(random.nextInt(220)==0&&world.provider.getDimensionName()!="PocketDim"&&!world.isRemote&&mod_pocketDim.riftsInWorldGen)
{
// System.out.println("tryingToGen");
int blockID=Block.stoneBrick.blockID;

View file

@ -987,7 +987,7 @@ public class dimHelper extends DimensionManager
{
if(!this.isSaving)
{
System.out.println("saving");
// System.out.println("saving");
this.isSaving=true;
HashMap comboSave=new HashMap();
@ -1326,5 +1326,10 @@ public class dimHelper extends DimensionManager
this.dimList.put(dimData.dimID, dimData);
}
public void createDimData(World world)
{
this.dimList.put(world.provider.dimensionId, new DimData(world.provider.dimensionId, false, 0,0,world.provider.getSpawnPoint().posX,world.provider.getSpawnPoint().posY,world.provider.getSpawnPoint().posZ));
}
}

View file

@ -53,7 +53,7 @@ import cpw.mods.fml.relauncher.Side;
public class mod_pocketDim
{
public static final String version = "1.4.6R1.3.0D1";
public static final String version = "1.4.7R1.3.0B2";
//need to clean up
@SidedProxy(clientSide = "StevenDimDoors.mod_pocketDimClient.ClientProxy", serverSide = "StevenDimDoors.mod_pocketDim.CommonProxy")
public static CommonProxy proxy;
@ -71,6 +71,7 @@ public class mod_pocketDim
public static int blockRiftID;
public static int transientDoorID;
public static int itemRiftBladeID;
public static int limboExitRange;
// public static int railRenderID;
public static int itemStableFabricID;
@ -195,6 +196,7 @@ public class mod_pocketDim
public static World limbo= null;
public static long genTime;
public static boolean enableRiftGrief;
@ -249,13 +251,16 @@ public class mod_pocketDim
itemDimDoorID=config.getItem("Dimensional Door Item", 5674).getInt();
itemLinkSignatureID=config.getItem("Rift Signature Item", 5675).getInt();
TNFREAKINGT = config.get("BOOLEAN", "EXPLOSIONS!!???!!!?!?!!", false).getBoolean(false);
this.enableRiftGrief = config.get("BOOLEAN", "toggles whether rifts eat blocks around them or not", true).getBoolean(true);
HOW_MUCH_TNT=config.get("Int", "Chance that a block will not be TNT. must be greater than 1. Explosions!?!?? must be set to true, and you figure out what it does. ", 25).getInt(25);
blockLimboID=config.get("Int", "Block ID for Limbo- must be below 256", 217).getInt();
blockDimWallPermID=config.get("Int", "Block ID for blockDimWallPermID- must be below 256", 220).getInt();
this.limboDimID=config.get("Int", "Limbo Dimension ID", -23).getInt();
this.limboExitRange=config.get("Int", "The farthest possible distance that limbo can send you upon return to the overworld.", 100000).getInt();
providerID=config.get("Int", "ProviderID", 12).getInt();
this.limboProviderID=config.get("Int", "Limbo Provider ID", 13).getInt();

View file

@ -91,7 +91,7 @@ public class pocketTeleporter extends Teleporter
id=dimHelper.instance.getDestOrientation(sendingLink);
par1Entity.rotationYaw=(id*90)+90;
if(id==2||id==6)
@ -152,6 +152,7 @@ public class pocketTeleporter extends Teleporter
par1Entity.rotationYaw=(id*90)+90;
// EntityMinecart.class.cast(par1Entity).isinreverse=false;
if(id==2||id==6)
{
this.setEntityPosition(par1Entity, x+1.5, y, z+.5 );

View file

@ -7,7 +7,7 @@
<property name="build.dir" value="build" />
<property name="classes.dir" value="${build.dir}/packaging" />
<property name="src.dir" value="src" />
<property name="forge.version" value="1.4.7-6.6.0.497" />
<property name="forge.version" value="1.4.7-6.6.2.534" />
<property name="forge.url" value="http://files.minecraftforge.net/minecraftforge/minecraftforge-src-${forge.version}.zip" />
<property name="mcp.version" value="723" />
<property name="forge.dir" value="${build.dir}/forge" />