Modified NewDimData and IDimLink

Modified how links are created so that the caller must specify a link
type when the link is created, rather than setting it later. This was
done to avoid having to send two link data packets following the way
links would be handled logically. Turns out this was good idea overall
for ensuring link integrity, because there was one case where I forgot
to set the link type after creating the link.
This commit is contained in:
SenseiKiwi
2013-09-01 10:50:20 -04:00
parent 4086e75ead
commit efa5b3eb4c
10 changed files with 51 additions and 41 deletions

View File

@@ -97,7 +97,7 @@ public class GatewayGenerator implements IWorldGenerator
if (link == null)
{
dimension = PocketManager.getDimensionData(world);
link = dimension.createLink(x, y + 1, z).setLinkType(IDimLink.TYPE_POCKET);
link = dimension.createLink(x, y + 1, z, IDimLink.TYPE_POCKET);
}
else
{
@@ -132,7 +132,7 @@ public class GatewayGenerator implements IWorldGenerator
{
//Create a partial link to a dungeon.
dimension = PocketManager.getDimensionData(world);
link = dimension.createLink(x, y + 1, z).setLinkType(IDimLink.TYPE_DUNGEON);
link = dimension.createLink(x, y + 1, z, IDimLink.TYPE_DUNGEON);
//If the current dimension isn't Limbo, build a Rift Gateway out of Stone Bricks
if (dimension.id() != properties.LimboDimensionID)