-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #77 from outercloudstudio/main
- Loading branch information
Showing
4 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
AmethystAPI/src/minecraft/src-deps/core/debug/log/ContentLog.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#pragma once | ||
#include <cstdint> | ||
#include "amethyst/Memory.hpp" | ||
#include "ContentLogTypes.hpp" | ||
|
||
class ContentLog { | ||
public: | ||
uintptr_t** vtable; | ||
|
||
// 1.20.72.1 - 48 89 5C 24 ? 48 89 4C 24 ? 57 48 83 EC ? 48 8B F9 48 8D 05 ? ? ? ? 48 89 01 48 89 4C 24 ? 48 83 C1 ? 48 8D 54 24 ? E8 ? ? ? ? 90 48 8D 05 ? ? ? ? 48 89 07 C6 47 | ||
ContentLog() {}; | ||
|
||
template<typename... Strings> | ||
int Log(bool doNotRepeat, LogLevel logLevel, LogArea logArea, Strings... strings) { | ||
using function = decltype(&ContentLog::Log); | ||
auto func = std::bit_cast<function>(SigScan("44 89 4C 24 ? 48 83 EC")); | ||
return (this->*func)(doNotRepeat, logLevel, logArea, strings...); | ||
} | ||
}; |
49 changes: 49 additions & 0 deletions
49
AmethystAPI/src/minecraft/src-deps/core/debug/log/ContentLogTypes.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#pragma once | ||
|
||
enum class LogLevel : unsigned int { | ||
Verbose = 0, | ||
Inform = 1, | ||
Warning = 2, | ||
Error = 3, | ||
_COUNT = 4, | ||
}; | ||
|
||
// Note the old ones we found from 1.19 are out of date | ||
enum class LogArea : unsigned int { | ||
Actor = 0, | ||
Addon = 1, | ||
AI = 2, | ||
Animation = 3, | ||
AutomatedTests = 4, | ||
BiomeRegistry = 5, | ||
Blocks = 6, | ||
Camera = 7, | ||
Commands = 8, | ||
Components = 9, | ||
Dialogue = 10, | ||
Effects = 11, | ||
Entity = 12, | ||
FeatureRegistry = 13, | ||
Geometry = 14, | ||
Item = 15, | ||
Json = 16, | ||
LevelStorage = 17, | ||
Lightning = 18, | ||
Localization = 19, | ||
Log = 20, | ||
Molang = 21, | ||
Messaging = 22, | ||
Recipes = 23, | ||
Rendering = 24, | ||
RuntimeCamera = 25, | ||
Scripting = 26, | ||
Sound = 27, | ||
Store = 28, | ||
Structure = 29, | ||
Texture = 30, | ||
TexturUI = 31, | ||
Volumes = 32, | ||
LootTable = 33, | ||
Packs = 34, | ||
_COUNT = 35, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters