プログラム動作の制御
Minecraft 1.18
RootCore
(https://github.com/Kvr0/RootCore)
END
- End of programDC
- StoreValue0
toRegistory[Value1]
LD
- LoadRegistory[Value0]
fromRegistory[Value1]
PUSH
- PushRegistory[Value0]
toStack
POP
- Pop fromStack
toRegistory[Value0]
CLS
- Clear stackGET
- LoadRegistory[Value0]
memory toRegistory
SET
- StoreRegistory[Value0]
memory fromRegistory
CLM
- ClearRegistory[Value0]
memoryWAIT
- WaitRegistory[Value0]
tickMOVE
- MoveRegistory[Value0]
orderPARALLEL
- RunRegistory[Value0]
order in 1 tickNYAN
- Say "NYAN"
ADD
- AddRegistory[Value1]
toRegistory[Value0]
SUB
- SubRegistory[Value1]
toRegistory[Value0]
MUL
- MulRegistory[Value1]
toRegistory[Value0]
DIV
- DivRegistory[Value1]
toRegistory[Value0]
MOD
- ModRegistory[Value1]
toRegistory[Value0]
INC
- IncrementRegistory[Value0]
DEC
- DecrementRegistory[Value0]
RND
- Store Random Number (0-Registory[Value0]
-1) toRegistory[Value1]
CP
- CompareRegistory[Value0]
withRegistory[Value1]
MVP
- MoveRegistory[Value0]
order if flag is plusMVM
- MoveRegistory[Value0]
order if flag is minusMVZ
- MoveRegistory[Value0]
order if flag is zeroMVNZ
- MoveRegistory[Value0]
order if flag is non-zeroNOP
- No operation
ROBOT:MOVE
- Move 1 toRegistory[Value0]
dirROBOT:TURNR
- Turn rightROBOT:TURNL
- Turn leftROBOT:DIG
- Dig 1 block toRegistory[Value0]
dirROBOT:PLACE
- Place Block toRegistory[Value0]
dir
INVENTORY:COLLECT
- Collect nearby itemsINVENTORY:EJECT
- Eject allInventory
itemsINVENTORY:SWAP
- Swap mainHand item WithInventory[0]
INVENTORY:STORE
- Store mainHand item toInventory
INVENTORY:EMPTY
- If Inventory is empty set flag to 1
CONTAINER:SWAP
- Swap item fromRegistory[Value0]
slot with MainHand toRegistory[Value1]
dirCONTAINER:GET
- Get item fromRegistory[Value0]
slot atRegistory[Value1]
dir container toInventory
CONTAINER:GETALL
- Get items fromRegistory[Value0]
dir container toInventory
CONTAINER:INSERT
- Insert MainHand item toRegistory[Value0]
dirCONTAINER:EMPTY
- IfRegistory[Value0]
dir Container is empty set flag to 1CONTAINER:SLOTEMPTY
- IfRegistory[Value0]
dir Container'sRegistory[Value1]
slot is empty set flag to 1
root: Order
├ id: String
├ value0: int
└ value1: int
root: Program
├ Orders: Order[]
└ EOP: bool
root: ProgramCore
├ Program: Program
├ Registory: int[8]
├ Flag: int
├ Memory: Registory[4]
└ Stack: int[]
root: RobotCore
└ Inventory: Item[]