我的世界:如何获取选择内的块的坐标 [英] minecraft: How to get coordinates of blocks inside selection

查看:224
本文介绍了我的世界:如何获取选择内的块的坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于战利品插件,我需要我的预制世界中所有箱子的坐标. 要将它们添加到插件配置中.我不是在编写插件,而是在使用它,我只需要一种获取世界中特定块的多个坐标的方法.

For a Loot Plugin i need all the coordinates of chests in my prebuilt world. To add them to the plugins config. I am not programming the plugin, i am just using it, i just need a way to get multiple coordinates for specific blocks in a world.

如果可以使用worldedit并将箱子替换为带有nbt标签的箱子,我可以完全跳过插件部分并使用香草战利品表.但是我还没有找到使用worldedit设置nbt数据的方法.

If it is possible to use worldedit and replace chests with chests that have nbt tags i can completely skip the plugin part and use the vanilla loot tables. But i haven't yet found a way to setblocks with nbt data using worldedit.

我当时正在考虑下载将地图移动到mcedit或worldpainter中的地图,希望在那里找到一种导出每个胸部坐标的方法.

I was thinking about downloading the map moving it into mcedit or worldpainter and hopefully find a way there to export the coordinates of each chest.

我期待一些解决方案,在此先感谢您!

I'm looking forward for some solutions, and i'm thanking you in advance!

推荐答案

如果您最初只需要准备一次这个世界,我建议您使用一个插件来识别世界上所有的箱子(例如,通过遍历所有箱子已经生成的块以及所有包含块的块),然后按照您需要的方式进行修改或保存.在生产服务器上执行此操作可能会导致延迟,导致迭代/搜索非常耗时.

If you have to prepare this world initially and only once, I would recomment to use a plugin to identify all the chests in the world (e.g. by iterating through all already generated chunks and all containing blocks), and modifing or saving them, the way you need to. Doing this on a productive server will probably cause lags, cause the iterating/searching will be very intensive.

您还可以考虑采用某种黑客手段,以识别这些块是由世界生成器/插件还是播放器放置的.当您使用插件LogBlock时,您可以检查被点击的箱子是否被玩家放置.如果是这样,请将此箱子视为普通箱子,否则,如果没有玩家在此位置放置障碍物,则将其视为抢劫插件"中的箱子.

You could also think about some kind of hacky way, to identify if the blocks are placed by the world generator/a plugin or a player. When u use the plugin LogBlock, you can check, if the clicked chest was placed by a player. If so, treat this chest as a normal chest, otherwise, if no player has ever placed a block at this location, treat the chest as a chest from the "loot plugin".

任何一种方法都行得通,但是第一种方法可能会有些困难,因为您必须手动加载所有块.第二个有点hacky,但是会更容易,但可能与您的设置不兼容.

Any of the ways will work, but the first one will probably be a little harder, since you have to manually load all the chunks. The second is a little bit hacky, but will be more easy, but maybe not compatible to your setup.

这篇关于我的世界:如何获取选择内的块的坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆