Interface AdvancementBuilder


@NullMarked @NonExtendable public interface AdvancementBuilder
발전 과제 빌더
  • Field Details

    • MAIN_SAVE_SECTION

      static final NamespacedKey MAIN_SAVE_SECTION
      기본 발전 과제 저장 구역
    • COUNT_CRITERION

      static final String COUNT_CRITERION
      카운트 타입 발전과제의 조건 (Magic value)
      See Also:
  • Method Details

    • getProvider

      AdvancementProvider getProvider()
      발전 과제 프로바이더를 가져옵니다.
      Returns:
      발전 과제 프로바이더
    • saveSection

      AdvancementBuilder saveSection(NamespacedKey section)
      발전 과제 저장 구역을 설정합니다.

      기본 저장 구역인 MAIN_SAVE_SECTION이 아닌 경우, 개발자가 진행도 저장을 직접 구현해야합니다.

      Parameters:
      section - 저장 구역
      Returns:
      this
    • parent

      부모 발전 과제를 설정합니다.
      Parameters:
      parent - 부모 발전 과제
      Returns:
      this
    • alwaysVisible

      AdvancementBuilder alwaysVisible()
      이 발전 과제가 항상 보여야 되는 경우에 사용합니다.
      Returns:
      this
    • display

      default AdvancementBuilder display(Material icon, Component title, Component description, @Nullable NamespacedKey background, AdvancementDisplay.Frame frame, boolean showToast, boolean announceChat, boolean hidden)
      이 발전 과제의 디스플레이를 설정합니다.
      Parameters:
      icon - 프레임에 표시되는 아이콘
      title - 제목
      description - 설명
      background - 배경 텍스처 위치 (루트 발전 과제 전용)
      frame - 프레임
      showToast - 완료 시에 토스트를 출력해야 하는 경우 true
      announceChat - 완료 시에 메시지를 보내야 하는 경우 true
      hidden - 발전 과제가 숨겨진 경우 true
      Returns:
      this
    • display

      default AdvancementBuilder display(ItemStack icon, Component title, Component description, @Nullable NamespacedKey background, AdvancementDisplay.Frame frame, boolean showToast, boolean announceChat, boolean hidden)
      이 발전 과제의 디스플레이를 설정합니다.
      Parameters:
      icon - 프레임에 표시되는 아이콘
      title - 제목
      description - 설명
      background - 배경 텍스처 위치 (루트 발전 과제 전용)
      frame - 프레임
      showToast - 완료 시에 토스트를 출력해야 하는 경우 true
      announceChat - 완료 시에 메시지를 보내야 하는 경우 true
      hidden - 발전 과제가 숨겨진 경우 true
      Returns:
      this
    • display

      default AdvancementBuilder display(Material icon, Component title, Component description, @Nullable NamespacedKey background, AdvancementDisplay.Frame frame, float x, float y, boolean showToast, boolean announceChat, boolean hidden)
      이 발전 과제의 디스플레이를 고정된 위치로 설정합니다.
      Parameters:
      icon - 프레임에 표시되는 아이콘
      title - 제목
      description - 설명
      background - 배경 텍스처 위치 (루트 발전 과제 전용)
      frame - 프레임
      x - 고정할 X 위치
      y - 고정할 Y 위치
      showToast - 완료 시에 토스트를 출력해야 하는 경우 true
      announceChat - 완료 시에 메시지를 보내야 하는 경우 true
      hidden - 발전 과제가 숨겨진 경우 true
      Returns:
      this
    • display

      default AdvancementBuilder display(ItemStack icon, Component title, Component description, @Nullable NamespacedKey background, AdvancementDisplay.Frame frame, float x, float y, boolean showToast, boolean announceChat, boolean hidden)
      이 발전 과제의 디스플레이를 고정된 위치로 설정합니다.
      Parameters:
      icon - 프레임에 표시되는 아이콘
      title - 제목
      description - 설명
      background - 배경 텍스처 위치 (루트 발전 과제 전용)
      frame - 프레임
      x - 고정할 X 위치
      y - 고정할 Y 위치
      showToast - 완료 시에 토스트를 출력해야 하는 경우 true
      announceChat - 완료 시에 메시지를 보내야 하는 경우 true
      hidden - 발전 과제가 숨겨진 경우 true
      Returns:
      this
    • display

      이 발전 과제의 디스플레이를 설정합니다.
      Parameters:
      display - 디스플레이
      Returns:
      this
    • reward

      default AdvancementBuilder reward(int experience, List<NamespacedKey> loot, List<NamespacedKey> recipes, @Nullable NamespacedKey function)
      이 발전 과제의 보상을 설정합니다.
      Parameters:
      experience - 제공할 경험치
      loot - 전리품 테이블 키
      recipes - 레시피 키
      function - 실행할 함수
      Returns:
      발전 과제 보상
    • reward

      이 발전 과제의 보상을 설정합니다.
      Parameters:
      reward - 보상
      Returns:
      this
    • addCriterion

      AdvancementBuilder addCriterion(String name, JsonElement criterion)
      달성 기준을 추가합니다. 트리거는 JSON 형식입니다.
      Parameters:
      name - 달성 기준의 이름
      criterion - JSON 예시
      {
         "conditions": {
           "player": [
             {
               "condition": "minecraft:entity_properties",
               "entity": "this",
               "predicate": {
                 "location": {
                   "biome": "minecraft:badlands"
                 }
               }
             }
           ]
         },
         "trigger": "minecraft:location"
       }
      Returns:
      this
    • addImpossibleCriterion

      AdvancementBuilder addImpossibleCriterion(String name)
      달성 기준을 추가합니다. 트리거는 Impossible 트리거로 고정됩니다.
      Parameters:
      name - 달성 기준의 이름
      Returns:
      this
    • addCustomTriggerCriterion

      default AdvancementBuilder addCustomTriggerCriterion(String name, NamespacedKey key)
      사용자 지정 트리거를 사용한 달성 기준을 추가합니다.
      Parameters:
      name - 달성 기준의 이름
      key - 사용자 지정 트리거 ID
      Returns:
      this
    • addCustomTriggerCriterion

      AdvancementBuilder addCustomTriggerCriterion(String name, NamespacedKey key, @Nullable JsonElement dataPredicate)
      사용자 지정 트리거를 사용한 달성 기준을 추가합니다.
      Parameters:
      name - 달성 기준의 이름
      key - 사용자 지정 트리거 ID
      dataPredicate - 데이터 매치 조건
      [
         {
             "name": "player_name",
             "type": "STRING_EQUAL",
             "value": "Notch"
         },
         {
             "name": "player_age",
             "type": "INT_RANGE",
             "value": {
                 "min": 10,
                 "max": 40
             }
         }
       ]
      Returns:
      this
    • requirements

      AdvancementBuilder requirements(boolean and)
      플레이어가 발전 과제를 완료하는 데 필요한 조건을 설정합니다.
      Parameters:
      and - true인 경우, 플레이어가 모든 기준을 완료해야합니다. (false인 경우, OR)
      Returns:
      this
    • requirements

      AdvancementBuilder requirements(List<List<String>> requirements)
      플레이어가 발전 과제를 완료하는 데 필요한 조건을 설정합니다.
      Parameters:
      requirements - 필요한 조건
      Returns:
      this
    • enableCount

      AdvancementBuilder enableCount(int count)
      이 발전 과제에 카운트를 사용합니다. 기준 설정이 필요하지 않습니다.
      Parameters:
      count - 최대 카운트
      Returns:
      this
    • enableCount

      AdvancementBuilder enableCount(int count, NamespacedKey triggerId)
      이 발전 과제에 카운트를 사용합니다.
      Parameters:
      count - 최대 카운트
      triggerId - 사용자 지정 트리거 ID
      Returns:
      this
    • enableCount

      AdvancementBuilder enableCount(int count, JsonElement criterion)
      이 발전 과제에 카운트를 사용합니다.
      Parameters:
      count - 최대 카운트
      criterion - JSON 예시
      {
         "conditions": {
           "player": [
             {
               "condition": "minecraft:entity_properties",
               "entity": "this",
               "predicate": {
                 "location": {
                   "biome": "minecraft:badlands"
                 }
               }
             }
           ]
         },
         "trigger": "minecraft:location"
       }
      Returns:
      this
    • extra

      발전 과제에 추가 JSON 데이터를 저장합니다.
      Parameters:
      json - JSON 데이터
      Returns:
      this