Skip to content

Commit

Permalink
fix jetpack loottable by applying nbt functions in the correct order
Browse files Browse the repository at this point in the history
  • Loading branch information
PssbleTrngle committed Sep 20, 2024
1 parent c63a8c3 commit 23d9583
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 23 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// 1.20.1 2024-09-13T10:27:23.1037164 Registrate Provider for create_jetpack [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
// 1.20.1 2024-09-20T12:08:10.3392817 Registrate Provider for create_jetpack [Recipes, Advancements, Loot Tables, Tags (blocks), Tags (items), Tags (fluids), Tags (entity_types), Blockstates, Item models, Lang (en_us/en_ud)]
673a48952547e61209ce76274272e9c4e05c8189 assets/create_jetpack/blockstates/jetpack.json
ba8e314e1e6dbb6c25dd5e837cef04f8d96412a1 assets/create_jetpack/blockstates/netherite_jetpack.json
a2f5d170a0eb9d1686d1c97de51bdb52eee864af assets/create_jetpack/lang/en_ud.json
Expand All @@ -10,6 +10,6 @@ a9f4853187ae09ad01356339f4acf9b3e8189ebd assets/create_jetpack/models/block/neth
f01edd57ce03744767e9ab7b7e68c80d9834a50c assets/create_jetpack/models/item/netherite_jetpack.json
6c53b1a6ed28929b7a0a090edf6101e610f842fc assets/create_jetpack/models/item/netherite_jetpack_placeable.json
45715b49eb3f91a62054f6c2a9d82115b8e188fb data/create/tags/items/pressurized_air_sources.json
04e37ca748611d77665e04326b133ad24f1e10a5 data/create_jetpack/loot_tables/blocks/jetpack.json
81f9ea6d670c6740c897b98d16301ff51c3860c1 data/create_jetpack/loot_tables/blocks/netherite_jetpack.json
4286224b5da14d4ff94cc9952af451274632589f data/create_jetpack/loot_tables/blocks/jetpack.json
3908eaf81ead088de7365ec3572694e9ed2bf3cb data/create_jetpack/loot_tables/blocks/netherite_jetpack.json
45715b49eb3f91a62054f6c2a9d82115b8e188fb data/minecraft/tags/blocks/mineable/pickaxe.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"function": "minecraft:copy_nbt",
"ops": [
{
"op": "replace",
"source": "Air",
"target": "Air"
"op": "merge",
"source": "VanillaTag",
"target": "{}"
}
],
"source": "block_entity"
Expand All @@ -27,9 +27,9 @@
"function": "minecraft:copy_nbt",
"ops": [
{
"op": "merge",
"source": "VanillaTag",
"target": "{}"
"op": "replace",
"source": "Air",
"target": "Air"
}
],
"source": "block_entity"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
"function": "minecraft:copy_nbt",
"ops": [
{
"op": "replace",
"source": "Air",
"target": "Air"
"op": "merge",
"source": "VanillaTag",
"target": "{}"
}
],
"source": "block_entity"
Expand All @@ -27,9 +27,9 @@
"function": "minecraft:copy_nbt",
"ops": [
{
"op": "merge",
"source": "VanillaTag",
"target": "{}"
"op": "replace",
"source": "Air",
"target": "Air"
}
],
"source": "block_entity"
Expand Down
12 changes: 4 additions & 8 deletions src/main/kotlin/com/possible_triangle/create_jetpack/Content.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,8 @@ import com.possible_triangle.create_jetpack.item.JetpackItem
import com.simibubi.create.AllCreativeModeTabs
import com.simibubi.create.AllTags.AllItemTags
import com.simibubi.create.Create
import com.simibubi.create.content.equipment.armor.AllArmorMaterials
import com.simibubi.create.content.equipment.armor.BacktankBlockEntity
import com.simibubi.create.content.equipment.armor.BacktankInstance
import com.simibubi.create.content.equipment.armor.*
import com.simibubi.create.content.equipment.armor.BacktankItem.BacktankBlockItem
import com.simibubi.create.content.equipment.armor.BacktankRenderer
import com.simibubi.create.content.equipment.armor.BacktankUtil
import com.simibubi.create.content.kinetics.BlockStressDefaults
import com.simibubi.create.foundation.data.CreateRegistrate
import com.simibubi.create.foundation.data.SharedProperties
Expand Down Expand Up @@ -126,11 +122,11 @@ object Content {
LootItem.lootTableItem(getItem())
.apply(
CopyNbtFunction.copyData(ContextNbtProvider.BLOCK_ENTITY)
.copy("Air", "Air")
.copy("VanillaTag", "{}", CopyNbtFunction.MergeStrategy.MERGE)
)
.apply(
CopyNbtFunction.copyData(ContextNbtProvider.BLOCK_ENTITY)
.copy("VanillaTag", "{}", CopyNbtFunction.MergeStrategy.MERGE)
.copy("Air", "Air")
)
)
)
Expand All @@ -147,7 +143,7 @@ object Content {
transform {
it.tab(AllCreativeModeTabs.BASE_CREATIVE_TAB.key!!) { mod ->
mod.accept(ItemStack(it.entry).apply {
orCreateTag.putFloat("Air", BacktankUtil.maxAir(this).toFloat())
orCreateTag.putInt("Air", BacktankUtil.maxAirWithoutEnchants())
})
}
}
Expand Down

0 comments on commit 23d9583

Please sign in to comment.