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:
@@ -187,7 +187,7 @@ public class ItemRiftBlade extends ItemSword
|
||||
NewDimData dimension = PocketManager.getDimensionData(world);
|
||||
if (!dimension.isPocketDimension() && dimension.getLink(x, y + 1, z) == null)
|
||||
{
|
||||
dimension.createLink(x, y + 1, z).setLinkType(IDimLink.TYPE_POCKET);
|
||||
dimension.createLink(x, y + 1, z, IDimLink.TYPE_POCKET);
|
||||
player.worldObj.playSoundAtEntity(player,"mods.DimDoors.sfx.riftDoor", 0.6f, 1);
|
||||
ItemDimensionalDoor.placeDoorBlock(world, x, y, z, orientation, mod_pocketDim.transientDoor);
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ public class ItemRiftSignature extends Item
|
||||
//The link was used before and already has an endpoint stored. Create links connecting the two endpoints.
|
||||
NewDimData sourceDimension = PocketManager.getDimensionData(source.getDimension());
|
||||
NewDimData destinationDimension = PocketManager.getDimensionData(world);
|
||||
IDimLink link = sourceDimension.createLink(source.getX(), source.getY(), source.getZ()).setLinkType(IDimLink.TYPE_NORMAL);
|
||||
IDimLink reverse = destinationDimension.createLink(x, y, z).setLinkType(IDimLink.TYPE_NORMAL);
|
||||
IDimLink link = sourceDimension.createLink(source.getX(), source.getY(), source.getZ(), IDimLink.TYPE_NORMAL);
|
||||
IDimLink reverse = destinationDimension.createLink(x, y, z, IDimLink.TYPE_NORMAL);
|
||||
link.setDestination(x, y, z, destinationDimension);
|
||||
reverse.setDestination(source.getX(), source.getY(), source.getZ(), sourceDimension);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user