From c2b8f6406d5749248ca7f629efa1d32b43742b63 Mon Sep 17 00:00:00 2001 From: ShrBox Date: Tue, 7 May 2024 14:45:25 +0800 Subject: [PATCH] fix: fix mc.explode compability --- src/legacy/api/EntityAPI.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/legacy/api/EntityAPI.cpp b/src/legacy/api/EntityAPI.cpp index 1e725a7..a7e38b5 100644 --- a/src/legacy/api/EntityAPI.cpp +++ b/src/legacy/api/EntityAPI.cpp @@ -1810,12 +1810,12 @@ Local McClass::explode(const Arguments& args) { return Local(); break; } - auto source = EntityClass::extract(args[beginIndex + 0]); // Can be nullptr + auto source = EntityClass::extract(args[beginIndex]); // Can be nullptr if (args.size() == 5 || args.size() == 8) { CHECK_ARG_TYPE(args[beginIndex + 1], ValueKind::kNumber); + CHECK_ARG_TYPE(args[beginIndex + 2], ValueKind::kBoolean); CHECK_ARG_TYPE(args[beginIndex + 3], ValueKind::kBoolean); - CHECK_ARG_TYPE(args[beginIndex + 4], ValueKind::kBoolean); float radius = args[beginIndex + 1].asNumber().toFloat(); bool isDestroy = args[beginIndex + 2].asBoolean().value();