private bool CustomRead(NbtCompound node, bool ignoreProperty) { if (!node.TryGet <NbtString>(nameof(Name), out var str)) { return(false); } NbtCompound property = null; if (!ignoreProperty) { node.TryGet(nameof(Properties), out property); } Name = str.Value; // TODO: BlockProperty if (property != null) { Properties = NbtBlockProperty.CreateFromNbt(Name, property); } return(true); }
public void Setup() { sourceBlock = new NamespacedBlock("TestBlock", NbtBlockProperty.CreateFromNbt("test", new NbtCompound() { new NbtInt("base", 2) })); sourceBlock2 = new NamespacedBlock("EqualTest"); sourceBlock3 = new NamespacedBlock("EqualTest"); }