This commit is contained in:
Justin Aquadro 2011-06-30 04:57:18 +00:00
parent 689d5020d2
commit d1f1361f3d
44 changed files with 58 additions and 58 deletions

View file

@ -12,7 +12,7 @@ namespace Substrate
/// <remarks>
/// A Chunk internally wraps an NBT_Tree of raw chunk data. Modifying the chunk will update the tree, and vice-versa.
/// </remarks>
public class Chunk : IChunk, INBTObject<Chunk>, ICopyable<Chunk>
public class Chunk : IChunk, INbtObject<Chunk>, ICopyable<Chunk>
{
private const int XDIM = 16;
private const int YDIM = 128;
@ -258,7 +258,7 @@ namespace Substrate
/// <returns>Status indicating if the tree represents a valid chunk.</returns>
public bool ValidateTree (TagNode tree)
{
NBTVerifier v = new NBTVerifier(tree, LevelSchema);
NbtVerifier v = new NbtVerifier(tree, LevelSchema);
return v.Verify();
}

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, ArrowSchema).Verify();
return new NbtVerifier(tree, ArrowSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, BoatSchema).Verify();
return new NbtVerifier(tree, BoatSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, ChickenSchema).Verify();
return new NbtVerifier(tree, ChickenSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, CowSchema).Verify();
return new NbtVerifier(tree, CowSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, CreeperSchema).Verify();
return new NbtVerifier(tree, CreeperSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, EggSchema).Verify();
return new NbtVerifier(tree, EggSchema).Verify();
}
#endregion

View file

@ -61,7 +61,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, FallingSandSchema).Verify();
return new NbtVerifier(tree, FallingSandSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, GhastSchema).Verify();
return new NbtVerifier(tree, GhastSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, GiantSchema).Verify();
return new NbtVerifier(tree, GiantSchema).Verify();
}
#endregion

View file

@ -85,7 +85,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, ItemSchema).Verify();
return new NbtVerifier(tree, ItemSchema).Verify();
}
#endregion

View file

@ -76,7 +76,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, MinecartSchema).Verify();
return new NbtVerifier(tree, MinecartSchema).Verify();
}
#endregion

View file

@ -67,7 +67,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, MinecartChestSchema).Verify();
return new NbtVerifier(tree, MinecartChestSchema).Verify();
}
#endregion

View file

@ -82,7 +82,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, MinecartFurnaceSchema).Verify();
return new NbtVerifier(tree, MinecartFurnaceSchema).Verify();
}
#endregion

View file

@ -99,7 +99,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, MobSchema).Verify();
return new NbtVerifier(tree, MobSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, MonsterSchema).Verify();
return new NbtVerifier(tree, MonsterSchema).Verify();
}
#endregion

View file

@ -113,7 +113,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, PaintingSchema).Verify();
return new NbtVerifier(tree, PaintingSchema).Verify();
}
#endregion

View file

@ -61,7 +61,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, PigSchema).Verify();
return new NbtVerifier(tree, PigSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, PigZombieSchema).Verify();
return new NbtVerifier(tree, PigZombieSchema).Verify();
}
#endregion

View file

@ -61,7 +61,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, PrimedTntSchema).Verify();
return new NbtVerifier(tree, PrimedTntSchema).Verify();
}
#endregion

View file

@ -72,7 +72,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, SheepSchema).Verify();
return new NbtVerifier(tree, SheepSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, SkeletonSchema).Verify();
return new NbtVerifier(tree, SkeletonSchema).Verify();
}
#endregion

View file

@ -61,7 +61,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, SlimeSchema).Verify();
return new NbtVerifier(tree, SlimeSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, SnowballSchema).Verify();
return new NbtVerifier(tree, SnowballSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, SpiderSchema).Verify();
return new NbtVerifier(tree, SpiderSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, SquidSchema).Verify();
return new NbtVerifier(tree, SquidSchema).Verify();
}
#endregion

View file

@ -115,7 +115,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, ThrowableSchema).Verify();
return new NbtVerifier(tree, ThrowableSchema).Verify();
}
#endregion

View file

@ -83,7 +83,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, WolfSchema).Verify();
return new NbtVerifier(tree, WolfSchema).Verify();
}
#endregion

View file

@ -28,7 +28,7 @@ namespace Substrate.Entities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, ZombieSchema).Verify();
return new NbtVerifier(tree, ZombieSchema).Verify();
}
#endregion

View file

@ -9,7 +9,7 @@ namespace Substrate
/// <summary>
/// The base Entity type for Minecraft Entities, providing access to data common to all Minecraft Entities.
/// </summary>
public class Entity : INBTObject<Entity>, ICopyable<Entity>
public class Entity : INbtObject<Entity>, ICopyable<Entity>
{
private static readonly SchemaNodeCompound _schema = new SchemaNodeCompound("")
{
@ -231,7 +231,7 @@ namespace Substrate
/// <returns>Status indicating whether the tree was valid against the internal schema.</returns>
public bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, _schema).Verify();
return new NbtVerifier(tree, _schema).Verify();
}
#endregion
@ -257,7 +257,7 @@ namespace Substrate
/// <remarks>Generally, this class should be subtyped into new concrete Entity types, as this generic type is unable to
/// capture any of the custom data fields. It is however still possible to create instances of <see cref="Entity"/> objects,
/// which may allow for graceful handling of unknown Entity types.</remarks>
public class EntityTyped : Entity, INBTObject<EntityTyped>, ICopyable<EntityTyped>
public class EntityTyped : Entity, INbtObject<EntityTyped>, ICopyable<EntityTyped>
{
private static readonly SchemaNodeCompound _schema = Entity.Schema.MergeInto(new SchemaNodeCompound("")
{
@ -355,7 +355,7 @@ namespace Substrate
/// <returns>Status indicating whether the tree was valid against the internal schema.</returns>
public virtual new bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, _schema).Verify();
return new NbtVerifier(tree, _schema).Verify();
}
#endregion

View file

@ -11,7 +11,7 @@ namespace Substrate
ItemCollection Items { get; }
}
public class Item : INBTObject<Item>, ICopyable<Item>
public class Item : INbtObject<Item>, ICopyable<Item>
{
public static readonly SchemaNodeCompound ItemSchema = new SchemaNodeCompound("")
{
@ -107,13 +107,13 @@ namespace Substrate
public bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, ItemSchema).Verify();
return new NbtVerifier(tree, ItemSchema).Verify();
}
#endregion
}
public class ItemCollection : INBTObject<ItemCollection>, ICopyable<ItemCollection>
public class ItemCollection : INbtObject<ItemCollection>, ICopyable<ItemCollection>
{
public static readonly SchemaNodeCompound InventorySchema = Item.ItemSchema.MergeInto(new SchemaNodeCompound("")
{
@ -228,7 +228,7 @@ namespace Substrate
public bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, ListSchema).Verify();
return new NbtVerifier(tree, ListSchema).Verify();
}
#endregion

View file

@ -5,7 +5,7 @@ using Substrate.Nbt;
namespace Substrate
{
public class Level : INBTObject<Level>, ICopyable<Level>
public class Level : INbtObject<Level>, ICopyable<Level>
{
public static SchemaNodeCompound LevelSchema = new SchemaNodeCompound()
{
@ -318,7 +318,7 @@ namespace Substrate
public virtual bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, LevelSchema).Verify();
return new NbtVerifier(tree, LevelSchema).Verify();
}
#endregion

View file

@ -6,7 +6,7 @@ namespace Substrate.Nbt
/// Defines methods for loading or extracting an NBT tree.
/// </summary>
/// <typeparam name="T">Object type that supports this interface.</typeparam>
public interface INBTObject<T>
public interface INbtObject<T>
{
/// <summary>
/// Attempt to load an NBT tree into the object without validation.

View file

@ -5,7 +5,7 @@ using Substrate.Core;
namespace Substrate.Nbt
{
/// <summary>
/// Indicates how an <see cref="NBTVerifier"/> event processor should respond to returning event handler.
/// Indicates how an <see cref="NbtVerifier"/> event processor should respond to returning event handler.
/// </summary>
public enum TagEventCode
{
@ -26,7 +26,7 @@ namespace Substrate.Nbt
}
/// <summary>
/// Event arguments for <see cref="NBTVerifier"/> failure events.
/// Event arguments for <see cref="NbtVerifier"/> failure events.
/// </summary>
public class TagEventArgs : EventArgs
{
@ -112,7 +112,7 @@ namespace Substrate.Nbt
/// <summary>
/// Verifies the integrity of an NBT tree against a schema definition.
/// </summary>
public class NBTVerifier
public class NbtVerifier
{
private TagNode _root;
private SchemaNode _schema;
@ -135,11 +135,11 @@ namespace Substrate.Nbt
private Dictionary<string, TagNode> _scratch = new Dictionary<string,TagNode>();
/// <summary>
/// Constructs a new <see cref="NBTVerifier"/> object for a given NBT tree and schema.
/// Constructs a new <see cref="NbtVerifier"/> object for a given NBT tree and schema.
/// </summary>
/// <param name="root">A <see cref="TagNode"/> representing the root of an NBT tree.</param>
/// <param name="schema">A <see cref="SchemaNode"/> representing the root of a schema definition for the NBT tree.</param>
public NBTVerifier (TagNode root, SchemaNode schema)
public NbtVerifier (TagNode root, SchemaNode schema)
{
_root = root;
_schema = schema;

View file

@ -4,7 +4,7 @@ using Substrate.Core;
namespace Substrate.Nbt
{
/// <summary>
/// A collection of static methods that can be hooked into <see cref="NBTVerifier"/> events for logging NBT errors to the console.
/// A collection of static methods that can be hooked into <see cref="NbtVerifier"/> events for logging NBT errors to the console.
/// </summary>
public static class VerifierLogger
{

View file

@ -6,7 +6,7 @@ using Substrate.Nbt;
namespace Substrate
{
public class Player : Entity, INBTObject<Player>, ICopyable<Player>, IItemContainer
public class Player : Entity, INbtObject<Player>, ICopyable<Player>, IItemContainer
{
public static readonly SchemaNodeCompound PlayerSchema = Entity.Schema.MergeInto(new SchemaNodeCompound("")
{
@ -217,7 +217,7 @@ namespace Substrate
public virtual new bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, PlayerSchema).Verify();
return new NbtVerifier(tree, PlayerSchema).Verify();
}
#endregion

View file

@ -81,7 +81,7 @@ namespace Substrate.TileEntities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, ChestSchema).Verify();
return new NbtVerifier(tree, ChestSchema).Verify();
}
#endregion

View file

@ -106,7 +106,7 @@ namespace Substrate.TileEntities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, FurnaceSchema).Verify();
return new NbtVerifier(tree, FurnaceSchema).Verify();
}
#endregion

View file

@ -82,7 +82,7 @@ namespace Substrate.TileEntities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, MobSpawnerSchema).Verify();
return new NbtVerifier(tree, MobSpawnerSchema).Verify();
}
#endregion

View file

@ -71,7 +71,7 @@ namespace Substrate.TileEntities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, MusicSchema).Verify();
return new NbtVerifier(tree, MusicSchema).Verify();
}
#endregion

View file

@ -76,7 +76,7 @@ namespace Substrate.TileEntities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, RecordPlayerSchema).Verify();
return new NbtVerifier(tree, RecordPlayerSchema).Verify();
}
#endregion

View file

@ -104,7 +104,7 @@ namespace Substrate.TileEntities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, SignSchema).Verify();
return new NbtVerifier(tree, SignSchema).Verify();
}
#endregion

View file

@ -82,7 +82,7 @@ namespace Substrate.TileEntities
public override bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, TrapSchema).Verify();
return new NbtVerifier(tree, TrapSchema).Verify();
}
#endregion

View file

@ -10,7 +10,7 @@ namespace Substrate
/// <remarks>Generally, this class should be subtyped into new concrete Tile Entity types, as this generic type is unable to
/// capture any of the custom data fields that make Tile Entities useful in the first place. It is however still possible to
/// create instances of <see cref="TileEntity"/> objects, which may allow for graceful handling of unknown Tile Entities.</remarks>
public class TileEntity : INBTObject<TileEntity>, ICopyable<TileEntity>
public class TileEntity : INbtObject<TileEntity>, ICopyable<TileEntity>
{
private static readonly SchemaNodeCompound _schema = new SchemaNodeCompound("")
{
@ -174,7 +174,7 @@ namespace Substrate
/// <returns>Status indicating whether the tree was valid against the internal schema.</returns>
public virtual bool ValidateTree (TagNode tree)
{
return new NBTVerifier(tree, _schema).Verify();
return new NbtVerifier(tree, _schema).Verify();
}
#endregion