Fix CompoundTag::fromBlock(Block* block)

This commit is contained in:
Qiuzhizhe 2023-02-05 06:39:52 -08:00
parent e277252a1d
commit 0070831a52

View File

@ -142,12 +142,12 @@ void CompoundTag::setItemStack(ItemStack* item) {
}
std::unique_ptr<CompoundTag> 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);
}