暴风湛娟 发表于 2024-4-14 20:17:46

[LiteloaderBDS插件编写教程] - 01.在开始之前 - 教程中心 - Minecraft(我

<br /><br /><font color="#f4a460"><font size="5">01.准备工作</font></font><br /><br /><font size="5"><font color="#f4a460">&nbsp; &nbsp; </font></font><input type="button" class="yc" value="点击展开折叠内容" onClick="n = this.parentNode.parentNode.lastChild;if(n.style.display == 'none') {n.style.display = 'block';this.value='点击折叠展开内容';} else {n.style.display = 'none';this.value='点击展开折叠内容';} return false;"/> <table style="word-break:break-all;word-wrap:break-all;"><td><br /><br /><br /><font color="#ff8c00"><font size="5">&nbsp; &nbsp; -</font><font size="4">所需设备</font></font><br /><font color="#9acd32"><font size="5">&nbsp; &nbsp; </font></font><font size="3"><font color="#000000">你需要的工具只有</font></font><font color="#000000"><font size="3">一台具有</font></font><font style="background-color:red"><font size="3"><font color="#ffffff">Windows系统</font></font></font><font color="#000000"><font size="3">的设备;</font></font><br />&nbsp; &nbsp;&nbsp; &nbsp; <br /><font size="4"><font color="#f5deb3">&nbsp; &nbsp;&nbsp;&nbsp;</font></font><font size="4"><font color="#ff8c00">-部署BDS原版服务器</font></font><br /><font size="4"><font color="#ff8c00">&nbsp; &nbsp;&nbsp;&nbsp;</font></font><font size="3"><font color="#000000">关于如何下载原版BDS,有两种渠道:</font></font><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;1.官方渠道下载 </font></font><a href="https://www.minecraft.net/zh-hans/download/server/bedrock" rel="external nofollow" onClick="saya_extlink_golink('https://www.minecraft.net/zh-hans/download/server/bedrock');return false;" target="_blank">戳我下载&gt;&gt;&gt;</a><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 优点</font><font color="#000000">:<font style="background-color:red">更新快</font></font></font><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 缺点:<font style="background-color:red">只可下载最新版本</font></font></font><br /><br /><br /><br /><br /><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;2.第三方渠道下载 </font></font><a href="https://meteormc.cn/threads/minecraft-bds-1-18-1-21.49/" rel="external nofollow" onClick="saya_extlink_golink('https://meteormc.cn/threads/minecraft-bds-1-18-1-21.49/');return false;" target="_blank">戳我下载&gt;&gt;&gt;</a><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 优点:<font style="background-color:red">版本全,下载快</font></font></font><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;&nbsp; &nbsp; 缺点:<font style="background-color:red">更新慢 </font></font></font><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;不管你使用哪种办法,下载完成后,将文件解压至一个文件夹中,看起来应该是这样的:</font></font><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;</font></font><img title="image.png" onerror="study_killerrpic(this)" aid="382080" src1="static/image/common/none.gif" zoom="https://ip.klpbbs.com/attach.php?id=/forum/202404/14/190501tp7fh7hbffq7j6ff.png" src="https://ip.klpbbs.com/attach.php?id=/forum/202404/14/190501tp7fh7hbffq7j6ff.png" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" id="aimg_382080" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br />&nbsp; &nbsp;&nbsp; &nbsp; 双击<font color="#ff0000">bedrock_server.exe</font>,就成功启动了原版BDS<br />&nbsp; &nbsp;&nbsp; &nbsp; 至此,BDS原版服务器部署成功<br />&nbsp; &nbsp;&nbsp; &nbsp; <br /><font size="4"><font color="#ff8c00">&nbsp; &nbsp;&nbsp;&nbsp;-安装LiteloaderBDS</font></font><br /><font size="4"><font color="#ff8c00">&nbsp; &nbsp;&nbsp;&nbsp;</font></font><font size="3"><font color="#000000">在这里,我有有一点需要说明</font></font><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;LiteliaderBDS(一下简称ll)分为两种版本:</font></font><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;</font><font color="#000"><font style="background-color:yellow">LiteloaderBDS</font></font><font color="#000000">(ll2,</font><font style="background-color:red"><font color="#ffffff">支持js,lua,py等语言编写插件,支持1.20.30以下MC版本</font></font><font color="#000000">)</font></font><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;<font style="background-color:yellow">L</font></font><font color="#000"><font style="background-color:yellow">evilamina</font></font><font color="#000000">(ll3,</font><font style="background-color:red"><font color="#ffffff">原生仅支持c/c++插件,需安装LLSE来扩展插件编写语言,支持最新MC版本</font></font><font color="#000000">) </font></font><a href="https://www.minebbs.com/resources/levilamina-legacyscriptengine.7230/" rel="external nofollow" onClick="saya_extlink_golink('https://www.minebbs.com/resources/levilamina-legacyscriptengine.7230/');return false;" target="_blank">戳我下载(自带LLSE)&gt;&gt;&gt;</a><br />&nbsp; &nbsp;&nbsp; &nbsp; 下载完之后,将压缩包内所以文件放入原版BDS存放目录内,再启动<u><font color="#000000"><strong>PeEditor.exe</strong></font></u><font color="#000000">,运行完毕后,键入回车</font><br /><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp; </font><font color="#ff0000">恭喜!LiteloaderBDS已安装完成</font><br /><font color="#000">&nbsp; &nbsp;&nbsp; &nbsp; 双击</font><u><strong><font color="#000000">bedrock_server_mod.exe</font></strong></u><font color="#000000">即可启动服务器</font><br /><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;</font><font style="background-color:red"><font color="#ffffff">TIPS:启动LiteloaderBDS前请先启动一遍原版BDS!</font></font><br /><br />&nbsp; &nbsp;&nbsp; &nbsp;<font size="4"><font color="#ff8c00"> -部署vscode</font></font><br /><font size="4"><font color="#ff8c00">&nbsp; &nbsp;&nbsp;&nbsp;</font></font><a href="https://code.visualstudio.com/" rel="external nofollow" onClick="saya_extlink_golink('https://code.visualstudio.com/');return false;" target="_blank">先戳我下载vscode&gt;&gt;&gt;</a><br />&nbsp; &nbsp;&nbsp; &nbsp;打开软件,在左边导航栏点击第四个进入插件市场,搜索<font color="#ff0000">LiteLoaderSE-Aids</font><font color="#000000">,下载</font><br /><font color="#000">&nbsp; &nbsp;&nbsp; &nbsp;在弹出的设置页面中做如下设置:</font><br /><font color="#000">&nbsp; &nbsp;&nbsp; &nbsp;</font><img title="image.png" onerror="study_killerrpic(this)" aid="382090" src1="static/image/common/none.gif" zoom="https://ip.klpbbs.com/attach.php?id=/forum/202404/14/193132zm1o7o1kn1q3book.png" src="https://ip.klpbbs.com/attach.php?id=/forum/202404/14/193132zm1o7o1kn1q3book.png" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" id="aimg_382090" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br />&nbsp; &nbsp;&nbsp; &nbsp;点击<font color="#ff0000">拉取并保存,在上方的选择页面中选择js/ts补全库</font><br /><font color="#ff0000">&nbsp; &nbsp;&nbsp; &nbsp;</font><img title="image.png" onerror="study_killerrpic(this)" aid="382091" src1="static/image/common/none.gif" zoom="https://ip.klpbbs.com/attach.php?id=/forum/202404/14/193309eoc4eln883uy484n.png" src="https://ip.klpbbs.com/attach.php?id=/forum/202404/14/193309eoc4eln883uy484n.png" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="600" id="aimg_382091" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /><br /></td></table><br /><br /><br /><br /><br /><img onerror="study_killerrpic(this)" id="aimg_zi8ti" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://klpbbs.com/static/image/hrline/line7.png" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" /><br /><br /><font color="#f4a460"><font size="5">02.学习简单的语句</font></font><br /><br /><br /><font size="5"><font color="#f4a460">&nbsp; &nbsp; </font></font><input type="button" class="yc" value="点击展开折叠内容" onClick="n = this.parentNode.parentNode.lastChild;if(n.style.display == 'none') {n.style.display = 'block';this.value='点击折叠展开内容';} else {n.style.display = 'none';this.value='点击展开折叠内容';} return false;"/> <table style="word-break:break-all;word-wrap:break-all;"><td><br /><font size="3"><font color="#000000"><font style="background-color:dimgray">&nbsp; &nbsp;&nbsp; &nbsp;毕竟是插件教程,肯定要先学会一点awa</font></font></font><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;在服务器目录的plugins文件夹内,新建一个js文件,在vscode内打开</font></font><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;在文件内输入</font></font><font size="3"><font color="#000000"><strong>lxl</strong></font></font><font size="3"><font color="#000000">并回车,会出现:</font></font><br /><ol><li>// LiteLoader-AIDS automatic generated<br /><li>/// &lt;reference path=&quot;服务器目录/llpackages/dts/helperlib/src/index.d.ts&quot;/&gt; <br /><li><br /><li>ll.registerPlugin(<br /><li>&nbsp; &nbsp; /* name */ &quot;插件名称&quot;,<br /><li>&nbsp; &nbsp; /* introduction */ &quot;插件描述&quot;,<br /><li>&nbsp; &nbsp; /* version版本 */ ,<br /><li>&nbsp; &nbsp; /* otherInformation其他信息 */ null<br /><li>);</ol>&nbsp; &nbsp;&nbsp; &nbsp; <font size="3">接下来就该学习一些简单的语句了<br /></font><br /><font color="#000000"><font size="3">&nbsp; &nbsp;&nbsp; &nbsp;</font><font size="4"> </font></font><font size="4"><font color="#ff8c00">log</font></font><br /><font size="3"><font color="#ff8c00">&nbsp; &nbsp; </font><strong><font color="#ff8c00">&nbsp; &nbsp;</font></strong><strong><font color="#000000">格式:</font></strong></font><br /><ol><li>log('内容')</ol>&nbsp; &nbsp; <strong>&nbsp;&nbsp;<font size="3">描述:</font></strong><font size="3">在插件加载时在控制台提示一条信息</font><br /><font size="3">&nbsp; &nbsp;&nbsp; &nbsp;<strong>效果:</strong></font><br /><ol><li>log('我是信息')</ol><br /><br /><font size="4"><font color="#ff8c00">&nbsp; &nbsp;&nbsp;&nbsp;</font></font><font color="#ff8c00"><font size="2"> </font></font><font size="3"><font color="#000000"><strong>格式:</strong></font></font><br /><ol><li>colorLog('color', '内容')</ol>&nbsp; &nbsp;&nbsp; &nbsp;<font size="3"><strong>描述:</strong>在插件加载时在控制台提示一条可调节颜色的信息</font><br /><font size="3">&nbsp; &nbsp;&nbsp; &nbsp;<strong>效果:</strong></font><br /><ol><li>colorLog('red', '红色')</ol>&nbsp; &nbsp;&nbsp; &nbsp;<img title="image.png" onerror="study_killerrpic(this)" aid="382131" src1="static/image/common/none.gif" zoom="https://ip.klpbbs.com/attach.php?id=/forum/202404/14/195727yysb4dgsc8bv4d3d.png" src="https://ip.klpbbs.com/attach.php?id=/forum/202404/14/195727yysb4dgsc8bv4d3d.png" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="344" id="aimg_382131" inpost="1" onmouseover="showMenu({'ctrlid':this.id,'pos':'12'})" /><br /></td></table><br /><img onerror="study_killerrpic(this)" id="aimg_iolT9" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://klpbbs.com/static/image/hrline/line4.png" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" /><br /><br /><br /><font size="5"><font color="#f4a460">03.插件操作</font></font><br /><font size="5"><font color="#f4a460">&nbsp; &nbsp; </font></font><input type="button" class="yc" value="点击展开折叠内容" onClick="n = this.parentNode.parentNode.lastChild;if(n.style.display == 'none') {n.style.display = 'block';this.value='点击折叠展开内容';} else {n.style.display = 'none';this.value='点击展开折叠内容';} return false;"/> <table style="word-break:break-all;word-wrap:break-all;"><td><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;可以在控制台中使用'll'指令进行插件操作</font></font><br /><table cellspacing="0" class="t_table" style="width:50%"><tr><td> 指令</td><td> 描述</td></tr><tr><td><i> ll load &lt;插件名字&gt;</i></td><td><i> 加载插件</i></td></tr><tr><td><i> ll reload &lt;插件名字&gt;</i></td><td><i> 重新加载插件</i></td></tr><tr><td><i> ll unload &lt;插件名字&gt;</i></td><td><i> 卸载插件</i><table cellspacing="0" class="t_table" style="width:50%"><tr><td><i> ll list</i></td><td><i> 列出插件</i><font style="background-color:yellow"><strong>此处的插件名字为插件文件名(不含后缀)</strong></font><br /></td></table><br /><br /><img onerror="study_killerrpic(this)" id="aimg_xVCsx" onclick="zoom(this, this.src, 0, 0, 0)" class="zoom" src="https://klpbbs.com/static/image/hrline/4.gif" onmouseover="img_onmouseoverfunc(this)" lazyloadthumb="1" border="0" alt="" /><br /><br /><br /><font size="5"><font color="#f4a460">04.练习</font></font><br /><font size="5"><font color="#f4a460">&nbsp; &nbsp; </font></font><input type="button" class="yc" value="点击展开折叠内容" onClick="n = this.parentNode.parentNode.lastChild;if(n.style.display == 'none') {n.style.display = 'block';this.value='点击折叠展开内容';} else {n.style.display = 'none';this.value='点击展开折叠内容';} return false;"/> <table style="word-break:break-all;word-wrap:break-all;"><td><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;1.在控制台内显示信息:Hello, world!</font></font><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;2.</font></font><font color="#000"><font size="3">在控制台内用<strong>红色</strong>文本显示信息:Red text</font></font><br /><font color="#000"><font size="3">&nbsp; &nbsp;&nbsp; &nbsp;答案:</font></font><br /><font color="#000"><font size="3">&nbsp; &nbsp;&nbsp; &nbsp;</font></font><a href="https://klpbbs.com/forum.php?mod=attachment&amp;aid=MzgyMTQyfGZkNWZkNjM1fDE3MTc5MjM5NDF8MHwxMzM3Mjk%3D" target="_blank">aaaaa.js</a><br /></td></table><br /><font color="#000"><font size="3"><br /></font></font><br /><font color="#000"><font size="3">感谢收看</font></font><img onerror="study_killerrpic(this)" src="https://klpbbs.com/static/image/smiley/bilibili/72.png"border="0" alt="" /><br /><font size="3"><font color="#000000">&nbsp; &nbsp;&nbsp; &nbsp;</font></font><br /><img title="image.png" id="aimg_382129" aid="382129" src1="static/image/common/none.gif" zoom="https://ip.klpbbs.com/attach.php?id=/forum/202404/14/195228zbzx8yz7a6x0bvvc.png" src="https://ip.klpbbs.com/attach.php?id=/forum/202404/14/195228zbzx8yz7a6x0bvvc.png" class="zoom" onclick="zoom(this, this.src, 0, 0, 0)" width="407" alt="image.png" title="image.png" w="407" /><br>来源:<a href="https://klpbbs.com/thread-133729-1-4.html" target="_blank">https://klpbbs.com/thread-133729-1-4.html</a><br>免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
页: [1]
查看完整版本: [LiteloaderBDS插件编写教程] - 01.在开始之前 - 教程中心 - Minecraft(我