I read this thread https://forums.pmmp.io/threads/adapting-old-code-using-compoundtags-since-api-3-0-0-alpha12.5975/ that adapt old code to new code but i need help. In his example he shows how to replace the old child tag compound to new. Like this unset($nbt->SomeTag); should be replaced with $nbt->removeTag("SomeTag"); But what if this one has more object or function? unset($nbt->SomeTag); // unset($nbt->SomeTag->hasMoreObject); //idk what shall i call this. Is this calling object to another object? Im a nub lol. Shall i remove it with the last object like this? $nbt->removeTag("hasMoreObject"); I need help lol
If you unset($nbt->sometag) then $nbt->sometag will deleted fully. You just need to delete the root of tag.