LiteLDev / LeviLamina

A lightweight, modular and versatile mod loader for Minecraft Bedrock Edition, formerly known as LiteLoaderBDS
https://levimc.org/software/levilamina
GNU Lesser General Public License v3.0
1.14k stars 117 forks source link

mc.cloneMob()生成实体坐标错误 #861

Closed mrmagic2020 closed 2 years ago

mrmagic2020 commented 2 years ago

异常模块

ScriptEngine (脚本引擎)

操作系统

Windows Server 2016

LiteLoader 版本

2.7.2

BDS 版本

1.19.30

发生了什么?

使用mc.cloneMob(entity, pos)复制实体时,生成实体的坐标不在指定的pos上,而是生成在原先实体entity.pos上

复现此问题的步骤

1、获得一个实体对象en 2、使用mc.cloneMob(en, pos)复制实体 3、发现无论pos输入的是坐标对象,还是x,y,z,dimid,复制出来的实体都在原先实体的坐标上。

有关的日志/输出

No response

插件列表

13:46:45 INFO [Server] 插件列表 [32]
13:46:45 INFO [Server] - anti_cheats-1.19.30.0929.dll [v1.0.0] (anti_cheats-1.19.30.0929.dll)
13:46:45 INFO [Server]   anti_cheats-1.19.30.0929.dll
13:46:45 INFO [Server] - BETweaker [v1.2.0] (BETweaker.dll)
13:46:45 INFO [Server]   adds features to the game, giving survival players a very rich and useful feature set.
13:46:45 INFO [Server] - BackupHelper [v2.0.7] (BackupHelper.dll)
13:46:45 INFO [Server]   One command to backup your level
13:46:45 INFO [Server] - LLMoney [v2.7.0] (LLMoney.dll)
13:46:45 INFO [Server]   EconomyCore for LiteLoaderBDS
13:46:45 INFO [Server] - PermissionAPI [v2.7.0] (PermissionAPI.dll)
13:46:45 INFO [Server]   Builtin & Powerful permission API for LiteLoaderBDS
13:46:45 INFO [Server] - MConsole [v1.0.0] (MConsole.js)
13:46:45 INFO [Server]
13:46:45 INFO [Server] - MovingLight [v1.8.2] (MovingLight.dll)
13:46:45 INFO [Server]   The moving light.
13:46:45 INFO [Server] - CustomMap [v1.1.6] (CustomMap.dll)
13:46:45 INFO [Server]   Customize the pixels on the map
13:46:45 INFO [Server] - MagicWelcome [v1.0.7] (MagicWelcome.js)
13:46:45 INFO [Server]   A Simple Welcome
13:46:45 INFO [Server] - MSEffect [v1.0.0] (MSEffect.js)
13:46:45 INFO [Server]   Special effects!
13:46:45 INFO [Server] - ScheduleCmd [v1.1.1] (ScheduleCmd.dll)
13:46:45 INFO [Server]   Schedule your command execute in language of crontab
13:46:45 INFO [Server] - LMenu [v1.0.0] (LMenu.js)
13:46:45 INFO [Server]   LMenu
13:46:45 INFO [Server] - ScriptEngine-QuickJs [v2.7.2] (LiteLoader.Js.dll)
13:46:45 INFO [Server]   Javascript ScriptEngine for LiteLoaderBDS
13:46:45 INFO [Server] - Bazaar [v1.1.9] (Bazaar.js)
13:46:45 INFO [Server]   物品集市
13:46:45 INFO [Server] - BehaviorLog [v2.1.4] (BehaviorLog.lxl.js)
13:46:45 INFO [Server]   Behavior Log for LiteLoaderBDS
13:46:45 INFO [Server] - BetterSidebar [v1.0.0] (BetterSidebar.lxl.js)
13:46:45 INFO [Server]   BetterSidebar
13:46:45 INFO [Server] - CustomGetMap [v0.3.0] (CustomGetMap.js)
13:46:45 INFO [Server]   插件CustomMap自定义地图画的辅助插件
13:46:45 INFO [Server] - hikokoto [v1.0.0] (hikokoto.lxl.js)
13:46:45 INFO [Server]   hikokoto
13:46:45 INFO [Server] - LxlBlackBe [v1.0.0] (LxlBlackBe.lxl.js)
13:46:45 INFO [Server]   LxlBlackBe
13:46:45 INFO [Server] - MBuffSwitch [v1.0.0] (MBuffSwitch.js)
13:46:45 INFO [Server]   个人BUFF开关
13:46:45 INFO [Server] - MJoinContract [v1.0.0] (MJoinContract.js)
13:46:45 INFO [Server]   入服须知
13:46:45 INFO [Server] - MPlayerInfo [v1.0.0] (MPlayerInfo.js)
13:46:45 INFO [Server]   记录玩家信息
13:46:45 INFO [Server] - MRSpawner [v1.0.0] (MRSpawner.js)
13:46:45 INFO [Server]   设置公共物资生成点,开展物资争夺赛!
13:46:45 INFO [Server] - NilCDK [v1.0.0] (NilCDK.js)
13:46:45 INFO [Server]   NilCDK
13:46:45 INFO [Server] - ScriptEngine-Lua [v2.7.2] (LiteLoader.Lua.dll)
13:46:45 INFO [Server]   Lua ScriptEngine for LiteLoaderBDS
13:46:45 INFO [Server] - ScriptEngine-NodeJs [v2.7.2] (LiteLoader.NodeJs.dll)
13:46:45 INFO [Server]   Node.js ScriptEngine for LiteLoaderBDS
13:46:45 INFO [Server] - MTeleporter [v1.0.1] (MTeleporter.js)
13:46:45 INFO [Server]   绑定实体&传送
13:46:45 INFO [Server] - MProtector [v1.0.0] (MProtector.js)
13:46:45 INFO [Server]   地皮保护
13:46:45 INFO [Server] - MSign [v1.0.0] (MSign.js)
13:46:45 INFO [Server]   签到系统
13:46:45 INFO [Server] - YoyoRobot [v0.0.13] (yoyorobot)
13:46:45 INFO [Server]   一个支持vps,面板的机器人
13:46:45 INFO [Server] - MElevator [v1.0.4] (MElevator.js)
13:46:45 INFO [Server]   方块电梯
13:46:45 INFO [Server] - MWiki [v0.0.1] (MWiki.js)
13:46:45 INFO [Server]   WIKI
13:46:45 INFO [Server]
13:46:45 INFO [Server]
13:46:45 INFO [Server] * 使用命令“ll list <Plugin Name>”来获取更多信息
quizhizhe commented 2 years ago

https://github.com/LiteLDev/LiteLoaderBDS/blob/df2215d1d5accd4d6f3092cf92f09771a7b4bb33/LiteLoader/src/llapi/mc/LevelAPI.cpp#L302-L307 我猜可能是因为nbt数据里有实体位置数据, 先在目标位置生成了实体,然后因为覆盖了nbt数据,就又来到原先实体的位置

mrmagic2020 commented 2 years ago

嗯;mc.spawnMob()也有一模一样的问题。。

dreamguxiang commented 2 years ago

已修复