feat: publish pack

This commit is contained in:
newt 2024-08-31 21:19:54 +01:00
commit 2f29f0b2ca
9 changed files with 104 additions and 0 deletions

BIN
bottle.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 MiB

57
license.md Normal file
View file

@ -0,0 +1,57 @@
# 🏳️‍🌈 Opinionated Queer License v1.2
© Copyright [newt](https://newty.dev/)
## Permissions
The creators of this Work (“The Licensor”) grant permission
to any person, group or legal entity that doesn't violate the prohibitions below (“The User”),
to do everything with this Work that would otherwise infringe their copyright or any patent claims,
subject to the following conditions:
## Obligations
The User must give appropriate credit to the Licensor,
provide a copy of this license or a (clickable, if the medium allows) link to
[oql.avris.it/license/v1.2](https://oql.avris.it/license/v1.2),
and indicate whether and what kind of changes were made.
The User may do so in any reasonable manner,
but not in any way that suggests the Licensor endorses the User or their use.
## Prohibitions
No one may use this Work for prejudiced or bigoted purposes, including but not limited to:
racism, xenophobia, queerphobia, queer exclusionism, homophobia, transphobia, enbyphobia, misogyny.
No one may use this Work to inflict or facilitate violence or abuse of human rights,
as defined in either of the following documents:
[Universal Declaration of Human Rights](https://www.un.org/en/about-us/universal-declaration-of-human-rights),
[European Convention on Human Rights](https://prd-echr.coe.int/web/echr/european-convention-on-human-rights)
along with the rulings of the [European Court of Human Rights](https://www.echr.coe.int/).
No law enforcement, carceral institutions, immigration enforcement entities, military entities or military contractors
may use the Work for any reason. This also applies to any individuals employed by those entities.
No business entity where the ratio of pay (salaried, freelance, stocks, or other benefits)
between the highest and lowest individual in the entity is greater than 50 : 1
may use the Work for any reason.
No private business run for profit with more than a thousand employees
may use the Work for any reason.
Unless the User has made substantial changes to the Work,
or uses it only as a part of a new work (eg. as a library, as a part of an anthology, etc.),
they are prohibited from selling the Work.
That prohibition includes processing the Work with machine learning models.
## Sanctions
If the Licensor notifies the User that they have not complied with the rules of the license,
they can keep their license by complying within 30 days after the notice.
If they do not do so, their license ends immediately.
## Warranty
This Work is provided “as is”, without warranty of any kind, express or implied.
The Licensor will not be liable to anyone for any damages related to the Work or this license,
under any kind of legal claim as far as the law allows.

View file

@ -0,0 +1 @@
execute as @a[scores={xpBottleThrow=1..}] run function drinkable_xp:bottle/thrown

View file

@ -0,0 +1,11 @@
# stop the experience bottle from being thrown
execute as @e[type=experience_bottle] run kill @s
stopsound @s * entity.experience_bottle.throw
# add xp and give a bottle
xp add @s 7 points
execute at @s run playsound minecraft:entity.experience_orb.pickup player @p ~ ~ ~ 0.25
execute if score @s giveEmptyBottle matches 0 run give @s minecraft:glass_bottle
# reset the xpBottleThrow score
scoreboard players set @s xpBottleThrow 0

View file

@ -0,0 +1,7 @@
# xp bottle throw counter
scoreboard objectives add xpBottleThrow minecraft.used:minecraft.experience_bottle
# giveEmptyXpBottle trigger
scoreboard objectives add giveEmptyXpBottle trigger
scoreboard players enable @a giveEmptyXpBottle
execute as @a[scores={giveEmptyXpBottle=2..}] run scoreboard players set @s giveEmptyXpBottle 0

View file

@ -0,0 +1,6 @@
{
"values": [
"drinkable_xp:scoreboard/create",
"drinkable_xp:bottle/detect_throw"
]
}

6
pack/pack.mcmeta Normal file
View file

@ -0,0 +1,6 @@
{
"pack": {
"pack_format": 48,
"description": "Drink XP bottles instead of throwing them!"
}
}

BIN
pack/pack.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

16
readme.md Normal file
View file

@ -0,0 +1,16 @@
<div align="center">
<img src="bottle.webp" height="125">
<h1>DrinkableXP</h3>
</div>
This datapack allows you to drink Bottle o' Enchanting to gain experience points instead of throwing them.
Currently supported version: **Minecraft 1.21.1** (pack format 48)
When you right-click with a Bottle o' Enchanting in hand, it consumes the bottle, grants 7 points of experience (the average that a Bottle o' Enchanting provides), and optionally replaces the bottle with an empty glass bottle.
### Configuration
By default, a Bottle o' Enchanting is replaced with an empty glass bottle upon consumption. This can be enabled or disabled on a per player basis by running the `/trigger giveEmptyXpBottle` command.
<sub>This project is licensed with the Opinionated Queer License v1.2 - you can view it <a href="license.md">here</a>.</sub>