コード例 #1
0
 private void sendEvent(String name, Object... parms) {
   if (Loader.isModLoaded(ModIds.COMPUTERCRAFT)) {
     for (IComputerAccess computer : attachedComputers) {
       computer.queueEvent(name, parms);
     }
   }
 }
コード例 #2
0
 /**
  * Called on a event sensor
  *
  * @param newRedstoneStrength
  */
 @Optional.Method(modid = ModIds.COMPUTERCRAFT)
 private void notifyComputers(int newRedstoneStrength) {
   for (IComputerAccess computer : attachedComputers) {
     computer.queueEvent(getType(), new Object[] {newRedstoneStrength});
   }
 }