2013-06-02 03:43:56 +02:00
|
|
|
package StevenDimDoors.mod_pocketDim.commands;
|
|
|
|
|
2013-06-04 14:52:06 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.customDungeonImporter;
|
2013-06-02 03:43:56 +02:00
|
|
|
import StevenDimDoors.mod_pocketDim.mod_pocketDim;
|
|
|
|
import net.minecraft.command.CommandBase;
|
|
|
|
import net.minecraft.command.ICommandSender;
|
|
|
|
|
|
|
|
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)
|
|
|
|
|
|
|
|
{
|
2013-06-04 14:52:06 +02:00
|
|
|
int x = (int) this.getCommandSenderAsPlayer(var1).posX;
|
|
|
|
int y = (int) this.getCommandSenderAsPlayer(var1).posY;
|
|
|
|
int z = (int) this.getCommandSenderAsPlayer(var1).posZ;
|
2013-06-02 03:43:56 +02:00
|
|
|
|
2013-06-04 14:52:06 +02:00
|
|
|
if(var2.length==0)
|
|
|
|
{
|
|
|
|
System.out.println("Must name file");
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
customDungeonImporter.exportDungeon(this.getCommandSenderAsPlayer(var1).worldObj, x, y, z, mod_pocketDim.schematicContainer+"/"+var2[0]);
|
|
|
|
this.getCommandSenderAsPlayer(var1).sendChatToPlayer("created dungeon schematic in " +mod_pocketDim.schematicContainer+"/"+var2[0]);
|
|
|
|
|
|
|
|
}
|
2013-06-02 03:43:56 +02:00
|
|
|
|
|
|
|
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|