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