public PresetEditUI() {
    player = Minecraft.getMinecraft().thePlayer;
    data = PresetData.get(player);
    if (!data.isActive()) {
      throw new RuntimeException("Cannot open preset edit gui when data is dirty");
    }

    init();
  }
 private void updateEditor() {
   if (editor != null) editor.save();
   editor = data.createEditor(active);
 }