apoli-python-extension


Nameapoli-python-extension JSON
Version 0.0.1 PyPI version JSON
download
home_page
SummaryA python package that can create Datapacks and Resourcepacks using Apoli powers.
upload_time2023-08-21 19:34:02
maintainer
docs_urlNone
authorThatRobin
requires_python
license
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            Apoli Python Extension is a python package that allows you to create Datapacks and Resourcepacks using Apoli Powers.

# How to generate the classes:
```py
from apoli_python_extension.wiki import update_wiki

update_wiki()
```

# Datapack Example:
```py
"""
Demo of Apoli Python Package

This is a Demo of my Apoli Python Package to see how long it would take to create a relatively large apoli power.

This Power will be a power that applies 3 random status effects whenever you recieve any status effect.
"""

status_effects = [
    "speed", "slowness", "haste", "mining_fatigue",
    "strength", "instant_health", "instant_damage",
    "jump_boost", "nausea", "regeneration",
    "resistance", "fire_resistance", "water_breathing",
    "invisibility", "blindness", "night_vision", "hunger",
    "weakness", "poison", "wither", "health_boost", "absorption",
    "saturation", "glowing", "levitation", "luck", "unluck",
    "slow_falling", "conduit_power", "dolphins_grace",
    "bad_omen", "hero_of_the_village", "darkness",
]

datapack = Datapack(name="Test Demo DataPack", namespace="test_demo")

effect_actions = []

for effect in status_effects:
    effect_actions.append({
        "element": ApplyEffectEntityAction(effect="minecraft:" + effect),
        "weight": 10
    })

effect_action = ChoiceAction(actions=effect_actions)

has_effect = NbtEntityCondition(nbt="{ActiveEffects:[{Ambient:0b}]}")

three_effects = AndAction(actions=[effect_action,effect_action,effect_action])

rising_power = ActionOverTimePower(rising_action=three_effects, condition=has_effect, name="Easily Effected", description="Whenever you gain a potion effect, you gain some random extras")

datapack.add_power(power=rising_power, name="random_effect")

datapack.save()
```

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "apoli-python-extension",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "ThatRobin",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/94/52/6587b3b12df5dc2f49f551f74ad3713a51561b8818ba848def6f7f79a057/apoli_python_extension-0.0.1.tar.gz",
    "platform": null,
    "description": "Apoli Python Extension is a python package that allows you to create Datapacks and Resourcepacks using Apoli Powers.\r\n\r\n# How to generate the classes:\r\n```py\r\nfrom apoli_python_extension.wiki import update_wiki\r\n\r\nupdate_wiki()\r\n```\r\n\r\n# Datapack Example:\r\n```py\r\n\"\"\"\r\nDemo of Apoli Python Package\r\n\r\nThis is a Demo of my Apoli Python Package to see how long it would take to create a relatively large apoli power.\r\n\r\nThis Power will be a power that applies 3 random status effects whenever you recieve any status effect.\r\n\"\"\"\r\n\r\nstatus_effects = [\r\n    \"speed\", \"slowness\", \"haste\", \"mining_fatigue\",\r\n    \"strength\", \"instant_health\", \"instant_damage\",\r\n    \"jump_boost\", \"nausea\", \"regeneration\",\r\n    \"resistance\", \"fire_resistance\", \"water_breathing\",\r\n    \"invisibility\", \"blindness\", \"night_vision\", \"hunger\",\r\n    \"weakness\", \"poison\", \"wither\", \"health_boost\", \"absorption\",\r\n    \"saturation\", \"glowing\", \"levitation\", \"luck\", \"unluck\",\r\n    \"slow_falling\", \"conduit_power\", \"dolphins_grace\",\r\n    \"bad_omen\", \"hero_of_the_village\", \"darkness\",\r\n]\r\n\r\ndatapack = Datapack(name=\"Test Demo DataPack\", namespace=\"test_demo\")\r\n\r\neffect_actions = []\r\n\r\nfor effect in status_effects:\r\n    effect_actions.append({\r\n        \"element\": ApplyEffectEntityAction(effect=\"minecraft:\" + effect),\r\n        \"weight\": 10\r\n    })\r\n\r\neffect_action = ChoiceAction(actions=effect_actions)\r\n\r\nhas_effect = NbtEntityCondition(nbt=\"{ActiveEffects:[{Ambient:0b}]}\")\r\n\r\nthree_effects = AndAction(actions=[effect_action,effect_action,effect_action])\r\n\r\nrising_power = ActionOverTimePower(rising_action=three_effects, condition=has_effect, name=\"Easily Effected\", description=\"Whenever you gain a potion effect, you gain some random extras\")\r\n\r\ndatapack.add_power(power=rising_power, name=\"random_effect\")\r\n\r\ndatapack.save()\r\n```\r\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "A python package that can create Datapacks and Resourcepacks using Apoli powers.",
    "version": "0.0.1",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "94526587b3b12df5dc2f49f551f74ad3713a51561b8818ba848def6f7f79a057",
                "md5": "4fd74ede3150cb97191ab9d1a91e7e1a",
                "sha256": "026d241ffc50294dfeaf4dd557ea2870219a47a6a5022330093203d644f96a0c"
            },
            "downloads": -1,
            "filename": "apoli_python_extension-0.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "4fd74ede3150cb97191ab9d1a91e7e1a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10300,
            "upload_time": "2023-08-21T19:34:02",
            "upload_time_iso_8601": "2023-08-21T19:34:02.214814Z",
            "url": "https://files.pythonhosted.org/packages/94/52/6587b3b12df5dc2f49f551f74ad3713a51561b8818ba848def6f7f79a057/apoli_python_extension-0.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-21 19:34:02",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "apoli-python-extension"
}
        
Elapsed time: 0.12372s