@@ -1205,7 +1205,7 @@ Local<Value> PlayerClass::isInsidePortal() {
1205
1205
1206
1206
auto component = player->getEntityContext ().tryGetComponent <InsideBlockComponent>();
1207
1207
if (component) {
1208
- auto & fullName = component->mInsideBlock ->getLegacyBlock ().mNameInfo ->mFullName ;
1208
+ auto & fullName = component->mInsideBlock ->getBlockType ().mNameInfo ->mFullName ;
1209
1209
return Boolean::newBoolean (
1210
1210
*fullName == VanillaBlockTypeIds::Portal () || *fullName == VanillaBlockTypeIds::EndPortal ()
1211
1211
);
@@ -1433,7 +1433,8 @@ Local<Value> PlayerClass::isMoving() {
1433
1433
return Local<Value>();
1434
1434
}
1435
1435
1436
- return Boolean::newBoolean (SynchedActorDataAccess::getActorFlag (player->getEntityContext (), ActorFlags::Moving)
1436
+ return Boolean::newBoolean (
1437
+ SynchedActorDataAccess::getActorFlag (player->getEntityContext (), ActorFlags::Moving)
1437
1438
);
1438
1439
}
1439
1440
CATCH (" Fail in isMoving!" )
@@ -1662,10 +1663,10 @@ Local<Value> PlayerClass::setTitle(const Arguments& args) {
1662
1663
fadeOutTime = args[4 ].asNumber ().toInt32 ();
1663
1664
}
1664
1665
1665
- SetTitlePacket pkt = SetTitlePacket (type, content, std::nullopt );
1666
- pkt.mFadeInTime = fadeInTime;
1667
- pkt.mStayTime = stayTime;
1668
- pkt.mFadeOutTime = fadeOutTime;
1666
+ SetTitlePacket pkt (type, content, std::nullopt );
1667
+ pkt.mFadeInTime = fadeInTime;
1668
+ pkt.mStayTime = stayTime;
1669
+ pkt.mFadeOutTime = fadeOutTime;
1669
1670
player->sendNetworkPacket (pkt);
1670
1671
return Boolean::newBoolean (true );
1671
1672
}
@@ -2290,6 +2291,9 @@ Local<Value> PlayerClass::setSidebar(const Arguments& args) {
2290
2291
CATCH (" Fail in setSidebar!" )
2291
2292
}
2292
2293
2294
+ RemoveObjectivePacketPayload::RemoveObjectivePacketPayload () = default;
2295
+ SetDisplayObjectivePacketPayload::SetDisplayObjectivePacketPayload () = default;
2296
+
2293
2297
Local<Value> PlayerClass::removeSidebar (const Arguments&) {
2294
2298
try {
2295
2299
Player* player = get ();
@@ -2456,7 +2460,8 @@ Local<Value> PlayerClass::sendSimpleForm(const Arguments& args) {
2456
2460
}
2457
2461
}
2458
2462
auto formCallback = [engine{EngineScope::currentEngine ()},
2459
- callback{script::Global (args[4 ].asFunction ())
2463
+ callback{
2464
+ script::Global (args[4 ].asFunction ())
2460
2465
}](Player& pl, int chosen, ll::form::FormCancelReason reason) {
2461
2466
if ((ll::getGamingStatus () != ll::GamingStatus::Running)) return ;
2462
2467
if (!EngineManager::isValid (engine)) return ;
@@ -2500,9 +2505,10 @@ Local<Value> PlayerClass::sendModalForm(const Arguments& args) {
2500
2505
args[2 ].asString ().toString (),
2501
2506
args[3 ].asString ().toString ()
2502
2507
);
2503
- auto formCallback = [engine{EngineScope::currentEngine ()},
2504
- callback{script::Global (args[4 ].asFunction ())
2505
- }](Player& pl, ll::form::ModalFormResult const & chosen, ll::form::FormCancelReason reason
2508
+ auto formCallback = [engine{EngineScope::currentEngine ()}, callback{script::Global (args[4 ].asFunction ())}](
2509
+ Player& pl,
2510
+ ll::form::ModalFormResult const & chosen,
2511
+ ll::form::FormCancelReason reason
2506
2512
) {
2507
2513
if ((ll::getGamingStatus () != ll::GamingStatus::Running)) return ;
2508
2514
if (!EngineManager::isValid (engine)) return ;
@@ -3236,7 +3242,7 @@ Local<Value> PlayerClass::getBlockFromViewVector(const Arguments& args) {
3236
3242
false ,
3237
3243
true ,
3238
3244
[&solidOnly, &fullOnly, &includeLiquid](BlockSource const &, Block const & block, bool ) {
3239
- if (solidOnly && !block.mCachedComponentData ->mUnkd6c5eb . as < bool >() ) {
3245
+ if (solidOnly && !block.mCachedComponentData ->mIsSolid ) {
3240
3246
return false ;
3241
3247
}
3242
3248
if (fullOnly && !block.isSlabBlock ()) {
@@ -3258,7 +3264,7 @@ Local<Value> PlayerClass::getBlockFromViewVector(const Arguments& args) {
3258
3264
bp = res.mBlock ;
3259
3265
}
3260
3266
Block const & bl = player->getDimensionBlockSource ().getBlock (bp);
3261
- BlockLegacy const & legacy = bl.getLegacyBlock ();
3267
+ BlockType const & legacy = bl.getBlockType ();
3262
3268
// isEmpty()
3263
3269
if (bl.isAir () || (legacy.mProperties == BlockProperty::None && legacy.mMaterial .mType == MaterialType::Any)) {
3264
3270
return Local<Value>();
@@ -3454,6 +3460,9 @@ Local<Value> PlayerClass::removeItem(const Arguments& args) {
3454
3460
CATCH (" Fail in removeItem!" )
3455
3461
}
3456
3462
3463
+ ToastRequestPacket::ToastRequestPacket () = default;
3464
+ ToastRequestPacketPayload::ToastRequestPacketPayload () = default;
3465
+
3457
3466
Local<Value> PlayerClass::sendToast (const Arguments& args) {
3458
3467
CHECK_ARGS_COUNT (args, 2 );
3459
3468
CHECK_ARG_TYPE (args[0 ], ValueKind::kString );
@@ -3628,7 +3637,7 @@ Local<Value> PlayerClass::getBiomeId() {
3628
3637
Player* player = get ();
3629
3638
if (!player) return Local<Value>();
3630
3639
Biome const & bio = player->getDimensionBlockSource ().getBiome (player->getFeetBlockPos ());
3631
- return Number::newNumber (bio.mId );
3640
+ return Number::newNumber (bio.mId -> mValue );
3632
3641
}
3633
3642
CATCH (" Fail in getBiomeId!" );
3634
3643
}
0 commit comments