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(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
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 )
{
if(blockID == 0)
if(blockID == 0||!(worldObj.rand.nextInt(100)<this.WORLD_THREAD_PROBABILITY))
{
return;
}
@@ -209,13 +209,11 @@ public class BlockRift extends Block implements ITileEntityProvider
{
return;
}
if(worldObj.rand.nextInt(100)<this.WORLD_THREAD_PROBABILITY)
{
ItemStack thread = new ItemStack(mod_pocketDim.itemWorldThread,1);
EntityItem threadEntity = new EntityItem(worldObj, x,y,z, thread);
worldObj.spawnEntityInWorld(threadEntity);
}
ItemStack thread = new ItemStack(mod_pocketDim.itemWorldThread,1);
EntityItem threadEntity = new EntityItem(worldObj, x,y,z, thread);
worldObj.spawnEntityInWorld(threadEntity);
}
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)
{
List<PackedDimData> unpackedDims = new ArrayList<PackedDimData>();
for(PackedDimData data : packedDims)
{
System.out.println(data.ID);
}
//Load roots
for(PackedDimData packedDim : packedDims)
{
@@ -144,7 +146,6 @@ public class DDSaveHandler
linkType = LinkTypes.NORMAL;
}
@SuppressWarnings("deprecation")
DimLink link = data.createLink(packedLink.source, linkType, packedLink.orientation);
Point4D destination = packedLink.tail.destination;
if(destination!=null)

View File

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