IntTurtle
添加了可以使用 Intcode 进行编程的海龟。为了与 Minecraft 世界交互,新增了一个操作码:系统调用操作码。有关可用系统调用的列表,请参阅 此处。
海龟分为两个等级。基础海龟每刻执行 4 条 Intcode 指令。高级海龟每刻执行 64 条 Intcode 指令。然而,某些操作码只能在特定的时间间隔内调用一次。在执行此类操作码后,海龟将继续执行。但如果在同一刻再次遇到该操作码,海龟将阻塞直到下一刻。
IntCode IO 操作码均可使用。输入操作码始终读取一个换行符(ASCII 10)。输出操作码会将输出解析为 Unicode 码点,并在打印换行符时将其写入聊天栏。
此模组是为 WinterJam 2021 制作的。它采用冬季主题,是因为海龟使用 Intcode 进行编程,而 Intcode 是为了 AdventOfCode 的倒数日历 AdventOfCode 而发明的。
IntTurtle
Adds Turtles that can be programmed in Intcode. To interface with the minecraft world, there is a new opcode: The system call opcode. For a list of available system calls, see here.
There are two tiers of turtles. The basic turtle executes 4 intcode instructions per tick. The advanced turtle executes 64 intcode instructions per tick. However some opcodes can only be invoked once per certain amount of ticks. After such an opcode, the turtle will continue execution. But if the opcode is approached again in the same tick, the turtle will block until the next tick.
The IntCode IO opcodes can both be used. The input opcode will always read a 10 (newline character). The output opcode will parse the ouput as unicode code points and write it to the chat whenever a newline character is printed.
This was made for WinterJam 2021. It is winter themed because the turtles are programmed in IntCode which was invented for the advent calendar AdventOfCode.
评论 0
登录后参与评分
还没有评论,来抢沙发吧