From 2be133ec4bbf1131466225d4d4c88e3be97f2124 Mon Sep 17 00:00:00 2001 From: IsuCake <61488220+IsuCake@users.noreply.github.com> Date: Tue, 20 Jan 2026 14:52:31 +1100 Subject: [PATCH 1/2] Fix incorrect method template being used --- dfpyre/export/action_classes.py | 97 ++++++++++++++------------------- dfpyre/scripts/action_gen.py | 7 ++- 2 files changed, 45 insertions(+), 59 deletions(-) diff --git a/dfpyre/export/action_classes.py b/dfpyre/export/action_classes.py index 331cc16..1ee2b7a 100644 --- a/dfpyre/export/action_classes.py +++ b/dfpyre/export/action_classes.py @@ -1,4 +1,4 @@ -# Auto generated by pyre 2026-01-03T02:43:22.013221+00:00 +# Auto generated by pyre 2026-01-20T03:25:03.185807+00:00 from typing import Literal from dfpyre.core.codeblock import CodeBlock, Target, DEFAULT_TARGET from dfpyre.core.items import ArgValue, Item, String as DFString, Text as DFText, Number, Variable, Location, Sound, Particle, Potion, Vector as DFVector @@ -9653,80 +9653,71 @@ def While(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=N return add_brackets(CodeBlock.new_subaction_block('repeat', 'While', args, tags, sub_action, inverted), codeblocks, 'repeat') @staticmethod - def Range(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=None, inverted: bool=False, codeblocks: list[CodeBlock]=[]): + def Range(codeblocks: list[CodeBlock]=[]): """ - :param tuple[ArgValue, ...] args: The argument items to include. - :param dict[str, str] tags: The tags to include. - :param str|None sub_action: The sub-action for the repeat action - :param bool inverted: Whether the sub-action condition should be inverted. - :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. + :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. """ - return add_brackets(CodeBlock.new_subaction_block('repeat', 'While', args, tags, sub_action, inverted), codeblocks, 'repeat') + return add_brackets(CodeBlock.new_subaction_block('repeat', 'Range', (), {}, None, False), codeblocks, 'repeat') @staticmethod - def ForEach(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=None, inverted: bool=False, codeblocks: list[CodeBlock]=[]): + def ForEach(variable: Variable, list: ArgValue, allow_list_changes: Literal["True", "False (copy list)"]="True", codeblocks: list[CodeBlock]=[]): """ Repeats code once for each index of a list. - :param tuple[ArgValue, ...] args: The argument items to include. - :param dict[str, str] tags: The tags to include. - :param str|None sub_action: The sub-action for the repeat action - :param bool inverted: Whether the sub-action condition should be inverted. + :param Variable variable: Gets the current value each iteration + :param ArgValue list: List to repeat through + :param str allow_list_changes: Allow List Changes :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. """ - return add_brackets(CodeBlock.new_subaction_block('repeat', 'While', args, tags, sub_action, inverted), codeblocks, 'repeat') + return add_brackets(CodeBlock.new_subaction_block('repeat', 'ForEach', (variable, list,), {'Allow List Changes': allow_list_changes}, None, False), codeblocks, 'repeat') @staticmethod - def Sphere(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=None, inverted: bool=False, codeblocks: list[CodeBlock]=[]): + def Sphere(variable: Variable, location: Location, number1: Number, number2: Number | None=None, point_locations_inwards: Literal["True", "False"]="False", codeblocks: list[CodeBlock]=[]): """ Repeats code once for every evenly distributed sphere point. - :param tuple[ArgValue, ...] args: The argument items to include. - :param dict[str, str] tags: The tags to include. - :param str|None sub_action: The sub-action for the repeat action - :param bool inverted: Whether the sub-action condition should be inverted. + :param Variable variable: Gets the current sphere location each iteration + :param Location location: Sphere center + :param Number number1: Sphere radius + :param Number | None number2: Sphere points (optional) + :param str point_locations_inwards: Point Locations Inwards :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. """ - return add_brackets(CodeBlock.new_subaction_block('repeat', 'While', args, tags, sub_action, inverted), codeblocks, 'repeat') + return add_brackets(CodeBlock.new_subaction_block('repeat', 'Sphere', (variable, location, number1, number2,), {'Point Locations Inwards': point_locations_inwards}, None, False), codeblocks, 'repeat') @staticmethod - def Forever(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=None, inverted: bool=False, codeblocks: list[CodeBlock]=[]): + def Forever(codeblocks: list[CodeBlock]=[]): """ Repeats code indefinitely. - :param tuple[ArgValue, ...] args: The argument items to include. - :param dict[str, str] tags: The tags to include. - :param str|None sub_action: The sub-action for the repeat action - :param bool inverted: Whether the sub-action condition should be inverted. :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. """ - return add_brackets(CodeBlock.new_subaction_block('repeat', 'While', args, tags, sub_action, inverted), codeblocks, 'repeat') + return add_brackets(CodeBlock.new_subaction_block('repeat', 'Forever', (), {}, None, False), codeblocks, 'repeat') @staticmethod - def Range(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=None, inverted: bool=False, codeblocks: list[CodeBlock]=[]): + def Range(variable: Variable | None=None, number1: Number=None, number2: Number=None, number3: Number | None=None, codeblocks: list[CodeBlock]=[]): """ Repeats code once for each number on a number line. - :param tuple[ArgValue, ...] args: The argument items to include. - :param dict[str, str] tags: The tags to include. - :param str|None sub_action: The sub-action for the repeat action - :param bool inverted: Whether the sub-action condition should be inverted. + :param Variable | None variable: Gets the current number each iteration (optional) + :param Number number1: Start of range + :param Number number2: End of range + :param Number | None number3: Step (optional) (Default = 1) :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. """ - return add_brackets(CodeBlock.new_subaction_block('repeat', 'While', args, tags, sub_action, inverted), codeblocks, 'repeat') + return add_brackets(CodeBlock.new_subaction_block('repeat', ' Range ', (variable, number1, number2, number3,), {}, None, False), codeblocks, 'repeat') @staticmethod - def ForEachEntry(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=None, inverted: bool=False, codeblocks: list[CodeBlock]=[]): + def ForEachEntry(variable1: Variable, variable2: Variable, dict: ArgValue, codeblocks: list[CodeBlock]=[]): """ Repeats code once per entry in a dictionary - :param tuple[ArgValue, ...] args: The argument items to include. - :param dict[str, str] tags: The tags to include. - :param str|None sub_action: The sub-action for the repeat action - :param bool inverted: Whether the sub-action condition should be inverted. + :param Variable variable1: Gets the current key each iteration + :param Variable variable2: Gets the current value each iteration + :param ArgValue dict: Dictionary to repeat through :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. """ - return add_brackets(CodeBlock.new_subaction_block('repeat', 'While', args, tags, sub_action, inverted), codeblocks, 'repeat') + return add_brackets(CodeBlock.new_subaction_block('repeat', 'ForEachEntry', (variable1, variable2, dict,), {}, None, False), codeblocks, 'repeat') class SelectObject: """ @@ -9877,28 +9868,22 @@ def EntitiesCond(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION return CodeBlock.new_subaction_block('select_obj', 'EntitiesCond', args, tags, sub_action, inverted) @staticmethod - def AllPlayers(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=None, inverted: bool=False): + def AllPlayers(): """ Creates a selection of all players in the game. - :param tuple[ArgValue, ...] args: The argument items to include. - :param dict[str, str] tags: The tags to include. - :param str|None sub_action: The sub-action to use. (Not relevant for all actions) - :param bool inverted: Whether the sub-action condition should be inverted. + """ - return CodeBlock.new_subaction_block('select_obj', 'AllPlayers', args, tags, sub_action, inverted) + return CodeBlock.new_action('select_obj', 'AllPlayers', (), {}) @staticmethod - def Invert(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=None, inverted: bool=False): + def Invert(): """ Creates a new selection by inverting the selection that is currently active. - :param tuple[ArgValue, ...] args: The argument items to include. - :param dict[str, str] tags: The tags to include. - :param str|None sub_action: The sub-action to use. (Not relevant for all actions) - :param bool inverted: Whether the sub-action condition should be inverted. + """ - return CodeBlock.new_subaction_block('select_obj', 'Invert', args, tags, sub_action, inverted) + return CodeBlock.new_action('select_obj', 'Invert', (), {}) @staticmethod def FilterCondition(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=None, inverted: bool=False): @@ -9913,16 +9898,16 @@ def FilterCondition(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACT return CodeBlock.new_subaction_block('select_obj', 'FilterCondition', args, tags, sub_action, inverted) @staticmethod - def FilterSort(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=None, inverted: bool=False): + def FilterSort(any_type: ArgValue, number: Number | None=None, sort_order: Literal["Ascending", "Descending"]="Ascending", ): """ Filters the selection by sorting the value of each object in order. - :param tuple[ArgValue, ...] args: The argument items to include. - :param dict[str, str] tags: The tags to include. - :param str|None sub_action: The sub-action to use. (Not relevant for all actions) - :param bool inverted: Whether the sub-action condition should be inverted. + :param ArgValue any_type: Value to compare + :param Number | None number: Selection size (optional) (Default = 1) + :param str sort_order: Sort Order + """ - return CodeBlock.new_subaction_block('select_obj', 'FilterSort', args, tags, sub_action, inverted) + return CodeBlock.new_action('select_obj', 'FilterSort', (any_type, number,), {'Sort Order': sort_order}) @staticmethod def PlayersCond(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=None, inverted: bool=False): diff --git a/dfpyre/scripts/action_gen.py b/dfpyre/scripts/action_gen.py index d75ddc5..2fa8399 100644 --- a/dfpyre/scripts/action_gen.py +++ b/dfpyre/scripts/action_gen.py @@ -146,11 +146,12 @@ def generate_actions(): continue method_name, method_aliases = method_data + current_method_template = method_template template_overrides = TEMPLATE_OVERRIDES.get(codeblock_type) if template_overrides: override_template = template_overrides.get(action_name) if override_template is not None: - method_template = override_template + current_method_template = override_template action_description = action_data.description or '' if action_description: @@ -186,7 +187,7 @@ def generate_actions(): # Fix indentation parameter_docstrings += INDENT - method_code = method_template.format( + method_code = current_method_template.format( method_name = method_name, parameter_list = parameter_list, parameter_names = parameter_names, @@ -214,7 +215,7 @@ def generate_actions(): generated_lines.append(alias_def) - with open(OUTPUT_PATH, 'w') as f: + with open(OUTPUT_PATH, 'w', encoding='utf-8') as f: f.write('\n'.join(generated_lines) + '\n') From 6fbafeeebc8182f766ccbec62f7b550fc16ddffb Mon Sep 17 00:00:00 2001 From: IsuCake <61488220+IsuCake@users.noreply.github.com> Date: Tue, 20 Jan 2026 16:51:26 +1100 Subject: [PATCH 2/2] Add missing deprecated actions --- dfpyre/data/deprecated_actions.json | 31 ++++ dfpyre/export/action_classes.py | 226 +--------------------------- 2 files changed, 32 insertions(+), 225 deletions(-) diff --git a/dfpyre/data/deprecated_actions.json b/dfpyre/data/deprecated_actions.json index fa01dcf..872c6b3 100644 --- a/dfpyre/data/deprecated_actions.json +++ b/dfpyre/data/deprecated_actions.json @@ -1,5 +1,9 @@ { "player_action": { + "RngTeleport": [], + "RemoveBossBar": [], + "SetInvName": [], + "SetAbsorption": [], "NoKeepInv": ["SetInventoryKept"], "BossBar": ["SetBossBar"], "NoNatRegen": [], @@ -37,6 +41,9 @@ "WeatherClear": ["SetPlayerWeather"] }, "entity_action": { + "SetSheepSheared": [], + "SetName": [], + "SetNameVisible": [], "DisableGlowing": ["SetGlowing"], "SetItemOwner": [], "NoGravity": ["FallingAttribute"], @@ -100,6 +107,16 @@ "PFX Line": [] }, "set_var": { + "SetItemEnchants": [], + "GetSignText": [], + "SetItemName": [], + "GetItemLore": [], + "RoundNumber": [], + "GetItemName": [], + "SetItemLore": [], + "GetItemEnchants": [], + "SetDirection": [], + "GetBookText": [], "ParseX": ["GetCoord"], "ParseY": ["GetCoord"], "ParseZ": ["GetCoord"], @@ -131,6 +148,8 @@ "SetCoords": ["SetAllCoords"] }, "if_player": { + "IsRiding": [], + "StandingOn": [], "IsHoldingOff": ["IsHolding"], "HasAllItems": ["HasItem"], "BlockEquals": [], @@ -141,9 +160,12 @@ "IsHoldingMain": ["IsHolding"] }, "if_entity": { + "IsRiding": [], + "StandingOn": [], "EStandingOn": ["StandingOn"] }, "if_var": { + "InRange": [], "TextMatches": ["StringMatches"], "EqIgnoreCase": ["StringMatches"], "IsNear": ["LocIsNear"], @@ -168,5 +190,14 @@ "event": { "FallDamage": ["PlayerTakeDmg"], "LoopEvent": [] + }, + "control": { + "ReturnNTimes": [] + }, + "repeat": { + "Range": [] + }, + "if_game": { + "SignHasTxt": [] } } \ No newline at end of file diff --git a/dfpyre/export/action_classes.py b/dfpyre/export/action_classes.py index 1ee2b7a..b3ba9f0 100644 --- a/dfpyre/export/action_classes.py +++ b/dfpyre/export/action_classes.py @@ -1,4 +1,4 @@ -# Auto generated by pyre 2026-01-20T03:25:03.185807+00:00 +# Auto generated by pyre 2026-01-20T05:49:00.793889+00:00 from typing import Literal from dfpyre.core.codeblock import CodeBlock, Target, DEFAULT_TARGET from dfpyre.core.items import ArgValue, Item, String as DFString, Text as DFText, Number, Variable, Location, Sound, Particle, Potion, Vector as DFVector @@ -330,16 +330,6 @@ def SetCursorItem(arg: Item | None=None, target: Target=DEFAULT_TARGET): """ return CodeBlock.new_action('player_action', 'SetCursorItem', (arg,), {}, target=target) - @staticmethod - def SetAbsorption(number: Number, target: Target=DEFAULT_TARGET): - """ - Sets a player's absorption health (golden hearts). - - :param Number number: Absorption health (❤ = 2 Health) - :param Target target: The target for the action. - """ - return CodeBlock.new_action('player_action', 'SetAbsorption', (number,), {}, target=target) - @staticmethod def SetFireTicks(number: Number, target: Target=DEFAULT_TARGET): """ @@ -719,17 +709,6 @@ def SetCompass(location: Location, target: Target=DEFAULT_TARGET): """ return CodeBlock.new_action('player_action', 'SetCompass', (location,), {}, target=target) - @staticmethod - def RngTeleport(locations: list[Location] | Location, keep_current_rotation: Literal["True", "False"]="False", target: Target=DEFAULT_TARGET): - """ - Teleports a player to a random location in the chest. - - :param list[Location] | Location locations: Locations to choose from - :param str keep_current_rotation: Keep Current Rotation - :param Target target: The target for the action. - """ - return CodeBlock.new_action('player_action', 'RngTeleport', (locations,), {'Keep Current Rotation': keep_current_rotation}, target=target) - @staticmethod def MobDisguise(spawn_egg: Item, text: DFText | None=None, target: Target=DEFAULT_TARGET): """ @@ -787,24 +766,6 @@ def ParticleCircleA(particle: Particle, location: Location, number1: Number | No """ return CodeBlock.new_action('player_action', 'ParticleCircleA', (particle, location, number1, number2,), {}, target=target) - @staticmethod - def RemoveBossBar(boss_bar_slot: Literal["All boss bars", "1", "2", "3", "4", "5", "6", "7", "8", "9"]="All boss bars", target: Target=DEFAULT_TARGET): - """ - :param str boss_bar_slot: Boss Bar Slot - - - 1: Removes the boss bar in slot 1 and any boss bars below it. - - 2: Removes the boss bar in slot 2 and any boss bars below it. - - 3: Removes the boss bar in slot 3 and any boss bars below it. - - 4: Removes the boss bar in slot 4 and any boss bars below it. - - 5: Removes the boss bar in slot 5 and any boss bars below it. - - 6: Removes the boss bar in slot 6 and any boss bars below it. - - 7: Removes the boss bar in slot 7 and any boss bars below it. - - 8: Removes the boss bar in slot 8 and any boss bars below it. - - 9: Removes the boss bar in slot 9 and any boss bars below it. - :param Target target: The target for the action. - """ - return CodeBlock.new_action('player_action', 'RemoveBossBar', (), {'Boss Bar Slot': boss_bar_slot}, target=target) - @staticmethod def SetEquipment(item: Item | None=None, equipment_slot: Literal["Main hand", "Off hand", "Head", "Chest", "Legs", "Feet"]="Main hand", target: Target=DEFAULT_TARGET): """ @@ -1627,13 +1588,6 @@ def ParticleLineA(particle: Particle, location1: Location, location2: Location, """ return CodeBlock.new_action('player_action', 'ParticleLineA', (particle, location1, location2, number1, number2,), {}, target=target) - @staticmethod - def SetInvName(target: Target=DEFAULT_TARGET): - """ - :param Target target: The target for the action. - """ - return CodeBlock.new_action('player_action', 'SetInvName', (), {}, target=target) - @staticmethod def SetItemCooldown(item: Item, number: Number, target: Target=DEFAULT_TARGET): """ @@ -2362,17 +2316,6 @@ def CombatAttribute(number: Number | None=None, attribute: Literal["Attack damag """ return CodeBlock.new_action('entity_action', 'CombatAttribute', (number,), {'Attribute': attribute, 'Value Type': value_type}, target=target) - @staticmethod - def SetName(arg: DFText | None=None, hide_name_tag: Literal["True", "False", "Don't change"]="False", target: Target=DEFAULT_TARGET): - """ - Sets an entity's custom name. - - :param DFText | None arg: Custom name OR Removes custom name - :param str hide_name_tag: Hide Name Tag - :param Target target: The target for the action. - """ - return CodeBlock.new_action('entity_action', 'SetName', (arg,), {'Hide Name Tag': hide_name_tag}, target=target) - @staticmethod def Jump(target: Target=DEFAULT_TARGET): """ @@ -2950,16 +2893,6 @@ def DisplayCullingSize(number1: Number | None=None, number2: Number | None=None, """ return CodeBlock.new_action('entity_action', 'DisplayCullingSize', (number1, number2,), {}, target=target) - @staticmethod - def SetSheepSheared(sheared: Literal["Enable", "Disable"]="Enable", target: Target=DEFAULT_TARGET): - """ - Sets whether a sheep has its wool. - - :param str sheared: Sheared - :param Target target: The target for the action. - """ - return CodeBlock.new_action('entity_action', 'SetSheepSheared', (), {'Sheared': sheared}, target=target) - @staticmethod def SetAxolotlColor(axolotl_color: Literal["Pink", "Brown", "Yellow", "Cyan", "Blue"]="Pink", target: Target=DEFAULT_TARGET): """ @@ -3242,16 +3175,6 @@ def TDisplayShadow(text_shadow: Literal["Enable", "Disable"]="Enable", target: T """ return CodeBlock.new_action('entity_action', 'TDisplayShadow', (), {'Text Shadow': text_shadow}, target=target) - @staticmethod - def SetNameVisible(name_tag_visible: Literal["Enable", "Disable"]="Enable", target: Target=DEFAULT_TARGET): - """ - Sets whether an entity's custom name is always displayed above them. - - :param str name_tag_visible: Name Tag Visible - :param Target target: The target for the action. - """ - return CodeBlock.new_action('entity_action', 'SetNameVisible', (), {'Name Tag Visible': name_tag_visible}, target=target) - @staticmethod def SetInvulTicks(number: Number, target: Target=DEFAULT_TARGET): """ @@ -4743,13 +4666,6 @@ def SetParticleType(variable: Variable, particle: Particle | None=None, text: DF """ return CodeBlock.new_action('set_var', 'SetParticleType', (variable, particle, text,), {}) - @staticmethod - def SetItemEnchants(): - """ - - """ - return CodeBlock.new_action('set_var', 'SetItemEnchants', (), {}) - @staticmethod def ClearItemTag(variable: Variable, item: Item | None=None, ): """ @@ -5068,14 +4984,6 @@ def Divide(variable: Variable, numbers: list[Number] | Number, division_mode: Li """ return CodeBlock.new_action('set_var', '/', (variable, numbers,), {'Division Mode': division_mode}) - @staticmethod - def GetSignText(sign_line: Literal["1", "2", "3", "4", "All lines"]="1", ): - """ - :param str sign_line: Sign Line - - """ - return CodeBlock.new_action('set_var', 'GetSignText', (), {'Sign Line': sign_line}) - @staticmethod def Bitwise(variable: Variable, number1: Number, number2: Number | None=None, operator: Literal["|", "&", "~", "^", "<<", ">>", ">>>"]="|", bit_precision: Literal["Default", "64-bit"]="Default", ): """ @@ -5629,13 +5537,6 @@ def GetPotionType(variable: Variable, potion: Potion, ): """ return CodeBlock.new_action('set_var', 'GetPotionType', (variable, potion,), {}) - @staticmethod - def SetItemName(): - """ - - """ - return CodeBlock.new_action('set_var', 'SetItemName', (), {}) - @staticmethod def ListLength(variable: Variable, list: ArgValue, ): """ @@ -5683,13 +5584,6 @@ def RepeatString(variable: Variable, text: DFString, number: Number, ): """ return CodeBlock.new_action('set_var', 'RepeatString', (variable, text, number,), {}) - @staticmethod - def GetItemLore(): - """ - - """ - return CodeBlock.new_action('set_var', 'GetItemLore', (), {}) - @staticmethod def JoinString(variable: Variable, list: ArgValue, text1: DFString | None=None, text2: DFString | None=None, ): """ @@ -5760,18 +5654,6 @@ def GetBlockByMCTag(variable: Variable, text: DFString, return_value_type: Liter """ return CodeBlock.new_action('set_var', 'GetBlockByMCTag', (variable, text,), {'Return Value Type': return_value_type}) - @staticmethod - def RoundNumber(round_mode: Literal["Floor", "Nearest", "Ceiling"]="Nearest", ): - """ - :param str round_mode: Round Mode - - - Floor: Rounds the number down. - - Nearest: Rounds the number to the nearest value. - - Ceiling: Rounds the number up. - - """ - return CodeBlock.new_action('set_var', 'RoundNumber', (), {'Round Mode': round_mode}) - @staticmethod def FaceLocation(variable: Variable, location1: Location | None=None, location2: Location=None, face_direction: Literal["Toward location", "Away from location"]="Toward location", ): """ @@ -6169,13 +6051,6 @@ def RotateAroundAxis(variable: Variable, vector: DFVector | None=None, number: N """ return CodeBlock.new_action('set_var', 'RotateAroundAxis', (variable, vector, number,), {'Axis': axis, 'Angle Units': angle_units}) - @staticmethod - def GetItemName(): - """ - - """ - return CodeBlock.new_action('set_var', 'GetItemName', (), {}) - @staticmethod def GetItemDura(variable: Variable, item: Item, durability_type: Literal["Get Damage", "Get Damage Percentage", "Get Remaining", "Get Remaining Percentage", "Get Maximum"]="Get Damage", ): """ @@ -6521,13 +6396,6 @@ def Distance(variable: Variable, location1: Location, location2: Location, dista """ return CodeBlock.new_action('set_var', 'Distance', (variable, location1, location2,), {'Distance Type': distance_type}) - @staticmethod - def SetItemLore(): - """ - - """ - return CodeBlock.new_action('set_var', 'SetItemLore', (), {}) - @staticmethod def ParseMiniMessage(variable: Variable, text: DFString, allowed_tags: Literal["Style Only", "Dynamic", "Full"]="Style Only", parse_legacy_color_codes: Literal["True", "False"]="False", ): """ @@ -6946,13 +6814,6 @@ def GetHeadOwner(variable: Variable, item: Item, text_value: Literal["Owner Name """ return CodeBlock.new_action('set_var', 'GetHeadOwner', (variable, item,), {'Text Value': text_value}) - @staticmethod - def GetItemEnchants(): - """ - - """ - return CodeBlock.new_action('set_var', 'GetItemEnchants', (), {}) - @staticmethod def AppendDict(variable: Variable, dict: ArgValue, ): """ @@ -7139,14 +7000,6 @@ def VoronoiNoise(variable: Variable, location: Location, number1: Number | None= """ return CodeBlock.new_action('set_var', 'VoronoiNoise', (variable, location, number1, number2, number3,), {'Cell Edge Type': cell_edge_type}) - @staticmethod - def SetDirection(face_direction: Literal["Towards direction", "Towards opposite direction"]="Towards direction", ): - """ - :param str face_direction: Face Direction - - """ - return CodeBlock.new_action('set_var', 'SetDirection', (), {'Face Direction': face_direction}) - @staticmethod def HSBColor(variable: Variable, number1: Number, number2: Number | None=None, arg: Number | ArgValue | None=None, ): """ @@ -7937,13 +7790,6 @@ def GetConsumable(variable: Variable, item: Item, consumable_property: Literal[" """ return CodeBlock.new_action('set_var', 'GetConsumable', (variable, item,), {'Consumable Property': consumable_property}) - @staticmethod - def GetBookText(): - """ - - """ - return CodeBlock.new_action('set_var', 'GetBookText', (), {}) - @staticmethod def SetParticleRoll(variable: Variable, particle: Particle | None=None, number: Number=None, ): """ @@ -8391,16 +8237,6 @@ def IsNear(locations: list[Location] | Location, number: Number | None=None, sha """ return add_brackets(CodeBlock.new_conditional('if_player', 'IsNear', (locations, number,), {'Shape': shape}, inverted, target), codeblocks) - @staticmethod - def IsRiding(compare_text_to: Literal["Entity type", "Name or UUID"]="Entity type", target: Target=DEFAULT_TARGET, inverted: bool=False, codeblocks: list[CodeBlock]=[]): - """ - :param str compare_text_to: Compare Text To - :param Target target: The target for the condition. - :param bool inverted: Whether the condition should be inverted. - :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. - """ - return add_brackets(CodeBlock.new_conditional('if_player', 'IsRiding', (), {'Compare Text To': compare_text_to}, inverted, target), codeblocks) - @staticmethod def CursorItem(items: list[Item] | Item | None=None, target: Target=DEFAULT_TARGET, inverted: bool=False, codeblocks: list[CodeBlock]=[]): """ @@ -8631,15 +8467,6 @@ def IsSwimming(target: Target=DEFAULT_TARGET, inverted: bool=False, codeblocks: """ return add_brackets(CodeBlock.new_conditional('if_player', 'IsSwimming', (), {}, inverted, target), codeblocks) - @staticmethod - def StandingOn(target: Target=DEFAULT_TARGET, inverted: bool=False, codeblocks: list[CodeBlock]=[]): - """ - :param Target target: The target for the condition. - :param bool inverted: Whether the condition should be inverted. - :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. - """ - return add_brackets(CodeBlock.new_conditional('if_player', 'StandingOn', (), {}, inverted, target), codeblocks) - @staticmethod def StandingOn(args: list[Item | Location] | Item | Location | None=None, target: Target=DEFAULT_TARGET, inverted: bool=False, codeblocks: list[CodeBlock]=[]): """ @@ -8941,25 +8768,6 @@ def HasPotion(potions: list[Potion] | Potion, check_properties: Literal["None", """ return add_brackets(CodeBlock.new_conditional('if_entity', 'HasPotion', (potions,), {'Check Properties': check_properties, 'Check Mode': check_mode}, inverted, target), codeblocks) - @staticmethod - def IsRiding(compare_text_to: Literal["Entity type", "Name or UUID"]="Entity type", target: Target=DEFAULT_TARGET, inverted: bool=False, codeblocks: list[CodeBlock]=[]): - """ - :param str compare_text_to: Compare Text To - :param Target target: The target for the condition. - :param bool inverted: Whether the condition should be inverted. - :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. - """ - return add_brackets(CodeBlock.new_conditional('if_entity', 'IsRiding', (), {'Compare Text To': compare_text_to}, inverted, target), codeblocks) - - @staticmethod - def StandingOn(target: Target=DEFAULT_TARGET, inverted: bool=False, codeblocks: list[CodeBlock]=[]): - """ - :param Target target: The target for the condition. - :param bool inverted: Whether the condition should be inverted. - :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. - """ - return add_brackets(CodeBlock.new_conditional('if_entity', 'StandingOn', (), {}, inverted, target), codeblocks) - @staticmethod def NameEquals(args: list[DFString | DFText] | DFString | DFText, ignore_formatting: Literal["True", "False"]="True", target: Target=DEFAULT_TARGET, inverted: bool=False, codeblocks: list[CodeBlock]=[]): """ @@ -8994,16 +8802,6 @@ class IfGame: Used to execute the code inside it if a certain condition related to the plot is met. """ - @staticmethod - def SignHasTxt(sign_line: Literal["1", "2", "3", "4", "All lines"]="All lines", check_mode: Literal["Contains", "Equals"]="Contains", inverted: bool=False, codeblocks: list[CodeBlock]=[]): - """ - :param str sign_line: Sign Line - :param str check_mode: Check Mode - :param bool inverted: Whether the condition should be inverted. - :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. - """ - return add_brackets(CodeBlock.new_conditional('if_game', 'SignHasTxt', (), {'Sign Line': sign_line, 'Check Mode': check_mode}, inverted), codeblocks) - @staticmethod def HasRoomForItem(location: Location, arg: Item | None=None, check_mode: Literal["Has Room for Any Item", "Has Room for All Items"]="Has Room for Any Item", inverted: bool=False, codeblocks: list[CodeBlock]=[]): """ @@ -9435,14 +9233,6 @@ def ListContains(list: ArgValue, any_types: list[ArgValue] | ArgValue, check_mod """ return add_brackets(CodeBlock.new_conditional('if_var', 'ListContains', (list, any_types,), {'Check Mode': check_mode}, inverted), codeblocks) - @staticmethod - def InRange(inverted: bool=False, codeblocks: list[CodeBlock]=[]): - """ - :param bool inverted: Whether the condition should be inverted. - :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. - """ - return add_brackets(CodeBlock.new_conditional('if_var', 'InRange', (), {}, inverted), codeblocks) - @staticmethod def LocIsNear(location: Location, locations: list[Location] | Location, number: Number, shape: Literal["Sphere", "Circle", "Cube", "Square"]="Sphere", inverted: bool=False, codeblocks: list[CodeBlock]=[]): """ @@ -9652,13 +9442,6 @@ def While(*args: ArgValue, tags: dict[str, str]={}, sub_action: SUBACTION|None=N """ return add_brackets(CodeBlock.new_subaction_block('repeat', 'While', args, tags, sub_action, inverted), codeblocks, 'repeat') - @staticmethod - def Range(codeblocks: list[CodeBlock]=[]): - """ - :param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets. - """ - return add_brackets(CodeBlock.new_subaction_block('repeat', 'Range', (), {}, None, False), codeblocks, 'repeat') - @staticmethod def ForEach(variable: Variable, list: ArgValue, allow_list_changes: Literal["True", "False (copy list)"]="True", codeblocks: list[CodeBlock]=[]): """ @@ -9986,13 +9769,6 @@ def PrintDebug(any_types: list[ArgValue] | ArgValue | None=None, permission: Lit """ return CodeBlock.new_action('control', 'PrintDebug', (any_types,), {'Permission': permission, 'Text Value Merging': text_value_merging, 'Highlighting': highlighting, 'Sound': sound, 'Message Style': message_style}) - @staticmethod - def ReturnNTimes(): - """ - - """ - return CodeBlock.new_action('control', 'ReturnNTimes', (), {}) - @staticmethod def Skip(): """