.schematic importer finished
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
package StevenDimDoors.mod_pocketDim.commands;
|
||||
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
||||
import StevenDimDoors.mod_pocketDim.DimData;
|
||||
import StevenDimDoors.mod_pocketDim.LinkData;
|
||||
import StevenDimDoors.mod_pocketDim.dimHelper;
|
||||
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
|
||||
import StevenDimDoors.mod_pocketDim.helpers.copyfile;
|
||||
import StevenDimDoors.mod_pocketDim.world.pocketProvider;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.MinecraftException;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldServer;
|
||||
|
||||
public class CommandEndDungeonCreation extends CommandBase
|
||||
{
|
||||
public String getCommandName()//the name of our command
|
||||
{
|
||||
return "end_dungeon_creation";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void processCommand(ICommandSender var1, String[] var2)
|
||||
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
@@ -61,34 +61,24 @@ public class CommandPrintDimData extends CommandBase
|
||||
{
|
||||
if(dimHelper.dimList.containsKey(targetDim))
|
||||
{
|
||||
for(DimData dimData :dimHelper.dimList.values())
|
||||
{
|
||||
DimData dimData = dimHelper.dimList.get(targetDim);
|
||||
Collection<LinkData> links= new ArrayList();
|
||||
links.addAll( dimData.printAllLinkData());
|
||||
|
||||
for(LinkData link : links)
|
||||
{
|
||||
if(link.destDimID==targetDim)
|
||||
{
|
||||
dimHelper.dimList.get(link.locDimID).removeLinkAtCoords(link);
|
||||
linksRemoved++;
|
||||
}
|
||||
if(dimData.dimID==targetDim)
|
||||
{
|
||||
linksRemoved++;
|
||||
}
|
||||
|
||||
this.getCommandSenderAsPlayer(var1).sendChatToPlayer( link.printLinkData());
|
||||
}
|
||||
|
||||
|
||||
this.getCommandSenderAsPlayer(var1).sendChatToPlayer("DimID= "+dimData.dimID+"Dim depth = "+dimData.depth);
|
||||
|
||||
}
|
||||
|
||||
dimHelper.dimList.remove(targetDim);
|
||||
this.getCommandSenderAsPlayer(var1).sendChatToPlayer("Removed dimension "+targetDim+" from DimDoors and deleted "+linksRemoved+" links");
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
this.getCommandSenderAsPlayer(var1).sendChatToPlayer("Error- dimension "+targetDim+" not registered with dimDoors");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -101,4 +91,3 @@ public class CommandPrintDimData extends CommandBase
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
package StevenDimDoors.mod_pocketDim.commands;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import cpw.mods.fml.common.FMLCommonHandler;
|
||||
|
||||
import StevenDimDoors.mod_pocketDim.DimData;
|
||||
import StevenDimDoors.mod_pocketDim.LinkData;
|
||||
import StevenDimDoors.mod_pocketDim.dimHelper;
|
||||
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
|
||||
import net.minecraft.command.CommandBase;
|
||||
import net.minecraft.command.ICommandSender;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
public class CommandStartDungeonCreation extends CommandBase
|
||||
{
|
||||
public String getCommandName()//the name of our command
|
||||
{
|
||||
return "start_dungeon_creation";
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public void processCommand(ICommandSender var1, String[] var2)
|
||||
|
||||
{
|
||||
|
||||
EntityPlayer player = this.getCommandSenderAsPlayer(var1);
|
||||
int x = (int) player.posX;
|
||||
int y = (int) player.posY;
|
||||
int z = (int) player.posZ;
|
||||
|
||||
LinkData link = new LinkData(player.worldObj.provider.dimensionId, 0, x, y+1, z, x, y+1, z, true, 3);
|
||||
link = dimHelper.instance.createPocket(link,true, false);
|
||||
|
||||
dimHelper.instance.teleportToPocket(player.worldObj, link, player);
|
||||
|
||||
|
||||
|
||||
|
||||
// this.getCommandSenderAsPlayer(var1).sendChatToPlayer(String.valueOf(var2));
|
||||
// this.getCommandSenderAsPlayer(var1).sendChatToPlayer(String.valueOf(var2.length));
|
||||
// this.getCommandSenderAsPlayer(var1).sendChatToPlayer("Removed "+linksRemoved+" rifts.");
|
||||
|
||||
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user