dfpyre 0.4.2__py3-none-any.whl → 0.10.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of dfpyre might be problematic. Click here for more details.
- dfpyre/__init__.py +3 -1
- dfpyre/core/actiondump.py +277 -0
- dfpyre/core/codeblock.py +207 -0
- dfpyre/core/items.py +580 -0
- dfpyre/core/template.py +220 -0
- dfpyre/data/actiondump_min.json +1 -0
- dfpyre/data/deprecated_actions.json +172 -0
- dfpyre/data/method_templates/action.txt +5 -0
- dfpyre/data/method_templates/conditional.txt +7 -0
- dfpyre/data/method_templates/event.txt +6 -0
- dfpyre/data/method_templates/notarget_action.txt +5 -0
- dfpyre/data/method_templates/notarget_conditional.txt +6 -0
- dfpyre/data/method_templates/repeat.txt +5 -0
- dfpyre/data/method_templates/repeat_while.txt +9 -0
- dfpyre/data/method_templates/select_obj_subaction.txt +8 -0
- dfpyre/export/action_classes.py +10891 -0
- dfpyre/export/block_functions.py +90 -0
- dfpyre/gen/action_class_data.py +203 -0
- dfpyre/gen/action_literals.py +20 -0
- dfpyre/scripts/action_gen.py +222 -0
- dfpyre/scripts/action_literal_gen.py +43 -0
- dfpyre/tool/scriptgen.py +274 -0
- dfpyre/tool/slice.py +199 -0
- dfpyre/util/style.py +23 -0
- dfpyre/util/util.py +65 -0
- dfpyre-0.10.5.dist-info/METADATA +64 -0
- dfpyre-0.10.5.dist-info/RECORD +29 -0
- {dfpyre-0.4.2.dist-info → dfpyre-0.10.5.dist-info}/WHEEL +1 -2
- {dfpyre-0.4.2.dist-info → dfpyre-0.10.5.dist-info/licenses}/LICENSE +21 -21
- dfpyre/data/data.json +0 -1
- dfpyre/items.py +0 -244
- dfpyre/pyre.py +0 -407
- dfpyre/style.py +0 -21
- dfpyre-0.4.2.dist-info/METADATA +0 -11
- dfpyre-0.4.2.dist-info/RECORD +0 -10
- dfpyre-0.4.2.dist-info/top_level.txt +0 -1
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
{
|
|
2
|
+
"player_action": {
|
|
3
|
+
"NoKeepInv": ["SetInventoryKept"],
|
|
4
|
+
"BossBar": ["SetBossBar"],
|
|
5
|
+
"NoNatRegen": [],
|
|
6
|
+
"SendAnimation": ["AttackAnimation", "HurtAnimation", "WakeUpAnimation"],
|
|
7
|
+
"GetTargetEntity": [],
|
|
8
|
+
"ProjColl": [],
|
|
9
|
+
"SetGamemode": ["SurvivalMode", "AdventureMode", "CreativeMode", "SpectatorMode"],
|
|
10
|
+
"L SetHealth": ["SetHealth"],
|
|
11
|
+
"ParticleEffect": ["Particle"],
|
|
12
|
+
"SetHandItem": ["SetHotbar"],
|
|
13
|
+
"ClearChat": [],
|
|
14
|
+
"SetSpeed": ["SetVelocity", "MovementAttribute"],
|
|
15
|
+
"NoProjColl": [],
|
|
16
|
+
"ShowDisguise": ["MobDisguise", "PlayerDisguise", "BlockDisguise"],
|
|
17
|
+
"ClearBars": ["RemoveBossBar"],
|
|
18
|
+
"GiveRngItem": ["GiveItems"],
|
|
19
|
+
"AllowDrops": [],
|
|
20
|
+
"Vibration": [],
|
|
21
|
+
"SetAtkSpeed": ["CombatAttribute"],
|
|
22
|
+
"DisablePvp": ["SetAllowPVP"],
|
|
23
|
+
"ReplaceProj": [],
|
|
24
|
+
"EnablePvp": ["SetAllowPVP"],
|
|
25
|
+
"HideDisguise": ["Undisguise"],
|
|
26
|
+
"EnableFlight": ["SetFlying"],
|
|
27
|
+
"DisallowDrops": [],
|
|
28
|
+
"WeatherRain": ["SetPlayerWeather"],
|
|
29
|
+
"DisableFlight": ["SetFlying"],
|
|
30
|
+
"SetItems": ["SetInventory"],
|
|
31
|
+
"KeepInv": ["SetInventoryKept"],
|
|
32
|
+
"Respawn": [],
|
|
33
|
+
"SendHover": [],
|
|
34
|
+
"NatRegen": [],
|
|
35
|
+
"NoDeathDrops": ["SetInventoryKept"],
|
|
36
|
+
"DeathDrops": ["SetInventoryKept"],
|
|
37
|
+
"WeatherClear": ["SetPlayerWeather"]
|
|
38
|
+
},
|
|
39
|
+
"entity_action": {
|
|
40
|
+
"DisableGlowing": ["SetGlowing"],
|
|
41
|
+
"SetItemOwner": [],
|
|
42
|
+
"NoGravity": ["FallingAttribute"],
|
|
43
|
+
"SetMoveSpeed": ["MovementAttribute"],
|
|
44
|
+
"ProjColl": [],
|
|
45
|
+
"ArmorStandTags": [],
|
|
46
|
+
"DropItems": ["SetDeathDrops"],
|
|
47
|
+
"SetHandItem": ["SetItem"],
|
|
48
|
+
"EnableAI": ["SetAI"],
|
|
49
|
+
"NoProjColl": [],
|
|
50
|
+
"ShowName": ["SetNameVisible"],
|
|
51
|
+
"HideName": ["SetNameVisible"],
|
|
52
|
+
"Silence": ["SetSilenced"],
|
|
53
|
+
"NoDrops": ["SetDeathDrops"],
|
|
54
|
+
"EnableGlowing": ["SetGlowing"],
|
|
55
|
+
"SetAge/Size": ["SetAge", "SetSize"],
|
|
56
|
+
"L SetArmor": ["SetArmor"],
|
|
57
|
+
"Gravity": ["FallingAttribute"],
|
|
58
|
+
"NoAI": ["SetAI"],
|
|
59
|
+
"MoveTo": ["MoveToLoc"],
|
|
60
|
+
"Unsilence": ["SetSilenced"]
|
|
61
|
+
},
|
|
62
|
+
"game_action": {
|
|
63
|
+
"L PFX Spiral": [],
|
|
64
|
+
"ParticleSphere": [],
|
|
65
|
+
"PFX Sphere": [],
|
|
66
|
+
"ClearScBoard": [],
|
|
67
|
+
"HideSidebar": [],
|
|
68
|
+
"SpawnItemDisplay": ["SpawnItemDisp"],
|
|
69
|
+
"ParticleSpiral": [],
|
|
70
|
+
"PFX Spiral": [],
|
|
71
|
+
"FireworkEffect": ["Firework"],
|
|
72
|
+
"ParticleEffect": [],
|
|
73
|
+
"Particle FX": [],
|
|
74
|
+
"RemoveScore": [],
|
|
75
|
+
"CreateHologram": ["SpawnTextDisplay"],
|
|
76
|
+
"ParticleCircle": [],
|
|
77
|
+
"PFX Circle": [],
|
|
78
|
+
"PFX Line [A]": [],
|
|
79
|
+
"StartLoop": [],
|
|
80
|
+
"DebugStackTrace": [],
|
|
81
|
+
"ParticleLineA": [],
|
|
82
|
+
"ShowSidebar": [],
|
|
83
|
+
"Wait": [],
|
|
84
|
+
"RemoveHologram": [],
|
|
85
|
+
"SpawnRngItem": ["SpawnItem"],
|
|
86
|
+
"ParticleCircleA": [],
|
|
87
|
+
"PFX Circle [A]": [],
|
|
88
|
+
"PFX Path": [],
|
|
89
|
+
"ParticleRay": [],
|
|
90
|
+
"PFX Ray": [],
|
|
91
|
+
"StopLoop": [],
|
|
92
|
+
"SetScObj": [],
|
|
93
|
+
"ParticleSpiralA": [],
|
|
94
|
+
"PFX Spiral [A]": [],
|
|
95
|
+
"SetScore": [],
|
|
96
|
+
"ParticleCluster": [],
|
|
97
|
+
"PFX Cluster": [],
|
|
98
|
+
"L PFX Cluster": [],
|
|
99
|
+
"ParticleLine": [],
|
|
100
|
+
"PFX Line": []
|
|
101
|
+
},
|
|
102
|
+
"set_var": {
|
|
103
|
+
"ParseX": ["GetCoord"],
|
|
104
|
+
"ParseY": ["GetCoord"],
|
|
105
|
+
"ParseZ": ["GetCoord"],
|
|
106
|
+
"RmText": ["RemoveString"],
|
|
107
|
+
"SetItemFood": [],
|
|
108
|
+
"WrapNumber": ["WrapNum"],
|
|
109
|
+
"SetY": ["SetCoord"],
|
|
110
|
+
"SetX": ["SetCoord"],
|
|
111
|
+
"ParseYaw": ["GetCoord"],
|
|
112
|
+
"SetZ": ["SetCoord"],
|
|
113
|
+
"GetItemLoreLine": ["GetLoreLine"],
|
|
114
|
+
"RaycastEntity": ["Raycast"],
|
|
115
|
+
" GetDirection ": ["GetDirection"],
|
|
116
|
+
"ParseMiniMessageExpr": ["ParseMiniMessage"],
|
|
117
|
+
"ShiftDirection": ["ShiftInDirection"],
|
|
118
|
+
"GetContainerName": ["ContainerName"],
|
|
119
|
+
"GetMaxItemAmount": ["GetMaxAmount"],
|
|
120
|
+
" SetItemFlags ": [],
|
|
121
|
+
"FaceDirection": ["SetDirection"],
|
|
122
|
+
"SetPitch": ["SetCoord"],
|
|
123
|
+
"RaycastBlock": ["Raycast"],
|
|
124
|
+
"SetItemFlags": [],
|
|
125
|
+
"SetYaw": ["SetCoord"],
|
|
126
|
+
"ShiftAllDirs": ["ShiftAllDirections"],
|
|
127
|
+
"ShiftLocation": ["ShiftOnAxis"],
|
|
128
|
+
"Round": ["RoundNumber"],
|
|
129
|
+
"ParsePitch": ["GetCoord"],
|
|
130
|
+
"SetModelData": ["SetModelDataNums", "SetModelDataStrs"],
|
|
131
|
+
"SetCoords": ["SetAllCoords"]
|
|
132
|
+
},
|
|
133
|
+
"if_player": {
|
|
134
|
+
"IsHoldingOff": ["IsHolding"],
|
|
135
|
+
"HasAllItems": ["HasItem"],
|
|
136
|
+
"BlockEquals": [],
|
|
137
|
+
"CmdEquals": [],
|
|
138
|
+
"ItemEquals": ["HasSlotItem"],
|
|
139
|
+
"CmdArgEquals": [],
|
|
140
|
+
"PStandingOn": ["StandingOn"],
|
|
141
|
+
"IsHoldingMain": ["IsHolding"]
|
|
142
|
+
},
|
|
143
|
+
"if_entity": {
|
|
144
|
+
"EStandingOn": ["StandingOn"]
|
|
145
|
+
},
|
|
146
|
+
"if_var": {
|
|
147
|
+
"TextMatches": ["StringMatches"],
|
|
148
|
+
"EqIgnoreCase": ["StringMatches"],
|
|
149
|
+
"IsNear": ["LocIsNear"],
|
|
150
|
+
"VIsNear": ["LocIsNear"],
|
|
151
|
+
"Legacy !=": ["!="],
|
|
152
|
+
"Legacy =": ["="]
|
|
153
|
+
},
|
|
154
|
+
"select_obj": {
|
|
155
|
+
"LastMob": ["LastEntity"],
|
|
156
|
+
"Shooter": ["EventTarget"],
|
|
157
|
+
"AllMobs": ["AllEntities"],
|
|
158
|
+
"DefaultEntity": ["EventTarget"],
|
|
159
|
+
"Damager": ["EventTarget"],
|
|
160
|
+
"Killer": ["EventTarget"],
|
|
161
|
+
"Victim": ["EventTarget"],
|
|
162
|
+
"RandomEntity": [],
|
|
163
|
+
"MobsCond": ["EntitiesCond"],
|
|
164
|
+
"Projectile": ["EventTarget"],
|
|
165
|
+
"DefaultPlayer": ["EventTarget"],
|
|
166
|
+
"MobName": ["EntityName"]
|
|
167
|
+
},
|
|
168
|
+
"event": {
|
|
169
|
+
"FallDamage": ["PlayerTakeDmg"],
|
|
170
|
+
"LoopEvent": []
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
def {method_name}({parameter_list}{tag_parameter_list}target: Target=DEFAULT_TARGET):
|
|
2
|
+
"""
|
|
3
|
+
{action_description}{parameter_docstrings}:param Target target: The target for the action.
|
|
4
|
+
"""
|
|
5
|
+
return CodeBlock.new_action('{codeblock_type}', '{action_name}', ({parameter_names}), {{{tag_values}}}, target=target)
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
def {method_name}({parameter_list}{tag_parameter_list}target: Target=DEFAULT_TARGET, inverted: bool=False, codeblocks: list[CodeBlock]=[]):
|
|
2
|
+
"""
|
|
3
|
+
{action_description}{parameter_docstrings}:param Target target: The target for the condition.
|
|
4
|
+
:param bool inverted: Whether the condition should be inverted.
|
|
5
|
+
:param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets.
|
|
6
|
+
"""
|
|
7
|
+
return add_brackets(CodeBlock.new_conditional('{codeblock_type}', '{action_name}', ({parameter_names}), {{{tag_values}}}, inverted, target), codeblocks)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
def {method_name}(codeblocks: list[CodeBlock]=[], ls_cancel: bool=False, author: str|None=None):
|
|
2
|
+
"""
|
|
3
|
+
{action_description}:param list[CodeBlock] codeblocks: The list of codeblocks in this template.
|
|
4
|
+
:param str|None author: The author of this template.
|
|
5
|
+
"""
|
|
6
|
+
return assemble_template(CodeBlock.new_event('{codeblock_type}', '{action_name}', ls_cancel), codeblocks, author)
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
def {method_name}({parameter_list}{tag_parameter_list}inverted: bool=False, codeblocks: list[CodeBlock]=[]):
|
|
2
|
+
"""
|
|
3
|
+
{action_description}{parameter_docstrings}:param bool inverted: Whether the condition should be inverted.
|
|
4
|
+
:param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets.
|
|
5
|
+
"""
|
|
6
|
+
return add_brackets(CodeBlock.new_conditional('{codeblock_type}', '{action_name}', ({parameter_names}), {{{tag_values}}}, inverted), codeblocks)
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
def {method_name}({parameter_list}{tag_parameter_list}codeblocks: list[CodeBlock]=[]):
|
|
2
|
+
"""
|
|
3
|
+
{action_description}{parameter_docstrings}:param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets.
|
|
4
|
+
"""
|
|
5
|
+
return add_brackets(CodeBlock.new_subaction_block('repeat', '{action_name}', ({parameter_names}), {{{tag_values}}}, None, False), codeblocks, 'repeat')
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
def {method_name}(*args: ArgValue, tags: dict[str, str]={{}}, sub_action: SUBACTION|None=None, inverted: bool=False, codeblocks: list[CodeBlock]=[]):
|
|
2
|
+
"""
|
|
3
|
+
{action_description} :param tuple[ArgValue, ...] args: The argument items to include.
|
|
4
|
+
:param dict[str, str] tags: The tags to include.
|
|
5
|
+
:param str|None sub_action: The sub-action for the repeat action
|
|
6
|
+
:param bool inverted: Whether the sub-action condition should be inverted.
|
|
7
|
+
:param list[CodeBlock] codeblocks: The list of codeblocks inside the brackets.
|
|
8
|
+
"""
|
|
9
|
+
return add_brackets(CodeBlock.new_subaction_block('repeat', 'While', args, tags, sub_action, inverted), codeblocks, 'repeat')
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
def {method_name}(*args: ArgValue, tags: dict[str, str]={{}}, sub_action: SUBACTION|None=None, inverted: bool=False):
|
|
2
|
+
"""
|
|
3
|
+
{action_description} :param tuple[ArgValue, ...] args: The argument items to include.
|
|
4
|
+
:param dict[str, str] tags: The tags to include.
|
|
5
|
+
:param str|None sub_action: The sub-action to use. (Not relevant for all actions)
|
|
6
|
+
:param bool inverted: Whether the sub-action condition should be inverted.
|
|
7
|
+
"""
|
|
8
|
+
return CodeBlock.new_subaction_block('select_obj', '{action_name}', args, tags, sub_action, inverted)
|