NBTExplorer/NBToolkit/TKFilter.cs

34 lines
768 B
C#
Raw Normal View History

using System;
using Substrate;
namespace NBToolkit
{
public abstract class TKFilter
{
//public abstract void ApplyChunk (NBT_Tree root);
public abstract void Run ();
2011-04-13 05:04:56 +00:00
public INBTWorld GetWorld (TKOptions opt)
{
2011-04-13 05:04:56 +00:00
INBTWorld world = null;
try {
if (opt.OPT_ALPHA) {
2011-04-13 05:04:56 +00:00
world = AlphaWorld.Open(opt.OPT_WORLD);
}
else {
2011-04-13 05:04:56 +00:00
world = BetaWorld.Open(opt.OPT_WORLD);
}
}
catch (Exception ex) {
Console.WriteLine("Error: " + ex.Message);
Environment.Exit(1);
}
return world;
}
}
}