From 0e2a6e613de9ee2828551ac269ff715afd672364 Mon Sep 17 00:00:00 2001 From: Niklas Widmann Date: Fri, 13 Sep 2024 10:05:29 +0200 Subject: [PATCH] add missing keybind category title to en_us & fix jetpack enchantments missing when picking up using wrench/pickaxe --- src/generated/resources/.cache/cache | 8 ++++---- .../resources/assets/create_jetpack/lang/en_ud.json | 3 ++- .../resources/assets/create_jetpack/lang/en_us.json | 3 ++- .../create_jetpack/loot_tables/blocks/jetpack.json | 10 +++------- .../loot_tables/blocks/netherite_jetpack.json | 10 +++------- .../com/possible_triangle/create_jetpack/Content.kt | 6 +++--- 6 files changed, 17 insertions(+), 23 deletions(-) diff --git a/src/generated/resources/.cache/cache b/src/generated/resources/.cache/cache index 1f42c5d..3281694 100644 --- a/src/generated/resources/.cache/cache +++ b/src/generated/resources/.cache/cache @@ -1,7 +1,7 @@ e0b5dd63814e40c825622f4a65f2bdf816561ad9 assets/create_jetpack/blockstates/jetpack.json a265a500a0c29f941cb158718512abf3cf7ab6f1 assets/create_jetpack/blockstates/netherite_jetpack.json -0f66f52f3d430725c0a35aaa424b8441ed5271be assets/create_jetpack/lang/en_ud.json -fe28bac1b3c53009dfd50206115834576261bfb2 assets/create_jetpack/lang/en_us.json +2390b1ac76e464aaa31a8d9a96e3a22974864348 assets/create_jetpack/lang/en_ud.json +bcaf699f7d3faec1e914aa38e8772cfd970158b8 assets/create_jetpack/lang/en_us.json e0bae5867d547956d13f7d044aa12cac27a7e1ff assets/create_jetpack/models/block/jetpack.json 5a61519dda46943ae461aa57712463a12d889405 assets/create_jetpack/models/block/netherite_jetpack.json 6657196f9547425f62f474797d4b717bf0807e2f assets/create_jetpack/models/item/jetpack.json @@ -9,6 +9,6 @@ e0bae5867d547956d13f7d044aa12cac27a7e1ff assets/create_jetpack/models/block/jetp a765123500d1e47eda40673e0b7d7b552ef3e03a assets/create_jetpack/models/item/netherite_jetpack.json 3652f8f7b454940050f090ab32d38e04b93e14f8 assets/create_jetpack/models/item/netherite_jetpack_placeable.json b7af399e696578d85930f7533fb28d2bfcc9aadb data/create/tags/items/pressurized_air_sources.json -e0538e8a80c9d8461f64679a226064f574c7e007 data/create_jetpack/loot_tables/blocks/jetpack.json -e876bf28e55e11edbff898471303a600f67f50d9 data/create_jetpack/loot_tables/blocks/netherite_jetpack.json +9fecd2df067a7650535b262f7ef49152c0aee543 data/create_jetpack/loot_tables/blocks/jetpack.json +64a9689f072509bc4fd73d8e1984638bbfdba582 data/create_jetpack/loot_tables/blocks/netherite_jetpack.json b7af399e696578d85930f7533fb28d2bfcc9aadb data/minecraft/tags/blocks/mineable/pickaxe.json diff --git a/src/generated/resources/assets/create_jetpack/lang/en_ud.json b/src/generated/resources/assets/create_jetpack/lang/en_ud.json index b019001..0ef82e0 100644 --- a/src/generated/resources/assets/create_jetpack/lang/en_ud.json +++ b/src/generated/resources/assets/create_jetpack/lang/en_ud.json @@ -24,5 +24,6 @@ "item.create_jetpack.netherite_jetpack.tooltip.control3": "]\u2141[ ss\u01DD\u0279\u0500", "item.create_jetpack.netherite_jetpack.tooltip.control4": "]H[ ss\u01DD\u0279\u0500", "item.create_jetpack.netherite_jetpack.tooltip.summary": "\u0279\u0131\u0250 p\u01DDz\u0131\u0279nss\u01DD\u0279d bu\u0131sn uo\u0131\u0287\u0250\u0287\u0131\u028C\u01DD\u05DF s\u028Do\u05DF\u05DF\u2C6F", - "item.create_jetpack.netherite_jetpack_placeable": "\u01DD\u05DFq\u0250\u01DD\u0254\u0250\u05DF\u0500 \u029E\u0254\u0250d\u0287\u01DD\u017F \u01DD\u0287\u0131\u0279\u01DD\u0265\u0287\u01DDN" + "item.create_jetpack.netherite_jetpack_placeable": "\u01DD\u05DFq\u0250\u01DD\u0254\u0250\u05DF\u0500 \u029E\u0254\u0250d\u0287\u01DD\u017F \u01DD\u0287\u0131\u0279\u01DD\u0265\u0287\u01DDN", + "key.categories.movement.jetpack": "\u029E\u0254\u0250d\u0287\u01DD\u017F \u01DD\u0287\u0250\u01DD\u0279\u0186" } \ No newline at end of file diff --git a/src/generated/resources/assets/create_jetpack/lang/en_us.json b/src/generated/resources/assets/create_jetpack/lang/en_us.json index 6d94b0c..9081f5b 100644 --- a/src/generated/resources/assets/create_jetpack/lang/en_us.json +++ b/src/generated/resources/assets/create_jetpack/lang/en_us.json @@ -24,5 +24,6 @@ "item.create_jetpack.netherite_jetpack.tooltip.control3": "Press [G]", "item.create_jetpack.netherite_jetpack.tooltip.control4": "Press [H]", "item.create_jetpack.netherite_jetpack.tooltip.summary": "Allows levitation using pressurized air", - "item.create_jetpack.netherite_jetpack_placeable": "Netherite Jetpack Placeable" + "item.create_jetpack.netherite_jetpack_placeable": "Netherite Jetpack Placeable", + "key.categories.movement.jetpack": "Create Jetpack" } \ No newline at end of file diff --git a/src/generated/resources/data/create_jetpack/loot_tables/blocks/jetpack.json b/src/generated/resources/data/create_jetpack/loot_tables/blocks/jetpack.json index 9340cd4..bd62372 100644 --- a/src/generated/resources/data/create_jetpack/loot_tables/blocks/jetpack.json +++ b/src/generated/resources/data/create_jetpack/loot_tables/blocks/jetpack.json @@ -8,10 +8,6 @@ { "type": "minecraft:item", "functions": [ - { - "function": "minecraft:copy_name", - "source": "block_entity" - }, { "function": "minecraft:copy_nbt", "source": "block_entity", @@ -28,9 +24,9 @@ "source": "block_entity", "ops": [ { - "source": "Enchantments", - "target": "Enchantments", - "op": "replace" + "source": "VanillaTag", + "target": "{}", + "op": "merge" } ] } diff --git a/src/generated/resources/data/create_jetpack/loot_tables/blocks/netherite_jetpack.json b/src/generated/resources/data/create_jetpack/loot_tables/blocks/netherite_jetpack.json index 2426f9f..b35b447 100644 --- a/src/generated/resources/data/create_jetpack/loot_tables/blocks/netherite_jetpack.json +++ b/src/generated/resources/data/create_jetpack/loot_tables/blocks/netherite_jetpack.json @@ -8,10 +8,6 @@ { "type": "minecraft:item", "functions": [ - { - "function": "minecraft:copy_name", - "source": "block_entity" - }, { "function": "minecraft:copy_nbt", "source": "block_entity", @@ -28,9 +24,9 @@ "source": "block_entity", "ops": [ { - "source": "Enchantments", - "target": "Enchantments", - "op": "replace" + "source": "VanillaTag", + "target": "{}", + "op": "merge" } ] } diff --git a/src/main/kotlin/com/possible_triangle/create_jetpack/Content.kt b/src/main/kotlin/com/possible_triangle/create_jetpack/Content.kt index 20a38ad..cb11564 100644 --- a/src/main/kotlin/com/possible_triangle/create_jetpack/Content.kt +++ b/src/main/kotlin/com/possible_triangle/create_jetpack/Content.kt @@ -40,7 +40,6 @@ import net.minecraft.world.level.block.Block import net.minecraft.world.level.storage.loot.LootPool import net.minecraft.world.level.storage.loot.LootTable import net.minecraft.world.level.storage.loot.entries.LootItem -import net.minecraft.world.level.storage.loot.functions.CopyNameFunction import net.minecraft.world.level.storage.loot.functions.CopyNbtFunction import net.minecraft.world.level.storage.loot.predicates.ExplosionCondition import net.minecraft.world.level.storage.loot.providers.nbt.ContextNbtProvider @@ -125,14 +124,13 @@ object Content { .setRolls(ConstantValue.exactly(1F)) .add( LootItem.lootTableItem(getItem()) - .apply(CopyNameFunction.copyName(CopyNameFunction.NameSource.BLOCK_ENTITY)) .apply( CopyNbtFunction.copyData(ContextNbtProvider.BLOCK_ENTITY) .copy("Air", "Air") ) .apply( CopyNbtFunction.copyData(ContextNbtProvider.BLOCK_ENTITY) - .copy("Enchantments", "Enchantments") + .copy("VanillaTag", "{}", CopyNbtFunction.MergeStrategy.MERGE) ) ) ) @@ -182,6 +180,8 @@ object Content { fun register(modBus: IEventBus) { REGISTRATE.registerEventListeners(modBus) + REGISTRATE.addRawLang("key.categories.movement.jetpack", "Create Jetpack") + LOADING_CONTEXT.registerConfig(ModConfig.Type.COMMON, Configs.SERVER_SPEC) LOADING_CONTEXT.registerConfig(ModConfig.Type.CLIENT, Configs.CLIENT_SPEC)