forked from Kolyah35/minecraft-pe-0.6.1
the whole game
This commit is contained in:
26
src/nbt/NbtIo.h
Executable file
26
src/nbt/NbtIo.h
Executable file
@@ -0,0 +1,26 @@
|
||||
#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__*/
|
||||
Reference in New Issue
Block a user