Files
MinecraftConsoles/Minecraft.World/Tag.h
daoge b3feddfef3 feat: TU19 (Dec 2014) Features & Content (#155)
* try to resolve merge conflict

* feat: TU19 (Dec 2014) Features & Content (#32)

* December 2014 files

* Working release build

* Fix compilation issues

* Add sound to Windows64Media

* Add DLC content and force Tutorial DLC

* Revert "Add DLC content and force Tutorial DLC"

This reverts commit 97a4399472.

* Disable broken light packing

* Disable breakpoint during DLC texture map load

Allows DLC loading but the DLC textures are still broken

* Fix post build not working

* ...

* fix vs2022 build

* fix cmake build

---------

Co-authored-by: Loki <lokirautio@gmail.com>
2026-03-03 03:04:10 +08:00

47 lines
1.3 KiB
C++

#pragma once
#include <ostream>
#include "InputOutputStream.h"
using namespace std;
class Tag
{
public:
static const byte TAG_End = 0;
static const byte TAG_Byte = 1;
static const byte TAG_Short = 2;
static const byte TAG_Int = 3;
static const byte TAG_Long = 4;
static const byte TAG_Float = 5;
static const byte TAG_Double = 6;
static const byte TAG_Byte_Array = 7;
static const byte TAG_String = 8;
static const byte TAG_List = 9;
static const byte TAG_Compound = 10;
static const byte TAG_Int_Array = 11;
static const int MAX_DEPTH = 512;
private:
wstring name;
protected:
Tag(const wstring &name);
public:
virtual void write(DataOutput *dos) = 0;
virtual void load(DataInput *dis, int tagDepth) = 0;
virtual wstring toString() = 0;
virtual byte getId() = 0;
void print(ostream out);
void print(char *prefix, wostream out);
wstring getName();
Tag *setName(const wstring& name);
static Tag *readNamedTag(DataInput *dis);
static Tag *readNamedTag(DataInput *dis, int tagDepth);
static void writeNamedTag(Tag *tag, DataOutput *dos);
static Tag *newTag(byte type, const wstring &name);
static wchar_t *getTagName(byte type);
virtual ~Tag() {}
virtual bool equals(Tag *obj); // 4J Brought forward from 1.2
virtual Tag *copy() = 0; // 4J Brought foward from 1.2
};