fix(canaplia): restaurer le gameplay et les textures historiques #56
@@ -18,7 +18,7 @@ It's Alive fournit l'alias Fabric canaplia et dépend explicitement d'Another Wo
|
||||
|
||||
Les seize clés stables sont common, tender, olive, dark, ashen, moss, gold, amber, bluish, pink, coral, purple, indigo, varieg, lunar et ember.
|
||||
|
||||
Les trois blocs historiques, le type de block entity et les 64 items historiques sont enregistrés une seule fois. Les cultures partagent une croissance à huit âges et conservent leur variante dans le blockstate. Dix têtes identiques dans un composteur produisent le bloc de résine correspondant ; une autre variante est refusée. La résine émet une aura serveur pendant 90 secondes, persiste son temps restant puis disparaît.
|
||||
Les trois blocs historiques, le type de block entity et les 64 items historiques sont enregistrés une seule fois. Les cultures partagent une croissance à huit âges et conservent leur variante dans le blockstate. Dix têtes identiques dans un composteur produisent le bloc de résine correspondant ; une autre variante est refusée. La résine est posée éteinte, s'allume au briquet, à la charge de feu ou avec un projectile enflammé, émet une fumée visible et applique son aura serveur pendant 90 secondes avant de disparaître.
|
||||
|
||||
Les sources sauvages sont chargées depuis data/canaplia/canaplia_discovery/sources.json. Elles fonctionnent lors de la casse de flore dans les chunks existants. Ember est limitée à la flore native du Nether, Indigo aux chorus de l'End, et toutes les variantes Canaplia sont exclues du Shop et des récompenses ordinaires.
|
||||
|
||||
@@ -32,7 +32,7 @@ Ambiance possède les trois payloads historiques canaplia:hemp_visual_sync, cana
|
||||
|
||||
## Codex
|
||||
|
||||
L'item partageable canaplia:codex se fabrique avec un livre et un colorant vert. Son écran distingue les découvertes personnelles des silhouettes connues par la communauté. Les origines génériques et les conditions détaillées se révèlent progressivement sans envoyer de payload de découverte client-vers-serveur.
|
||||
Les monstres tués par un joueur peuvent laisser une `canaplia:codex_page` et, très rarement, le `canaplia:codex` complet. Quatre pages récupérées permettent aussi de relier le Codex autour d'un livre. L'objet utilise la texture du livre Minecraft et son écran repose sur les pages vanilla. Il distingue les découvertes personnelles des silhouettes connues par la communauté ; les origines génériques et les conditions détaillées se révèlent progressivement sans envoyer de payload de découverte client-vers-serveur.
|
||||
|
||||
Les données canaplia:codex sont versionnées. Les clés futures syntaxiquement valides restent conservées lors d'un aller-retour afin qu'une migration ne perde pas les découvertes ajoutées par une version ultérieure.
|
||||
|
||||
@@ -51,8 +51,8 @@ Les données canaplia:codex sont versionnées. Les clés futures syntaxiquement
|
||||
|
||||
## Compatibilité, licence et migrations
|
||||
|
||||
Les IDs historiques, les clés et le namespace sont inchangés. L'ancien format non versionné de canaplia:hemp_bud_composters reste lisible et est réécrit sous une enveloppe v1. Le block entity de résine conserve remaining_burn_ticks. Le Codex utilise sa propre donnée v1. Les protocoles deviennent It's Alive v4 et Ambiance v5.
|
||||
Les IDs historiques, les clés et le namespace sont inchangés. L'ancien format non versionné de canaplia:hemp_bud_composters reste lisible et est réécrit sous une enveloppe v1. Le block entity de résine conserve `remaining_burn_ticks` et migre sa donnée v1 déjà active vers l'état allumé v2. Le Codex utilise sa propre donnée v1. Les protocoles restent It's Alive v4 et Ambiance v5.
|
||||
|
||||
La source historique 2.0.0 demeure **All Rights Reserved**, copyright KOKA99CAB. Aucun fichier Java, modèle, texture, son ou JSON historique n'a été copié. Le code et les palettes 16×16 de cette implémentation sont originaux et restent sous GPL-3.0-or-later.
|
||||
La source historique 2.0.0 demeure **All Rights Reserved**, copyright KOKA99CAB. À la demande explicite du détenteur des droits, ses 224 textures 16×16 ont été restaurées dans l'alpha.209 ; leur provenance est documentée avec les ressources. Aucun fichier Java, modèle, son ou JSON historique n'est copié. Le code d'intégration reste sous GPL-3.0-or-later.
|
||||
|
||||
Les inventaires machine sont dans pack/migrations/canaplia-foundation-alpha32.json et pack/migrations/canaplia-gameplay-alpha33.json. La release `26.2.0-alpha.208` distribue ces contrats via pack/migrations/26.2.0-alpha.207-canaplia-to-alpha.208.json.
|
||||
Les inventaires machine sont dans `pack/migrations/canaplia-foundation-alpha32.json` et `pack/migrations/canaplia-gameplay-alpha33.json`. La release `26.2.0-alpha.209` décrit la correction de gameplay et l'import autorisé dans `pack/migrations/26.2.0-alpha.208-canaplia-fixes-to-alpha.209.json`.
|
||||
|
||||
@@ -6,6 +6,18 @@ Ce journal suit les **versions du modpack**. Lorsqu'un seul module change, sa ve
|
||||
- Depuis `26.2.0-alpha.6`, le pack et les modules ont des versions indépendantes. I Like To Move It et Only Fun deviennent les cinquième et sixième modules actifs dans l'alpha 46.
|
||||
- Les versions ci-dessous ont été reconstituées à partir des JAR archivés, des packs locaux et du code source actuel. Les dates n'étant pas enregistrées de manière fiable, elles ne sont pas inventées.
|
||||
|
||||
## `26.2.0-alpha.209`
|
||||
|
||||
Module modifié : **It's Alive `0.0.0-alpha.34`**. Les neuf autres modules conservent leur version issue de l’alpha.208.
|
||||
|
||||
- restaure les 224 textures 16×16 authored du Canaplia historique, avec provenance et autorisation explicite du détenteur des droits, à la place des palettes procédurales illisibles ;
|
||||
- rétablit la consommation des seize joints avec animation, son, particules de fumée, découverte et effets serveur ;
|
||||
- pose les blocs de résine éteints, permet de les allumer au briquet, à la charge de feu ou avec un projectile enflammé, puis affiche une fumée de feu de camp pendant leur aura de 90 secondes ;
|
||||
- migre sans perte les résines déjà posées par l’alpha.208 vers l’état allumé et porte les données It's Alive en v3 sans changer le protocole réseau 4 ;
|
||||
- remplace l’ancien panneau vert du Codex par l’écran et les pages du livre Minecraft ;
|
||||
- ajoute les pages de Canaplia aux butins des monstres tués par un joueur, un rare butin direct du Codex et une recette livre + quatre pages ;
|
||||
- distribue It's Alive `0.0.0-alpha.34` dans les manifestes Packwiz, Prism et Modrinth du pack alpha.209, sans exiger de nouveau monde.
|
||||
|
||||
## `26.2.0-alpha.208`
|
||||
|
||||
Modules modifiés : **It's Alive `0.0.0-alpha.33`**, **Ambiance `0.0.0-alpha.14`** et **Only Fun `0.0.0-alpha.20`**. Les sept autres modules conservent leur version issue de l’alpha.207.
|
||||
|
||||
@@ -3428,7 +3428,7 @@ tasks.register("verifyProgressivePauseMenuRelease") {
|
||||
[(locale): new JsonSlurper().parse(file(
|
||||
"sanctuary/src/main/resources/assets/sanctuary/lang/${locale}.json"))]
|
||||
}
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.sanctuary_version != "0.0.0-alpha.117"
|
||||
|| rootProject.onlyfun_version != "0.0.0-alpha.20"
|
||||
|| release.pack_version != rootProject.pack_version || index.versionId != rootProject.pack_version
|
||||
@@ -3478,7 +3478,7 @@ tasks.register("verifyMirrorLavenderDrawerRelease") {
|
||||
def redStonerRegistry = file(
|
||||
"redstoner/src/main/java/fr/koka99cab/sanctuary26/redstoner/registry/RedStonerRegistries.java").text
|
||||
def drawerRecipe = file("redstoner/src/main/resources/data/redstoner/recipe/drawer.json")
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.anotherworld_version != "0.0.0-alpha.55"
|
||||
|| rootProject.redstoner_version != "0.0.0-alpha.10"
|
||||
|| release.pack_version != rootProject.pack_version || index.versionId != rootProject.pack_version
|
||||
@@ -4126,7 +4126,7 @@ tasks.register("verifyShopPricingLayoutRelease") {
|
||||
"pack/migrations/26.2.0-alpha.192-shop-pricing-layout-to-alpha.193.json"))
|
||||
def release = new JsonSlurper().parse(file("pack/release.json"))
|
||||
def index = new JsonSlurper().parse(file("pack/prism/modrinth.index.json"))
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.onlyfun_version != "0.0.0-alpha.20"
|
||||
|| rootProject.sanctuary_version != "0.0.0-alpha.117"
|
||||
|| release.pack_version != rootProject.pack_version || index.versionId != rootProject.pack_version
|
||||
@@ -4171,8 +4171,8 @@ tasks.register("verifyCuisineCropsRelease") {
|
||||
def climate = file("itsalive/src/main/java/fr/koka99cab/sanctuary26/itsalive/agriculture/ClimateCropForaging.java").text
|
||||
def rice = file("itsalive/src/main/java/fr/koka99cab/sanctuary26/itsalive/agriculture/RiceCropBlock.java").text
|
||||
def bean = file("itsalive/src/main/java/fr/koka99cab/sanctuary26/itsalive/agriculture/BeanCropBlock.java").text
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.33"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.34"
|
||||
|| release.pack_version != rootProject.pack_version || index.versionId != rootProject.pack_version
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.193"
|
||||
|| migration.source?.modules != [itsalive: "0.0.0-alpha.26"]
|
||||
@@ -4220,7 +4220,7 @@ tasks.register("verifyShopCsvBossGatesRelease") {
|
||||
def bossGate = file("onlyfun/src/main/java/fr/koka99cab/sanctuary26/onlyfun/shop/OnlyFunBossShopGate.java").text
|
||||
def catalog = file("onlyfun/src/main/java/fr/koka99cab/sanctuary26/onlyfun/shop/OnlyFunShopCatalog.java").text
|
||||
def offerCatalog = file("sanctuary/src/main/java/fr/koka99cab/sanctuary26/sanctuary/shop/ShopOfferCatalog.java").text
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.onlyfun_version != "0.0.0-alpha.20"
|
||||
|| rootProject.sanctuary_version != "0.0.0-alpha.117"
|
||||
|| release.pack_version != rootProject.pack_version || index.versionId != rootProject.pack_version
|
||||
@@ -4266,7 +4266,7 @@ tasks.register("verifyCulinaryMailboxGrappleFixesRelease") {
|
||||
def release = new JsonSlurper().parse(file("pack/release.json"))
|
||||
def prism = new JsonSlurper().parse(file("pack/prism/modrinth.index.json"))
|
||||
def packwiz = file("pack/packwiz/pack.toml").text
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.195"
|
||||
|| migration.target?.pack_version != "26.2.0-alpha.196"
|
||||
|| migration.target?.modules != [
|
||||
@@ -4284,10 +4284,10 @@ tasks.register("verifyCulinaryMailboxGrappleFixesRelease") {
|
||||
|| migration.distribution?.jei?.target != "30.26.0.182"
|
||||
|| migration.compatibility?.save_migration_required != false
|
||||
|| migration.compatibility?.registry_ids_changed != false
|
||||
|| release.pack_version != "26.2.0-alpha.208"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.208"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')) {
|
||||
|| release.pack_version != "26.2.0-alpha.209"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.209"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')) {
|
||||
throw new GradleException("The alpha.196 culinary, mailbox and grapple release contract is incomplete")
|
||||
}
|
||||
}
|
||||
@@ -4312,8 +4312,8 @@ tasks.register("verifyQuestRequestsCauldronBatchesRelease") {
|
||||
def prism = new JsonSlurper().parse(file("pack/prism/modrinth.index.json"))
|
||||
def packwiz = file("pack/packwiz/pack.toml").text
|
||||
def sanctuaryManifest = new JsonSlurper().parse(file("sanctuary/src/main/resources/fabric.mod.json"))
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.33"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.34"
|
||||
|| rootProject.sanctuary_version != "0.0.0-alpha.117"
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.196"
|
||||
|| migration.target?.pack_version != "26.2.0-alpha.197"
|
||||
@@ -4332,10 +4332,10 @@ tasks.register("verifyQuestRequestsCauldronBatchesRelease") {
|
||||
|| migration.distribution?.jei?.target != "30.26.0.186"
|
||||
|| migration.compatibility?.sanctuary_target_network_protocol != 19
|
||||
|| sanctuaryManifest.custom?.sanctuary26?.network_protocol != 21
|
||||
|| release.pack_version != "26.2.0-alpha.208"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.208"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')) {
|
||||
|| release.pack_version != "26.2.0-alpha.209"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.209"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')) {
|
||||
throw new GradleException("The alpha.197 quest-request and cauldron-batch release contract is incomplete")
|
||||
}
|
||||
}
|
||||
@@ -4362,8 +4362,8 @@ tasks.register("verifyFermentationBarrelAutomationRelease") {
|
||||
def packwiz = file("pack/packwiz/pack.toml").text
|
||||
def packwizIndex = file("pack/packwiz/index.toml").text
|
||||
def itsAliveManifest = new JsonSlurper().parse(file("itsalive/src/main/resources/fabric.mod.json"))
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.33"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.34"
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.197"
|
||||
|| migration.target?.pack_version != "26.2.0-alpha.198"
|
||||
|| migration.target?.modules != [itsalive: "0.0.0-alpha.30", sanctuary: "0.0.0-alpha.114"]
|
||||
@@ -4379,13 +4379,13 @@ tasks.register("verifyFermentationBarrelAutomationRelease") {
|
||||
|| migration.compatibility?.save_migration_required != false
|
||||
|| migration.compatibility?.registry_ids_changed != false
|
||||
|| migration.distribution?.packwiz_index_refreshed != true
|
||||
|| itsAliveManifest.custom?.sanctuary26?.data_version != 2
|
||||
|| itsAliveManifest.custom?.sanctuary26?.data_version != 3
|
||||
|| itsAliveManifest.custom?.sanctuary26?.network_protocol != 4
|
||||
|| release.pack_version != "26.2.0-alpha.208"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.208"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')
|
||||
|| !packwizIndex.contains('file = "mods/itsalive-0.0.0-alpha.33.jar"')) {
|
||||
|| release.pack_version != "26.2.0-alpha.209"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.209"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')
|
||||
|| !packwizIndex.contains('file = "mods/itsalive-0.0.0-alpha.34.jar"')) {
|
||||
throw new GradleException("The alpha.198 fermentation barrel release contract is incomplete")
|
||||
}
|
||||
}
|
||||
@@ -4412,8 +4412,8 @@ tasks.register("verifyQuestRequestContractsRelease") {
|
||||
def packwiz = file("pack/packwiz/pack.toml").text
|
||||
def packwizIndex = file("pack/packwiz/index.toml").text
|
||||
def sanctuaryManifest = new JsonSlurper().parse(file("sanctuary/src/main/resources/fabric.mod.json"))
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.33"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.34"
|
||||
|| rootProject.sanctuary_version != "0.0.0-alpha.117"
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.198"
|
||||
|| migration.source?.modules?.sanctuary != "0.0.0-alpha.114"
|
||||
@@ -4426,11 +4426,11 @@ tasks.register("verifyQuestRequestContractsRelease") {
|
||||
|| migration.quest_request_contracts?.chat_accept_revalidates_distance_owner_sign_and_claim != true
|
||||
|| migration.compatibility?.sanctuary_target_network_protocol != 20
|
||||
|| sanctuaryManifest.custom?.sanctuary26?.network_protocol != 21
|
||||
|| release.pack_version != "26.2.0-alpha.208"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.208"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')
|
||||
|| !packwizIndex.contains('file = "mods/itsalive-0.0.0-alpha.33.jar"')
|
||||
|| release.pack_version != "26.2.0-alpha.209"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.209"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')
|
||||
|| !packwizIndex.contains('file = "mods/itsalive-0.0.0-alpha.34.jar"')
|
||||
|| !packwizIndex.contains('file = "mods/sanctuary-0.0.0-alpha.117.jar"')) {
|
||||
throw new GradleException("The alpha.199 quest-request contract release is incomplete")
|
||||
}
|
||||
@@ -4467,7 +4467,7 @@ tasks.register("verifyWeatherTntAmbianceRelease") {
|
||||
def ambianceManifest = new JsonSlurper().parse(file("ambiance/src/main/resources/fabric.mod.json"))
|
||||
def ouchManifest = new JsonSlurper().parse(file("ouch/src/main/resources/fabric.mod.json"))
|
||||
def rootBuild = file("build.gradle").text
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.ambiance_version != "0.0.0-alpha.14"
|
||||
|| rootProject.ouch_version != "0.0.0-alpha.9"
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.199"
|
||||
@@ -4501,10 +4501,10 @@ tasks.register("verifyWeatherTntAmbianceRelease") {
|
||||
|| !weatherTnt.contains("AmbianceDailyWeather.CLEAR")
|
||||
|| !weatherTnt.contains("CLEAR_WEATHER_TICKS = 864_000")
|
||||
|| weatherTnt.contains("setWeatherParameters")
|
||||
|| release.pack_version != "26.2.0-alpha.208"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.208"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')
|
||||
|| release.pack_version != "26.2.0-alpha.209"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.209"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')
|
||||
|| !packwizIndex.contains('file = "mods/ambiance-0.0.0-alpha.14.jar"')
|
||||
|| !packwizIndex.contains('file = "mods/ouch-0.0.0-alpha.9.jar"')) {
|
||||
throw new GradleException("The alpha.200 Weather TNT and Ambiance release is incomplete")
|
||||
@@ -4533,7 +4533,7 @@ tasks.register("verifyQuestRequestEscrowRelease") {
|
||||
def packwiz = file("pack/packwiz/pack.toml").text
|
||||
def packwizIndex = file("pack/packwiz/index.toml").text
|
||||
def sanctuaryManifest = new JsonSlurper().parse(file("sanctuary/src/main/resources/fabric.mod.json"))
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.sanctuary_version != "0.0.0-alpha.117"
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.200"
|
||||
|| migration.source?.modules?.sanctuary != "0.0.0-alpha.115"
|
||||
@@ -4548,10 +4548,10 @@ tasks.register("verifyQuestRequestEscrowRelease") {
|
||||
|| migration.compatibility?.sanctuary_target_network_protocol != 21
|
||||
|| sanctuaryManifest.custom?.sanctuary26?.data_version != 11
|
||||
|| sanctuaryManifest.custom?.sanctuary26?.network_protocol != 21
|
||||
|| release.pack_version != "26.2.0-alpha.208"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.208"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')
|
||||
|| release.pack_version != "26.2.0-alpha.209"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.209"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')
|
||||
|| !packwizIndex.contains('file = "mods/sanctuary-0.0.0-alpha.117.jar"')) {
|
||||
throw new GradleException("The alpha.201 quest-request escrow release is incomplete")
|
||||
}
|
||||
@@ -4587,9 +4587,9 @@ tasks.register("verifyWaystoneShopCulinaryAlpha202Release") {
|
||||
"iliketomoveit/src/main/resources/fabric.mod.json"))
|
||||
def sanctuaryManifest = new JsonSlurper().parse(file(
|
||||
"sanctuary/src/main/resources/fabric.mod.json"))
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.anotherworld_version != "0.0.0-alpha.55"
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.33"
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.34"
|
||||
|| rootProject.iliketomoveit_version != "0.0.0-alpha.14"
|
||||
|| rootProject.sanctuary_version != "0.0.0-alpha.117"
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.201"
|
||||
@@ -4621,18 +4621,18 @@ tasks.register("verifyWaystoneShopCulinaryAlpha202Release") {
|
||||
|| migration.compatibility?.sanctuary_network_protocol != 21
|
||||
|| migration.compatibility?.save_migration_required != false
|
||||
|| migration.compatibility?.registry_ids_changed != false
|
||||
|| itsAliveManifest.custom?.sanctuary26?.data_version != 2
|
||||
|| itsAliveManifest.custom?.sanctuary26?.data_version != 3
|
||||
|| itsAliveManifest.custom?.sanctuary26?.network_protocol != 4
|
||||
|| moveItManifest.custom?.sanctuary26?.data_version != 3
|
||||
|| moveItManifest.custom?.sanctuary26?.network_protocol != 5
|
||||
|| sanctuaryManifest.custom?.sanctuary26?.data_version != 11
|
||||
|| sanctuaryManifest.custom?.sanctuary26?.network_protocol != 21
|
||||
|| release.pack_version != "26.2.0-alpha.208"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.208"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')
|
||||
|| release.pack_version != "26.2.0-alpha.209"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != "26.2.0-alpha.209"
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')
|
||||
|| !packwizIndex.contains('file = "mods/anotherworld-0.0.0-alpha.55.jar"')
|
||||
|| !packwizIndex.contains('file = "mods/itsalive-0.0.0-alpha.33.jar"')
|
||||
|| !packwizIndex.contains('file = "mods/itsalive-0.0.0-alpha.34.jar"')
|
||||
|| !packwizIndex.contains('file = "mods/iliketomoveit-0.0.0-alpha.14.jar"')
|
||||
|| !packwizIndex.contains('file = "mods/sanctuary-0.0.0-alpha.117.jar"')) {
|
||||
throw new GradleException("The alpha.202 Waystone, Shop and culinary lectern release is incomplete")
|
||||
@@ -4747,7 +4747,7 @@ tasks.register("verifySafeVaultFeature") {
|
||||
def image = javax.imageio.ImageIO.read(file("anotherworld/src/main/resources/assets/anotherworld/textures/${path}"))
|
||||
image == null || image.width != size[0] || image.height != size[1]
|
||||
}.keySet()
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.anotherworld_version != "0.0.0-alpha.55"
|
||||
|| rootProject.sanctuary_version != "0.0.0-alpha.117"
|
||||
|| migration.schema_version != 1
|
||||
@@ -4939,7 +4939,7 @@ tasks.register("verifySafeVaultInterfaceAlpha203Release") {
|
||||
def packwiz = file("pack/packwiz/pack.toml").text
|
||||
def packwizIndex = file("pack/packwiz/index.toml").text
|
||||
def jeiFiles = prism.files.findAll { it.path == "mods/jei-26.2-fabric-30.28.0.191.jar" }
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.anotherworld_version != "0.0.0-alpha.55"
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.202"
|
||||
|| migration.source?.modules != [anotherworld: "0.0.0-alpha.50"]
|
||||
@@ -4957,9 +4957,9 @@ tasks.register("verifySafeVaultInterfaceAlpha203Release") {
|
||||
|| migration.distribution?.jei?.modrinth_version_id != "XXTFqqwG"
|
||||
|| migration.distribution?.jei?.prism_manifest_updated != true
|
||||
|| release.pack_version != rootProject.pack_version
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != rootProject.pack_version
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')
|
||||
|| !packwizIndex.contains('file = "mods/anotherworld-0.0.0-alpha.55.jar"')
|
||||
|| packwizIndex.contains('file = "mods/anotherworld-0.0.0-alpha.50.jar"')
|
||||
|| jeiFiles.size() != 1
|
||||
@@ -4985,7 +4985,7 @@ tasks.register("verifySafeVaultFixAlpha204Release") {
|
||||
def packwiz = file("pack/packwiz/pack.toml").text
|
||||
def packwizIndex = file("pack/packwiz/index.toml").text
|
||||
def jeiFiles = prism.files.findAll { it.path == "mods/jei-26.2-fabric-30.28.0.191.jar" }
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.anotherworld_version != "0.0.0-alpha.55"
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.203"
|
||||
|| migration.source?.modules != [anotherworld: "0.0.0-alpha.51"]
|
||||
@@ -5011,9 +5011,9 @@ tasks.register("verifySafeVaultFixAlpha204Release") {
|
||||
|| migration.distribution?.jei?.modrinth_version_id != "OcMayhUH"
|
||||
|| migration.distribution?.jei?.prism_manifest_updated != true
|
||||
|| release.pack_version != rootProject.pack_version
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != rootProject.pack_version
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')
|
||||
|| !packwizIndex.contains('file = "mods/anotherworld-0.0.0-alpha.55.jar"')
|
||||
|| packwizIndex.contains('file = "mods/anotherworld-0.0.0-alpha.51.jar"')
|
||||
|| jeiFiles.size() != 1
|
||||
@@ -5039,7 +5039,7 @@ tasks.register("verifySafeVaultCubeAlpha205Release") {
|
||||
def packwiz = file("pack/packwiz/pack.toml").text
|
||||
def packwizIndex = file("pack/packwiz/index.toml").text
|
||||
def jeiFiles = prism.files.findAll { it.path == "mods/jei-26.2-fabric-30.28.0.191.jar" }
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.anotherworld_version != "0.0.0-alpha.55"
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.204"
|
||||
|| migration.source?.modules != [anotherworld: "0.0.0-alpha.52"]
|
||||
@@ -5068,9 +5068,9 @@ tasks.register("verifySafeVaultCubeAlpha205Release") {
|
||||
|| migration.distribution?.jei?.modrinth_version_id != "NtfJDMhk"
|
||||
|| migration.distribution?.jei?.prism_manifest_updated != true
|
||||
|| release.pack_version != rootProject.pack_version
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != rootProject.pack_version
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')
|
||||
|| !packwizIndex.contains('file = "mods/anotherworld-0.0.0-alpha.55.jar"')
|
||||
|| packwizIndex.contains('file = "mods/anotherworld-0.0.0-alpha.52.jar"')
|
||||
|| jeiFiles.size() != 1
|
||||
@@ -5097,7 +5097,7 @@ tasks.register("verifySafeVaultCtmAlpha206Release") {
|
||||
def packwiz = file("pack/packwiz/pack.toml").text
|
||||
def packwizIndex = file("pack/packwiz/index.toml").text
|
||||
def jeiFiles = prism.files.findAll { it.path == "mods/jei-26.2-fabric-30.28.0.191.jar" }
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.anotherworld_version != "0.0.0-alpha.55"
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.205"
|
||||
|| migration.source?.modules != [anotherworld: "0.0.0-alpha.53"]
|
||||
@@ -5120,9 +5120,9 @@ tasks.register("verifySafeVaultCtmAlpha206Release") {
|
||||
|| migration.compatibility?.pack_release_updated != true
|
||||
|| migration.distribution?.packwiz_index_refreshed != true
|
||||
|| release.pack_version != rootProject.pack_version
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != rootProject.pack_version
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')
|
||||
|| !packwizIndex.contains('file = "mods/anotherworld-0.0.0-alpha.55.jar"')
|
||||
|| packwizIndex.contains('file = "mods/anotherworld-0.0.0-alpha.53.jar"')
|
||||
|| jeiFiles.size() != 1
|
||||
@@ -5149,7 +5149,7 @@ tasks.register("verifySafeVaultUnlimitedAlpha207Release") {
|
||||
def packwiz = file("pack/packwiz/pack.toml").text
|
||||
def packwizIndex = file("pack/packwiz/index.toml").text
|
||||
def jeiFiles = prism.files.findAll { it.path == "mods/jei-26.2-fabric-30.28.0.191.jar" }
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.anotherworld_version != "0.0.0-alpha.55"
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.206"
|
||||
|| migration.source?.modules != [anotherworld: "0.0.0-alpha.54"]
|
||||
@@ -5179,9 +5179,9 @@ tasks.register("verifySafeVaultUnlimitedAlpha207Release") {
|
||||
|| migration.compatibility?.pack_release_updated != true
|
||||
|| migration.distribution?.packwiz_index_refreshed != true
|
||||
|| release.pack_version != rootProject.pack_version
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != rootProject.pack_version
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')
|
||||
|| !packwizIndex.contains('file = "mods/anotherworld-0.0.0-alpha.55.jar"')
|
||||
|| packwizIndex.contains('file = "mods/anotherworld-0.0.0-alpha.54.jar"')
|
||||
|| jeiFiles.size() != 1
|
||||
@@ -5237,8 +5237,8 @@ tasks.register("verifyCanapliaFoundation") {
|
||||
"itsalive/src/main/java/fr/koka99cab/sanctuary26/itsalive/ItsAliveMod.java").text
|
||||
def visualApiSource = file(
|
||||
"ambiance/src/main/java/fr/koka99cab/sanctuary26/ambiance/api/visual/AmbianceVisualEffectApi.java").text
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.33"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.34"
|
||||
|| rootProject.ambiance_version != "0.0.0-alpha.14"
|
||||
|| migration.issue != 35
|
||||
|| migration.source?.fabric_id != "canaplia"
|
||||
@@ -5282,7 +5282,7 @@ tasks.register("verifyCanapliaFoundation") {
|
||||
|| itsAliveManifest.provides != ["canaplia"]
|
||||
|| itsAliveManifest.depends?.ambiance != ">=0.0.0-alpha.14"
|
||||
|| itsAliveManifest.depends?.sanctuary != ">=0.0.0-alpha.117"
|
||||
|| itsAliveManifest.custom?.sanctuary26?.data_version != 2
|
||||
|| itsAliveManifest.custom?.sanctuary26?.data_version != 3
|
||||
|| itsAliveManifest.custom?.sanctuary26?.network_protocol != 4
|
||||
|| ambianceManifest.custom?.sanctuary26?.data_version != 2
|
||||
|| ambianceManifest.custom?.sanctuary26?.network_protocol != 5
|
||||
@@ -5302,7 +5302,7 @@ tasks.register("verifyCanapliaFoundation") {
|
||||
|
||||
tasks.named("verifyWorkspace") {
|
||||
dependsOn "verifyCanapliaGameplay"
|
||||
dependsOn "verifyCanapliaAlpha208Release"
|
||||
dependsOn "verifyCanapliaAlpha209Release"
|
||||
dependsOn tasks.named("verifyWaystoneShopCulinaryAlpha202Release")
|
||||
dependsOn tasks.named("verifySafeVaultFeature")
|
||||
dependsOn tasks.named("verifySafeVaultInterfaceAlpha203Release")
|
||||
@@ -5321,6 +5321,7 @@ tasks.register("verifyCanapliaGameplay") {
|
||||
inputs.file(file("pack/migrations/canaplia-gameplay-alpha33.json"))
|
||||
inputs.file(file("itsalive/src/main/resources/data/canaplia/canaplia_discovery/sources.json"))
|
||||
inputs.files(fileTree("itsalive/src/main/resources/assets/canaplia/lang") { include "*.json" })
|
||||
inputs.files(fileTree("itsalive/src/main/resources/assets/canaplia/textures") { include "**/*.png" })
|
||||
inputs.files(fileTree("ambiance/src/main/resources/assets/ambiance/lang") { include "*.json" })
|
||||
inputs.files(
|
||||
file("itsalive/src/main/resources/fabric.mod.json"),
|
||||
@@ -5341,15 +5342,20 @@ tasks.register("verifyCanapliaGameplay") {
|
||||
def jointRecipes = fileTree(new File(generated, "data/canaplia/recipe")) {
|
||||
include "*rolled_joint.json"
|
||||
}.files
|
||||
def generatedTextures = fileTree(new File(generated, "assets/canaplia/textures")) {
|
||||
def authoredTextures = fileTree(file("itsalive/src/main/resources/assets/canaplia/textures")) {
|
||||
include "**/*.png"
|
||||
}.files
|
||||
def cropState = new JsonSlurper().parse(new File(generated, "assets/canaplia/blockstates/hemp_crop.json"))
|
||||
def resinState = new JsonSlurper().parse(new File(generated, "assets/canaplia/blockstates/resin_block.json"))
|
||||
def codexRecipe = new JsonSlurper().parse(new File(generated, "data/canaplia/recipe/codex.json"))
|
||||
def requiredCodexKeys = [
|
||||
"screen.canaplia.codex.introduction", "screen.canaplia.codex.entry_number",
|
||||
"screen.canaplia.codex.origin", "item.canaplia.codex_page"
|
||||
]
|
||||
def languageKeysMissing = ["fr_fr", "en_us", "ru_ru"].collectMany { locale ->
|
||||
def lang = new JsonSlurper().parse(file(
|
||||
"itsalive/src/main/resources/assets/canaplia/lang/${locale}.json"))
|
||||
expectedVariants.collectMany { variant ->
|
||||
def missing = expectedVariants.collectMany { variant ->
|
||||
[
|
||||
"variant.canaplia.${variant}",
|
||||
"origin.canaplia.${variant}",
|
||||
@@ -5360,6 +5366,7 @@ tasks.register("verifyCanapliaGameplay") {
|
||||
"item.canaplia.${familyPath(variant, 'rolled_joint')}"
|
||||
].findAll { key -> !lang.containsKey(key.toString()) }.collect { "${locale}:${it}" }
|
||||
}
|
||||
missing + requiredCodexKeys.findAll { !lang.containsKey(it) }.collect { "${locale}:${it}" }
|
||||
}
|
||||
def accessibilityMissing = ["fr_fr", "en_us", "ru_ru"].collectMany { locale ->
|
||||
def lang = new JsonSlurper().parse(file(
|
||||
@@ -5384,6 +5391,16 @@ tasks.register("verifyCanapliaGameplay") {
|
||||
"itsalive/src/main/java/fr/koka99cab/sanctuary26/itsalive/canaplia/CanapliaEffects.java").text
|
||||
def knowledge = file(
|
||||
"itsalive/src/main/java/fr/koka99cab/sanctuary26/itsalive/canaplia/CanapliaKnowledgeData.java").text
|
||||
def joint = file(
|
||||
"itsalive/src/main/java/fr/koka99cab/sanctuary26/itsalive/canaplia/item/CanapliaJointItem.java").text
|
||||
def resin = file(
|
||||
"itsalive/src/main/java/fr/koka99cab/sanctuary26/itsalive/canaplia/block/CanapliaResinBlock.java").text
|
||||
def resinEntity = file(
|
||||
"itsalive/src/main/java/fr/koka99cab/sanctuary26/itsalive/canaplia/block/CanapliaResinBlockEntity.java").text
|
||||
def codexDrops = file(
|
||||
"itsalive/src/main/java/fr/koka99cab/sanctuary26/itsalive/canaplia/CanapliaCodexDrops.java").text
|
||||
def codexScreen = file(
|
||||
"itsalive/src/main/java/fr/koka99cab/sanctuary26/itsalive/canaplia/client/CanapliaCodexScreen.java").text
|
||||
if (migration.issues != (36..43).toList()
|
||||
|| migration.target?.modules != [
|
||||
itsalive: "0.0.0-alpha.33", ambiance: "0.0.0-alpha.14", onlyfun: "0.0.0-alpha.20"]
|
||||
@@ -5395,7 +5412,7 @@ tasks.register("verifyCanapliaGameplay") {
|
||||
|| migration.compatibility?.save_reset_required != false
|
||||
|| migration.compatibility?.historical_registry_ids_changed != false
|
||||
|| migration.compatibility?.pack_release_updated != false
|
||||
|| itsAliveManifest.custom?.sanctuary26?.data_version != 2
|
||||
|| itsAliveManifest.custom?.sanctuary26?.data_version != 3
|
||||
|| itsAliveManifest.custom?.sanctuary26?.network_protocol != 4
|
||||
|| ambianceManifest.custom?.sanctuary26?.network_protocol != 5
|
||||
|| discovery.schema_version != 1 || discovery.sources.size() > 128
|
||||
@@ -5406,16 +5423,27 @@ tasks.register("verifyCanapliaGameplay") {
|
||||
|| !discoveryBlocks.containsAll(requiredDimensionalBlocks)
|
||||
|| jointRecipes.size() != 16
|
||||
|| !new File(generated, "data/canaplia/recipe/codex.json").isFile()
|
||||
|| !new File(generated, "assets/canaplia/items/codex_page.json").isFile()
|
||||
|| codexRecipe.type != "minecraft:crafting_shaped"
|
||||
|| codexRecipe.pattern != [" P ", "PBP", " P "]
|
||||
|| codexRecipe.key?.P != "canaplia:codex_page"
|
||||
|| cropState.variants.size() != 16 * 8
|
||||
|| resinState.variants.size() != 16
|
||||
|| generatedTextures.size() != 16 * 15 + 1
|
||||
|| generatedTextures.any {
|
||||
|| authoredTextures.size() != 224
|
||||
|| authoredTextures.any {
|
||||
def image = javax.imageio.ImageIO.read(it)
|
||||
image == null || image.width != 16 || image.height != 16
|
||||
}
|
||||
|| !languageKeysMissing.isEmpty()
|
||||
|| !accessibilityMissing.isEmpty()
|
||||
|| !content.contains("new ArrayList<>(65)")
|
||||
|| !content.contains("new ArrayList<>(66)")
|
||||
|| !joint.contains("ItemUtils.startUsingInstantly")
|
||||
|| !joint.contains("ParticleTypes.SMOKE")
|
||||
|| !resin.contains("Items.FLINT_AND_STEEL")
|
||||
|| !resin.contains("ParticleTypes.CAMPFIRE_COSY_SMOKE")
|
||||
|| !resinEntity.contains("CanapliaResinBlock.LIT")
|
||||
|| !codexDrops.contains("ServerLivingEntityEvents.AFTER_DEATH")
|
||||
|| !codexScreen.contains("extends BookViewScreen")
|
||||
|| !harvesting.contains("NEIGHBOR_RADIUS = 1")
|
||||
|| !effects.contains("ServerPlayConnectionEvents.DISCONNECT")
|
||||
|| !knowledge.contains("unknown future keys survive round-trips")
|
||||
@@ -5427,10 +5455,11 @@ tasks.register("verifyCanapliaGameplay") {
|
||||
}
|
||||
}
|
||||
|
||||
tasks.register("verifyCanapliaAlpha208Release") {
|
||||
tasks.register("verifyCanapliaAlpha209Release") {
|
||||
group = "verification"
|
||||
description = "Checks the Sanctuary 26.2.0-alpha.208 Canaplia distribution release."
|
||||
description = "Checks the Sanctuary 26.2.0-alpha.209 Canaplia gameplay and texture correction release."
|
||||
inputs.file(file("pack/migrations/26.2.0-alpha.207-canaplia-to-alpha.208.json"))
|
||||
inputs.file(file("pack/migrations/26.2.0-alpha.208-canaplia-fixes-to-alpha.209.json"))
|
||||
inputs.file(file("pack/release.json"))
|
||||
inputs.file(file("pack/prism/modrinth.index.json"))
|
||||
inputs.file(file("pack/packwiz/pack.toml"))
|
||||
@@ -5438,6 +5467,8 @@ tasks.register("verifyCanapliaAlpha208Release") {
|
||||
doLast {
|
||||
def migration = new JsonSlurper().parse(file(
|
||||
"pack/migrations/26.2.0-alpha.207-canaplia-to-alpha.208.json"))
|
||||
def fixMigration = new JsonSlurper().parse(file(
|
||||
"pack/migrations/26.2.0-alpha.208-canaplia-fixes-to-alpha.209.json"))
|
||||
def release = new JsonSlurper().parse(file("pack/release.json"))
|
||||
def prism = new JsonSlurper().parse(file("pack/prism/modrinth.index.json"))
|
||||
def packwiz = file("pack/packwiz/pack.toml").text
|
||||
@@ -5453,9 +5484,9 @@ tasks.register("verifyCanapliaAlpha208Release") {
|
||||
ambiance: "0.0.0-alpha.14",
|
||||
itsalive: "0.0.0-alpha.33",
|
||||
onlyfun: "0.0.0-alpha.20"]
|
||||
if (rootProject.pack_version != "26.2.0-alpha.208"
|
||||
if (rootProject.pack_version != "26.2.0-alpha.209"
|
||||
|| rootProject.ambiance_version != expectedTarget.ambiance
|
||||
|| rootProject.itsalive_version != expectedTarget.itsalive
|
||||
|| rootProject.itsalive_version != "0.0.0-alpha.34"
|
||||
|| rootProject.onlyfun_version != expectedTarget.onlyfun
|
||||
|| migration.source?.pack_version != "26.2.0-alpha.207"
|
||||
|| migration.source?.modules != expectedSource
|
||||
@@ -5485,20 +5516,35 @@ tasks.register("verifyCanapliaAlpha208Release") {
|
||||
|| migration.distribution?.jei?.release_type != "beta"
|
||||
|| migration.distribution?.jei?.modrinth_version_id != "FQUVLzeD"
|
||||
|| migration.distribution?.jei?.packwiz_and_prism_synchronized != true
|
||||
|| fixMigration.source?.pack_version != "26.2.0-alpha.208"
|
||||
|| fixMigration.source?.modules != [itsalive: "0.0.0-alpha.33"]
|
||||
|| fixMigration.target?.pack_version != "26.2.0-alpha.209"
|
||||
|| fixMigration.target?.modules != [itsalive: "0.0.0-alpha.34"]
|
||||
|| fixMigration.canaplia?.authored_textures_restored != 224
|
||||
|| fixMigration.canaplia?.texture_authorization != "explicit_copyright_holder_request"
|
||||
|| fixMigration.canaplia?.rolled_joints_consumable != true
|
||||
|| fixMigration.canaplia?.resin_requires_ignition != true
|
||||
|| fixMigration.canaplia?.codex_uses_vanilla_book_screen != true
|
||||
|| fixMigration.canaplia?.codex_page_item != "canaplia:codex_page"
|
||||
|| fixMigration.compatibility?.legacy_burning_resins_migrated_to_lit != true
|
||||
|| fixMigration.compatibility?.itsalive_target_data_version != 3
|
||||
|| fixMigration.compatibility?.itsalive_network_protocol != 4
|
||||
|| fixMigration.compatibility?.network_protocol_changed != false
|
||||
|| fixMigration.distribution?.pack_release_updated != true
|
||||
|| release.pack_version != rootProject.pack_version
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.208.mrpack"
|
||||
|| release.modrinth?.primary_file != "sanctuary-26.2.0-alpha.209.mrpack"
|
||||
|| prism.versionId != rootProject.pack_version
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.208"')
|
||||
|| !packwiz.contains('version = "26.2.0-alpha.209"')
|
||||
|| !packwizIndex.contains('file = "mods/ambiance-0.0.0-alpha.14.jar"')
|
||||
|| !packwizIndex.contains('file = "mods/itsalive-0.0.0-alpha.33.jar"')
|
||||
|| !packwizIndex.contains('file = "mods/itsalive-0.0.0-alpha.34.jar"')
|
||||
|| !packwizIndex.contains('file = "mods/onlyfun-0.0.0-alpha.20.jar"')
|
||||
|| packwizIndex.contains('file = "mods/ambiance-0.0.0-alpha.12.jar"')
|
||||
|| packwizIndex.contains('file = "mods/itsalive-0.0.0-alpha.31.jar"')
|
||||
|| packwizIndex.contains('file = "mods/itsalive-0.0.0-alpha.33.jar"')
|
||||
|| packwizIndex.contains('file = "mods/onlyfun-0.0.0-alpha.19.jar"')
|
||||
|| jeiFiles.size() != 1
|
||||
|| jeiFiles[0].hashes?.sha1 != "35353e18b1cf2a61339463447fce1f3e2f716b80"
|
||||
|| jeiFiles[0].hashes?.sha512 != "aa7dca89026fea2293a2e25fa4a84faf0eeaa6407b7e84991e69626ff1ee0f9df9ba3a5e096cbf631d08842693b115653c5c8373e5ef3953318a892dbdc0a33d") {
|
||||
throw new GradleException("The alpha.208 Canaplia distribution release is incomplete")
|
||||
throw new GradleException("The alpha.209 Canaplia correction release is incomplete")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ redstoner_version=0.0.0-alpha.10
|
||||
redstoner_lifecycle=active
|
||||
anotherworld_version=0.0.0-alpha.55
|
||||
anotherworld_lifecycle=active
|
||||
itsalive_version=0.0.0-alpha.33
|
||||
itsalive_version=0.0.0-alpha.34
|
||||
itsalive_lifecycle=active
|
||||
ouch_version=0.0.0-alpha.9
|
||||
ouch_lifecycle=active
|
||||
@@ -30,5 +30,5 @@ onlyfun_version=0.0.0-alpha.20
|
||||
onlyfun_lifecycle=active
|
||||
sanctuary_version=0.0.0-alpha.117
|
||||
sanctuary_lifecycle=active
|
||||
pack_version=26.2.0-alpha.208
|
||||
pack_version=26.2.0-alpha.209
|
||||
maven_group=fr.koka99cab.sanctuary26
|
||||
|
||||
@@ -52,19 +52,15 @@ sourceSets.main.resources.srcDir(generatedResources)
|
||||
sourceSets.main.resources.srcDir(generatedCanapliaResources)
|
||||
|
||||
def canapliaVariants = [
|
||||
[key: "common", color: 0x5F9E55], [key: "tender", color: 0xA7D88B],
|
||||
[key: "olive", color: 0x8A8C3B], [key: "dark", color: 0x384A42],
|
||||
[key: "ashen", color: 0xA9B5B5], [key: "moss", color: 0x397B4B],
|
||||
[key: "gold", color: 0xE4B83E], [key: "amber", color: 0xD57A2E],
|
||||
[key: "bluish", color: 0x64A8C8], [key: "pink", color: 0xE889A8],
|
||||
[key: "coral", color: 0xE16E62], [key: "purple", color: 0x8154A8],
|
||||
[key: "indigo", color: 0x494E9C], [key: "varieg", color: 0xD6E26C],
|
||||
[key: "lunar", color: 0xC7D8F2], [key: "ember", color: 0xD94B31]
|
||||
[key: "common"], [key: "tender"], [key: "olive"], [key: "dark"],
|
||||
[key: "ashen"], [key: "moss"], [key: "gold"], [key: "amber"],
|
||||
[key: "bluish"], [key: "pink"], [key: "coral"], [key: "purple"],
|
||||
[key: "indigo"], [key: "varieg"], [key: "lunar"], [key: "ember"]
|
||||
]
|
||||
|
||||
tasks.register("generateCanapliaResources") {
|
||||
group = "build"
|
||||
description = "Generates the GPL Canaplia models, loot, recipes and sixteen original palettes."
|
||||
description = "Generates models, loot and recipes around the restored authored Canaplia sprites."
|
||||
outputs.dir(generatedCanapliaResources)
|
||||
|
||||
doLast {
|
||||
@@ -75,21 +71,12 @@ tasks.register("generateCanapliaResources") {
|
||||
target.parentFile.mkdirs()
|
||||
target.text = JsonOutput.prettyPrint(JsonOutput.toJson(value)) + "\n"
|
||||
}
|
||||
def writePng = { String relativePath, Closure painter ->
|
||||
def target = new File(root, relativePath)
|
||||
target.parentFile.mkdirs()
|
||||
def image = new java.awt.image.BufferedImage(16, 16, java.awt.image.BufferedImage.TYPE_INT_ARGB)
|
||||
painter(image)
|
||||
ImageIO.write(image, "png", target)
|
||||
}
|
||||
def argb = { int rgb -> (0xFF000000L | (rgb & 0xFFFFFF)) as int }
|
||||
def shade = { int rgb, double factor ->
|
||||
int r = Math.max(0, Math.min(255, Math.round(((rgb >> 16) & 0xFF) * factor) as int))
|
||||
int g = Math.max(0, Math.min(255, Math.round(((rgb >> 8) & 0xFF) * factor) as int))
|
||||
int b = Math.max(0, Math.min(255, Math.round((rgb & 0xFF) * factor) as int))
|
||||
(r << 16) | (g << 8) | b
|
||||
}
|
||||
def path = { String key, String family -> key == "common" ? family : "${key}_${family}" }
|
||||
def cropTexture = { String key, int age ->
|
||||
if (age == 7) return key == "common" ? "hemp_tall_bottom" : "hemp_tall_bottom_${key}"
|
||||
key == "common" ? "hemp_stage_${age}" : "hemp_stage_${age}_${key}"
|
||||
}
|
||||
def topTexture = { String key -> key == "common" ? "hemp_tall_top" : "hemp_tall_top_${key}" }
|
||||
def itemDefinition = { String itemPath, String modelPath ->
|
||||
writeJson("assets/canaplia/items/${itemPath}.json", [model: [type: "minecraft:model", model: modelPath]])
|
||||
}
|
||||
@@ -104,32 +91,13 @@ tasks.register("generateCanapliaResources") {
|
||||
def resinVariants = [:]
|
||||
canapliaVariants.each { variant ->
|
||||
String key = variant.key
|
||||
int color = variant.color as int
|
||||
(0..7).each { age ->
|
||||
cropVariants["age=${age},variant=${key}"] = [model: "canaplia:block/hemp_crop_${key}_stage${age}"]
|
||||
topVariants["age=${age},variant=${key}"] = [model: "canaplia:block/hemp_top_${key}_stage${Math.max(5, age)}"]
|
||||
writeJson("assets/canaplia/models/block/hemp_crop_${key}_stage${age}.json", [
|
||||
parent: "minecraft:block/crop", textures: [crop: "canaplia:block/hemp_crop_${key}_stage${age}"]])
|
||||
parent: "minecraft:block/crop", textures: [crop: "canaplia:block/${cropTexture(key, age)}"]])
|
||||
if (age >= 5) writeJson("assets/canaplia/models/block/hemp_top_${key}_stage${age}.json", [
|
||||
parent: "minecraft:block/crop", textures: [crop: "canaplia:block/hemp_top_${key}_stage${age}"]])
|
||||
writePng("assets/canaplia/textures/block/hemp_crop_${key}_stage${age}.png") { image ->
|
||||
int stem = argb(shade(0x4E8A47, 0.72 + age * 0.045))
|
||||
int leaf = argb(shade(0x69A85C, 0.72 + age * 0.04))
|
||||
int top = 15 - Math.max(2, age + 3)
|
||||
for (int y = top; y < 16; y++) { image.setRGB(7, y, stem); image.setRGB(8, y, stem) }
|
||||
if (age >= 2) { image.setRGB(5, 12, leaf); image.setRGB(6, 11, leaf); image.setRGB(9, 10, leaf); image.setRGB(10, 11, leaf) }
|
||||
if (age >= 4) { image.setRGB(4, 9, leaf); image.setRGB(5, 10, leaf); image.setRGB(10, 8, leaf); image.setRGB(11, 9, leaf) }
|
||||
if (age >= 6) { image.setRGB(6, top, argb(shade(color, 0.78))); image.setRGB(7, top - 1, argb(color)); image.setRGB(8, top - 1, argb(shade(color, 1.12))); image.setRGB(9, top, argb(shade(color, 0.82))) }
|
||||
}
|
||||
if (age >= 5) writePng("assets/canaplia/textures/block/hemp_top_${key}_stage${age}.png") { image ->
|
||||
int stem = argb(0x4E8A47)
|
||||
for (int y = 7; y < 16; y++) { image.setRGB(7, y, stem); image.setRGB(8, y, stem) }
|
||||
image.setRGB(5, 10, argb(0x69A85C)); image.setRGB(6, 9, argb(0x69A85C)); image.setRGB(9, 8, argb(0x69A85C)); image.setRGB(10, 9, argb(0x69A85C))
|
||||
int radius = age == 7 ? 2 : 1
|
||||
for (int y = 2; y <= 4 + radius; y++) for (int x = 7 - radius; x <= 8 + radius; x++) {
|
||||
if (Math.abs(x - 7.5) + Math.abs(y - 4.0) <= radius + 1.5) image.setRGB(x, y, argb(shade(color, 0.82 + (x + y) % 3 * 0.12)))
|
||||
}
|
||||
}
|
||||
parent: "minecraft:block/crop", textures: [crop: "canaplia:block/${topTexture(key)}"]])
|
||||
}
|
||||
|
||||
String seed = path(key, "hemp_seeds")
|
||||
@@ -140,25 +108,9 @@ tasks.register("generateCanapliaResources") {
|
||||
writeJson("assets/canaplia/models/item/${resin}.json", [parent: "canaplia:block/resin_block_${key}"])
|
||||
itemDefinition(resin, "canaplia:item/${resin}")
|
||||
writeJson("assets/canaplia/models/block/resin_block_${key}.json", [
|
||||
parent: "minecraft:block/cube_all", textures: [all: "canaplia:block/resin_block_${key}"]])
|
||||
parent: "minecraft:block/cube_all", textures: [all: "canaplia:block/${resin}"]])
|
||||
resinVariants["variant=${key}"] = [model: "canaplia:block/resin_block_${key}"]
|
||||
|
||||
writePng("assets/canaplia/textures/item/${seed}.png") { image ->
|
||||
[[7,6],[9,7],[6,9],[9,10],[7,12]].eachWithIndex { point, index -> image.setRGB(point[0], point[1], argb(shade(color, 0.65 + index * 0.10))) }
|
||||
}
|
||||
writePng("assets/canaplia/textures/item/${bud}.png") { image ->
|
||||
for (int y = 4; y <= 12; y++) for (int x = 4; x <= 11; x++) {
|
||||
if (Math.pow((x - 7.5) / 4.0, 2) + Math.pow((y - 8.0) / 5.0, 2) <= 1.0) image.setRGB(x, y, argb(shade(color, 0.72 + (x + y) % 4 * 0.11)))
|
||||
}
|
||||
image.setRGB(7, 13, argb(0x4E8A47)); image.setRGB(8, 13, argb(0x4E8A47))
|
||||
}
|
||||
writePng("assets/canaplia/textures/item/${joint}.png") { image ->
|
||||
for (int i = 0; i < 9; i++) { image.setRGB(3 + i, 12 - i, argb(i < 2 ? color : 0xD8C6A0)); if (i > 1 && i < 8) image.setRGB(4 + i, 12 - i, argb(0xB39A72)) }
|
||||
}
|
||||
writePng("assets/canaplia/textures/block/resin_block_${key}.png") { image ->
|
||||
for (int y = 0; y < 16; y++) for (int x = 0; x < 16; x++) image.setRGB(x, y, argb(shade(color, 0.62 + ((x / 4 + y / 4) % 3) * 0.13)))
|
||||
}
|
||||
|
||||
writeJson("data/canaplia/recipe/${joint}.json", [
|
||||
type: "minecraft:crafting_shapeless", category: "misc",
|
||||
ingredients: ["minecraft:paper", "canaplia:${bud}"], result: [id: "canaplia:${joint}"]])
|
||||
@@ -201,15 +153,13 @@ tasks.register("generateCanapliaResources") {
|
||||
writeJson("data/c/tags/item/seeds.json", [replace: false, values: seedIds])
|
||||
writeJson("data/canaplia/tags/item/hemp_buds.json", [replace: false, values: budIds])
|
||||
|
||||
generatedItem("codex")
|
||||
itemDefinition("codex", "minecraft:item/book")
|
||||
itemDefinition("codex_page", "minecraft:item/paper")
|
||||
writeJson("data/canaplia/recipe/codex.json", [
|
||||
type: "minecraft:crafting_shapeless", category: "misc",
|
||||
ingredients: ["minecraft:book", "minecraft:green_dye"], result: [id: "canaplia:codex"]])
|
||||
writePng("assets/canaplia/textures/item/codex.png") { image ->
|
||||
for (int y = 2; y < 14; y++) for (int x = 2; x < 14; x++) image.setRGB(x, y, argb(x < 8 ? 0x6D8A55 : 0x789A61))
|
||||
for (int y = 3; y < 13; y++) image.setRGB(7, y, argb(0xD8CDA6))
|
||||
image.setRGB(5, 6, argb(0xE4B83E)); image.setRGB(10, 9, argb(0x8154A8))
|
||||
}
|
||||
type: "minecraft:crafting_shaped", category: "misc",
|
||||
pattern: [" P ", "PBP", " P "],
|
||||
key: [P: "canaplia:codex_page", B: "minecraft:book"],
|
||||
result: [id: "canaplia:codex"]])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -606,7 +556,7 @@ tasks.register("verifyItsAlive") {
|
||||
def climateSource = file("src/main/java/fr/koka99cab/sanctuary26/itsalive/agriculture/ClimateCropForaging.java").text
|
||||
def pineappleSource = file("src/main/java/fr/koka99cab/sanctuary26/itsalive/agriculture/PineappleItem.java").text
|
||||
def worldgenSource = file("src/main/java/fr/koka99cab/sanctuary26/itsalive/agriculture/ItsAliveAgricultureWorldGeneration.java").text
|
||||
if (project.version.toString() != "0.0.0-alpha.33"
|
||||
if (project.version.toString() != "0.0.0-alpha.34"
|
||||
|| climateMigration.target?.pack_version != "26.2.0-alpha.157"
|
||||
|| climateMigration.target?.modules?.itsalive != "0.0.0-alpha.24"
|
||||
|| !climateSource.contains("PlayerBlockBreakEvents.AFTER.register")
|
||||
@@ -1363,7 +1313,7 @@ tasks.register("verifyCulinaryReliability") {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (project.version.toString() != "0.0.0-alpha.33"
|
||||
if (project.version.toString() != "0.0.0-alpha.34"
|
||||
|| migration.target?.modules?.itsalive != "0.0.0-alpha.28"
|
||||
|| migration.culinary_fixes?.food_press_contents_destroyed_on_break != true
|
||||
|| migration.culinary_fixes?.comparator_contract?.blocks?.size() != 6
|
||||
@@ -1401,7 +1351,7 @@ tasks.register("verifyCauldronBatching") {
|
||||
def recipe = file("src/main/java/fr/koka99cab/sanctuary26/itsalive/culinary/recipe/CulinaryProcessRecipe.java").text
|
||||
def cauldron = file("src/main/java/fr/koka99cab/sanctuary26/itsalive/culinary/block/entity/CookingCauldronBlockEntity.java").text
|
||||
def timed = file("src/main/java/fr/koka99cab/sanctuary26/itsalive/culinary/block/entity/AbstractTimedCulinaryBlockEntity.java").text
|
||||
if (project.version.toString() != "0.0.0-alpha.33"
|
||||
if (project.version.toString() != "0.0.0-alpha.34"
|
||||
|| migration.target?.modules?.itsalive != "0.0.0-alpha.29"
|
||||
|| migration.cauldron_batches?.logical_stack_limit != 64
|
||||
|| migration.cauldron_batches?.identity != "same_item_same_components"
|
||||
@@ -1439,7 +1389,7 @@ tasks.register("verifyFermentationBarrelAutomation") {
|
||||
def partialMatching = file("src/main/java/fr/koka99cab/sanctuary26/itsalive/culinary/recipe/CulinaryPartialMatching.java").text
|
||||
def blockstate = new JsonSlurper().parse(
|
||||
file("src/main/resources/assets/itsalive/blockstates/fermentation_barrel.json"))
|
||||
if (project.version.toString() != "0.0.0-alpha.33"
|
||||
if (project.version.toString() != "0.0.0-alpha.34"
|
||||
|| migration.source?.modules?.itsalive != "0.0.0-alpha.29"
|
||||
|| migration.target?.modules?.itsalive != "0.0.0-alpha.30"
|
||||
|| migration.fermentation_barrel?.maximum_units_per_input_slot != 1
|
||||
@@ -1487,7 +1437,7 @@ tasks.register("verifyCulinaryLecternRelease") {
|
||||
[(locale): new JsonSlurper().parse(file(
|
||||
"src/main/resources/assets/itsalive/lang/${locale}.json"))]
|
||||
}
|
||||
if (project.version.toString() != "0.0.0-alpha.33"
|
||||
if (project.version.toString() != "0.0.0-alpha.34"
|
||||
|| migration.target?.modules?.itsalive != "0.0.0-alpha.31"
|
||||
|| migration.culinary_lectern?.book_tag != "minecraft:lectern_books"
|
||||
|| migration.culinary_lectern?.owner_catalog_shared_while_placed != true
|
||||
|
||||
@@ -13,7 +13,7 @@ import org.slf4j.LoggerFactory;
|
||||
public final class ItsAliveMod implements ModInitializer {
|
||||
public static final String MOD_ID = "itsalive";
|
||||
public static final String DISPLAY_NAME = "It's Alive !";
|
||||
public static final int CURRENT_DATA_VERSION = 2;
|
||||
public static final int CURRENT_DATA_VERSION = 3;
|
||||
public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);
|
||||
|
||||
public ItsAliveMod() {
|
||||
|
||||
@@ -0,0 +1,41 @@
|
||||
package fr.koka99cab.sanctuary26.itsalive.canaplia;
|
||||
|
||||
import net.fabricmc.fabric.api.entity.event.v1.ServerLivingEntityEvents;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.world.entity.monster.Enemy;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
|
||||
/** Bounded player-kill drops that make the Codex and its loose pages survival rewards. */
|
||||
public final class CanapliaCodexDrops {
|
||||
public static final int PAGE_DROP_DENOMINATOR = 12;
|
||||
public static final int CODEX_DROP_DENOMINATOR = 256;
|
||||
private static boolean initialized;
|
||||
|
||||
private CanapliaCodexDrops() {}
|
||||
|
||||
public static void initialize() {
|
||||
if (initialized) return;
|
||||
initialized = true;
|
||||
ServerLivingEntityEvents.AFTER_DEATH.register((entity, damageSource) -> {
|
||||
if (!(entity instanceof Enemy)
|
||||
|| !(entity.level() instanceof ServerLevel level)
|
||||
|| !(damageSource.getEntity() instanceof ServerPlayer)) return;
|
||||
|
||||
if (dropsPage(level.getRandom().nextInt(PAGE_DROP_DENOMINATOR))) {
|
||||
entity.spawnAtLocation(level, new ItemStack(CanapliaContent.CODEX_PAGE));
|
||||
}
|
||||
if (dropsCodex(level.getRandom().nextInt(CODEX_DROP_DENOMINATOR))) {
|
||||
entity.spawnAtLocation(level, new ItemStack(CanapliaContent.CODEX));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
static boolean dropsPage(int roll) {
|
||||
return roll == 0;
|
||||
}
|
||||
|
||||
static boolean dropsCodex(int roll) {
|
||||
return roll == 0;
|
||||
}
|
||||
}
|
||||
@@ -36,6 +36,8 @@ public final class CanapliaContent {
|
||||
key -> new CanapliaResinBlock(BlockBehaviour.Properties.ofFullCopy(Blocks.HONEY_BLOCK).setId(key)));
|
||||
public static final BlockEntityType<CanapliaResinBlockEntity> RESIN_BLOCK_ENTITY_TYPE = registerResinBlockEntity();
|
||||
private static final Map<CanapliaVariantKey, Family> FAMILIES = registerFamilies();
|
||||
public static final Item CODEX_PAGE = registerItem("codex_page", key ->
|
||||
new Item(new Item.Properties().setId(key)));
|
||||
public static final Item CODEX = registerItem("codex", key ->
|
||||
new CanapliaCodexItem(new Item.Properties().stacksTo(1).setId(key)));
|
||||
private static final List<Item> CREATIVE_ITEMS = createCreativeItems();
|
||||
@@ -92,7 +94,7 @@ public final class CanapliaContent {
|
||||
}
|
||||
|
||||
private static List<Item> createCreativeItems() {
|
||||
List<Item> items = new ArrayList<>(65);
|
||||
List<Item> items = new ArrayList<>(66);
|
||||
for (CanapliaVariantKey variant : CanapliaVariantKey.values()) {
|
||||
Family family = family(variant);
|
||||
items.add(family.seeds());
|
||||
@@ -100,6 +102,7 @@ public final class CanapliaContent {
|
||||
items.add(family.resin());
|
||||
items.add(family.joint());
|
||||
}
|
||||
items.add(CODEX_PAGE);
|
||||
items.add(CODEX);
|
||||
return List.copyOf(items);
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import fr.koka99cab.sanctuary26.itsalive.ItsAliveMod;
|
||||
|
||||
/** Initializes the complete compatibility implementation and its public module boundaries. */
|
||||
public final class CanapliaFoundation {
|
||||
public static final int FOUNDATION_VERSION = 2;
|
||||
public static final int FOUNDATION_VERSION = 3;
|
||||
private static boolean initialized;
|
||||
|
||||
private CanapliaFoundation() {
|
||||
@@ -21,6 +21,7 @@ public final class CanapliaFoundation {
|
||||
throw new IllegalStateException("Unsupported Ambiance visual contract");
|
||||
}
|
||||
CanapliaContent.register();
|
||||
CanapliaCodexDrops.initialize();
|
||||
CanapliaDiscoverySources.register();
|
||||
CanapliaDiscovery.initialize();
|
||||
CanapliaHarvestService.initialize();
|
||||
|
||||
@@ -28,7 +28,7 @@ import net.minecraft.world.phys.BlockHitResult;
|
||||
/** Shared seven-age crop retaining one of the sixteen stable variant keys in block state. */
|
||||
public final class CanapliaHempCropBlock extends CropBlock {
|
||||
public static final EnumProperty<CanapliaVariantKey> VARIANT = EnumProperty.create("variant", CanapliaVariantKey.class);
|
||||
public static final int UPPER_START_AGE = 5;
|
||||
public static final int UPPER_START_AGE = 7;
|
||||
private static final int HARVEST_RESET_AGE = 3;
|
||||
|
||||
public CanapliaHempCropBlock(BlockBehaviour.Properties properties) {
|
||||
|
||||
@@ -3,7 +3,20 @@ package fr.koka99cab.sanctuary26.itsalive.canaplia.block;
|
||||
import fr.koka99cab.sanctuary26.itsalive.canaplia.CanapliaContent;
|
||||
import fr.koka99cab.sanctuary26.itsalive.canaplia.CanapliaVariantKey;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.sounds.SoundEvent;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.stats.Stats;
|
||||
import net.minecraft.util.RandomSource;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.entity.projectile.Projectile;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.Items;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.LevelReader;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
@@ -14,15 +27,21 @@ import net.minecraft.world.level.block.entity.BlockEntityType;
|
||||
import net.minecraft.world.level.block.state.BlockBehaviour;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.block.state.StateDefinition;
|
||||
import net.minecraft.world.level.block.state.properties.BlockStateProperties;
|
||||
import net.minecraft.world.level.block.state.properties.BooleanProperty;
|
||||
import net.minecraft.world.level.block.state.properties.EnumProperty;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.phys.BlockHitResult;
|
||||
|
||||
/** Shared resin block with a bounded, server-ticked aura. */
|
||||
public final class CanapliaResinBlock extends Block implements EntityBlock {
|
||||
public static final BooleanProperty LIT = BlockStateProperties.LIT;
|
||||
public static final EnumProperty<CanapliaVariantKey> VARIANT = EnumProperty.create("variant", CanapliaVariantKey.class);
|
||||
|
||||
public CanapliaResinBlock(BlockBehaviour.Properties properties) {
|
||||
super(properties);
|
||||
registerDefaultState(defaultBlockState().setValue(VARIANT, CanapliaVariantKey.COMMON));
|
||||
registerDefaultState(defaultBlockState().setValue(LIT, false)
|
||||
.setValue(VARIANT, CanapliaVariantKey.COMMON));
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -32,13 +51,83 @@ public final class CanapliaResinBlock extends Block implements EntityBlock {
|
||||
|
||||
@Override
|
||||
public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level level, BlockState state, BlockEntityType<T> type) {
|
||||
return type == CanapliaContent.RESIN_BLOCK_ENTITY_TYPE
|
||||
return !level.isClientSide() && type == CanapliaContent.RESIN_BLOCK_ENTITY_TYPE
|
||||
? (tickerLevel, pos, tickerState, blockEntity) ->
|
||||
CanapliaResinBlockEntity.tick(tickerLevel, pos, tickerState,
|
||||
(CanapliaResinBlockEntity) blockEntity)
|
||||
: null;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected InteractionResult useItemOn(ItemStack stack, BlockState state, Level level, BlockPos pos,
|
||||
Player player, InteractionHand hand, BlockHitResult hit) {
|
||||
if (state.getValue(LIT) || !isIgnitionItem(stack)) return InteractionResult.TRY_WITH_EMPTY_HAND;
|
||||
if (level.isClientSide()) return InteractionResult.SUCCESS;
|
||||
|
||||
igniteWithItem((ServerLevel) level, pos, state, player, hand);
|
||||
return InteractionResult.SUCCESS_SERVER;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onProjectileHit(Level level, BlockState state, BlockHitResult hit, Projectile projectile) {
|
||||
if (!(level instanceof ServerLevel serverLevel) || state.getValue(LIT) || !projectile.isOnFire()) return;
|
||||
BlockPos pos = hit.getBlockPos();
|
||||
if (projectile.mayInteract(serverLevel, pos)) {
|
||||
ignite(serverLevel, pos, state, SoundEvents.FIRECHARGE_USE, 0.9F);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void animateTick(BlockState state, Level level, BlockPos pos, RandomSource random) {
|
||||
if (!state.getValue(LIT)) return;
|
||||
if (random.nextInt(10) == 0) {
|
||||
level.playLocalSound(pos.getX() + 0.5D, pos.getY() + 0.5D, pos.getZ() + 0.5D,
|
||||
SoundEvents.CAMPFIRE_CRACKLE, SoundSource.BLOCKS,
|
||||
0.35F + random.nextFloat() * 0.3F, 0.6F + random.nextFloat() * 0.4F, false);
|
||||
}
|
||||
spawnSmoke(level, pos, random);
|
||||
if (random.nextBoolean()) spawnSmoke(level, pos, random);
|
||||
}
|
||||
|
||||
private static void spawnSmoke(Level level, BlockPos pos, RandomSource random) {
|
||||
level.addParticle(ParticleTypes.CAMPFIRE_COSY_SMOKE,
|
||||
pos.getX() + 0.5D, pos.getY() + 1.0D, pos.getZ() + 0.5D,
|
||||
random.nextDouble() * 0.01D, random.nextDouble() * 0.02D,
|
||||
random.nextDouble() * 0.01D);
|
||||
}
|
||||
|
||||
private static boolean isIgnitionItem(ItemStack stack) {
|
||||
return stack.is(Items.FLINT_AND_STEEL) || stack.is(Items.FIRE_CHARGE);
|
||||
}
|
||||
|
||||
private static void igniteWithItem(ServerLevel level, BlockPos pos, BlockState state,
|
||||
Player player, InteractionHand hand) {
|
||||
ItemStack stack = player.getItemInHand(hand);
|
||||
if (stack.is(Items.FLINT_AND_STEEL)) {
|
||||
if (player instanceof ServerPlayer serverPlayer) {
|
||||
stack.hurtAndBreak(1, level, serverPlayer, item -> {});
|
||||
}
|
||||
player.awardStat(Stats.ITEM_USED.get(Items.FLINT_AND_STEEL));
|
||||
ignite(level, pos, state, SoundEvents.FLINTANDSTEEL_USE, 1.0F);
|
||||
return;
|
||||
}
|
||||
stack.consume(1, player);
|
||||
player.awardStat(Stats.ITEM_USED.get(Items.FIRE_CHARGE));
|
||||
ignite(level, pos, state, SoundEvents.FIRECHARGE_USE, 0.9F);
|
||||
}
|
||||
|
||||
private static void ignite(ServerLevel level, BlockPos pos, BlockState state,
|
||||
SoundEvent sound, float pitch) {
|
||||
BlockState litState = state.setValue(LIT, true);
|
||||
level.setBlock(pos, litState, Block.UPDATE_ALL);
|
||||
if (level.getBlockEntity(pos) instanceof CanapliaResinBlockEntity blockEntity) {
|
||||
blockEntity.light();
|
||||
}
|
||||
level.playSound(null, pos, sound, SoundSource.BLOCKS, 1.0F,
|
||||
pitch + level.getRandom().nextFloat() * 0.2F);
|
||||
level.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(litState));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemStack getCloneItemStack(LevelReader level, BlockPos pos, BlockState state, boolean includeData) {
|
||||
return new ItemStack(CanapliaContent.family(state.getValue(VARIANT)).resin());
|
||||
@@ -46,6 +135,6 @@ public final class CanapliaResinBlock extends Block implements EntityBlock {
|
||||
|
||||
@Override
|
||||
protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
|
||||
builder.add(VARIANT);
|
||||
builder.add(LIT, VARIANT);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,22 +3,29 @@ package fr.koka99cab.sanctuary26.itsalive.canaplia.block;
|
||||
import fr.koka99cab.sanctuary26.itsalive.canaplia.CanapliaContent;
|
||||
import fr.koka99cab.sanctuary26.itsalive.canaplia.CanapliaEffects;
|
||||
import net.minecraft.core.BlockPos;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.world.level.storage.ValueInput;
|
||||
import net.minecraft.world.level.storage.ValueOutput;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.level.Level;
|
||||
import net.minecraft.world.level.block.Block;
|
||||
import net.minecraft.world.level.block.Blocks;
|
||||
import net.minecraft.world.level.block.entity.BlockEntity;
|
||||
import net.minecraft.world.level.block.state.BlockState;
|
||||
import net.minecraft.world.level.gameevent.GameEvent;
|
||||
import net.minecraft.world.phys.AABB;
|
||||
|
||||
/** Persisted ninety-second resin aura; the source variant lives in the block state. */
|
||||
public final class CanapliaResinBlockEntity extends BlockEntity {
|
||||
public static final int DATA_VERSION = 1;
|
||||
public static final int DATA_VERSION = 2;
|
||||
public static final int DEFAULT_BURN_TICKS = 90 * 20;
|
||||
private static final int AURA_INTERVAL = 40;
|
||||
private static final double AURA_RADIUS = 4.0D;
|
||||
private int remainingBurnTicks = DEFAULT_BURN_TICKS;
|
||||
private int remainingBurnTicks;
|
||||
private boolean migrateLegacyBurn;
|
||||
|
||||
public CanapliaResinBlockEntity(BlockPos pos, BlockState state) {
|
||||
super(CanapliaContent.RESIN_BLOCK_ENTITY_TYPE, pos, state);
|
||||
@@ -26,8 +33,16 @@ public final class CanapliaResinBlockEntity extends BlockEntity {
|
||||
|
||||
public static void tick(Level level, BlockPos pos, BlockState state, CanapliaResinBlockEntity entity) {
|
||||
if (!(level instanceof ServerLevel serverLevel)) return;
|
||||
if (entity.migrateLegacyBurn) {
|
||||
entity.migrateLegacyBurn = false;
|
||||
if (!state.getValue(CanapliaResinBlock.LIT) && entity.remainingBurnTicks > 0) {
|
||||
state = state.setValue(CanapliaResinBlock.LIT, true);
|
||||
serverLevel.setBlock(pos, state, Block.UPDATE_ALL);
|
||||
}
|
||||
}
|
||||
if (!state.getValue(CanapliaResinBlock.LIT)) return;
|
||||
if (entity.remainingBurnTicks <= 0) {
|
||||
serverLevel.removeBlock(pos, false);
|
||||
extinguishAndConsume(serverLevel, pos, state);
|
||||
return;
|
||||
}
|
||||
if (entity.remainingBurnTicks % AURA_INTERVAL == 0) {
|
||||
@@ -37,10 +52,16 @@ public final class CanapliaResinBlockEntity extends BlockEntity {
|
||||
}
|
||||
}
|
||||
entity.remainingBurnTicks--;
|
||||
if (entity.remainingBurnTicks <= 0) serverLevel.removeBlock(pos, false);
|
||||
if (entity.remainingBurnTicks <= 0) extinguishAndConsume(serverLevel, pos, state);
|
||||
else if (entity.remainingBurnTicks % 20 == 0) entity.setChanged();
|
||||
}
|
||||
|
||||
public void light() {
|
||||
remainingBurnTicks = DEFAULT_BURN_TICKS;
|
||||
migrateLegacyBurn = false;
|
||||
setChanged();
|
||||
}
|
||||
|
||||
public int remainingBurnTicks() {
|
||||
return remainingBurnTicks;
|
||||
}
|
||||
@@ -55,7 +76,18 @@ public final class CanapliaResinBlockEntity extends BlockEntity {
|
||||
@Override
|
||||
protected void loadAdditional(ValueInput input) {
|
||||
super.loadAdditional(input);
|
||||
int dataVersion = input.getIntOr("data_version", 1);
|
||||
remainingBurnTicks = Math.clamp(
|
||||
input.getIntOr("remaining_burn_ticks", DEFAULT_BURN_TICKS), 0, DEFAULT_BURN_TICKS);
|
||||
input.getIntOr("remaining_burn_ticks", dataVersion < DATA_VERSION ? DEFAULT_BURN_TICKS : 0),
|
||||
0, DEFAULT_BURN_TICKS);
|
||||
migrateLegacyBurn = dataVersion < DATA_VERSION && remainingBurnTicks > 0;
|
||||
}
|
||||
|
||||
private static void extinguishAndConsume(ServerLevel level, BlockPos pos, BlockState state) {
|
||||
level.playSound(null, pos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.8F, 1.0F);
|
||||
level.sendParticles(ParticleTypes.SMOKE, pos.getX() + 0.5D, pos.getY() + 0.85D,
|
||||
pos.getZ() + 0.5D, 20, 0.25D, 0.15D, 0.25D, 0.01D);
|
||||
level.setBlock(pos, Blocks.AIR.defaultBlockState(), Block.UPDATE_ALL);
|
||||
level.gameEvent(GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(state));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,82 +2,58 @@ package fr.koka99cab.sanctuary26.itsalive.canaplia.client;
|
||||
|
||||
import fr.koka99cab.sanctuary26.itsalive.canaplia.CanapliaVariantKey;
|
||||
import fr.koka99cab.sanctuary26.itsalive.network.CanapliaCodexPayload;
|
||||
import net.minecraft.client.gui.GuiGraphicsExtractor;
|
||||
import net.minecraft.client.gui.components.Button;
|
||||
import net.minecraft.client.gui.screens.Screen;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import net.minecraft.ChatFormatting;
|
||||
import net.minecraft.client.gui.screens.inventory.BookViewScreen;
|
||||
import net.minecraft.network.chat.Component;
|
||||
import net.minecraft.network.chat.MutableComponent;
|
||||
|
||||
/** Compact two-page personal/shared catalogue with progressively revealed hints. */
|
||||
public final class CanapliaCodexScreen extends Screen {
|
||||
private static final int ENTRIES_PER_PAGE = 8;
|
||||
private final Screen parent;
|
||||
private final CanapliaCodexPayload snapshot;
|
||||
private int page;
|
||||
|
||||
public CanapliaCodexScreen(Screen parent, CanapliaCodexPayload snapshot) {
|
||||
super(Component.translatable("screen.canaplia.codex.title"));
|
||||
this.parent = parent;
|
||||
this.snapshot = snapshot;
|
||||
/** Vanilla book presentation of the server-authored Canaplia catalogue. */
|
||||
public final class CanapliaCodexScreen extends BookViewScreen {
|
||||
public CanapliaCodexScreen(CanapliaCodexPayload snapshot) {
|
||||
super(new BookAccess(pages(snapshot)));
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void init() {
|
||||
int y = Math.max(6, height - 28);
|
||||
addRenderableWidget(Button.builder(Component.literal("‹"), button -> changePage(-1))
|
||||
.bounds(width / 2 - 104, y, 24, 20).build()).active = page > 0;
|
||||
addRenderableWidget(Button.builder(Component.translatable("gui.done"), button -> onClose())
|
||||
.bounds(width / 2 - 76, y, 152, 20).build());
|
||||
addRenderableWidget(Button.builder(Component.literal("›"), button -> changePage(1))
|
||||
.bounds(width / 2 + 80, y, 24, 20).build()).active = page < 1;
|
||||
}
|
||||
|
||||
private void changePage(int delta) {
|
||||
page = Math.clamp(page + delta, 0, 1);
|
||||
rebuildWidgets();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void extractRenderState(GuiGraphicsExtractor graphics, int mouseX, int mouseY, float tickDelta) {
|
||||
graphics.fill(width / 2 - 172, 5, width / 2 + 172, height - 34, 0xD0182118);
|
||||
graphics.centeredText(font, title, width / 2, 12, 0xFFE8F1CF);
|
||||
graphics.centeredText(font, Component.translatable("screen.canaplia.codex.page", page + 1, 2),
|
||||
width / 2, 25, 0xFF9DB886);
|
||||
int start = page * ENTRIES_PER_PAGE;
|
||||
int y = 43;
|
||||
private static List<Component> pages(CanapliaCodexPayload snapshot) {
|
||||
List<Component> pages = new ArrayList<>(CanapliaVariantKey.values().length + 1);
|
||||
pages.add(Component.translatable("screen.canaplia.codex.introduction"));
|
||||
CanapliaVariantKey[] variants = CanapliaVariantKey.values();
|
||||
for (int index = start; index < Math.min(start + ENTRIES_PER_PAGE, variants.length); index++) {
|
||||
drawEntry(graphics, variants[index], index, y);
|
||||
y += 24;
|
||||
for (int index = 0; index < variants.length; index++) {
|
||||
pages.add(variantPage(snapshot, variants[index], index));
|
||||
}
|
||||
super.extractRenderState(graphics, mouseX, mouseY, tickDelta);
|
||||
return List.copyOf(pages);
|
||||
}
|
||||
|
||||
private void drawEntry(GuiGraphicsExtractor graphics, CanapliaVariantKey variant, int index, int y) {
|
||||
private static Component variantPage(CanapliaCodexPayload snapshot,
|
||||
CanapliaVariantKey variant, int index) {
|
||||
boolean personal = bit(snapshot.personalMask(), index);
|
||||
boolean shared = bit(snapshot.sharedMask(), index);
|
||||
boolean originHint = bit(snapshot.originHintMask(), index);
|
||||
boolean conditionHint = bit(snapshot.conditionHintMask(), index);
|
||||
int x = width / 2 - 156;
|
||||
int color = personal ? 0xFFF0F4D7 : shared ? 0xFF9BA697 : 0xFF566056;
|
||||
Component name = personal
|
||||
|
||||
MutableComponent page = Component.translatable("screen.canaplia.codex.entry_number", index + 1)
|
||||
.withStyle(ChatFormatting.DARK_GRAY).append("\n\n");
|
||||
if (!personal && !shared) {
|
||||
return page.append(Component.translatable("screen.canaplia.codex.hidden")
|
||||
.withStyle(ChatFormatting.GRAY));
|
||||
}
|
||||
|
||||
page.append((personal
|
||||
? Component.translatable("variant.canaplia." + variant.key())
|
||||
: shared ? Component.translatable("screen.canaplia.codex.silhouette")
|
||||
: Component.translatable("screen.canaplia.codex.hidden");
|
||||
graphics.text(font, name, x, y, color, false);
|
||||
: Component.translatable("screen.canaplia.codex.silhouette"))
|
||||
.withStyle(personal ? ChatFormatting.DARK_GREEN : ChatFormatting.GRAY));
|
||||
if (personal || originHint) {
|
||||
graphics.text(font, Component.translatable("origin.canaplia." + variant.key()),
|
||||
x + 104, y, 0xFF9DB886, false);
|
||||
page.append("\n\n").append(Component.translatable("screen.canaplia.codex.origin",
|
||||
Component.translatable("origin.canaplia." + variant.key())));
|
||||
}
|
||||
if (conditionHint || personal) {
|
||||
graphics.text(font, Component.translatable("hint.canaplia." + variant.key()),
|
||||
x + 8, y + 11, personal ? 0xFFBFC9AC : 0xFF75836D, false);
|
||||
if (personal || conditionHint) {
|
||||
page.append("\n\n").append(Component.translatable("hint.canaplia." + variant.key()));
|
||||
}
|
||||
return page;
|
||||
}
|
||||
|
||||
private static boolean bit(int mask, int index) { return (mask & (1 << index)) != 0; }
|
||||
|
||||
@Override
|
||||
public void onClose() {
|
||||
if (minecraft != null) minecraft.gui.setScreen(parent);
|
||||
private static boolean bit(int mask, int index) {
|
||||
return (mask & (1 << index)) != 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,13 +3,18 @@ package fr.koka99cab.sanctuary26.itsalive.canaplia.item;
|
||||
import fr.koka99cab.sanctuary26.itsalive.canaplia.CanapliaEffects;
|
||||
import fr.koka99cab.sanctuary26.itsalive.canaplia.CanapliaKnowledge;
|
||||
import fr.koka99cab.sanctuary26.itsalive.canaplia.CanapliaVariantKey;
|
||||
import net.minecraft.core.particles.ParticleTypes;
|
||||
import net.minecraft.server.level.ServerLevel;
|
||||
import net.minecraft.server.level.ServerPlayer;
|
||||
import net.minecraft.sounds.SoundEvents;
|
||||
import net.minecraft.sounds.SoundSource;
|
||||
import net.minecraft.world.InteractionHand;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
import net.minecraft.world.entity.LivingEntity;
|
||||
import net.minecraft.world.entity.player.Player;
|
||||
import net.minecraft.world.item.Item;
|
||||
import net.minecraft.world.item.ItemStack;
|
||||
import net.minecraft.world.item.ItemUtils;
|
||||
import net.minecraft.world.item.ItemUseAnimation;
|
||||
import net.minecraft.world.level.Level;
|
||||
|
||||
@@ -29,8 +34,7 @@ public final class CanapliaJointItem extends Item {
|
||||
|
||||
@Override
|
||||
public InteractionResult use(Level level, Player player, InteractionHand hand) {
|
||||
player.startUsingItem(hand);
|
||||
return InteractionResult.CONSUME;
|
||||
return ItemUtils.startUsingInstantly(level, player, hand);
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -38,14 +42,22 @@ public final class CanapliaJointItem extends Item {
|
||||
if (!level.isClientSide() && consumer instanceof ServerPlayer player) {
|
||||
CanapliaKnowledge.discover(player, variant, "consumption");
|
||||
CanapliaEffects.consume(player, variant);
|
||||
if (!player.hasInfiniteMaterials()) stack.shrink(1);
|
||||
level.playSound(null, consumer.getX(), consumer.getY(), consumer.getZ(),
|
||||
SoundEvents.SMOKER_SMOKE, SoundSource.PLAYERS, 0.35F,
|
||||
0.9F + level.getRandom().nextFloat() * 0.2F);
|
||||
if (level instanceof ServerLevel serverLevel) {
|
||||
serverLevel.sendParticles(ParticleTypes.SMOKE, consumer.getX(),
|
||||
consumer.getY() + consumer.getBbHeight() * 0.6D, consumer.getZ(),
|
||||
8, 0.12D, 0.12D, 0.12D, 0.01D);
|
||||
}
|
||||
stack.consume(1, consumer);
|
||||
}
|
||||
return stack;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ItemUseAnimation getUseAnimation(ItemStack stack) {
|
||||
return ItemUseAnimation.TOOT_HORN;
|
||||
return ItemUseAnimation.DRINK;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -52,7 +52,7 @@ public final class ItsAliveClient implements ClientModInitializer {
|
||||
context.client().execute(() -> CulinaryRecipeBookClient.open(payload)));
|
||||
ClientPlayNetworking.registerGlobalReceiver(CanapliaCodexPayload.ID, (payload, context) ->
|
||||
context.client().execute(() -> context.client().gui.setScreen(
|
||||
new CanapliaCodexScreen(context.client().gui.screen(), payload))));
|
||||
new CanapliaCodexScreen(payload))));
|
||||
ClientTickEvents.END_CLIENT_TICK.register(client -> VomiterOverlayState.tick());
|
||||
ClientPlayConnectionEvents.DISCONNECT.register((handler, client) -> VomiterOverlayState.clear());
|
||||
ModelLayerRegistry.registerModelLayer(ButterflyModel.LAYER_LOCATION, ButterflyModel::createBodyLayer);
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
"description.canaplia": "Complete Canaplia gameplay: sixteen plants, server-authoritative discovery, hybrids, effects and an Ambiance-owned visual layer.",
|
||||
"screen.canaplia.codex.title": "Canaplia Codex",
|
||||
"screen.canaplia.codex.page": "Page %s / %s",
|
||||
"screen.canaplia.codex.introduction": "CANAPLIA CODEX\n\nSlay monsters to recover scattered pages and, very rarely, a complete Codex.\n\nGrow and discover varieties to fill its pages.",
|
||||
"screen.canaplia.codex.entry_number": "Entry %s",
|
||||
"screen.canaplia.codex.origin": "Origin: %s",
|
||||
"screen.canaplia.codex.hidden": "Undiscovered",
|
||||
"screen.canaplia.codex.silhouette": "Known silhouette",
|
||||
"message.canaplia.discovered": "Canaplia discovered: %s",
|
||||
@@ -10,6 +13,7 @@
|
||||
"block.canaplia.hemp_top": "Canaplia Plant Top",
|
||||
"block.canaplia.resin_block": "Canaplia Resin Block",
|
||||
"item.canaplia.codex": "Canaplia Codex",
|
||||
"item.canaplia.codex_page": "Canaplia Page",
|
||||
"variant.canaplia.common": "Common",
|
||||
"origin.canaplia.common": "Wild",
|
||||
"hint.canaplia.common": "Search ordinary Overworld vegetation.",
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
"description.canaplia": "Gameplay Canaplia complet : seize plantes, découvertes, hybrides et effets autoritaires côté serveur, avec une couche visuelle gérée par Ambiance.",
|
||||
"screen.canaplia.codex.title": "Codex Canaplia",
|
||||
"screen.canaplia.codex.page": "Page %s / %s",
|
||||
"screen.canaplia.codex.introduction": "CODEX CANAPLIA\n\nTuez des monstres pour retrouver des pages éparses et, très rarement, un Codex complet.\n\nCultivez et découvrez les variétés pour remplir ses pages.",
|
||||
"screen.canaplia.codex.entry_number": "Entrée %s",
|
||||
"screen.canaplia.codex.origin": "Origine : %s",
|
||||
"screen.canaplia.codex.hidden": "Non découverte",
|
||||
"screen.canaplia.codex.silhouette": "Silhouette connue",
|
||||
"message.canaplia.discovered": "Canaplia découverte : %s",
|
||||
@@ -10,6 +13,7 @@
|
||||
"block.canaplia.hemp_top": "Sommet de Canaplia",
|
||||
"block.canaplia.resin_block": "Bloc de résine Canaplia",
|
||||
"item.canaplia.codex": "Codex Canaplia",
|
||||
"item.canaplia.codex_page": "Page de Canaplia",
|
||||
"variant.canaplia.common": "Commune",
|
||||
"origin.canaplia.common": "Sauvage",
|
||||
"hint.canaplia.common": "Cherchez dans la végétation ordinaire de l'Overworld.",
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
"description.canaplia": "Полная механика Canaplia: шестнадцать растений, серверные открытия, гибриды и эффекты с визуальным слоем Ambiance.",
|
||||
"screen.canaplia.codex.title": "Кодекс Canaplia",
|
||||
"screen.canaplia.codex.page": "Страница %s / %s",
|
||||
"screen.canaplia.codex.introduction": "КОДЕКС CANAPLIA\n\nУбивайте монстров, чтобы находить отдельные страницы и, очень редко, полный Кодекс.\n\nВыращивайте и открывайте сорта, чтобы заполнить его.",
|
||||
"screen.canaplia.codex.entry_number": "Запись %s",
|
||||
"screen.canaplia.codex.origin": "Происхождение: %s",
|
||||
"screen.canaplia.codex.hidden": "Не открыто",
|
||||
"screen.canaplia.codex.silhouette": "Известный силуэт",
|
||||
"message.canaplia.discovered": "Открыта Canaplia: %s",
|
||||
@@ -10,6 +13,7 @@
|
||||
"block.canaplia.hemp_top": "Верхушка Canaplia",
|
||||
"block.canaplia.resin_block": "Блок смолы Canaplia",
|
||||
"item.canaplia.codex": "Кодекс Canaplia",
|
||||
"item.canaplia.codex_page": "Страница Canaplia",
|
||||
"variant.canaplia.common": "Обычная",
|
||||
"origin.canaplia.common": "Дикая",
|
||||
"hint.canaplia.common": "Ищите среди обычной растительности Верхнего мира.",
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
# Canaplia texture provenance
|
||||
|
||||
The 224 pixel-art sprites in `block/` and `item/` are the authored Canaplia
|
||||
textures restored from the copyright holder's local Sanctuary source tree at
|
||||
commit `b14fbe561ac99054f17ae56caee9eebee3dbcbb6`.
|
||||
|
||||
They are included in Sanctuary 26.2 at the copyright holder's explicit request.
|
||||
Minecraft book, paper, and book-screen assets remain referenced from the
|
||||
`minecraft` namespace and are not copied here.
|
||||
|
After Width: | Height: | Size: 537 B |
|
After Width: | Height: | Size: 519 B |
|
After Width: | Height: | Size: 534 B |
|
After Width: | Height: | Size: 539 B |
|
After Width: | Height: | Size: 513 B |
|
After Width: | Height: | Size: 520 B |
|
After Width: | Height: | Size: 540 B |
|
After Width: | Height: | Size: 112 B |
|
After Width: | Height: | Size: 116 B |
|
After Width: | Height: | Size: 116 B |
|
After Width: | Height: | Size: 116 B |
|
After Width: | Height: | Size: 113 B |
|
After Width: | Height: | Size: 112 B |
|
After Width: | Height: | Size: 112 B |
|
After Width: | Height: | Size: 116 B |
|
After Width: | Height: | Size: 112 B |
|
After Width: | Height: | Size: 117 B |
|
After Width: | Height: | Size: 111 B |
|
After Width: | Height: | Size: 113 B |
|
After Width: | Height: | Size: 116 B |
|
After Width: | Height: | Size: 113 B |
|
After Width: | Height: | Size: 116 B |
|
After Width: | Height: | Size: 113 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 125 B |
|
After Width: | Height: | Size: 124 B |
|
After Width: | Height: | Size: 124 B |
|
After Width: | Height: | Size: 139 B |
|
After Width: | Height: | Size: 124 B |
|
After Width: | Height: | Size: 140 B |
|
After Width: | Height: | Size: 124 B |
|
After Width: | Height: | Size: 126 B |
|
After Width: | Height: | Size: 139 B |
|
After Width: | Height: | Size: 124 B |
|
After Width: | Height: | Size: 126 B |
|
After Width: | Height: | Size: 129 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 129 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 138 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 139 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 139 B |
|
After Width: | Height: | Size: 128 B |
|
After Width: | Height: | Size: 129 B |
|
After Width: | Height: | Size: 135 B |
|
After Width: | Height: | Size: 158 B |
|
After Width: | Height: | Size: 158 B |
|
After Width: | Height: | Size: 158 B |
|
After Width: | Height: | Size: 163 B |
|
After Width: | Height: | Size: 158 B |
|
After Width: | Height: | Size: 157 B |
|
After Width: | Height: | Size: 158 B |
|
After Width: | Height: | Size: 168 B |
|
After Width: | Height: | Size: 158 B |
|
After Width: | Height: | Size: 161 B |
|
After Width: | Height: | Size: 158 B |
|
After Width: | Height: | Size: 158 B |
|
After Width: | Height: | Size: 168 B |
|
After Width: | Height: | Size: 158 B |
|
After Width: | Height: | Size: 158 B |
|
After Width: | Height: | Size: 175 B |
|
After Width: | Height: | Size: 187 B |
|
After Width: | Height: | Size: 192 B |
|
After Width: | Height: | Size: 188 B |
|
After Width: | Height: | Size: 191 B |
|
After Width: | Height: | Size: 189 B |
|
After Width: | Height: | Size: 186 B |
|
After Width: | Height: | Size: 188 B |
|
After Width: | Height: | Size: 204 B |
|
After Width: | Height: | Size: 188 B |
|
After Width: | Height: | Size: 204 B |