mirror of
https://github.com/quizhizhe/LiteLoaderBDS-1.16.40.git
synced 2025-06-03 04:23:39 +00:00
只剩mce::Color的问题了,BDS内部没有mce
This commit is contained in:
parent
3a4787b312
commit
6ae301d624
@ -25,7 +25,7 @@ namespace RakNet {
|
||||
|
||||
struct SystemAddress {
|
||||
char filler[17 * 8]; // uncertain?
|
||||
MCAPI void ToString_New(bool, char, char*) const;
|
||||
MCAPI void ToString_New(bool,char *,char) const;
|
||||
};
|
||||
struct RakNetGUID {
|
||||
uint64_t unk;
|
||||
|
@ -4,13 +4,17 @@
|
||||
#include "../Global.h"
|
||||
|
||||
#define BEFORE_EXTRA
|
||||
|
||||
#include "MC/ReadOnlyBinaryStream.hpp"
|
||||
#undef BEFORE_EXTRA
|
||||
|
||||
class VarIntDataInput {
|
||||
|
||||
#define AFTER_EXTRA
|
||||
|
||||
ReadOnlyBinaryStream *mStream;
|
||||
public:
|
||||
VarIntDataInput(ReadOnlyBinaryStream *stream){
|
||||
mStream = stream;
|
||||
};
|
||||
#undef AFTER_EXTRA
|
||||
#ifndef DISABLE_CONSTRUCTOR_PREVENTION_VARINTDATAINPUT
|
||||
public:
|
||||
@ -21,8 +25,8 @@ public:
|
||||
|
||||
public:
|
||||
/*0*/ virtual ~VarIntDataInput();
|
||||
/*1*/ virtual void __unk_vfn_1();
|
||||
/*2*/ virtual void __unk_vfn_2();
|
||||
// /*1*/ virtual void __unk_vfn_1();
|
||||
/*2*/ virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char>> readLongString(void);
|
||||
/*3*/ virtual float readFloat();
|
||||
/*4*/ virtual double readDouble();
|
||||
/*5*/ virtual char readByte();
|
||||
|
@ -118,7 +118,7 @@ Color ColorFromConsoleCode(std::string const& console) {
|
||||
auto codeIter = decorationToColorCodeMap.find(decoration);
|
||||
if (codeIter != decorationToColorCodeMap.end())
|
||||
return *ColorFromColorCode(codeIter->second);
|
||||
return mce::Color::NIL;
|
||||
return Color::NIL;
|
||||
}
|
||||
if (decoration == 38 && c == ';') {
|
||||
unsigned char unk;
|
||||
|
@ -3,6 +3,6 @@
|
||||
|
||||
string NetworkIdentifier::getIP() {
|
||||
string rv;
|
||||
Global<RakNet::RakPeer>->getAdr(*this).ToString_New(true, ':', rv.data());
|
||||
Global<RakNet::RakPeer>->getAdr(*this).ToString_New(true, rv.data(), ':');
|
||||
return rv.substr(0, rv.find('|'));
|
||||
}
|
@ -1,6 +1,8 @@
|
||||
#include <MC/ReadOnlyBinaryStream.hpp>
|
||||
#include <MC/CompoundTag.hpp>
|
||||
#include <MC/NbtIo.hpp>
|
||||
#include <MC/IDataInput.hpp>
|
||||
#include <MC/VarIntDataInput.hpp>
|
||||
|
||||
std::string const& ReadOnlyBinaryStream::getData() const {
|
||||
return *pBuf;
|
||||
@ -26,20 +28,14 @@ void ReadOnlyBinaryStream::setReadPointer(std::size_t size) {
|
||||
readPointer = len;
|
||||
}
|
||||
|
||||
struct IDataInput{
|
||||
void* pVT;
|
||||
ReadOnlyBinaryStream* pReadOnlyBinaryStream;
|
||||
};
|
||||
|
||||
std::unique_ptr<class CompoundTag> ReadOnlyBinaryStream::getCompoundTag() {
|
||||
// auto tag = CompoundTag::create();
|
||||
// class CompoundTag& (*rv)(class CompoundTag&, class ReadOnlyBinaryStream&);
|
||||
// *((void**)&rv) = dlsym("?read@?$serialize@VCompoundTag@@@@SA?AVCompoundTag@@AEAVReadOnlyBinaryStream@@@Z");
|
||||
// (*rv)(*tag, *this);
|
||||
IDataInput pVTVarIntDataInput;
|
||||
pVTVarIntDataInput.pVT = dlsym("??_7VarIntDataInput@@6B@");
|
||||
pVTVarIntDataInput.pReadOnlyBinaryStream = this;
|
||||
return std::move(NbtIo::read(pVTVarIntDataInput));
|
||||
VarIntDataInput pVTVarIntDataInput= VarIntDataInput(this);
|
||||
return std::move(NbtIo::read((IDataInput&)pVTVarIntDataInput));
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user