-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: RvcManager and reference (part 1) #106
Conversation
Signed-off-by: Liyan Zhao <return65535@qq.com>
@lovexyn0827 @wafarm @Cubik65536 有空review一下吗?主要看看设计,命名,以及需求计划等等,这个还在初步阶段还好改,如果有可能的问题尽快处理 |
非常好的想法! 不过,根据实践,还是感觉需求当中有几处是可以补充一下的:
(不知道最近有没有时间来写一些qwq)【手动狗头】 |
// com.github.zly2006.reden.rvc.tracking.reference.StructureReference.SyncMode
// 同步的内容逐渐增多
enum class SyncMode {
ChangedBlocks,
AllBlocks,
ChangedBlockEntities,
AllBlockEntities,
Entities,
}
不会考虑
(类似PR中波纹剪辑啥的?)
有计划做,会使用gui实现。可以说是x/z上赛上两个for循环,TODO |
也是一种办法,不过还是有几个问题,一方面,如果默认设置为同步内容最多的选项的话就有可能会因为误操作而替换掉本不该被替换的部分;再一方面就是,这种方法没有处理到某个方块实体的NBT只有一部分分属每个instance而另一部分可能随reference整体的变更而改变这样的corner case(可以添加MergeChangedBlockEntities这样的选项来解决,但这又涉及一个冲突处理的问题);还有,如果全物品单片中的漏斗改变了位置,直接同步的话原来漏斗当中的内容就会丢失。 现在再看还是倾向于支持在结构中添加类似与方法参数的“待定内容”这种方案(尽管再添加这一的功能能提高设计的自由度,但是这样又会导致工作量&用户学习难度++)。
不处理附带的非reference结构这一特性可以考虑和下面一项合并一下,也就是在批量移动reference位置时支持2x+406(将放置原点的x坐标移动到原x坐标的2倍加上406[整个堆叠的起点坐标])这样的位置选定语法,这样也就实现了在更改了reference的厚度后半自动地相应地移动相关reference的需求。
有相似之处。但有个问题是,增大reference的大小后新同步过来的方块可能会覆盖掉reference以外的一些结构,需要让用户先行预览确认一下。 还有一条刚想起来可以补充一下,有时候同一个reference可能会被用在多个机器当中,可能有必要对reference进行分组。(可以考虑借助既有的机器范围自动完成) |
Signed-off-by: Liyan Zhao <return65535@qq.com>
使用结构空位那个方块?可以用来替换方块或者物品
of course
可以,但是比较麻烦,我没空弄所以欢迎contribute |
我在考虑reference是不是应该算作一种tracker? /**
* track a structure's part, listen to block changes and update the positions of the tracked blocks.
* provide a way to iterate through the tracked blocks.
*/
@Serializable
sealed class StructureTracker 但是reference看起来不像是可以Serializable的样子,给加载保存部分开个洞还是单独保存? |
考虑先merge此PR以引入RvcManager。 |
Description/描述
RVC: Reference
For many fields such as storage tech, people will make some slices that,
for example, each slice can filter a single type of item.
However, when you want to test them, you have to stack them together, which is very inconvenient.
RVC Reference can help you to place a "reference" of a slice, once you finished your slice,
you can press a hotkey, and the reference will be updated to the latest version of the slice.
Happy debugging!
Related Issues/相关的 issue
#83
Checklist/清单
Screenshots