This commit is contained in:
StevenRS11
2014-01-27 16:25:49 -05:00
parent c830a8e812
commit ca42be0a5e
4 changed files with 18 additions and 15 deletions

View File

@@ -54,7 +54,7 @@ public class DDLoot {
addContent(true, items, Item.ghastTear.itemID, 15); addContent(true, items, Item.ghastTear.itemID, 15);
addContent(properties.FabricOfRealityLootEnabled, items, mod_pocketDim.blockDimWall.blockID, 80, 4, 16); addContent(properties.FabricOfRealityLootEnabled, items, mod_pocketDim.blockDimWall.blockID, 80, 4, 16);
addContent(properties.WorldThreadLootEnabled, items, mod_pocketDim.itemWorldThread.itemID, 90, 1,2); addContent(properties.WorldThreadLootEnabled, items, mod_pocketDim.itemWorldThread.itemID, 120, 1,4);
// Add all the items to our dungeon chest // Add all the items to our dungeon chest
addItemsToContainer(DungeonChestInfo, items); addItemsToContainer(DungeonChestInfo, items);

View File

@@ -199,7 +199,7 @@ public class BlockRift extends Block implements ITileEntityProvider
} }
private void spawnWorldThread(int blockID,World worldObj,int x,int y,int z ) private void spawnWorldThread(int blockID,World worldObj,int x,int y,int z )
{ {
if(blockID == 0) if(blockID == 0||!(worldObj.rand.nextInt(100)<this.WORLD_THREAD_PROBABILITY))
{ {
return; return;
} }
@@ -209,13 +209,11 @@ public class BlockRift extends Block implements ITileEntityProvider
{ {
return; return;
} }
if(worldObj.rand.nextInt(100)<this.WORLD_THREAD_PROBABILITY)
{
ItemStack thread = new ItemStack(mod_pocketDim.itemWorldThread,1); ItemStack thread = new ItemStack(mod_pocketDim.itemWorldThread,1);
EntityItem threadEntity = new EntityItem(worldObj, x,y,z, thread); EntityItem threadEntity = new EntityItem(worldObj, x,y,z, thread);
worldObj.spawnEntityInWorld(threadEntity); worldObj.spawnEntityInWorld(threadEntity);
}
} }
private void addAdjacentBlocks(int x, int y, int z, int distance, HashMap<Point3D, Integer> pointDistances, Queue<Point3D> points) private void addAdjacentBlocks(int x, int y, int z, int distance, HashMap<Point3D, Integer> pointDistances, Queue<Point3D> points)
{ {

View File

@@ -88,8 +88,10 @@ public class DDSaveHandler
public static boolean unpackDimData(List<PackedDimData> packedDims) public static boolean unpackDimData(List<PackedDimData> packedDims)
{ {
List<PackedDimData> unpackedDims = new ArrayList<PackedDimData>(); List<PackedDimData> unpackedDims = new ArrayList<PackedDimData>();
for(PackedDimData data : packedDims)
{
System.out.println(data.ID);
}
//Load roots //Load roots
for(PackedDimData packedDim : packedDims) for(PackedDimData packedDim : packedDims)
{ {
@@ -144,7 +146,6 @@ public class DDSaveHandler
linkType = LinkTypes.NORMAL; linkType = LinkTypes.NORMAL;
} }
@SuppressWarnings("deprecation")
DimLink link = data.createLink(packedLink.source, linkType, packedLink.orientation); DimLink link = data.createLink(packedLink.source, linkType, packedLink.orientation);
Point4D destination = packedLink.tail.destination; Point4D destination = packedLink.tail.destination;
if(destination!=null) if(destination!=null)

View File

@@ -170,6 +170,9 @@ public class TileEntityRift extends TileEntity
EntityEnderman enderman = new EntityEnderman(worldObj); EntityEnderman enderman = new EntityEnderman(worldObj);
enderman.setLocationAndAngles(xCoord + 0.5, yCoord - 1, zCoord + 0.5, 5, 6); enderman.setLocationAndAngles(xCoord + 0.5, yCoord - 1, zCoord + 0.5, 5, 6);
worldObj.spawnEntityInWorld(enderman); worldObj.spawnEntityInWorld(enderman);
if(this.worldObj.rand.nextInt(3)==0)
{
EntityPlayer player = this.worldObj.getClosestPlayerToEntity(enderman, 50); EntityPlayer player = this.worldObj.getClosestPlayerToEntity(enderman, 50);
if(player!=null) if(player!=null)
{ {
@@ -179,6 +182,7 @@ public class TileEntityRift extends TileEntity
} }
} }
} }
}
public boolean updateNearestRift() public boolean updateNearestRift()
{ {