Ejemplo n.º 1
0
  void changeFocus(ISceptreFocus focus, ItemStack stack) {
    ISceptreFocus oldFocus = getFocus(stack);
    if (oldFocus != null) oldFocus.onDeactivated(stack);

    if (focus != null) {
      stack.stackTagCompound.setString("focus", focus.getFocusIdentifier());
      focus.onActivated(stack);
    } else stack.stackTagCompound.removeTag("focus");
  }