Skip to content

Commit

Permalink
fix: fix mc.explode compability
Browse files Browse the repository at this point in the history
  • Loading branch information
ShrBox committed May 7, 2024
1 parent e4bc275 commit c2b8f64
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/legacy/api/EntityAPI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1810,12 +1810,12 @@ Local<Value> McClass::explode(const Arguments& args) {
return Local<Value>();
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();
Expand Down

0 comments on commit c2b8f64

Please sign in to comment.