From 0070831a5246c9b91e007a6d5f4045113ff45c98 Mon Sep 17 00:00:00 2001 From: Qiuzhizhe <42761326+quizhizhe@users.noreply.github.com> Date: Sun, 5 Feb 2023 06:39:52 -0800 Subject: [PATCH] Fix CompoundTag::fromBlock(Block* block) --- LiteLoader/Kernel/NBT/CompoundTagAPI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/LiteLoader/Kernel/NBT/CompoundTagAPI.cpp b/LiteLoader/Kernel/NBT/CompoundTagAPI.cpp index 2b827b5..c0615d3 100644 --- a/LiteLoader/Kernel/NBT/CompoundTagAPI.cpp +++ b/LiteLoader/Kernel/NBT/CompoundTagAPI.cpp @@ -142,12 +142,12 @@ void CompoundTag::setItemStack(ItemStack* item) { } std::unique_ptr CompoundTag::fromBlock(Block* block) { - auto tag = (CompoundTag*)((uintptr_t)block + 120); //dAccess Block::Block + auto tag = (CompoundTag*)((uintptr_t)block + 24); //dAccess Block::Block return tag->clone(); } void CompoundTag::setBlock(Block* blk) { - auto tag = (CompoundTag*)((uintptr_t)blk + 120);//dAccess Block::Block + auto tag = (CompoundTag*)((uintptr_t)blk + 24);//dAccess Block::Block tag->deepCopy(*this); }