Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions src/content/docs/java/advance/optimize/go.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1026,15 +1026,21 @@ exp: 4.0

:::

将红石系统替换为优化版本,减少冗余更新,降低服务器必须计算的逻辑量。可能会对~~个别~~的红石机器产生影响,
将红石系统替换为优化版本,减少冗余更新,降低服务器必须计算的逻辑量。可能会对 ~~个别~~ 的红石机器产生影响,

但其提升非常大,性能提升可能有 70%,利大于弊。甚至还可以修复 Bukkit 造成的红石同步问题。

`ALTERNATE_CURRENT`是基于 [Alternate Current](https://modrinth.com/mod/alternate-current)。更多信息请阅读该页面。
`ALTERNATE_CURRENT` 是基于 [Alternate Current](https://modrinth.com/mod/alternate-current)。更多信息请阅读该页面。

:::caution

此选项会使 TNT 复制失效,生电服请不要考虑此选项。
Paper 提供的两种红石优化算法都会对红石机器有不同程度的轻微影响。

`ALTERNATE_CURRENT` 算法会使某一 TNT 复制机的设计失效,需要对设计进行更改,可以查看 SpaceWalkerRS 在 [alternate-current#23](https://github.com/SpaceWalkerRS/alternate-current/issues/23#issuecomment-1475507971) 中对这个问题的详细解释,同时在 Issue 底部可以找到有人附上的机器改造教程。

`EIGENCRAFT` 算法可以兼容目前几乎所有的红石机器,但是也有罕见的边缘例子,比如 theosib 在 [MC-81098 评论](https://mojira.dev/MC-81098#comment-420777) 中提及的红石设计。

如你服是生电服并且玩家不想改造机器,可以使用 `EIGENCRAFT`。或者保留此项为 `VANILLA` 不使用红石优化。

:::

Expand Down
4 changes: 2 additions & 2 deletions src/content/docs/java/process/redstone/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ title: 概述

生电是 Minecraft 服务器中重要的一环,同时也是吸引玩家的一个重要手段

这篇文档不是教你如何制作红石机器,而是教你如何在服务端中 **还原原版特性**,以及一些专门用于红石的服务端
这篇文档不是教你如何制作红石机器,而是教你如何调整服务端配置以 **还原原版特性**,以及介绍一些专门用于红石的服务端核心

## 「生电」的概念

在游戏中,「生电」,顾名思义,「生」指的是「生存」,「电」指的是「电路」。

更详细的定义请参考 https://www.bilibili.com/opus/689475167383978005
更详细的定义可参考 [《生电究竟是个什么东西?》第 1 期:什么是生电?](https://www.bilibili.com/opus/689475167383978005)
59 changes: 31 additions & 28 deletions src/content/docs/java/process/redstone/mchprs.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: MCHPRS
---

一个为红石而构建的 Minecraft 服务器。每个 512x512 的区域运行在单独的线程上,基于 Rust ,拥有非常高的性能
一个为红石而构建的 1.20.4 Minecraft 服务器。基于 Rust,每个 512x512 的区域运行在单独的线程上,拥有非常高的性能

MCHPRS 与传统服务器非常不同。因为这个服务器是为计算红石的使用而量身定制的,所以许多原版的东西在这里不存在

Expand All @@ -24,7 +24,7 @@ cargo build --release

完成后,编译的可执行文件为 `./target/release/mchprs` 或 `./target/release/mchprs.exe` ,具体取决于操作系统。

如果你希望基于你的 CPU 进一步优化 (但兼容性会下降),你可以使用这个指令构建:
如果你希望基于你的 CPU 进一步优化但兼容性会下降),你可以使用这个指令构建:

```bash
RUSTFLAGS="-C target-cpu=native" cargo build --release
Expand All @@ -50,51 +50,54 @@ RUSTFLAGS="-C target-cpu=native" cargo build --release

## Velocity

MCHPRS 本身不支持玩家身份验证,但支持 Velocity 转发
MCHPRS 本身不支持玩家身份验证,但支持 Velocity 的现代转发

要使用 Velocity IP 转发,您必须设置并配置 Velocity 代理。确保您的 Velocity 配置中 `player-info-forwarding-mode` 设置为
`modern`.然后,将其追加到 `Config.toml`:
要使用 Velocity IP 转发,您必须设置并配置 Velocity 代理。确保您 Velocity 配置中的 `player-info-forwarding-mode`
`modern`然后,将以下配置追加到 `Config.toml`:

```toml
[velocity]
enabled = true
# 这是来自你 velocity 配置中 `forwarding-secret-file` 文件里的密钥内容,
# 这是来自你 Velocity 配置中 `forwarding-secret-file` 文件里的密钥内容,
# 而不是该文件的路径。
secret = "<密钥>"
```

## 普通命令

| 命令 | 缩写 | 说明 |
| ------------------------------ | --------------- | ---------------------------------------------------------------------------------------------------------------- |
| `/rtps [rtps\|无限]` | 无 | 将区域的红石刻每秒设置为`[rtps]`(1 个红石刻=2 个游戏刻) |
| `/radvance [刻数]` | `/radv` | 使区域推进`[刻数]`个红石刻 |
| `/teleport [玩家名]` | `/tp` | 传送至目标玩家所在位置 |
| `/teleport [x] [y] [z]` | `/tp` | 传送至指定坐标(支持相对坐标,浮点数格式参见[此文档](https://doc.rust-lang.org/std/primitive.f64.html#grammar)) |
| `/speed [速度值]` | 无 | 设置飞行速度 |
| `/gamemode [模式]` | `/gmc`, `/gmsp` | 切换游戏模式 |
| `/container [类型] [信号强度]` | 无 | 获取特定容器(如木桶),该容器被比较器检测时会输出指定信号强度 |
| `/toggleautorp` | 无 | 切换红石编译器的自动编译功能 |
| `/stop` | 无 | 关闭服务器 |
| 命令 | 缩写 | 说明 |
| ------------------------------ | --------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `/rtps [rtps\|无限]` | 无 | 将区域的红石刻每秒设置为 `[rtps]`。默认值:`10`。(1 个红石刻 = 2 个游戏刻) |
| `/radvance [刻数]` | `/radv` | 使区域推进 `[刻数]` 个红石刻 |
| `/teleport [玩家名]` | `/tp` | 传送至目标玩家所在位置 |
| `/teleport [x] [y] [z]` | `/tp` | 传送至指定坐标(支持相对坐标,浮点数格式参见 [Rust 官方文档](https://doc.rust-lang.org/std/primitive.f64.html#grammar)) |
| `/speed [速度值]` | 无 | 设置飞行速度 |
| `/gamemode [模式]` | `/gmc`,`/gmsp` | 切换游戏模式 |
| `/container [类型] [信号强度]` | 无 | 获取特定容器(如木桶),该容器被比较器检测时会输出指定信号强度 |
| `/worldsendrate [频率]` | `/wsr` | 将世界发送速率设置为 `[频率]`(向客户端发送世界更新的频率)。范围:`1` ~ `1000`。默认值:`60`。 |
| `/toggleautorp` | 无 | 切换红石编译器的自动编译功能 |
| `/stop` | 无 | 关闭服务器 |

## Redpiler

Redpiler 是 MCHPRS 的核心,这允许红石模拟比其他方式快得多。当 redpiler 运行时,所有红石连接都会预先计算,因此在此状态下与世界的交互受到限制。当
redpiler 运行时放置或破坏方块将导致重置并禁用 redpiler.
Redpiler 是 MCHPRS 的核心,这允许红石模拟比其他方式快得多。当 Redpiler 运行时,所有红石连接都会预先计算,因此在此状态下与世界的交互受到限制。当
Redpiler 运行时放置或破坏方块将导致重置并禁用 Redpiler。

| 命令 | 别名 | 说明 |
| ------------------- | ------- | ---------------------------------------------------- |
| `/redpiler compile` | `/rp c` | 手动启动红石编译器。可使用下列多个参数(详见下文)。 |
| `/redpiler reset` | `/rp r` | 停止红石编译器。 |

| 参数 | 简写 | 说明 |
| ---------------- | ---- | ------------------------------------------------------------------------------------------------------------------- |
| `--optimize` | `-o` | 启用红石编译优化。警告:此操作可能导致当前建造状态损坏。使用时请备份存档。 |
| `--io-only` | `-i` | 仅更新输入/输出相关方块状态(包括活板门、红石灯、音符盒、按钮、拉杆和压力板)。此参数可显著降低延迟并提升模拟速度。 |
| `--wire-dot-out` | `-d` | 将点状红石线视为`-i`参数中的输出方块(适用于彩色显示器等场景)。 |
| `--update` | `-u` | 红石编译器重置后更新全部方块状态。 |
| `--export` | `-e` | 以二进制格式导出编译图谱。适用于红石编译图谱的第三方开发场景。 |
| `--export-dot` | 无 | 生成后端图谱的 graphviz 点文件。用于调试/开发用途。 |
| 参数 | 简写 | 说明 |
| ------------------------ | ---- | ------------------------------------------------------------------------------------------------------------------- |
| `--optimize` | `-o` | 启用红石编译优化。警告:此操作可能导致当前建造状态损坏。使用时请备份存档。 |
| `--io-only` | `-i` | 仅更新输入/输出相关方块状态(包括活板门、红石灯、音符盒、按钮、拉杆和压力板)。此参数可显著降低延迟并提升模拟速度。 |
| `--wire-dot-out` | `-d` | 将点状红石线视为`-i`参数中的输出方块(适用于彩色显示器等场景)。 |
| `--update` | `-u` | 红石编译器重置后更新全部方块状态。 |
| `--export` | `-e` | 以二进制格式导出编译图谱。适用于红石编译图谱的第三方开发场景。 |
| `--export-dot` | 无 | 生成后端图谱的 graphviz 点文件。用于调试/开发用途。 |
| `--print-after-all` | 无 | 每次红石编译器构建后输出 RIL 电路调试信息。用于调试/开发用途。 |
| `--print-before-backend` | 无 | 每次后端编译之前输出 RIL 电路调试信息。用于调试/开发用途。 |

## 优点

Expand All @@ -104,4 +107,4 @@ redpiler 运行时放置或破坏方块将导致重置并禁用 redpiler.

## 其他

自行查看 [README](https://github.com/MCHPR/MCHPRS/)
更多有关 MCHPR 的介绍请查看 [README](https://github.com/MCHPR/MCHPRS/)
42 changes: 17 additions & 25 deletions src/content/docs/java/process/redstone/mod.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,25 @@ Carpet 是一个适用于原版 Minecraft 的 Mod,它可以开关一些特性

Carpet 还有许多扩展,你可以在下表里下载它们

| 名字 | 下载链接 |
| ------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Carpet Extra | [Modrinth](https://modrinth.com/mod/carpet-extra) [CurseForge](https://www.curseforge.com/minecraft/mc-mods/carpet-extra) [GitHub](https://github.com/gnembon/carpet-extra/releases) |
| Carpet TIS Addition | [Modrinth](https://modrinth.com/mod/carpet-tis-addition) [CurseForge](http://curseforge.com/minecraft/mc-mods/carpet-tis-addition) [GitHub](https://github.com/TISUnion/Carpet-TIS-Addition/releases) |
| Carpet Org Addition | [Modrinth](https://modrinth.com/mod/carpet-org-addition) [GitHub](https://github.com/fcsailboat/Carpet-Org-Addition/releases) |
| GugleCarpetAddition | [Modrinth](https://modrinth.com/mod/gca) [CurseForge](https://www.curseforge.com/minecraft/mc-mods/guglecarpetaddition) [GitHub](https://github.com/Gu-ZT/gugle-carpet-addition) |
| 名字 | 下载链接 |
| ----------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Carpet Extra | [Modrinth](https://modrinth.com/mod/carpet-extra) [CurseForge](https://www.curseforge.com/minecraft/mc-mods/carpet-extra) [GitHub](https://github.com/gnembon/carpet-extra/releases) |
| Carpet TIS Addition | [Modrinth](https://modrinth.com/mod/carpet-tis-addition) [CurseForge](http://curseforge.com/minecraft/mc-mods/carpet-tis-addition) [GitHub](https://github.com/TISUnion/Carpet-TIS-Addition/releases) |
| Carpet Org Addition | [Modrinth](https://modrinth.com/mod/carpet-org-addition) [GitHub](https://github.com/fcsailboat/Carpet-Org-Addition/releases) |
| Gugle's Carpet Addition | [Modrinth](https://modrinth.com/mod/gca) [CurseForge](https://www.curseforge.com/minecraft/mc-mods/guglecarpetaddition) [GitHub](https://github.com/Gu-ZT/gugle-carpet-addition) |

这些拓展的规则和命令基本上都在 GitHub 里(都有中文)

## 其他 Mod

其他 mod 基本上都是对生电作用没那么大,所以在下面简单介绍一下

AppleSkin(正常在客户端显示饱和度和消耗度)

Xaero's Minimap 和 Xaero's World Map(在客户端获取其他功能)

Jade(许多功能需要服务器端安装才能使用)

JEI/REI(一些功能需要服务器端安装才能使用)

Servux(让玩家在服务器可以正常使用使用 MiniHUD 中的显示结构功能和更好的原理图粘贴)

Easy Auth(登录)

BBOR(服务器支持才能正常显示结构信息,要不然就只能客户端手动输入种子)

Syncmatica(服务器安装客户端才能正常使用)

Fuji(像 CMI 一样的多功能 mod)
以下的 mod 对生电帮助可能没那么大,但是可以提高游玩和生存的体验,所以简单介绍一下

- [AppleSkin](https://www.mcmod.cn/class/744.html) - 饥饿值,食物的饱食度恢复的扩展显示(需要服务器端安装才能显示准确的值)
- [Xaero's Minimap](https://www.mcmod.cn/class/1701.html) 和 [Xaero's World Map](https://www.mcmod.cn/class/1483.html) - 地图显示模组
- [Jade](https://www.mcmod.cn/class/3482.html) - 支持显示多种有用信息的 HUD 模组,用于提高生存体验(许多功能需要服务器端安装才能使用)
- [JEI](https://www.mcmod.cn/class/459.html) 或 [REI](https://www.mcmod.cn/class/1674.html) - 用于查看物品和合成配方。(一些功能需要服务器端安装才能使用)
- [Servux](https://www.mcmod.cn/class/5219.html) - 让玩家在服务器可以正常使用 MiniHUD 中的显示结构功能和更好的原理图粘贴。
- [EasyAuth](https://www.mcmod.cn/class/6241.html) - 一个用于服务端的登录模组。
- [BBOR](https://www.mcmod.cn/class/1869.html) - 支持显示自然生成的结构,3D 群系边界,和史莱姆区块。
- [Syncmatica](https://www.mcmod.cn/class/6842.html) - 允许上传投影原理图到服务器,并与其他玩家共享。
- [Fuji](https://www.mcmod.cn/class/12645.html) - 像 CMI 一样的多功能模组。
Loading