Skip to content

Commit 21828c4

Browse files
committed
Update to Minecraft 1.20.71.1
1 parent b16cb30 commit 21828c4

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

include/dllmain.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,19 @@
2626
#include <chrono>
2727
#include <amethyst-deps/safetyhook.hpp>
2828
#include <amethyst/runtime/AmethystContext.h>
29+
#include <typeindex>
30+
#include <minecraft/src/common/world/level/Level.h>
2931

3032
#include "ShulkerRenderer.h"
3133

3234
#define ModFunction extern "C" __declspec(dllexport)
3335

36+
class CollisionTest {
37+
public:
38+
void Func1(const std::string&);
39+
void Func2(const std::string&);
40+
};
41+
3442
BOOL APIENTRY DllMain(HMODULE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
3543
return TRUE;
3644
}

src/dllmain.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static void Item_appendFormattedHovertext(Item* self, const ItemStackBase& itemS
2020
text.append(fmt::format("\n{}7Durability: {} / {}{}r", "\xc2\xa7", current, max, "\xc2\xa7"));
2121
}
2222

23-
std::string rawNameId = itemStack.getRawNameId();
23+
std::string rawNameId = std::string(item->mRawNameId.c_str());
2424

2525
if (rawNameId.find("shulker_box") != std::string::npos) {
2626
// Don't append the id for shulker boxes (makes it too long)
@@ -55,7 +55,7 @@ static void Shulker_appendFormattedHovertext(ShulkerBoxBlockItem* self, const It
5555
if (!itemStack.mUserData->contains("Items")) return;
5656

5757
const ListTag* items = itemStack.mUserData->getList("Items");
58-
ItemRegistryRef itemRegistryRef = ItemRegistryManager::getItemRegistry();
58+
ItemRegistryRef itemRegistryRef = level.mItemRegistry;
5959
auto registry = itemRegistryRef.mItemRegistry.lock();
6060

6161
for (int i = 0; i < items->size(); i++) {

0 commit comments

Comments
 (0)