File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -50,7 +50,7 @@ BlockActor* BlockEntityClass::extract(Local<Value> v) {
5050// 成员函数
5151Local<Value> BlockEntityClass::getPos () {
5252 try {
53- return IntPos::newPos (blockEntity->getPosition () , dim);
53+ return IntPos::newPos (blockEntity->mPosition , dim);
5454 }
5555 CATCH (" Fail in getBlockEntityPos!" )
5656}
@@ -64,7 +64,7 @@ Local<Value> BlockEntityClass::getName() {
6464
6565Local<Value> BlockEntityClass::getType () {
6666 try {
67- return Number::newNumber ((int )blockEntity->getType () );
67+ return Number::newNumber ((int )blockEntity->mType );
6868 }
6969 CATCH (" Fail in getBlockEntityType!" )
7070}
@@ -95,9 +95,10 @@ Local<Value> BlockEntityClass::setNbt(const Arguments& args) {
9595
9696Local<Value> BlockEntityClass::getBlock (const Arguments&) {
9797 try {
98- BlockPos bp = blockEntity->getPosition ();
99- auto & bl = ll::service::getLevel ()->getDimension (dim)->getBlockSourceFromMainChunkSource ().getBlock (bp);
100- return BlockClass::newBlock (bl, bp, dim);
98+ BlockPos blockPos = blockEntity->mPosition ;
99+ auto & block =
100+ ll::service::getLevel ()->getDimension (dim).lock ()->getBlockSourceFromMainChunkSource ().getBlock (blockPos);
101+ return BlockClass::newBlock (block, blockPos, dim);
101102 }
102103 CATCH (" Fail in getBlock!" )
103104}
You can’t perform that action at this time.
0 commit comments