CCUtils
作者:rebot | 分类:模组
Minecraft 版本: 1.12 1.12.1 1.12.2 1.13 1.13.1 1.13.2 1.14 1.14.1 1.14.2 1.14.3 1.14.4 1.15 1.15.1 1.15.2 1.16 1.16.1 1.16.2 1.16.3 1.16.4 1.16.5 1.17 1.17.1 1.18 1.18.1 1.18.2 1.19 1.19.1 1.19.2 1.19.3 1.19.4 1.20 1.20.1 1.20.2 1.20.3 1.20.4 1.20.5 1.20.6 1.21 1.21.1 1.21.2 1.21.3 1.21.4 1.21.5 1.21.6 1.21.7 1.21.8 1.21.9 1.21.10 1.21.11 26.1 26.1.1 26.1.2 26.2
平台: datapack
标签: management technology
This datapack adds usefull features to the CC: Tweaked mod.
It contains:
modemutils:
Modemutils is a programm designed to extend the functionality of the already existing modem.
It can be used in lua.
It has several functions:
modemutils.sendTable(modem, data, channel, replyChannel):
"data" has to be a table here.
as a modem, you can provide anything with a "transmit" function, so this is also compatible with other modifications that add more modems.
This function will turn your table into a string using textutils.serialize and send it via your modem.
modemutils.receiveTable(modem, channel):
This function will receive a string generated by modemutils.sendTable and will return event, side, channel, replyChannel, data, distance back to you. The returned "data" value is a table.
modemutils.sendAndReceiveTable(modem, data, channel, replyChannel):
This function will send your table as a string and then wait for data to arrive on the specified reply channel. It will return event, side, channel, replyChannel, data, distance back to you, received from your specified return channel.
sendTableJSON
receiveTableJSON
sendAndReceiveTableJSON
will do the exact same thing exept it will use textutils.serializeJSON to send the data in a json formated string. the normal and JSON methods are NOT compatible with each others.
请登录后举报
请 登录 后赞助作者。
暂无评论,抢个沙发吧~