mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-11-07 17:36:07 +00:00
Various C# Script improvements
Move handling code in a separate file Add caching ability for low-power devices (rpi..) Use a distinct API with MCC.MethodName() Stop script execution only on specific API calls
This commit is contained in:
parent
ca02c7f2e6
commit
3e2622fbb7
8 changed files with 407 additions and 159 deletions
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
/* This is a sample script for Minecraft Console Client
|
||||
* The code provided in this file will be compiled at runtime and executed
|
||||
* Allowed instructions: Any C# code AND all methods provided by the bot API */
|
||||
* Allowed instructions: Any C# code AND methods provided by the MCC API */
|
||||
|
||||
for (int i = 0; i < 5; i++)
|
||||
{
|
||||
int count = GetVarAsInt("test") + 1;
|
||||
SetVar("test", count);
|
||||
SendText("Hello World no. " + count);
|
||||
LogToConsole("Sleeping for 5 seconds...");
|
||||
int count = MCC.GetVarAsInt("test") + 1;
|
||||
MCC.SetVar("test", count);
|
||||
MCC.SendText("Hello World no. " + count);
|
||||
MCC.LogToConsole("Sleeping for 5 seconds...");
|
||||
Thread.Sleep(5000);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue