From a4e25a929f8ce5f8fc8e3c2d64bf5d70de724e11 Mon Sep 17 00:00:00 2001 From: CptbeffHeart <51067790+CptbeffHeart@users.noreply.github.com> Date: Wed, 27 Mar 2024 17:28:48 +0100 Subject: [PATCH 01/23] Update fr_fr.json modifying translation errors --- .../resources/assets/nova/lang/fr_fr.json | 80 +++++++++---------- 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/nova/src/main/resources/assets/nova/lang/fr_fr.json b/nova/src/main/resources/assets/nova/lang/fr_fr.json index bfa7a9c203..6947853693 100644 --- a/nova/src/main/resources/assets/nova/lang/fr_fr.json +++ b/nova/src/main/resources/assets/nova/lang/fr_fr.json @@ -1,9 +1,9 @@ { "item.nova.wrench": "Clé à molette", - "menu.nova.items.search": "Chercher un objet", + "menu.nova.items.search": "Rechercher un objet", "menu.nova.items.search.back": "Retour au menu principal", "menu.nova.items.search.clear": "Nettoyer la recherche", - "menu.nova.items.search-item": "Recherche...", + "menu.nova.items.search-item": "Rechercher...", "menu.nova.recipe": "Guide de recettes", "menu.nova.recipe.back": "Précédent", "menu.nova.recipe.time": "Temps: %ss", @@ -21,11 +21,11 @@ "menu.nova.side_config.output": "§6Sortie", "menu.nova.side_config.input": "§bEntrée", "menu.nova.side_config.input_output": "§aEntrée & Sortie", - "menu.nova.paged.back": "§7Revenir en arrière", + "menu.nova.paged.back": "§7Retour", "menu.nova.paged.forward": "§7Page suivante", "menu.nova.paged.go_infinite": "§8Aller à la page %s", "menu.nova.paged.go": "§8Aller à la page %s/%s", - "menu.nova.paged.limit_min": "§8Vous ne pouvez pas revenir plus loin en arrière", + "menu.nova.paged.limit_min": "§8Vous ne pouvez pas revenir plus en arrière", "menu.nova.paged.limit_max": "§8Il n'y a plus de pages", "menu.nova.visual_region.hide": "Cacher la zone", "menu.nova.visual_region.show": "Afficher la zone", @@ -39,53 +39,53 @@ "command.nova.no-players": "Aucun joueur trouvé.", "command.nova.no-item-in-hand": "Tenez un objet dans votre main et réessayez.", "command.nova.give.success": "A donné %s %s à %s", - "command.nova.list_nearby.success": "Sur les %s porte armures dans ce tronçon, %s sont des tile entity.", - "command.nova.get_nearest_data.failed": "Impossible de trouver une tile entity à proximité.", - "command.nova.remove_obsolete_models.success": "%s porte armures supprimés.", - "command.nova.remove_tile_entities.success": "%s tile entities supprimées.", + "command.nova.list_nearby.success": "Sur les %s porte-armures dans ce tronçon, %s sont des entité de bloc.", + "command.nova.get_nearest_data.failed": "Impossible de trouver une entité de bloc à proximité.", + "command.nova.remove_obsolete_models.success": "%s porte-armures supprimés.", + "command.nova.remove_tile_entities.success": "%s entités de bloc supprimées.", "command.nova.render_distance": "Votre distance de rendu a bien été définie à %s.", - "command.nova.show_tile_entity_data.success": "Ce %s a les données d'entité de tuile suivantes :\n%s", - "command.nova.show_tile_entity_data.failure": "Veuillez regarder sur la tile entity et réessayer après.", + "command.nova.show_tile_entity_data.success": "Ce %s a les données d'entité de bloc suivantes :\n%s", + "command.nova.show_tile_entity_data.failure": "Veuillez regarder une entité de bloc et réessayer après.", "command.nova.modeldata.item": "L'élément %s utilise %s et a les données personnalisées suivantes : %s.", "command.nova.modeldata.block": "Le bloc %s utilise %s et a les données personnalisées suivantes : %s.", - "command.nova.modeldata.no-nova-item": "Tenez un objet de Nova dans votre main et réessayez.", + "command.nova.modeldata.no-nova-item": "Tenez un objet Nova dans votre main et réessayez.", "command.nova.recipe.no-recipe": "Cet objet n'a pas de recette.", "command.nova.usage.no-usage": "Cet objet n'a aucune utilisation.", - "nova.tile_entity_limits.type_blacklist.deny": "Vous n'êtes pas autorisé à placer des tuiles-entités de ce type.", - "nova.tile_entity_limits.amount_global.deny": "Vous ne pouvez pas placer d'autres tuiles de ce type.", - "item.nova.wrench.mode.nova.item": "Mode : Articles", + "nova.tile_entity_limits.type_blacklist.deny": "Vous n'êtes pas autorisé à placer des entité de bloc de ce type.", + "nova.tile_entity_limits.amount_global.deny": "Vous ne pouvez pas placer d'autres entité de bloc de ce type.", + "item.nova.wrench.mode.nova.item": "Mode : Objets", "menu.nova.color_picker": "Choisissez une couleur...", "command.nova.network_reload.success": "Tous les réseaux actifs ont été rechargés.", - "nova.tile_entity_limits.world_blacklist.deny": "Vous n'êtes pas autorisé à placer des tuiles-entités de Nova dans ce monde.", - "nova.tile_entity_limits.type_world_blacklist.deny": "Vous n'êtes pas autorisé à placer cette entité-carreau dans ce monde.", - "nova.tile_entity_limits.amount_per_chunk.deny": "Vous ne pouvez pas placer d'autres tuiles de ce type dans ce bloc.", - "nova.tile_entity_limits.amount_global_total.deny": "Vous ne pouvez pas placer d'autres tuiles.", - "command.nova.invalidate_char_sizes.success": "L'invalidation de toutes les tailles de caractères a été effectuée avec succès. Elles seront recalculées lors de la prochaine création de resource pack.", + "nova.tile_entity_limits.world_blacklist.deny": "Vous n'êtes pas autorisé à placer des entité de bloc de Nova dans ce monde.", + "nova.tile_entity_limits.type_world_blacklist.deny": "Vous n'êtes pas autorisé à placer cette entité de bloc dans ce monde.", + "nova.tile_entity_limits.amount_per_chunk.deny": "Vous ne pouvez pas placer d'autres entité de bloc de ce type dans ce tronçon.", + "nova.tile_entity_limits.amount_global_total.deny": "Vous ne pouvez pas placer d'autres entité de bloc.", + "command.nova.invalidate_char_sizes.success": "L'invalidation de toutes les tailles de caractères a été effectuée avec succès. Elles seront recalculées lors de la prochaine création du resource pack.", "item.nova.wrench.mode.nova.energy": "Mode : Énergie", "item.nova.wrench.mode.nova.fluid": "Mode : Fluide", "menu.nova.energy_per_tick": "%s / tick", - "menu.nova.items": "Articles", - "command.nova.remove_invalid_vtes.success": "Successfully removed %s invalid vanilla tile-entities.", - "command.nova.remove_invalid_vtes.failure": "Aucune entité de carreaux de vanille invalide n'a été trouvée.", + "menu.nova.items": "Objets", + "command.nova.remove_invalid_vtes.success": "Successfully removed %s invalid vanilla entités de bloc.", + "command.nova.remove_invalid_vtes.failure": "Aucune entité de bloc vanilla invalide n'a été trouvée.", "waila.nova.required_tool": "Outil : ", "waila.nova.required_tool.none": "Aucun outil n'est nécessaire", "waila.nova.required_tool.unbreakable": "Incassable", - "nova.tile_entity_limits.amount_per_world.deny": "Vous ne pouvez pas placer plus de tuiles-entités de ce type dans ce monde.", + "nova.tile_entity_limits.amount_per_world.deny": "Vous ne pouvez pas placer plus d'entité de bloc de ce type dans ce monde.", "item.cbf_tags": "CBF : %s tag(s)", "menu.nova.items.cheat_mode.on": "Mode triche : Activé", "menu.nova.items.cheat_mode.off": "Mode triche : Désactivé", "command.nova.advanced_tooltips.all.failure": "Les infobulles avancées pour tous les éléments sont déjà activées.", - "nova.tile_entity_limits.amount_per_world_total.deny": "Il n'est pas possible de placer plus de tuiles dans ce monde.", - "nova.tile_entity_limits.amount_per_chunk_total.deny": "Il n'est pas possible de placer d'autres tuiles dans ce bloc.", + "nova.tile_entity_limits.amount_per_world_total.deny": "Il n'est pas possible de placer plus d'entité de bloc dans ce monde.", + "nova.tile_entity_limits.amount_per_chunk_total.deny": "Il n'est pas possible de placer d'autres entité de bloc dans ce tronçon.", "nova.outdated_version": "Vous utilisez une version obsolète de %s.\nVeuillez télécharger la dernière version à l'adresse %s.", "menu.nova.items.category.misc": "Divers", - "menu.nova.recipe.item_info": "Info sur l'article", + "menu.nova.recipe.item_info": "Info sur l'objet", "menu.nova.side_config.north": "Nord", "menu.nova.side_config.east": "Est", "menu.nova.side_config.south": "Sud", "menu.nova.side_config.west": "Ouest", "menu.nova.side_config.up": "Haut de la page", - "menu.nova.side_config.down": "En bas", + "menu.nova.side_config.down": "Bas", "menu.nova.side_config.simple_mode": "Mode simple", "menu.nova.side_config.advanced_mode": "Mode avancé", "menu.nova.side_config.simple_mode.unavailable": "Impossible de passer en mode simple en raison d'une configuration avancée.", @@ -96,34 +96,34 @@ "menu.nova.region.size": "Taille de la région : %s", "menu.nova.region.increase": "Agrandir la région", "menu.nova.region.decrease": "Réduire la région", - "inventory.nova.all": "Tous les stocks", + "inventory.nova.all": "Tous les inventaires", "command.nova.addons.header": "Addons (%s) : ", "command.nova.network_debug.nova.energy": "Changement de la vue de débogage pour les réseaux d'énergie.", "command.nova.network_debug.nova.item": "Bascule de la vue de débogage pour les réseaux d'éléments.", - "command.nova.network_debug.nova.fluid": "Changement de la vue de débogage pour Fluid-Networks.", - "command.nova.hitbox_debug": "Basculement de la vue de débogage pour les hitboxes virtuelles.", + "command.nova.network_debug.nova.fluid": "Changement de la vue de débogage pour les réseaux de fluide.", + "command.nova.hitbox_debug": "Activation de la vue de débogage pour les hitboxes virtuelles.", "command.nova.show_item_data.success": "Ce %s a les données suivantes :\n%s", "command.nova.show_item_data.no_item": "Tenez un objet dans votre main principale et réessayez.", - "command.nova.show_item_data.no_data": "Cet article n'a pas de données.", - "command.nova.resource_pack.create.start": "Création d'un pack de ressources... veuillez patienter", + "command.nova.show_item_data.no_data": "Cet objet n'a pas de données.", + "command.nova.resource_pack.create.start": "Création du pack de ressources... veuillez patienter", "command.nova.resource_pack.create.success": "Resource pack créé. Il est recommandé de redémarrer le serveur.", "command.nova.resource_pack.reupload.start": "Téléchargement du pack de ressources... veuillez patienter", "command.nova.resource_pack.reupload.fail": "Le pack de ressources n'a pas pu être téléchargé.", - "command.nova.resource_pack.reupload.success": "Resource pack uploaded to %s.", - "command.nova.reload_configs.start": "Recharger les configurations...", + "command.nova.resource_pack.reupload.success": "Le pack de ressources à été envoyé sur %s.", + "command.nova.reload_configs.start": "Rechargement des configurations...", "command.nova.reload_configs.success": "Configurations rechargées.", - "command.nova.reload_recipes.start": "Recettes de rechargement...", + "command.nova.reload_recipes.start": "Rechargement des recettes...", "command.nova.reload_recipes.success": "Recettes rechargées.", "command.nova.advanced_tooltips.off.success": "Désactivation des infobulles avancées.", "command.nova.advanced_tooltips.off.failure": "Les infobulles avancées sont déjà désactivées.", "command.nova.advanced_tooltips.nova.success": "Activation des infobulles avancées pour les éléments Nova.", "command.nova.advanced_tooltips.nova.failure": "Les infobulles avancées pour les éléments Nova sont déjà activées.", "command.nova.advanced_tooltips.all.success": "Activation des infobulles avancées pour tous les éléments.", - "command.nova.update_chunk_search_id.success": "Mise à jour de l'identifiant de recherche de morceaux.", - "command.nova.waila.off": "Handicapés WAILA.", - "command.nova.waila.already_off": "WAILA est déjà désactivé.", - "command.nova.waila.on": "Activé WAILA.", - "command.nova.waila.already_on": "WAILA est déjà activé.", + "command.nova.update_chunk_search_id.success": "Mise à jour de l'identifiant de recherche de tronçon.", + "command.nova.waila.off": "Désactivation du WAILA.", + "command.nova.waila.already_off": "Le WAILA est déjà désactivé.", + "command.nova.waila.on": "Activation du WAILA.", + "command.nova.waila.already_on": "Le WAILA est déjà activé.", "command.nova.list_blocks.success": "Total : %s", "command.nova.enchant.success": "A réussi à appliquer l'enchantement %s à %s's %s.", "command.nova.enchant.incompatible": "Impossible d'appliquer l'enchantement %s à %s's %s car il est incompatible avec les enchantements existants.", From 1c2e5af4a9e07132dbaa5965971108318dfad362 Mon Sep 17 00:00:00 2001 From: CptbeffHeart <51067790+CptbeffHeart@users.noreply.github.com> Date: Wed, 27 Mar 2024 17:37:58 +0100 Subject: [PATCH 02/23] Update fr_fr.json MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change "tronçon" to "chunk" --- nova/src/main/resources/assets/nova/lang/fr_fr.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nova/src/main/resources/assets/nova/lang/fr_fr.json b/nova/src/main/resources/assets/nova/lang/fr_fr.json index 6947853693..6027814257 100644 --- a/nova/src/main/resources/assets/nova/lang/fr_fr.json +++ b/nova/src/main/resources/assets/nova/lang/fr_fr.json @@ -39,7 +39,7 @@ "command.nova.no-players": "Aucun joueur trouvé.", "command.nova.no-item-in-hand": "Tenez un objet dans votre main et réessayez.", "command.nova.give.success": "A donné %s %s à %s", - "command.nova.list_nearby.success": "Sur les %s porte-armures dans ce tronçon, %s sont des entité de bloc.", + "command.nova.list_nearby.success": "Sur les %s porte-armures dans ce chunk, %s sont des entité de bloc.", "command.nova.get_nearest_data.failed": "Impossible de trouver une entité de bloc à proximité.", "command.nova.remove_obsolete_models.success": "%s porte-armures supprimés.", "command.nova.remove_tile_entities.success": "%s entités de bloc supprimées.", @@ -58,7 +58,7 @@ "command.nova.network_reload.success": "Tous les réseaux actifs ont été rechargés.", "nova.tile_entity_limits.world_blacklist.deny": "Vous n'êtes pas autorisé à placer des entité de bloc de Nova dans ce monde.", "nova.tile_entity_limits.type_world_blacklist.deny": "Vous n'êtes pas autorisé à placer cette entité de bloc dans ce monde.", - "nova.tile_entity_limits.amount_per_chunk.deny": "Vous ne pouvez pas placer d'autres entité de bloc de ce type dans ce tronçon.", + "nova.tile_entity_limits.amount_per_chunk.deny": "Vous ne pouvez pas placer d'autres entité de bloc de ce type dans ce chunk.", "nova.tile_entity_limits.amount_global_total.deny": "Vous ne pouvez pas placer d'autres entité de bloc.", "command.nova.invalidate_char_sizes.success": "L'invalidation de toutes les tailles de caractères a été effectuée avec succès. Elles seront recalculées lors de la prochaine création du resource pack.", "item.nova.wrench.mode.nova.energy": "Mode : Énergie", @@ -76,7 +76,7 @@ "menu.nova.items.cheat_mode.off": "Mode triche : Désactivé", "command.nova.advanced_tooltips.all.failure": "Les infobulles avancées pour tous les éléments sont déjà activées.", "nova.tile_entity_limits.amount_per_world_total.deny": "Il n'est pas possible de placer plus d'entité de bloc dans ce monde.", - "nova.tile_entity_limits.amount_per_chunk_total.deny": "Il n'est pas possible de placer d'autres entité de bloc dans ce tronçon.", + "nova.tile_entity_limits.amount_per_chunk_total.deny": "Il n'est pas possible de placer d'autres entité de bloc dans ce chunk.", "nova.outdated_version": "Vous utilisez une version obsolète de %s.\nVeuillez télécharger la dernière version à l'adresse %s.", "menu.nova.items.category.misc": "Divers", "menu.nova.recipe.item_info": "Info sur l'objet", @@ -119,7 +119,7 @@ "command.nova.advanced_tooltips.nova.success": "Activation des infobulles avancées pour les éléments Nova.", "command.nova.advanced_tooltips.nova.failure": "Les infobulles avancées pour les éléments Nova sont déjà activées.", "command.nova.advanced_tooltips.all.success": "Activation des infobulles avancées pour tous les éléments.", - "command.nova.update_chunk_search_id.success": "Mise à jour de l'identifiant de recherche de tronçon.", + "command.nova.update_chunk_search_id.success": "Mise à jour de l'identifiant de recherche de chunk.", "command.nova.waila.off": "Désactivation du WAILA.", "command.nova.waila.already_off": "Le WAILA est déjà désactivé.", "command.nova.waila.on": "Activation du WAILA.", From 8ddc9b3879b08f6a63e44dfc49eb741eff83597f Mon Sep 17 00:00:00 2001 From: NichtStudioCode <51272202+NichtStudioCode@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:38:54 +0100 Subject: [PATCH 03/23] Create dependabot.yml --- .github/dependabot.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000000..21a90a37f0 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,10 @@ +version: 2 +updates: + - package-ecosystem: "gradle" + directory: "/" + schedule: + interval: "daily" + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" From fbc50f8ffe8a0a486c3f6583cae0c2e08a890e30 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:39:24 +0000 Subject: [PATCH 04/23] Bump actions/checkout from 3 to 4 Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/checkout dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/dokka.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f071fd238..c14b3569b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Up JDK 17 uses: actions/setup-java@v3 diff --git a/.github/workflows/dokka.yml b/.github/workflows/dokka.yml index e57a3ccb9b..b9803c9428 100644 --- a/.github/workflows/dokka.yml +++ b/.github/workflows/dokka.yml @@ -13,7 +13,7 @@ jobs: steps: - name: Checkout Code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Set Up JDK 17 uses: actions/setup-java@v3 From e3044350009e71b4c8f23db4f4d3db9d1f21bd81 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:39:28 +0000 Subject: [PATCH 05/23] Bump actions/setup-java from 3 to 4 Bumps [actions/setup-java](https://github.com/actions/setup-java) from 3 to 4. - [Release notes](https://github.com/actions/setup-java/releases) - [Commits](https://github.com/actions/setup-java/compare/v3...v4) --- updated-dependencies: - dependency-name: actions/setup-java dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- .github/workflows/dokka.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f071fd238..0608cb19ba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,7 @@ jobs: uses: actions/checkout@v3 - name: Set Up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: 17 distribution: adopt diff --git a/.github/workflows/dokka.yml b/.github/workflows/dokka.yml index e57a3ccb9b..365f1c936b 100644 --- a/.github/workflows/dokka.yml +++ b/.github/workflows/dokka.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v3 - name: Set Up JDK 17 - uses: actions/setup-java@v3 + uses: actions/setup-java@v4 with: java-version: 17 distribution: adopt From f483ffa17d830d10bdd75d80431286d627ca3995 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:39:32 +0000 Subject: [PATCH 06/23] Bump JamesIves/github-pages-deploy-action from 4.4.1 to 4.5.0 Bumps [JamesIves/github-pages-deploy-action](https://github.com/jamesives/github-pages-deploy-action) from 4.4.1 to 4.5.0. - [Release notes](https://github.com/jamesives/github-pages-deploy-action/releases) - [Commits](https://github.com/jamesives/github-pages-deploy-action/compare/v4.4.1...v4.5.0) --- updated-dependencies: - dependency-name: JamesIves/github-pages-deploy-action dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- .github/workflows/dokka.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/dokka.yml b/.github/workflows/dokka.yml index e57a3ccb9b..1b819fe423 100644 --- a/.github/workflows/dokka.yml +++ b/.github/workflows/dokka.yml @@ -34,6 +34,6 @@ jobs: --scan - name: Deploy to Github Pages - uses: JamesIves/github-pages-deploy-action@v4.4.1 + uses: JamesIves/github-pages-deploy-action@v4.5.0 with: folder: build/dokka/htmlMultiModule From dc39f383292e1a44470c2e6c86ef297d574fd051 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:39:32 +0000 Subject: [PATCH 07/23] Bump org.apache.maven.resolver:maven-resolver-connector-basic Bumps [org.apache.maven.resolver:maven-resolver-connector-basic](https://github.com/apache/maven-resolver) from 1.8.2 to 1.9.18. - [Release notes](https://github.com/apache/maven-resolver/releases) - [Commits](https://github.com/apache/maven-resolver/compare/maven-resolver-1.8.2...maven-resolver-1.9.18) --- updated-dependencies: - dependency-name: org.apache.maven.resolver:maven-resolver-connector-basic dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2120a47087..5e0385a639 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -44,7 +44,7 @@ ktor-client-core-jvm = { group = "io.ktor", name = "ktor-client-core-jvm", versi ktor-serialization-gson-jvm = { group = "io.ktor", name = "ktor-serialization-gson-jvm", version.ref = "ktor" } ktor-server-cio-jvm = { group = "io.ktor", name = "ktor-server-cio-jvm", version.ref = "ktor" } ktor-server-core-jvm = { group = "io.ktor", name = "ktor-server-core-jvm", version.ref = "ktor" } -maven-resolver-connector-basic = { group = "org.apache.maven.resolver", name = "maven-resolver-connector-basic", version = "1.8.2" } +maven-resolver-connector-basic = { group = "org.apache.maven.resolver", name = "maven-resolver-connector-basic", version = "1.9.18" } maven-resolver-provider = { group = "org.apache.maven", name = "maven-resolver-provider", version = "3.8.5" } maven-resolver-transport-http = { group = "org.apache.maven.resolver", name = "maven-resolver-transport-http", version = "1.8.2" } minecraft-asset-downloader = { group = "xyz.xenondevs", name = "minecraft-asset-downloader", version = "1.3" } From f3490a7cfde9acb2e3770e0dfe3ec442d34df4d6 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:39:36 +0000 Subject: [PATCH 08/23] Bump actions/upload-artifact from 2 to 4 Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 2 to 4. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](https://github.com/actions/upload-artifact/compare/v2...v4) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f071fd238..41e25af756 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -35,7 +35,7 @@ jobs: - name: Upload Artifacts id: upload - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@v4 with: name: Artifacts path: ./artifacts/*.jar From 2996bedcc421998ba9e7b85ef4d3efb689247f74 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:39:37 +0000 Subject: [PATCH 09/23] Bump org.jetbrains:annotations from 24.0.1 to 24.1.0 Bumps [org.jetbrains:annotations](https://github.com/JetBrains/java-annotations) from 24.0.1 to 24.1.0. - [Release notes](https://github.com/JetBrains/java-annotations/releases) - [Changelog](https://github.com/JetBrains/java-annotations/blob/master/CHANGELOG.md) - [Commits](https://github.com/JetBrains/java-annotations/compare/24.0.1...24.1.0) --- updated-dependencies: - dependency-name: org.jetbrains:annotations dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- nova-api/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova-api/build.gradle.kts b/nova-api/build.gradle.kts index 67c7088d30..a4cc95b18c 100644 --- a/nova-api/build.gradle.kts +++ b/nova-api/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } dependencies { - implementation("org.jetbrains:annotations:24.0.1") + implementation("org.jetbrains:annotations:24.1.0") compileOnly(project(":nova-loader")) compileOnly(libs.paper.api) } From 9c31a59aa181c07821d08b0c74ade99200210c53 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:39:41 +0000 Subject: [PATCH 10/23] Bump gradle/gradle-build-action from 2 to 3 Bumps [gradle/gradle-build-action](https://github.com/gradle/gradle-build-action) from 2 to 3. - [Release notes](https://github.com/gradle/gradle-build-action/releases) - [Commits](https://github.com/gradle/gradle-build-action/compare/v2...v3) --- updated-dependencies: - dependency-name: gradle/gradle-build-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] --- .github/workflows/ci.yml | 6 +++--- .github/workflows/dokka.yml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8f071fd238..3007d8e684 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -21,12 +21,12 @@ jobs: distribution: adopt - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@v3 with: cache-disabled: true - name: Build Spigot-Mapped - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@v3 with: arguments: | loaderJarSpigot @@ -42,7 +42,7 @@ jobs: - name: Deploy Mojang-Mapped if: github.event_name == 'release' - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@v3 with: arguments: | publishNovaPublicationToXenondevsRepository diff --git a/.github/workflows/dokka.yml b/.github/workflows/dokka.yml index e57a3ccb9b..a9dd53df9e 100644 --- a/.github/workflows/dokka.yml +++ b/.github/workflows/dokka.yml @@ -22,12 +22,12 @@ jobs: distribution: adopt - name: Setup Gradle - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@v3 with: cache-disabled: true - name: Run Dokka - uses: gradle/gradle-build-action@v2 + uses: gradle/gradle-build-action@v3 with: arguments: | dokkaHtmlMultiModule From d0b023ca49dedd07887ad1293df72ad725ea96a1 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:39:42 +0000 Subject: [PATCH 11/23] Bump com.fastasyncworldedit:FastAsyncWorldEdit-Libs-Core Bumps [com.fastasyncworldedit:FastAsyncWorldEdit-Libs-Core](https://github.com/IntellectualSites/FastAsyncWorldEdit) from 2.6.0 to 2.9.1. - [Release notes](https://github.com/IntellectualSites/FastAsyncWorldEdit/releases) - [Commits](https://github.com/IntellectualSites/FastAsyncWorldEdit/compare/2.6.0...2.9.1) --- updated-dependencies: - dependency-name: com.fastasyncworldedit:FastAsyncWorldEdit-Libs-Core dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- nova-hooks/nova-hook-fastasyncworldedit/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova-hooks/nova-hook-fastasyncworldedit/build.gradle.kts b/nova-hooks/nova-hook-fastasyncworldedit/build.gradle.kts index 7af6a7d153..3c301560f3 100644 --- a/nova-hooks/nova-hook-fastasyncworldedit/build.gradle.kts +++ b/nova-hooks/nova-hook-fastasyncworldedit/build.gradle.kts @@ -6,7 +6,7 @@ plugins { dependencies { paperweight.paperDevBundle(libs.versions.paper) implementation(project(":nova")) - compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Libs-Core:2.6.0") { isTransitive = false } + compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Libs-Core:2.9.1") { isTransitive = false } compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Core:2.6.0") { isTransitive = false } compileOnly("com.fastasyncworldedit:FastAsyncWorldEdit-Bukkit:2.6.0") { isTransitive = false } } \ No newline at end of file From efabad1c477e5aaacf4854330fedb77acd248271 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:39:49 +0000 Subject: [PATCH 12/23] Bump com.plotsquared:PlotSquared-Bukkit from 6.10.5 to 6.11.2 Bumps [com.plotsquared:PlotSquared-Bukkit](https://github.com/IntellectualSites/PlotSquared) from 6.10.5 to 6.11.2. - [Release notes](https://github.com/IntellectualSites/PlotSquared/releases) - [Commits](https://github.com/IntellectualSites/PlotSquared/commits) --- updated-dependencies: - dependency-name: com.plotsquared:PlotSquared-Bukkit dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- nova-hooks/nova-hook-plotsquared/build.gradle.kts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova-hooks/nova-hook-plotsquared/build.gradle.kts b/nova-hooks/nova-hook-plotsquared/build.gradle.kts index 8253f21fe7..a7cd1c4d05 100644 --- a/nova-hooks/nova-hook-plotsquared/build.gradle.kts +++ b/nova-hooks/nova-hook-plotsquared/build.gradle.kts @@ -12,5 +12,5 @@ dependencies { implementation(project(":nova")) implementation(project(":nova-api")) compileOnly("com.plotsquared:PlotSquared-Core:6.10.5") { isTransitive = false } - compileOnly("com.plotsquared:PlotSquared-Bukkit:6.10.5") { isTransitive = false } + compileOnly("com.plotsquared:PlotSquared-Bukkit:6.11.2") { isTransitive = false } } \ No newline at end of file From 05c4ee62bb741d782fd3a1341108cc158fb99ee9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Fri, 29 Mar 2024 09:39:56 +0000 Subject: [PATCH 13/23] Bump net.lingala.zip4j:zip4j from 2.11.2 to 2.11.5 Bumps [net.lingala.zip4j:zip4j](https://github.com/srikanth-lingala/zip4j) from 2.11.2 to 2.11.5. - [Release notes](https://github.com/srikanth-lingala/zip4j/releases) - [Commits](https://github.com/srikanth-lingala/zip4j/compare/v2.11.2...v2.11.5) --- updated-dependencies: - dependency-name: net.lingala.zip4j:zip4j dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] --- gradle/libs.versions.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 2120a47087..6cea5ebd04 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -53,7 +53,7 @@ nmsutilities = { group = "xyz.xenondevs", name = "nms-utilities", version = "0.1 paper-api = { group = "io.papermc.paper", name = "paper-api", version.ref = "paper" } specialsource = { group = "net.md-5", name = "SpecialSource", version = "1.11.0" } stringremapper = { group = "xyz.xenondevs.string-remapper", name = "string-remapper-core", version.ref = "stringremapper" } -zip4j = { group = "net.lingala.zip4j", name = "zip4j", version = "2.11.2" } +zip4j = { group = "net.lingala.zip4j", name = "zip4j", version = "2.11.5" } [bundles] cbf = ["cosmic-binary-format", "cosmic-binary-format-netty-adapter"] From 8578a6a37fa5e34c29597f67d6c5766ad11f5223 Mon Sep 17 00:00:00 2001 From: NichtStudioCode <51272202+NichtStudioCode@users.noreply.github.com> Date: Fri, 29 Mar 2024 10:45:09 +0100 Subject: [PATCH 14/23] Create dependency-submission.yml --- .github/workflows/dependency-submission.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 .github/workflows/dependency-submission.yml diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml new file mode 100644 index 0000000000..b63317bc02 --- /dev/null +++ b/.github/workflows/dependency-submission.yml @@ -0,0 +1,15 @@ +name: Dependency Submission + +on: [ push ] + +permissions: + contents: write + +jobs: + dependency-submission: + runs-on: ubuntu-latest + steps: + - name: Checkout sources + uses: actions/checkout@v4 + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@v3 From 53e66b752f8c40920987547712e9cb6b62ed42d2 Mon Sep 17 00:00:00 2001 From: NichtStudioCode <51272202+NichtStudioCode@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:00:57 +0100 Subject: [PATCH 15/23] Update dependency-submission.yml --- .github/workflows/dependency-submission.yml | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/.github/workflows/dependency-submission.yml b/.github/workflows/dependency-submission.yml index b63317bc02..b007a8d045 100644 --- a/.github/workflows/dependency-submission.yml +++ b/.github/workflows/dependency-submission.yml @@ -9,7 +9,14 @@ jobs: dependency-submission: runs-on: ubuntu-latest steps: - - name: Checkout sources - uses: actions/checkout@v4 - - name: Generate and submit dependency graph - uses: gradle/actions/dependency-submission@v3 + - name: Checkout Code + uses: actions/checkout@v4 + + - name: Set Up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: adopt + + - name: Generate and submit dependency graph + uses: gradle/actions/dependency-submission@v3 \ No newline at end of file From b672f48d67fb90fbae633ff695c8168fd6785cce Mon Sep 17 00:00:00 2001 From: NichtStudioCode <51272202+NichtStudioCode@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:08:44 +0100 Subject: [PATCH 16/23] Update gradle --- gradle/wrapper/gradle-wrapper.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index ac72c34e8a..b82aa23a4f 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip networkTimeout=10000 validateDistributionUrl=true zipStoreBase=GRADLE_USER_HOME From 7ae5c4f2aae63e0fdf69b0ac155bcf2fea5abd5f Mon Sep 17 00:00:00 2001 From: NichtStudioCode <51272202+NichtStudioCode@users.noreply.github.com> Date: Sat, 24 Feb 2024 13:53:32 +0100 Subject: [PATCH 17/23] Fix some class loading issues --- .../nova/loader/NovaClassLoader.java | 33 ++++++++++--------- .../nova/transformer/PatchedClassLoader.kt | 5 +-- 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaClassLoader.java b/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaClassLoader.java index 4ab3dfd99a..1b7661700c 100644 --- a/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaClassLoader.java +++ b/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaClassLoader.java @@ -31,27 +31,30 @@ private static URL[] concatUrls(URL url, URL[] arr) { public @NotNull Class loadClass(@NotNull String name, boolean resolve, boolean checkParents, boolean checkPrioritizedLibraries) throws ClassNotFoundException { // TODO: evaluate the possibility of potential deadlocks considering PatchedClassLoader + + // check if class is already loaded + Class c = findLoadedClass(name); + + // try load class from prioritized libraries synchronized (getClassLoadingLock(name)) { - // check if class is already loaded - Class c = findLoadedClass(name); - - // try load class from prioritized libraries if (c == null && checkPrioritizedLibraries) c = tryFindClass(prioritizedLibraries, name); - - // try load class from parent (PaperPluginClassLoader) - if (c == null && checkParents) - c = tryLoadClass(getParent(), name); - - // load class from nova and libraries or throw ClassNotFoundException + } + + // try load class from parent (PaperPluginClassLoader) + if (c == null && checkParents) + c = tryLoadClass(getParent(), name); + + // load class from nova and libraries or throw ClassNotFoundException + synchronized (getClassLoadingLock(name)) { if (c == null) c = findClass(name); - - if (resolve) - resolveClass(c); - - return c; } + + if (resolve) + resolveClass(c); + + return c; } private @Nullable Class tryLoadClass(@NotNull ClassLoader loader, @NotNull String name) { diff --git a/nova/src/main/kotlin/xyz/xenondevs/nova/transformer/PatchedClassLoader.kt b/nova/src/main/kotlin/xyz/xenondevs/nova/transformer/PatchedClassLoader.kt index f9cd89f99b..fbd3f8b9b1 100644 --- a/nova/src/main/kotlin/xyz/xenondevs/nova/transformer/PatchedClassLoader.kt +++ b/nova/src/main/kotlin/xyz/xenondevs/nova/transformer/PatchedClassLoader.kt @@ -60,8 +60,9 @@ internal class PatchedClassLoader : ClassLoader(PAPER_CLASS_LOADER.parent) { for (i in 3..stackTrace.lastIndex) { // skip the first three elements: Thread.getStackTrace(), checkNonRecursive(), loadClass() val className = stackTrace[i].className - // check whether the stack trace element is PatchedClassLoader - if (className == "xyz.xenondevs.nova.transformer.PatchedClassLoader") + // check whether the stack trace element is NovaClassLoader or PatchedClassLoader + // if yes, this indicates a recursive call (PatchedClassLoader) or a call that will become recursive (NovaClassLoader) + if (className == "xyz.xenondevs.nova.loader.NovaClassLoader" || className == "xyz.xenondevs.nova.transformer.PatchedClassLoader") return false } From 752cee7d088de29f9dd3d268ac58512345c2920e Mon Sep 17 00:00:00 2001 From: NichtStudioCode <51272202+NichtStudioCode@users.noreply.github.com> Date: Fri, 29 Mar 2024 11:50:16 +0100 Subject: [PATCH 18/23] Use Paper's library loader for main libraries Fixes #318 This also removes the ability to specify the library directory via system properties, the alternative for that would be to use symlinks --- .../nova/loader/NovaBootstrapper.java | 2 - .../nova/loader/NovaClassLoader.java | 11 +---- .../xyz/xenondevs/nova/loader/NovaLoader.java | 42 +++++++++++++++++++ .../nova/loader/library/LibraryLoader.java | 7 +--- .../src/main/resources/paper-plugin.yml | 1 + 5 files changed, 46 insertions(+), 17 deletions(-) create mode 100644 nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaLoader.java diff --git a/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaBootstrapper.java b/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaBootstrapper.java index 1fd95b252b..d0a3db6ae5 100644 --- a/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaBootstrapper.java +++ b/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaBootstrapper.java @@ -19,7 +19,6 @@ public class NovaBootstrapper implements PluginBootstrap { private static final String NOVA_JAR_PATH = "/nova.jar"; - private static final String LIBRARIES_PATH = "/libraries.json"; private static final String PRIORITIZED_LIBRARIES_PATH = "/prioritized_libraries.json"; private static final String BUNDLER_DIR_PATH = ".internal_data/bundler"; @@ -36,7 +35,6 @@ public void bootstrap(@NotNull BootstrapContext context) { var novaJar = extractNovaJar(context); var classLoader = new NovaClassLoader( novaJar.toURI().toURL(), - loadLibraries(logger, LIBRARIES_PATH), loadLibraries(logger, PRIORITIZED_LIBRARIES_PATH), getClass().getClassLoader() // PaperPluginClassLoader ); diff --git a/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaClassLoader.java b/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaClassLoader.java index 1b7661700c..31128e2519 100644 --- a/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaClassLoader.java +++ b/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaClassLoader.java @@ -12,18 +12,11 @@ public class NovaClassLoader extends URLClassLoader { // Under no circumstances should it be used to load classes, only to find resources. private final URLClassLoader prioritizedLibraries; - public NovaClassLoader(@NotNull URL nova, @NotNull URL @NotNull [] libraries, @NotNull URL @NotNull [] prioritizedLibraries, @Nullable ClassLoader parent) { - super(concatUrls(nova, libraries), parent); + public NovaClassLoader(@NotNull URL nova, @NotNull URL @NotNull [] prioritizedLibraries, @Nullable ClassLoader parent) { + super(new URL[] {nova}, parent); this.prioritizedLibraries = new URLClassLoader(prioritizedLibraries, null); } - private static URL[] concatUrls(URL url, URL[] arr) { - URL[] result = new URL[arr.length + 1]; - result[0] = url; - System.arraycopy(arr, 0, result, 1, arr.length); - return result; - } - @Override public @NotNull Class loadClass(@NotNull String name, boolean resolve) throws ClassNotFoundException { return loadClass(name, resolve, true, true); diff --git a/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaLoader.java b/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaLoader.java new file mode 100644 index 0000000000..e20c58e33d --- /dev/null +++ b/nova-loader/src/main/java/xyz/xenondevs/nova/loader/NovaLoader.java @@ -0,0 +1,42 @@ +package xyz.xenondevs.nova.loader; + +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import io.papermc.paper.plugin.loader.PluginClasspathBuilder; +import io.papermc.paper.plugin.loader.PluginLoader; +import io.papermc.paper.plugin.loader.library.impl.MavenLibraryResolver; +import org.eclipse.aether.repository.RemoteRepository; +import org.jetbrains.annotations.NotNull; +import xyz.xenondevs.nova.loader.library.LibraryFileParser; +import xyz.xenondevs.nova.loader.library.NovaLibraryLoader; + +import java.io.IOException; +import java.io.InputStreamReader; + +public class NovaLoader implements PluginLoader { + + private static final String LIBRARIES_PATH = "/libraries.json"; + + @Override + public void classloader(@NotNull PluginClasspathBuilder pluginClasspathBuilder) { + JsonObject librariesJson; + try (var stream = NovaLibraryLoader.class.getResourceAsStream(LIBRARIES_PATH)) { + assert stream != null; + librariesJson = JsonParser.parseReader(new InputStreamReader(stream)).getAsJsonObject(); + } catch (IOException e) { + throw new RuntimeException(e); + } + + var repositories = LibraryFileParser.readRepositories(librariesJson); + var dependencies = LibraryFileParser.readLibraries(librariesJson); + + MavenLibraryResolver resolver = new MavenLibraryResolver(); + for (var dependency : dependencies) + resolver.addDependency(dependency); + for (var repository : repositories) + resolver.addRepository(new RemoteRepository.Builder(repository, "default", repository).build()); + + pluginClasspathBuilder.addLibrary(resolver); + } + +} diff --git a/nova-loader/src/main/java/xyz/xenondevs/nova/loader/library/LibraryLoader.java b/nova-loader/src/main/java/xyz/xenondevs/nova/loader/library/LibraryLoader.java index b1bd5a1160..d13bc18dbe 100644 --- a/nova-loader/src/main/java/xyz/xenondevs/nova/loader/library/LibraryLoader.java +++ b/nova-loader/src/main/java/xyz/xenondevs/nova/loader/library/LibraryLoader.java @@ -27,12 +27,7 @@ public class LibraryLoader { - private static final File LIBRARIES_DIR; - - static { - var repoProperty = System.getProperty("repo"); - LIBRARIES_DIR = repoProperty != null ? new File(repoProperty) : new File("libraries"); - } + private static final File LIBRARIES_DIR = new File("libraries"); public static List downloadLibraries(List repositories, List dependencies, Set exclusions, Logger logger) throws DependencyResolutionException { // setup connection diff --git a/nova-loader/src/main/resources/paper-plugin.yml b/nova-loader/src/main/resources/paper-plugin.yml index cf1140f5f3..f68e722c81 100644 --- a/nova-loader/src/main/resources/paper-plugin.yml +++ b/nova-loader/src/main/resources/paper-plugin.yml @@ -3,6 +3,7 @@ version: "${version}" api-version: "1.20" authors: [ "StudioCode", "ByteZ1337", "Javahase" ] website: "https://github.com/xenondevs/Nova/" +loader: xyz.xenondevs.nova.loader.NovaLoader bootstrapper: xyz.xenondevs.nova.loader.NovaBootstrapper main: xyz.xenondevs.nova.loader.NovaJavaPlugin load: STARTUP From 16e91409755ef5c97091a4bc7b95b76c018fd6f5 Mon Sep 17 00:00:00 2001 From: NichtStudioCode <51272202+NichtStudioCode@users.noreply.github.com> Date: Fri, 29 Mar 2024 12:06:20 +0100 Subject: [PATCH 19/23] Fix some enchantments not being applicable with anvil Adresses #335 --- .../nova/transformer/patch/item/AnvilResultPatch.kt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nova/src/main/kotlin/xyz/xenondevs/nova/transformer/patch/item/AnvilResultPatch.kt b/nova/src/main/kotlin/xyz/xenondevs/nova/transformer/patch/item/AnvilResultPatch.kt index 34e5f0868e..93280e4dd5 100644 --- a/nova/src/main/kotlin/xyz/xenondevs/nova/transformer/patch/item/AnvilResultPatch.kt +++ b/nova/src/main/kotlin/xyz/xenondevs/nova/transformer/patch/item/AnvilResultPatch.kt @@ -17,6 +17,7 @@ import xyz.xenondevs.nova.item.behavior.Damageable.Companion.isValidRepairItem import xyz.xenondevs.nova.item.behavior.Damageable.Companion.setDamage import xyz.xenondevs.nova.item.behavior.Enchantable import xyz.xenondevs.nova.item.enchantment.Enchantment +import xyz.xenondevs.nova.item.enchantment.VanillaEnchantment import xyz.xenondevs.nova.registry.NovaRegistries import xyz.xenondevs.nova.transformer.MethodTransformer import xyz.xenondevs.nova.util.bukkitMirror @@ -244,9 +245,9 @@ internal object AnvilResultPatch : MethodTransformer(AnvilMenu::createResult) { } private fun canEnchant(itemStack: ItemStack, enchantment: Enchantment): Boolean { - return NovaRegistries.ENCHANTMENT_CATEGORY.any { category -> - enchantment in category.enchantments && category.canEnchant(itemStack) - } + return NovaRegistries.ENCHANTMENT_CATEGORY.any { category -> + enchantment in category.enchantments && category.canEnchant(itemStack) + } || (enchantment is VanillaEnchantment && enchantment.enchantment.canEnchant(itemStack)) } } \ No newline at end of file From a1d130269c273bc2bd41e60e5ec686cd8296bcb5 Mon Sep 17 00:00:00 2001 From: NichtStudioCode <51272202+NichtStudioCode@users.noreply.github.com> Date: Fri, 29 Mar 2024 12:25:39 +0100 Subject: [PATCH 20/23] Fix BlockBreaker not calling BlockDamageEvent Fix #312, Fix #337 --- .../nova/world/block/logic/break/BlockBreaker.kt | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/nova/src/main/kotlin/xyz/xenondevs/nova/world/block/logic/break/BlockBreaker.kt b/nova/src/main/kotlin/xyz/xenondevs/nova/world/block/logic/break/BlockBreaker.kt index a200b21ab5..1e38d13929 100644 --- a/nova/src/main/kotlin/xyz/xenondevs/nova/world/block/logic/break/BlockBreaker.kt +++ b/nova/src/main/kotlin/xyz/xenondevs/nova/world/block/logic/break/BlockBreaker.kt @@ -19,6 +19,7 @@ import org.bukkit.block.BlockFace import org.bukkit.craftbukkit.v1_20_R3.event.CraftEventFactory import org.bukkit.entity.Player import org.bukkit.event.block.BlockBreakEvent +import org.bukkit.event.block.BlockDamageEvent import org.bukkit.event.block.BlockExpEvent import org.bukkit.inventory.ItemStack import org.bukkit.potion.PotionEffectType @@ -146,7 +147,7 @@ internal sealed class BlockBreaker(val player: Player, val block: Block, val sta if (isDone) return - val damage = calculateDamage() + var damage = calculateDamage() val clientsideDamage = calculateClientsideDamage() if (clientsideDamage >= 1 && damage < 1) { @@ -154,6 +155,19 @@ internal sealed class BlockBreaker(val player: Player, val block: Block, val sta return } + val damageEvent = BlockDamageEvent( + player, + block, + BlockFaceUtils.determineBlockFaceLookingAt(player.eyeLocation) ?: BlockFace.NORTH, + tool ?: ItemStack(Material.AIR), + damage > 1 + ) + callEvent(damageEvent) + if (damageEvent.isCancelled) + return + if (damageEvent.instaBreak && damage < 1) + damage = 1.0 + if (damage >= 1.0 || serverTick >= blockedUntil) { progress += damage From d8454071b41ff3b754a624578487c881d40830ed Mon Sep 17 00:00:00 2001 From: NichtStudioCode <51272202+NichtStudioCode@users.noreply.github.com> Date: Fri, 29 Mar 2024 12:27:43 +0100 Subject: [PATCH 21/23] Update BlockBreaker.kt --- .../nova/world/block/logic/break/BlockBreaker.kt | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/nova/src/main/kotlin/xyz/xenondevs/nova/world/block/logic/break/BlockBreaker.kt b/nova/src/main/kotlin/xyz/xenondevs/nova/world/block/logic/break/BlockBreaker.kt index 1e38d13929..c4ae93eedf 100644 --- a/nova/src/main/kotlin/xyz/xenondevs/nova/world/block/logic/break/BlockBreaker.kt +++ b/nova/src/main/kotlin/xyz/xenondevs/nova/world/block/logic/break/BlockBreaker.kt @@ -171,18 +171,9 @@ internal sealed class BlockBreaker(val player: Player, val block: Block, val sta if (damage >= 1.0 || serverTick >= blockedUntil) { progress += damage - // - if (progress < 1.0 && destroyTicks % 4 == 0) { - if (soundGroup != null) { - block.pos.playSound( - soundGroup.hitSound, - SoundCategory.BLOCKS, - soundGroup.hitVolume, - soundGroup.hitPitch - ) - } - } - // + // play break sound every 4 ticks + if (progress < 1.0 && destroyTicks % 4 == 0 && soundGroup != null) + block.pos.playSound(soundGroup.hitSound,SoundCategory.BLOCKS, soundGroup.hitVolume, soundGroup.hitPitch) destroyTicks++ } From bbc256c9fa8cd78c4a0a73c5d0144dc43860ba07 Mon Sep 17 00:00:00 2001 From: NichtStudioCode <51272202+NichtStudioCode@users.noreply.github.com> Date: Fri, 29 Mar 2024 14:27:34 +0100 Subject: [PATCH 22/23] Fix char size calculation of yRange for bitmap providers --- .../font/provider/bitmap/BitmapGlyphImageType.kt | 14 ++++++++------ .../builder/font/provider/bitmap/BitmapProvider.kt | 8 ++++---- .../font/provider/bitmap/MutableBitmapProvider.kt | 2 +- .../xyz/xenondevs/nova/util/data/ImageUtils.kt | 8 +++++--- 4 files changed, 18 insertions(+), 14 deletions(-) diff --git a/nova/src/main/kotlin/xyz/xenondevs/nova/data/resources/builder/font/provider/bitmap/BitmapGlyphImageType.kt b/nova/src/main/kotlin/xyz/xenondevs/nova/data/resources/builder/font/provider/bitmap/BitmapGlyphImageType.kt index e3c04d2b64..06e5de8c06 100644 --- a/nova/src/main/kotlin/xyz/xenondevs/nova/data/resources/builder/font/provider/bitmap/BitmapGlyphImageType.kt +++ b/nova/src/main/kotlin/xyz/xenondevs/nova/data/resources/builder/font/provider/bitmap/BitmapGlyphImageType.kt @@ -1,5 +1,7 @@ package xyz.xenondevs.nova.data.resources.builder.font.provider.bitmap +import org.joml.Vector2i +import org.joml.Vector2ic import xyz.xenondevs.nova.util.data.ImageUtils import java.awt.image.BufferedImage @@ -20,16 +22,16 @@ interface BitmapGlyphImageType { * The values in the returned Pair correspond with the * y-coordinate of the first non-empty row from the top and bottom side of the image. * - * @return An integer pair containing the top and bottom borders, or null if the image is completely empty. + * @return A vector containing the top and bottom borders, or null if the image is completely empty. */ - fun findHorizontalBorders(image: T, width: Int, height: Int): Pair? + fun findTopBottomBorders(image: T, width: Int, height: Int): Vector2ic? companion object { /** * A glyph texture represented by a one-dimensional array of argb integers. */ - val INT_ARRAY: BitmapGlyphImageType = object : BitmapGlyphImageType { + val ARGB_ARRAY: BitmapGlyphImageType = object : BitmapGlyphImageType { // TODO: consider moving these to ImageUtils as well? override fun findRightBorder(image: IntArray, width: Int, height: Int): Int? { @@ -46,7 +48,7 @@ interface BitmapGlyphImageType { return if (x != -1) x else null } - override fun findHorizontalBorders(image: IntArray, width: Int, height: Int): Pair? { + override fun findTopBottomBorders(image: IntArray, width: Int, height: Int): Vector2ic? { fun isRowEmpty(y: Int): Boolean { for (x in 0.. { var bottom = height - 1 while (bottom > top && isRowEmpty(bottom)) bottom-- - return top to bottom + return Vector2i(top, bottom) } } @@ -72,7 +74,7 @@ interface BitmapGlyphImageType { */ val BUFFERED_IMAGE: BitmapGlyphImageType = object : BitmapGlyphImageType { override fun findRightBorder(image: BufferedImage, width: Int, height: Int): Int? = ImageUtils.findRightBorder(image) - override fun findHorizontalBorders(image: BufferedImage, width: Int, height: Int): Pair? = ImageUtils.findHorizontalBorders(image) + override fun findTopBottomBorders(image: BufferedImage, width: Int, height: Int): Vector2ic? = ImageUtils.findTopBottomBorders(image) } } diff --git a/nova/src/main/kotlin/xyz/xenondevs/nova/data/resources/builder/font/provider/bitmap/BitmapProvider.kt b/nova/src/main/kotlin/xyz/xenondevs/nova/data/resources/builder/font/provider/bitmap/BitmapProvider.kt index 956fbe8a39..7c30b47fd7 100644 --- a/nova/src/main/kotlin/xyz/xenondevs/nova/data/resources/builder/font/provider/bitmap/BitmapProvider.kt +++ b/nova/src/main/kotlin/xyz/xenondevs/nova/data/resources/builder/font/provider/bitmap/BitmapProvider.kt @@ -101,10 +101,10 @@ abstract class BitmapProvider internal constructor() : FontProvider() { var minY = 0f var maxY = 0f - val horizontalBorders = glyphImageType.findHorizontalBorders(glyph, glyphWidth, glyphHeight) + val horizontalBorders = glyphImageType.findTopBottomBorders(glyph, glyphWidth, glyphHeight) if (horizontalBorders != null) { - minY = ((minY - ascent) * rescale) - maxY = ((maxY - ascent) * rescale) + minY = ((horizontalBorders.x() - ascent) * rescale) + maxY = ((horizontalBorders.y() - ascent) * rescale) } map.put(codePoint, floatArrayOf(width, minY, maxY)) @@ -239,7 +239,7 @@ abstract class BitmapProvider internal constructor() : FontProvider() { */ @JvmName("custom1") fun custom(file: ResourcePath, codePointGrid: CodePointGrid, glyphGrid: GlyphGrid, height: Int, ascent: Int): BitmapProvider = - Custom(BitmapGlyphImageType.INT_ARRAY, file, codePointGrid, glyphGrid, height, ascent) + Custom(BitmapGlyphImageType.ARGB_ARRAY, file, codePointGrid, glyphGrid, height, ascent) /** * Creates a new immutable [BitmapProvider] that references another one, but with a different ascent. diff --git a/nova/src/main/kotlin/xyz/xenondevs/nova/data/resources/builder/font/provider/bitmap/MutableBitmapProvider.kt b/nova/src/main/kotlin/xyz/xenondevs/nova/data/resources/builder/font/provider/bitmap/MutableBitmapProvider.kt index 7d3f6d5cfa..6f578b07ad 100644 --- a/nova/src/main/kotlin/xyz/xenondevs/nova/data/resources/builder/font/provider/bitmap/MutableBitmapProvider.kt +++ b/nova/src/main/kotlin/xyz/xenondevs/nova/data/resources/builder/font/provider/bitmap/MutableBitmapProvider.kt @@ -168,7 +168,7 @@ abstract class MutableBitmapProvider : BitmapProvider() { */ @JvmName("custom1") fun custom(file: ResourcePath, codePointGrid: MutableCodePointGrid, glyphGrid: MutableGlyphGrid, height: Int, ascent: Int): MutableBitmapProvider = - Custom(BitmapGlyphImageType.INT_ARRAY, file, codePointGrid, glyphGrid, height, ascent) + Custom(BitmapGlyphImageType.ARGB_ARRAY, file, codePointGrid, glyphGrid, height, ascent) /** * Creates a new [BitmapProvider] with a single glyph from a texture. diff --git a/nova/src/main/kotlin/xyz/xenondevs/nova/util/data/ImageUtils.kt b/nova/src/main/kotlin/xyz/xenondevs/nova/util/data/ImageUtils.kt index 32fdd0d7c6..5670859b1c 100644 --- a/nova/src/main/kotlin/xyz/xenondevs/nova/util/data/ImageUtils.kt +++ b/nova/src/main/kotlin/xyz/xenondevs/nova/util/data/ImageUtils.kt @@ -1,5 +1,7 @@ package xyz.xenondevs.nova.util.data +import org.joml.Vector2i +import org.joml.Vector2ic import java.awt.Point import java.awt.image.BufferedImage import java.awt.image.ColorModel @@ -68,9 +70,9 @@ object ImageUtils { * The values in the returned Pair correspond with the * y-coordinate of the first non-empty row from the top and bottom side of the image. * - * @return An integer pair containing the top and bottom borders, or null if the image is completely empty. + * @return A vector containing the top and bottom borders, or null if the image is completely empty. */ - fun findHorizontalBorders(image: BufferedImage): Pair? { + fun findTopBottomBorders(image: BufferedImage): Vector2ic? { var top = 0 while (top < image.height && isRowEmpty(image, top)) top++ if (top == image.height) return null @@ -78,7 +80,7 @@ object ImageUtils { var bottom = image.height - 1 while (bottom > top && isRowEmpty(image, bottom)) bottom-- - return top to bottom + return Vector2i(top, bottom) } /** From 0b97246a3643c622459e308d345dc04bb6c12a9b Mon Sep 17 00:00:00 2001 From: NichtStudioCode <51272202+NichtStudioCode@users.noreply.github.com> Date: Fri, 29 Mar 2024 14:28:06 +0100 Subject: [PATCH 23/23] Bump version --- gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gradle.properties b/gradle.properties index af62df1a45..d9012f7231 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,3 +1,3 @@ -version = 0.16-alpha.4 +version = 0.16-RC.1 kotlin.daemon.jvmargs=-Xmx2g org.gradle.jvmargs=-Xmx2g