forked from Kolyah35/minecraft-pe-0.6.1
27 lines
564 B
C++
Executable File
27 lines
564 B
C++
Executable File
#ifndef COM_MOJANG_NBT__NbtIo_H__
|
|
#define COM_MOJANG_NBT__NbtIo_H__
|
|
|
|
//package com.mojang.nbt;
|
|
|
|
#include "CompoundTag.h"
|
|
#include "../util/DataIO.h"
|
|
|
|
class NbtIo
|
|
{
|
|
public:
|
|
static CompoundTag* read(IDataInput* dis) {
|
|
Tag *tag = Tag::readNamedTag(dis);
|
|
if (tag && tag->getId() == Tag::TAG_Compound)
|
|
return (CompoundTag*) tag;
|
|
return NULL;
|
|
}
|
|
|
|
static bool write(CompoundTag* tag, IDataOutput* dos) {
|
|
if (!tag) return false;
|
|
Tag::writeNamedTag(tag, dos);
|
|
return false;
|
|
}
|
|
};
|
|
|
|
#endif /*COM_MOJANG_NBT__NbtIo_H__*/
|