@@ -2981,7 +2981,6 @@ Local<Value> PlayerClass::getAttributes(const Arguments& args) {
29812981}
29822982
29832983Local<Value> PlayerClass::getEntityFromViewVector (const Arguments& args) {
2984-
29852984 try {
29862985 Player* player = get ();
29872986 if (!player) return Local<Value>();
@@ -2992,7 +2991,9 @@ Local<Value> PlayerClass::getEntityFromViewVector(const Arguments& args) {
29922991 }
29932992 HitResult result = player->traceRay (maxDistance, true , false );
29942993 Actor* entity = result.getEntity ();
2995- if (entity) return EntityClass::newEntity (entity);
2994+ if (entity) {
2995+ return EntityClass::newEntity (entity);
2996+ }
29962997 return Local<Value>();
29972998 }
29982999 CATCH (" Fail in getEntityFromViewVector!" );
@@ -3003,10 +3004,10 @@ Local<Value> PlayerClass::getBlockFromViewVector(const Arguments& args) {
30033004 Player* player = get ();
30043005 if (!player) return Local<Value>();
30053006 bool includeLiquid = false ;
3006- bool solidOnly = false ; // not used
3007+ bool solidOnly = false ;
30073008 float maxDistance = 5 .25f ;
3008- bool ignoreBorderBlocks = true ; // not used
3009- bool fullOnly = false ; // not used
3009+ bool ignoreBorderBlocks = true ;
3010+ bool fullOnly = false ;
30103011 if (args.size () > 0 ) {
30113012 CHECK_ARG_TYPE (args[0 ], ValueKind::kBoolean );
30123013 includeLiquid = args[0 ].asBoolean ().value ();
@@ -3041,15 +3042,16 @@ Local<Value> PlayerClass::getBlockFromViewVector(const Arguments& args) {
30413042 }
30423043 );
30433044
3044- return Local<Value>();
30453045 BlockPos bp;
30463046 if (includeLiquid && res.mIsHitLiquid ) {
30473047 bp = res.mLiquidPos ;
30483048 } else {
30493049 bp = res.mBlockPos ;
30503050 }
30513051 Block const & bl = player->getDimensionBlockSource ().getBlock (bp);
3052- if (bl.isEmpty ()) return Local<Value>();
3052+ if (bl.isEmpty ()) {
3053+ return Local<Value>();
3054+ }
30533055 return BlockClass::newBlock (std::move (&bl), std::move (&bp), &player->getDimensionBlockSource ());
30543056 }
30553057 CATCH (" Fail in getBlockFromViewVector!" );
0 commit comments