From cf54f584b4a563fb29fad43e06a164a61db71e8a Mon Sep 17 00:00:00 2001 From: Redeix <59435925+Redeix@users.noreply.github.com> Date: Mon, 12 May 2025 06:29:10 -0500 Subject: [PATCH] Fixes and features (#987) * - Fixed hide duping recipes. - Added quest book and field guide instances for fishing nets. - Fixed rebar support recipe crash. - Fixed red steel flask dupe. - Fixed red alloy recipe inconsistency. * - Fixed blue steel backpack block lang * - Added max vessel fluid warning to small vessels. * - Moved red steel flask recipe * - Fixed fishing nets event function * Update queststfc_tips.snbt Signed-off-by: Redeix <59435925+Redeix@users.noreply.github.com> * Update en_us.json Signed-off-by: Redeix <59435925+Redeix@users.noreply.github.com> * - Added item to summon armor stands with arms * - Added recipes to empty vessels and molds * - Added recipes for extracting/ forming magma blocks. * - Added recipes for extracting/ forming magma blocks. * - Nerfed steel support recipe output. --------- Signed-off-by: Redeix <59435925+Redeix@users.noreply.github.com> --- CHANGELOG.md | 5 + kubejs/assets/create/lang/en_us.json | 4 +- .../tfg/textures/item/armor_stand_arms.png | Bin 0 -> 520 bytes kubejs/server_scripts/tfg/events.js | 117 +++++++++++------- .../tfg/recipes.miscellaneous.js | 8 ++ kubejs/server_scripts/tfg/recipes.molds.js | 16 +++ kubejs/server_scripts/tfg/recipes.rocks.js | 34 +++++ kubejs/server_scripts/tfg/recipes.supports.js | 16 +-- kubejs/startup_scripts/tfg/items.js | 3 + 9 files changed, 148 insertions(+), 55 deletions(-) create mode 100644 kubejs/assets/tfg/textures/item/armor_stand_arms.png diff --git a/CHANGELOG.md b/CHANGELOG.md index f378d34c5..a5e865ee0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,11 @@ - Fixed assembler clay recipes so they output the correct amount (Pyritie) - Quest fixes/tweaks (Pyritie) - Added aluminium, stainless steel, and titanium millstones (Pyritie) +- Fixed fishing nets behavior. (Redeix) +- Added item to summon armor stands with arms. (Redeix) +- Added recipes for emptying vessels and molds. (Redeix) +- Added recipes for extracting/ forming magma blocks. (Redeix) +- Nerfed steel support recipe output. (Redeix) ## [0.9.5] - 08.05.2025 ### Changes diff --git a/kubejs/assets/create/lang/en_us.json b/kubejs/assets/create/lang/en_us.json index 9c17fa677..a45af984a 100644 --- a/kubejs/assets/create/lang/en_us.json +++ b/kubejs/assets/create/lang/en_us.json @@ -1,6 +1,5 @@ { "__COMMENT__": "This file was auto generated by the LanguageMerger, read the file \".README IF TRANSLATING\" found in \"minecraft/kubejs\" for more information.", - "block.create.netherite_backtank": "Blue Steel Backtank", "block.create.dark_oak_window": "Hickory Window", "block.create.dark_oak_window_pane": "Hickory Window Pane", "block.create.andesite_bars": "Metal Bars", @@ -69,6 +68,7 @@ "block.create.small_granite_brick_wall": "Small Chert Brick Wall", "block.create.layered_granite": "Layered Chert", "block.create.granite_pillar": "Chert Pillar", + "block.create.netherite_backtank": "Blue Steel Backtank", "item.create.netherite_diving_helmet.tooltip.summary": "Together with a _Blue Steel Backtank_, this can protect you from _extreme heat_. To be effective, _Legs and Feet_ have to be covered in a _Blue Steel Diving Equipment_, too.", "item.create.netherite_backtank": "Blue Steel Backtank", "item.create.netherite_diving_helmet": "Blue Steel Diving Helmet", @@ -89,4 +89,4 @@ "create.ponder.brass_funnel.text_1": "Metal Funnels can only ever extract single items.", "create.ponder.cogwheel_casing.text_1": "Brass or Metal Casing can be used to decorate Cogwheels", "create.ponder.shaft_casing.text_1": "Brass or Metal Casing can be used to decorate Shafts" -} \ No newline at end of file +} diff --git a/kubejs/assets/tfg/textures/item/armor_stand_arms.png b/kubejs/assets/tfg/textures/item/armor_stand_arms.png new file mode 100644 index 0000000000000000000000000000000000000000..0f5f8408405d782b4e4e13e13bd1be4b828c855f GIT binary patch literal 520 zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7I14-?iy0WWg+Z8+Vb&Z8 z1_s7mo-U3d7QMZb4`vAminQ&&Tw*wRCeM{jalt5!pjjMQZ@pMzIWDD@>6P64$XU~t zclQTF*Mhq{Gj?wlxx*nUz9>`Rh+0CX_PL}rtw(NfoRbmvRlPi$rG7_uwZ;GP^OoP^ zLZ)6W4ND9#YufvB)v1n$uU^$HU9)}N)E$QAnUktb1QsyuOXvU0q_B5sH;4DsNnLY} ztc#hoD9rkW+)|tRoyzIavTyI|gnCuwC(b+k%y3_N@s(dk?;fp`3OwUe*rb2IPFsOF z+9PD8yP^N}dzU+s=B=q)Aa`_4uGtEAL*>P3$7g!zO+Q>7v+TTe&u+f1N7i~yUGH~f zB%L#6zTooFR{G+UjZX8pUB&Nj_IH@)d+GTqKcMg7fGBbykR3Z#Yo2Bo!AV$sQ+z0?l%}{tX^dlwn0Gf)m^Vc3ET8l zKbst0u*Pu*kHhY}YV*%0-!_};$9{TK#g;z}*RR@2atH|Ko%7Y4pcyR?)VTK5zK`Pn am~IwtU3u%>p@j?#3=E#GelF{r5}E)fBjvUL literal 0 HcmV?d00001 diff --git a/kubejs/server_scripts/tfg/events.js b/kubejs/server_scripts/tfg/events.js index 064d12767..d22db8044 100644 --- a/kubejs/server_scripts/tfg/events.js +++ b/kubejs/server_scripts/tfg/events.js @@ -117,6 +117,20 @@ BlockEvents.rightClicked(event => { if (block.id != 'tfg:decorative_vase') {return}{ server.runCommandSilent(`playsound tfc:block.quern.drag block ${username} ${block.x} ${block.y} ${block.z} 0.3 2.0 0.1`) }}); +//#endregion + +BlockEvents.rightClicked(event=>{ + let item = event.item + if(item.id != 'tfg:armor_stand_arms') return + let mob = event.block[event.facing].createEntity('minecraft:armor_stand') + mob.mergeNbt('{ShowArms:1b}') + mob.setPos(mob.x + 0.5, mob.y, mob.z + 0.5) + mob.setYaw(event.player.yaw + 180) + mob.spawn() + if (event.player.isCreative() == false){ + item.shrink(1) + } +}) /** * @@ -131,7 +145,6 @@ function getTFGPersistentDataRoot(player) } return player.persistentData.getCompound("tfg:custom_data") } -//#endregion //#region Fishing Net const fish = [ @@ -153,16 +166,70 @@ function getTFGPersistentDataRoot(player) 'crayfish' ]; + //tags wont work here (or at least I couldnt get it to work) so we need to manually declare each net tier. + const tiers = [ + 'wood', + 'brass', + 'rose_gold', + 'sterling_silver', + 'invar', + 'tin_alloy', + 'cupronickel', + 'magnalium' + ]; + //Event detects if fish is right clicked with fishing net and then teleports the mob into the void, plays some actions and gives the player the proper item. - fish.forEach(fish => { - ItemEvents.entityInteracted('#forge:tools/fishing_nets', event => { + tiers.forEach(tier => { + fish.forEach(fish => { + ItemEvents.entityInteracted(`tfg:fishing_net/${tier}`, (event) => { + const {item, player, server, target} = event; + + if (target.type != `tfc:${fish}`) return + server.runCommandSilent(`particle minecraft:bubble_pop ${target.x} ${target.y} ${target.z} 0.5 0.5 0.5 0.00001 10`) + server.runCommandSilent(`playsound minecraft:entity.player.splash player ${player.username} ${target.x} ${target.y} ${target.z} 2 2 1`) + server.runCommandSilent(`tp ${target.uuid} ${target.x} ${target.y - 382} ${target.z}`) + event.player.give(`tfc:food/${fish}`) + player.swing() + if (player.isCreative() == false){ + item.damageValue++ + if (item.damageValue >= item.maxDamage) { + server.runCommandSilent(`playsound minecraft:item.shield.break player ${player.username} ${player.x} ${player.y} ${player.z} 1 1 1`) + item.count-- + } + } + }) + }) + + //Shellfish Exception + shellfish.forEach(shellfish => { + ItemEvents.entityInteracted(`tfg:fishing_net/${tier}`, (event) => { + const {item, player, server, target} = event; + + if (target.type != `tfc:${shellfish}`) return + server.runCommandSilent(`particle minecraft:bubble_pop ${target.x} ${target.y} ${target.z} 0.5 0.5 0.5 0.00001 10`) + server.runCommandSilent(`playsound minecraft:entity.player.splash player ${player.username} ${target.x} ${target.y} ${target.z} 2 2 1`) + server.runCommandSilent(`tp ${target.uuid} ${target.x} ${target.y - 382} ${target.z}`) + event.player.give('tfc:food/shellfish') + player.swing() + if (player.isCreative() == false){ + item.damageValue++ + if (item.damageValue >= item.maxDamage) { + server.runCommandSilent(`playsound minecraft:item.shield.break player ${player.username} ${player.x} ${player.y} ${player.z} 1 1 1`) + item.count-- + } + } + }) + }) + + //Pufferfish Exception + ItemEvents.entityInteracted(`tfg:fishing_net/${tier}`, (event) => { const {item, player, server, target} = event; - if (target.type != `tfc:${fish}`) return + if (target.type != 'tfc:pufferfish') return server.runCommandSilent(`particle minecraft:bubble_pop ${target.x} ${target.y} ${target.z} 0.5 0.5 0.5 0.00001 10`) server.runCommandSilent(`playsound minecraft:entity.player.splash player ${player.username} ${target.x} ${target.y} ${target.z} 2 2 1`) server.runCommandSilent(`tp ${target.uuid} ${target.x} ${target.y - 382} ${target.z}`) - event.player.give(`tfc:food/${fish}`) + event.player.give('minecraft:pufferfish') player.swing() if (player.isCreative() == false){ item.damageValue++ @@ -173,44 +240,4 @@ function getTFGPersistentDataRoot(player) } }) }) - - //Shellfish Exception - shellfish.forEach(shellfish => { - ItemEvents.entityInteracted('#forge:tools/fishing_nets', event => { - const {item, player, server, target} = event; - - if (target.type != `tfc:${shellfish}`) return - server.runCommandSilent(`particle minecraft:bubble_pop ${target.x} ${target.y} ${target.z} 0.5 0.5 0.5 0.00001 10`) - server.runCommandSilent(`playsound minecraft:entity.player.splash player ${player.username} ${target.x} ${target.y} ${target.z} 2 2 1`) - server.runCommandSilent(`tp ${target.uuid} ${target.x} ${target.y - 382} ${target.z}`) - event.player.give('tfc:food/shellfish') - player.swing() - if (player.isCreative() == false){ - item.damageValue++ - if (item.damageValue >= item.maxDamage) { - server.runCommandSilent(`playsound minecraft:item.shield.break player ${player.username} ${player.x} ${player.y} ${player.z} 1 1 1`) - item.count-- - } - } - }) - }) - - //Pufferfish Exception - ItemEvents.entityInteracted('#forge:tools/fishing_nets', event => { - const {item, player, server, target} = event; - - if (target.type != 'tfc:pufferfish') return - server.runCommandSilent(`particle minecraft:bubble_pop ${target.x} ${target.y} ${target.z} 0.5 0.5 0.5 0.00001 10`) - server.runCommandSilent(`playsound minecraft:entity.player.splash player ${player.username} ${target.x} ${target.y} ${target.z} 2 2 1`) - server.runCommandSilent(`tp ${target.uuid} ${target.x} ${target.y - 382} ${target.z}`) - event.player.give('minecraft:pufferfish') - player.swing() - if (player.isCreative() == false){ - item.damageValue++ - if (item.damageValue >= item.maxDamage) { - server.runCommandSilent(`playsound minecraft:item.shield.break player ${player.username} ${player.x} ${player.y} ${player.z} 1 1 1`) - item.count-- - } - } - }) //#endregion \ No newline at end of file diff --git a/kubejs/server_scripts/tfg/recipes.miscellaneous.js b/kubejs/server_scripts/tfg/recipes.miscellaneous.js index 3c1ce08b0..5234d345b 100644 --- a/kubejs/server_scripts/tfg/recipes.miscellaneous.js +++ b/kubejs/server_scripts/tfg/recipes.miscellaneous.js @@ -389,4 +389,12 @@ function registerTFGMiscellaneousRecipes(event) { .dimension('minecraft:the_nether') .duration(200) .EUt(16) + + event.shapeless('1x tfg:armor_stand_arms', [ + 'minecraft:armor_stand' + ]).id(`tfg:shapeless/armor_stand_arms`) + + event.shapeless('1x minecraft:armor_stand', [ + 'tfg:armor_stand_arms' + ]).id(`tfg:shapeless/armor_stand`) } \ No newline at end of file diff --git a/kubejs/server_scripts/tfg/recipes.molds.js b/kubejs/server_scripts/tfg/recipes.molds.js index a1c16a114..f387a16da 100644 --- a/kubejs/server_scripts/tfg/recipes.molds.js +++ b/kubejs/server_scripts/tfg/recipes.molds.js @@ -273,4 +273,20 @@ function registerTFGMoldRecipes(event) { .duration(120) .EUt(GTValues.VA[GTValues.LV]) }) + + //craft mold to scrub nbt + const molds = Ingredient.of('#tfc:fired_molds').itemIds; + + molds.forEach(mold => { + event.shapeless(Item.of(mold), [mold]) + .id(`tfg:shapeless/mold_cleaning/${mold.replace(":", "/")}`); + }); + + //craft vessel to scrub nbt + const vessels = Ingredient.of('#tfc:fired_vessels').itemIds; + + vessels.forEach(vessel => { + event.shapeless(Item.of(vessel), [vessel]) + .id(`tfg:shapeless/vessel_cleaning/${vessel.replace(":", "/")}`); + }); } \ No newline at end of file diff --git a/kubejs/server_scripts/tfg/recipes.rocks.js b/kubejs/server_scripts/tfg/recipes.rocks.js index 59d288ffe..ad1920c2b 100644 --- a/kubejs/server_scripts/tfg/recipes.rocks.js +++ b/kubejs/server_scripts/tfg/recipes.rocks.js @@ -256,4 +256,38 @@ function registerTFGRockRecipes(event) { }) // #endregion + + //#region Magma Blocks + event.remove({id: 'gtceu:compressor/magma_block'}) + event.remove({id: 'greate:splashing/obsidian'}) + + //magma block + stone group + const magma_blocks = [ + {magma: 'minecraft:magma_block', rock: 'minecraft:blackstone'}, + {magma: 'tfc:rock/magma/granite', rock: 'tfc:rock/raw/granite'}, + {magma: 'tfc:rock/magma/diorite', rock: 'tfc:rock/raw/diorite'}, + {magma: 'tfc:rock/magma/gabbro', rock: 'tfc:rock/raw/gabbro'}, + {magma: 'tfc:rock/magma/rhyolite', rock: 'tfc:rock/raw/rhyolite'}, + {magma: 'tfc:rock/magma/basalt', rock: 'tfc:rock/raw/basalt'}, + {magma: 'tfc:rock/magma/andesite', rock: 'tfc:rock/raw/andesite'}, + {magma: 'tfc:rock/magma/dacite', rock: 'tfc:rock/raw/dacite'} + ]; + + magma_blocks.forEach(block => { + + event.recipes.gtceu.fluid_solidifier(`tfg:gtceu/fluid_solidifier/${block.magma}`.replace(/:/g, '/')) + .itemInputs(`1x ${block.rock}`) + .inputFluids(Fluid.of('minecraft:lava', 250)) + .itemOutputs(`1x ${block.magma}`) + .duration(100) + .EUt(GTValues.VA[GTValues.ULV]) + + event.recipes.gtceu.extractor(`tfg:gtceu/extractor/${block.magma}`.replace(/:/g, "/")) + .itemInputs(`1x ${block.magma}`) + .outputFluids(Fluid.of('minecraft:lava', 250)) + .itemOutputs(`1x ${block.rock}`) + .duration(100) + .EUt(GTValues.VA[GTValues.LV]) + }) + //#endregion } \ No newline at end of file diff --git a/kubejs/server_scripts/tfg/recipes.supports.js b/kubejs/server_scripts/tfg/recipes.supports.js index e600035d0..fc7bd1873 100644 --- a/kubejs/server_scripts/tfg/recipes.supports.js +++ b/kubejs/server_scripts/tfg/recipes.supports.js @@ -185,7 +185,7 @@ function registerTFGSupportRecipes(event) { .EUt(GTValues.VA[GTValues.ULV]) event.recipes.tfc.anvil( - '4x tfg:steel_support', + '1x tfg:steel_support', '#forge:double_ingots/steel', [ 'upset_last', @@ -196,7 +196,7 @@ function registerTFGSupportRecipes(event) { event.recipes.gtceu.assembler('tfg:gtceu/assembler/steel_support') .circuit(4) - .itemOutputs('8x tfg:steel_support') + .itemOutputs('4x tfg:steel_support') .itemInputs('2x #forge:double_ingots/steel') .duration(100) .EUt(GTValues.VA[GTValues.ULV]) @@ -204,25 +204,25 @@ function registerTFGSupportRecipes(event) { event.recipes.gtceu.macerator('tfg:macerator/recycling/steel_support') .itemInputs('tfg:steel_support') .itemOutputs( - ChemicalHelper.get(TagPrefix.dustSmall, GTMaterials.Steel, 1) + ChemicalHelper.get(TagPrefix.dustSmall, GTMaterials.Steel, 2) ) - .duration(GTMaterials.Steel.getMass() * 1) + .duration(GTMaterials.Steel.getMass() * 2) .category(GTRecipeCategories.MACERATOR_RECYCLING) .EUt(GTValues.VA[GTValues.ULV]) event.recipes.gtceu.arc_furnace('tfg:arc_furnace/recycling/steel_support') .itemInputs('tfg:steel_support') .itemOutputs( - ChemicalHelper.get(TagPrefix.nugget, GTMaterials.Steel, 2) + ChemicalHelper.get(TagPrefix.nugget, GTMaterials.Steel, 4) ) - .duration(GTMaterials.Steel.getMass() * 1) + .duration(GTMaterials.Steel.getMass() * 4) .category(GTRecipeCategories.ARC_FURNACE_RECYCLING) .EUt(GTValues.VA[GTValues.LV]) event.recipes.gtceu.extractor('tfg:extractor/recycling/steel_support') .itemInputs('tfg:steel_support') - .outputFluids(Fluid.of('gtceu:steel', 36)) - .duration(GTMaterials.Steel.getMass() * 1) + .outputFluids(Fluid.of('gtceu:steel', 64)) + .duration(GTMaterials.Steel.getMass() * 2) .category(GTRecipeCategories.EXTRACTOR_RECYCLING) .EUt(GTValues.VA[GTValues.ULV]) } \ No newline at end of file diff --git a/kubejs/startup_scripts/tfg/items.js b/kubejs/startup_scripts/tfg/items.js index d665f28a6..b3ee53518 100644 --- a/kubejs/startup_scripts/tfg/items.js +++ b/kubejs/startup_scripts/tfg/items.js @@ -161,6 +161,9 @@ const registerTFGItems = (event) => { event.create('tfg:fletching') .translationKey('item.tfg.fletching') + event.create('tfg:armor_stand_arms') + .translationKey('item.tfg.armor_stand_arms') + event.create('tfg:fishing_net/wood') .translationKey('item.tfg.fishing_net.wood') .parentModel('tfg:item/fishing_nets/wood_fishing_net')