Fixed door orientation finally.

Limbo generates terrain under you

can use items in limbo

more voids to send you home.

update to 1.5.2

Signed-off-by: StevenRS11 <stevenrs11@aol.com>
This commit is contained in:
StevenRS11 2013-05-09 17:16:27 -04:00
parent 995755360a
commit 0b5bbb7dc1
20 changed files with 63 additions and 36 deletions

View file

@ -129,7 +129,7 @@ public class EventHookContainer
/**
if(event.entityPlayer.worldObj.provider.dimensionId==mod_pocketDim.limboDimID&&event.action==PlayerInteractEvent.Action.RIGHT_CLICK_BLOCK)
{
@ -162,7 +162,9 @@ public class EventHookContainer
}
}
**/
}

View file

@ -323,7 +323,7 @@ public class LimboGenerator extends ChunkProviderGenerate implements IChunkProvi
{
byte var4 = 4;
byte var5 = 16;
byte var6 = 16;
byte var6 = 19;
int var7 = var4 + 1;
byte var8 = 17;
int var9 = var4 + 1;
@ -373,6 +373,7 @@ public class LimboGenerator extends ChunkProviderGenerate implements IChunkProvi
{
par3ArrayOfByte[var43 += var44] = (byte)mod_pocketDim.blockDimWallPermID;
}
else
{
par3ArrayOfByte[var43 += var44] = 0;

View file

@ -71,8 +71,8 @@ public class BlockDimWallPerm extends Block
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;
x=x+(x>> 4); //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);
@ -98,7 +98,7 @@ public class BlockDimWallPerm extends Block
{
for(int yc=0;yc<200;yc++)
{
if(yc==0&&dimHelper.getWorld(0).isBlockOpaqueCube(i+xc, j-2,k +zc))
if(yc==0)
{
if(Math.abs(xc)+Math.abs(zc)<rand.nextInt(3)+2)

View file

@ -150,6 +150,7 @@ public class dimDoor extends BlockContainer
var12=dimHelper.instance.flipDoorMetadata(var12);
}
par1World.setBlockMetadataWithNotify(par2, par3-1, par4, var12,2);
if( dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World)!=null)
{
dimHelper.instance.getLinkDataFromCoords(par2, par3, par4, par1World).linkOrientation= par1World.getBlockMetadata(par2, par3-1, par4);
@ -164,10 +165,12 @@ public class dimDoor extends BlockContainer
var12=dimHelper.instance.flipDoorMetadata(var12);
}
par1World.setBlockMetadataWithNotify(par2, par3, par4, var12,2);
if( dimHelper.instance.getLinkDataFromCoords(par2, par3+1, par4, par1World)!=null)
{
dimHelper.instance.getLinkDataFromCoords(par2, par3+1, par4, par1World).linkOrientation= par1World.getBlockMetadata(par2, par3, par4);
}
}
par1World.playAuxSFXAtEntity(par5EntityPlayer, 1001, par2, par3, par4, 0);

View file

@ -310,7 +310,7 @@ public class dimHelper extends DimensionManager
{
if(linkData!=null)
{
@ -330,7 +330,7 @@ public class dimHelper extends DimensionManager
{
this.generatePocket(linkData);
if(mod_pocketDim.teleTimer==0||entity instanceof EntityPlayer)
{
mod_pocketDim.teleTimer=2+rand.nextInt(2);
@ -341,13 +341,11 @@ public class dimHelper extends DimensionManager
}
entity = this.teleportEntity(world, entity, linkData);
if(entity instanceof EntityPlayerMP)
{
@ -392,6 +390,7 @@ public class dimHelper extends DimensionManager
entity.worldObj.setBlock(playerXCoord, playerYCoord-1, playerZCoord, mod_pocketDim.blockDimWallID);
}
this.generateDoor(world,linkData);
@ -411,6 +410,7 @@ public class dimHelper extends DimensionManager
}
}
/**
if(entity.worldObj.getBlockId(x, y, z)==mod_pocketDim.dimDoorID||entity.worldObj.getBlockId(x, y, z)==mod_pocketDim.ExitDoorID)
{
if(this.getLinkDataFromCoords(x, y, z, entity.worldObj)!=null)
@ -422,7 +422,8 @@ public class dimHelper extends DimensionManager
}
}
**/
}
}
@ -660,7 +661,7 @@ public class dimHelper extends DimensionManager
if(blockToReplace!=mod_pocketDim.dimDoorID&&blockToReplace!=mod_pocketDim.linkExitDoorID&&blockToReplace!=mod_pocketDim.linkDimDoorID&&blockToReplace!=mod_pocketDim.ExitDoorID&&blockToReplace!=mod_pocketDim.transientDoorID)
{
this.getWorld(destinationID).setBlock(destX, destY-1, destZ, doorTypeToPlace,destOrientation,2);
this.getWorld(destinationID).setBlock(destX, destY, destZ, doorTypeToPlace,world.getBlockMetadata(locX, locY, locZ),2);
this.getWorld(destinationID).setBlock(destX, destY, destZ, doorTypeToPlace,8,2);
// System.out.println("Genned door");
}

View file

@ -55,7 +55,7 @@ public class ItemStabilizedRiftSignature extends itemLinkSignature
public void registerIcons(IconRegister par1IconRegister)
{
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
}

View file

@ -32,13 +32,17 @@ public class ItemStableFabric extends Item
}
public void registerIcons(IconRegister par1IconRegister)
{
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
}
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10)
{
System.out.println("Block metadata is "+par3World.getBlockMetadata(par4, par5, par6));
if(!par3World.isRemote)
{
System.out.println("Block metadata is "+par3World.getBlockMetadata(par4, par5, par6));
this.onItemRightClick(par1ItemStack, par3World, par2EntityPlayer);
}
//System.out.println("Block texture data is "+Block.blocksList[par3World.getBlockId(par4, par5, par6)].getBlockTexture(par3World,par4, par5, par6,par7).getIconName());
//System.out.println("Block name is is "+Block.blocksList[par3World.getBlockId(par4, par5, par6)].getUnlocalizedName2());
@ -76,7 +80,7 @@ public class ItemStableFabric extends Item
MovingObjectPosition hit = this.getMovingObjectPositionFromPlayer(par3EntityPlayer.worldObj, par3EntityPlayer, false );
if(hit!=null&&!par2World.isRemote)
{
if(par2World.getBlockId(hit.blockX, hit.blockY, hit.blockZ)==mod_pocketDim.blockRiftID)
//if(par2World.getBlockId(hit.blockX, hit.blockY, hit.blockZ)==mod_pocketDim.blockRiftID)
{
LinkData link = dimHelper.instance.getLinkDataFromCoords(hit.blockX, hit.blockY, hit.blockZ, par2World);
if(link!=null)
@ -104,12 +108,24 @@ public class ItemStableFabric extends Item
if (par3EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack) && par3EntityPlayer.canPlayerEdit(par4, par5 + 1, par6, par7, par1ItemStack)&&!par2World.isRemote)
{
int var12 = MathHelper.floor_double((double)((par3EntityPlayer.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
if (par3EntityPlayer.canPlayerEdit(par4, par5, par6, par7, par1ItemStack) && par3EntityPlayer.canPlayerEdit(par4, par5 + 1, par6, par7, par1ItemStack)&&!par2World.isRemote)
{
int var12 = MathHelper.floor_double((double)((par3EntityPlayer.rotationYaw + 180.0F) * 4.0F / 360.0F) - 0.5D) & 3;
String cardinal= "default";
System.out.println("Link orientation is " + link.linkOrientation);
}
switch(link.linkOrientation)
{
case 0: cardinal = "East";
break;
case 1: cardinal = "South";
break;
case 2: cardinal = "West";
break;
case 3: cardinal = "North";
break;
}
System.out.println("Link orientation is " + link.linkOrientation + "- "+cardinal);
}
}
}
}

View file

@ -33,7 +33,7 @@ public class itemDimDoor extends ItemDoor
}
public void registerIcons(IconRegister par1IconRegister)
{
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
}

View file

@ -29,7 +29,7 @@ public class itemExitDoor extends itemDimDoor
public void registerIcons(IconRegister par1IconRegister)
{
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName());
this.itemIcon = par1IconRegister.registerIcon(mod_pocketDim.modid + ":" + this.getUnlocalizedName().replace("item.", ""));
}

View file

@ -111,8 +111,14 @@ public class itemLinkSignature extends Item
{
if(dimHelper.instance.getLinkDataFromCoords(par4, par5+count, par6,par3World)!=null)
{
orientation = dimHelper.instance.getLinkDataFromCoords(par4, par5+count, par6,par3World).linkOrientation;
int id= (par3World.getBlockId(par4, par5+count, par6));
if(id == mod_pocketDim.dimDoorID||id==mod_pocketDim.ExitDoorID||id==mod_pocketDim.chaosDoorID)
{
orientation = dimHelper.instance.getLinkDataFromCoords(par4, par5+count, par6,par3World).linkOrientation;
}
}
}

View file

@ -34,19 +34,22 @@ public class pocketTeleporter
this.x=link.destXCoord;
this.y=link.destYCoord;
this.z=link.destZCoord;
this.sendingLink=link;
int id;
id=dimHelper.instance.getDestOrientation(sendingLink);
if(par1Entity instanceof EntityPlayer)
{
EntityPlayer player = (EntityPlayer) par1Entity;
int id;
id=dimHelper.instance.getDestOrientation(sendingLink);
//System.out.println("Teleporting with link oreintation "+id);
@ -91,9 +94,7 @@ public class pocketTeleporter
par1Entity.motionX=0;
par1Entity.motionZ=0;
par1Entity.motionY=0;
int id;
id=dimHelper.instance.getDestOrientation(sendingLink);
par1Entity.rotationYaw=(id*90)+90;
@ -151,10 +152,7 @@ public class pocketTeleporter
else if(par1Entity instanceof Entity)
{
int id;
id=dimHelper.instance.getDestOrientation(sendingLink);
//System.out.println("Teleporting with link oreintation "+id);

View file

Before

Width:  |  Height:  |  Size: 194 B

After

Width:  |  Height:  |  Size: 194 B

View file

Before

Width:  |  Height:  |  Size: 3.1 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 173 B

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 189 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB