From 1712cd4f471ade0649c234db92ee4167cd6c24ad Mon Sep 17 00:00:00 2001 From: Nikita Edel Date: Wed, 11 Mar 2026 19:04:02 +0100 Subject: [PATCH] the tutorial does not crash --- Minecraft.World/IO/NBT/CompoundTag.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Minecraft.World/IO/NBT/CompoundTag.h b/Minecraft.World/IO/NBT/CompoundTag.h index 45b840538..e41a7ce8f 100644 --- a/Minecraft.World/IO/NBT/CompoundTag.h +++ b/Minecraft.World/IO/NBT/CompoundTag.h @@ -194,8 +194,11 @@ public: ListTag *getList(const wchar_t * name) { - if (tags.find(name) == tags.end()) return new ListTag(name); - return (ListTag *) tags[name]; + // 4jcraft changed this function to not do a c style cast + // of a templated class + auto it = tags.find(name); + if(it == tags.end()) return new ListTag(name); + return dynamic_cast*>(it->second); } bool getBoolean(const wchar_t *string)