A python package that can create Datapacks and Resourcepacks using Apoli powers.
Project description
Apoli Python Extension is a python package that allows you to create Datapacks and Resourcepacks using Apoli Powers.
How to generate the classes:
from apoli_python_extension.wiki import update_wiki
update_wiki()
Datapack Example:
"""
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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file apoli_python_extension-0.0.1.tar.gz
.
File metadata
- Download URL: apoli_python_extension-0.0.1.tar.gz
- Upload date:
- Size: 10.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 026d241ffc50294dfeaf4dd557ea2870219a47a6a5022330093203d644f96a0c |
|
MD5 | 4fd74ede3150cb97191ab9d1a91e7e1a |
|
BLAKE2b-256 | 94526587b3b12df5dc2f49f551f74ad3713a51561b8818ba848def6f7f79a057 |