Posted 25 May 2015 - 03:40 PM
Downloads
——————
Download it from here.
API is here.
——————
Requirements: Minecraft Forge, ComputerCraft
——————
What this mod is about:
If you make CC peripherals, you need plenty of code for each peripheral. This mod aims to simplify that by making it only needing a few lines of code. An example will be:
Now you need to send
Now in ComputerCraft, the Chest block will be a peripheral! It is that easy to add more peripherals, this took just 8 lines of code!
In your computer, enter
Here are some things I want to add in the future:
-IMount
-Turtle Upgrade
-Media Providers
-Maybe this (Meaning @LuaMethod could have a field declared as: type = { PeripheralType.Computer, PeripheralType.Turtle })
Warning: If your computer is slow, this may impact the calling speed of functions as it has heavy use of reflection.
NOTE: This idea came from OpenPeripheral.
——————
Download it from here.
API is here.
——————
Requirements: Minecraft Forge, ComputerCraft
——————
What this mod is about:
If you make CC peripherals, you need plenty of code for each peripheral. This mod aims to simplify that by making it only needing a few lines of code. An example will be:
@PeripheralTarget(name = "chest", targetClass = TileEntityChest.class)
public class ChestPeripheral {
@LuaMethod(luaName = "runSomething")
public double something(boolean someBool, String someString, double someDouble) {
return someDouble;
}
}
Now you need to send
FMLInterModComms.sendMessage("ComputerCraftFramework", "register", ChestPeripheral.class.getName())
.Now in ComputerCraft, the Chest block will be a peripheral! It is that easy to add more peripherals, this took just 8 lines of code!
In your computer, enter
chest = peripheral.find("chest")
sucess, something = chest.runSomething(true, "Hello World!", 100)
print(something)
and your output will be 100.Here are some things I want to add in the future:
-IMount
-Turtle Upgrade
-Media Providers
-Maybe this (Meaning @LuaMethod could have a field declared as: type = { PeripheralType.Computer, PeripheralType.Turtle })
Warning: If your computer is slow, this may impact the calling speed of functions as it has heavy use of reflection.
NOTE: This idea came from OpenPeripheral.
Edited on 27 May 2015 - 05:06 PM