namespace Automap
{
+ //ProtocolBuffer does not actually INHERIT the base class without an extra attribute on it...'lovely, just freakin' lovely.'
+
[JsonConverter(typeof(BlockPosConverter))]
- [ProtoContract]
+ [ProtoContract(ImplicitFields = ImplicitFields.None)]
public class BlockPosJson : BlockPos
{
- public BlockPosJson( )
+ public BlockPosJson()
{
-
+
}
public BlockPosJson(BlockPos orig) : base(x: orig.X, y: orig.Y, z: orig.Z)
{
}
+
+ [ProtoMember(1)]
+ public new int X {
+ get { return base.X; }
+ set { base.X = value; }
+ }
+
+ [ProtoMember(2)]
+ public new int Y {
+ get { return base.Y; }
+ set { base.Y = value; }
+ }
+
+ [ProtoMember(3)]
+ public int Z {
+ get { return base.Z; }
+ set { base.Z = value; }
+ }
}
/// <summary>
/// How JSON object conversion should be done for special formatting
/// </summary>
- public class BlockPosConverter : JsonConverter
+ public class BlockPosConverter : JsonConverter
{
public override bool CanConvert(Type objectType)
{