[1.16.4] Unable to apply 'comfort_foods' tag using CraftTweaker
jengendler opened this issue · 10 comments
Description
I am trying to add the 'farmersdelight:comfort_foods' tag to all soups and stews from this mod and others with CraftTweaker. I can confirm I am using the correct ZenScript/CraftTweaker syntax because I can add custom tags to soups and stews, but the comfort_foods tag does not appear to apply, nor does it give an error. Is it even possible to add this tag via CraftTweaker?
Steps to reproduce:
In CraftTweaker, I have the following code:
<tag:items:farmersdelight:comfort_foods>.add(<item:farmersdelight:chicken_soup>); <tag:items:farmersdelight:comfort_foods>.add(<item:pamhc2foodcore:noodlesoupitem>);
Expected behavior:
After saving the above .zs to the scripts folder, and entering /reload in Minecraft, no comfort_foods tag appears to apply when viewing NBT tags / hidden tooltips. I have tried 'comfort_food' without the 's', which does apply, so I know the syntax is correct.
Mod list:
Minecraft 1.16.4
Forge: net.minecraftforge:35.1.13
Mod List:
GetExpForEverything-v1.2.2-1.14-1.16.jar |Get experience for everything!|getexpforeverything |1.2.2
HealthOverlay-1.16.4-2.1.7.jar |Health Overlay |healthoverlay |NONE
Uppers-0.3.2.jar |Uppers |uppers |0.3.2
mcw-windows-1.0.2-mc1.16.4.jar |Macaw's Windows |mcwwindows |1.0.2
modnametooltip_1.16.2-1.15.0.jar |Mod Name Tooltip |modnametooltip |1.15.0
guiclock_1.16.4-2.0.jar |GUI Clock |guiclock |2.0
gildedarmor-1.16.3-1.0.3.jar |Gilded Armor |gildedarmor |1.0.3
GravelMiner_1.16.3-10.2.0.jar |GravelMiner |gravelminer |10.2.0
XaerosWorldMap_1.11.4_Forge_1.16.4.jar |Xaero's World Map |xaeroworldmap |1.11.4
CookingForBlockheads_1.16.3-9.2.2.jar |Cooking for Blockheads |cookingforblockheads |9.2.2
Controlling-7.0.0.11.jar |Controlling |controlling |7.0.0.11
Placebo-1.16.3-4.3.3.jar |Placebo |placebo |4.3.3
citadel-1.5.3.jar |Citadel |citadel |1.5.3
alexsmobs-1.2.0.jar |Alex's Mobs |alexsmobs |1.2.0
YungsApi-1.16.4-Forge-3.jar |YUNG's API |yungsapi |1.16.4-Forge-3
ftb-gui-library-1604.1.1.26.jar |FTB GUI Library |ftbguilibrary |1604.1.1.26
gemsnjewels-1.16.4-0.21.0.jar |Gems & Jewels |gemsnjewels |0.21.0
branders-spawnermod-1.16.4-1.7.10.jar |Enhanced Mob Spawners |spawnermod |1.7.10
Bookshelf-1.16.4-9.3.18.jar |Bookshelf |bookshelf |9.3.18
itemzoom-1.16.4-2.3.0.jar |Item Zoom |itemzoom |2.3.0
sophisticatedbackpacks-1.16.4-1.3.4.136.jar |Sophisticated Backpacks |sophisticatedbackpacks |1.16.4-1.3.4.136
ForgivingVoid_1.16.3-5.2.0.jar |Forgiving Void |forgivingvoid |5.2.0
LightingWand-1.16.4-1.7.2.jar |Lighting Wand |lightingwand |1.7.2
WaterStrainer-1.16.3-10.0.0.jar |Water Strainer |waterstrainer |1.16.3-10.0.0
carryon-1.16.3-1.15.1.7.jar |Carry On |carryon |1.15.1.7
JustEnoughResources-1.16.4-0.12.0.104.jar |Just Enough Resources |jeresources |0.12.0.104
exp_ore-1.16.4-1.0.jar |Exp Ore Block |exp_ore |1.0
MmmMmmMmmMmm-1.16-1.0.1.jar |MmmMmmMmmMmm |dummmmmmy |1.0.1
supplementaries-0.9.22.jar |Supplementaries |supplementaries |0.9.22
betterendforge-1.16.4-1.2.0.jar |BetterEnd Forge Port |betterendforge |1.16.4-1.2.0
easy_piglins-1.16.4-1.0.5.jar |Easy Piglins |easy_piglins |1.16.4-1.0.5
anviltweaks-3.1.jar |Anvil Tweaks |anviltweaks |3.1
wt_improvements-1.16.3-1.1.0.0.jar |Wandering Trader Improvements |wt_improvements |1.16.3-1.1.0.0
FarmersDelight-1.16.3-0.3.1.jar |Farmer's Delight |farmersdelight |1.16.3-0.3.1
repurposed_structures-1.16.4-2.3.3.jar |Repurposed Structures |repurposed_structures |1.16.4-2.3.3
AmbientSounds_v3.1.2_mc1.16.4.jar |Ambient Sounds |ambientsounds |3.0.3
GreaterEye-1.16.4-1.1.10.jar |GreaterEye |greater_eye |1.1.10
Compressium-1.16.4-1.1.36.jar |Compressium |compressium |1.1.36
ToolSwap-1.16.2-1.2.0.jar |ToolSwap |toolswap |1.2.0
valhelsia_structures-16.0.5.jar |Valhelsia Structures |valhelsia_structures |16.0.5
ironfurnaces-1.16.4-2.5.8.jar |Iron Furnaces |ironfurnaces |2.5.8
thatched-1.16.4-0.2.jar |Thatched Roof Villages |thatched |version
ineedthemores-1.16.4-1.3.jar |I Need Them Ores |ineedthemores |1.16.4-1.3
simplefarming-1.16.4-1.3.5.jar |Simple Farming |simplefarming |1.16.4-1.3.5
curios-forge-1.16.4-4.0.3.0.jar |Curios API |curios |1.16.4-4.0.3.0
Curious+Armor+Stands-1.16.3-2.0.2.jar |Curious Armor Stands |curious_armor_stands |1.16.3-2.0.2
Patchouli-1.16.4-48.jar |Patchouli |patchouli |1.16.4-48
randomite-1.16.4-1.0.1.jar |Randomite Classic |randomite |1.0.1
collective-1.16.4-1.53.jar |Collective |collective |1.53
petrevivemod-1.1.jar |Pet Revive Mod |petrevive |1.0
extlights-3.3.jar |Extended Lights |extlights |3.3
editmobdrops-1.16.3-1.3.2.jar |Edit Mob Drops |editmobdrops |1.3.2
blockcarpentry-1.16.2-0.3.4.jar |BlockCarpentry |blockcarpentry |1.16.2-0.3.4
angelring-1.16.3-1.3.3.jar |Angel Ring |angelring |1.3.3
DrawersTooltip-1.16.2-2.1.0.jar |Drawers Tooltip |drawerstooltip |2.1.0
ftb-ultimine-1603.1.1.13.jar |FTB Ultimine |ftbultimine |1603.1.1.13
buildersaddition-1.16.4-20201220b.jar |Builders Crafts & Addition |buildersaddition |1.16.4-20210118a
starterkit_1.16.4-2.1.jar |Starter Kit |starterkit |2.1
constructionwand-1.16.2-1.7.jar |Construction Wand |constructionwand |1.16.2-1.7
curiouselytra-forge-1.16.3-4.0.0.1.jar |Curious Elytra |curiouselytra |1.16.3-4.0.0.1
fortunate-2.10.1-MC-1.16.4.jar |How Fortunate! |fortunate |2.10.1-MC-1.16.4
cloth-config-forge-4.1.1.jar |Cloth Config v4 API |cloth-config |4.0
InventoryEssentials_1.16.3-2.3.0.jar |Inventory Essentials |inventoryessentials |2.3.0
woodcutter-1.3-1.16.3.jar |Wood Cutter |woodcutter |1.3-1.16.3
charm-forge-1.16.4-2.1.9.jar |Charm |charm |2.1.9
FastLeafDecay-v25.jar |FastLeafDecay |fastleafdecay |v25
exoticbirds-1.16.4-1.0.3.jar |Exotic Birds |exoticbirds |1.0.3
Disenchanting-forge_1.16.3-1.6.0-alpha.jar |Disenchanting |disenchanting |1.6.0
PrettyBeaches_1.16.3-5.2.0.jar |Pretty Beaches |prettybeaches |5.2.0
BetterMineshafts-Forge-1.16.4-2.0.1.jar |YUNG's Better Mineshafts |bettermineshafts |1.16.4-2.0.1
forge-1.16.4-geckolib-3.0.0.jar |GeckoLib |geckolib3 |3.0.0
DarkPaintings-1.16.4-5.0.3.jar |DarkPaintings |darkpaintings |5.0.3
BetterAdvancements-1.16.4-0.1.0.103.jar |Better Advancements |betteradvancements |0.1.0.103
QuarkOddities-1.16.3.jar |Quark Oddities |quarkoddities |1.16.3
BedBenefits-1.16.4-4.0.3.jar |BedBenefits |bedbenefits |4.0.3
Cucumber-1.16.4-4.1.5.jar |Cucumber Library |cucumber |4.1.5
TrashSlot_1.16.3-12.2.1.jar |TrashSlot |trashslot |12.2.1
torchslabmod-1.16.3_v1.6.18.jar |Torch Slab Mod |torchslabmod |1.6.18
bagofyurting-1.16.4-1.1.0.2.jar |Bag of Yurting |bagofyurting |1.1.0.2
Bountiful+Baubles+FORGE-1.16.3-0.0.2.jar |Bountiful Baubles |bountifulbaubles |NONE
jei-1.16.4-7.6.0.62.jar |Just Enough Items |jei |7.6.0.62
AttributeFix-1.16.4-9.0.5.jar |AttributeFix |attributefix |9.0.5
fishtraps-0.1.2.jar |Fish Traps |fishtraps |1.16.3-0.1.2
abnormals_core-1.16.4-3.0.6.jar |Abnormals Core |abnormals_core |3.0.6
buzzier_bees-1.16.4-3.0.0.jar |Buzzier Bees |buzzier_bees |3.0.0
caelus-forge-1.16.4-2.1.0.0.jar |Caelus API |caelus |1.16.4-2.1.0.0
Waystones_1.16.3-7.3.1.jar |Waystones |waystones |7.3.1
WallpaperCraft-1.16.3-1.4.6.jar |Wallpapercraft |wallpapercraft |1.4.5
Clumps-6.0.0.13.jar |Clumps |clumps |6.0.0.13
RingOfRepair-1.16.4-1.2.10.jar |Ring of Repair |ring_of_repair |1.2.10
light-overlay-5.5.4.jar |Light Overlay Forge |lightoverlay-forge |NONE
comforts-forge-1.16.4-4.0.1.0.jar |Comforts |comforts |1.16.4-4.0.1.0
NaturesCompass-1.16.4-1.8.6.jar |Nature's Compass |naturescompass |1.16.4-1.8.6
Artifacts-1.16.4-2.7.1.jar |Artifacts |artifacts |1.16.4-2.7.1
framedcompactdrawers-1.16-2.2.0.jar |Framed Compacting Drawers |framedcompactdrawers |1.16-2.2.0
NeverBreak-1.16-0.2.1.jar |Never Break |neverbreak |1.16-0.2.1
guicompass_1.16.4-1.3.jar |GUI Compass |guicompass |1.3
decorative_blocks-1.16.4-1.7.0.jar |Decorative Blocks |decorative_blocks |1.7.0
curioofundying-forge-1.16.4-5.1.0.0.jar |Curio of Undying |curioofundying |1.16.4-5.1.0.0
FarmingForBlockheads_1.16.3-7.2.1.jar |Farming for Blockheads |farmingforblockheads |7.2.1
Coins-1.16.4-5.0.1.jar |Coins |coins |5.0.1
bottleyourxp_1.16.4-1.3.jar |Bottle Your Xp |bottleyourxp |1.3
grassseeds_1.16.4-1.2.jar |Grass Seeds |grassseeds |1.2
TinyMobFarm-1.16.2-1.1.1.jar |Tiny Mob Farm |tinymobfarm |1.1.1
nhacampfire_1.16.4-3.0.jar |No Hostiles Around Campfire |nhacampfire |3.0
additional_lights-1.16.4-2.1.3.jar |Additional Lights |additional_lights |2.1.3
PackingTape-1.16.3-0.10.0.jar |Packing Tape |packingtape |0.10.0
CraftTweaker-1.16.4-7.0.0.63.jar |CraftTweaker |crafttweaker |7.0.0.63
BotanyPots-1.16.4-6.0.17.jar |BotanyPots |botanypots |6.0.17
BotanyTrees-1.16.4-2.0.10.jar |BotanyTrees |botanytrees |2.0.10
ars_nouveau-1.16.4-1.9.5.jar |Ars Nouveau |ars_nouveau |1.9.5
ftb-chunks-1604.2.2.61.jar |FTB Chunks |ftbchunks |1604.2.2.61
forge-1.16.4-35.1.16-universal.jar |Forge |forge |35.1.16
creativeblockreplacer_1.16.4-1.2.jar |Creative Block Replacer |creativeblockreplacer |1.2
CraftingTweaks_1.16.3-12.2.0.jar |Crafting Tweaks |craftingtweaks |12.2.0
smarthud-1.1-1.16.3.jar |Smarter HUD |smarthud |1.1-1.16.3
forge-1.16.4-35.1.16-client.jar |Minecraft |minecraft |1.16.4
cofh_core-1.16.3-1.0.4.jar |CoFH Core |cofh_core |1.0.4
ensorcellation-1.16.3-1.0.3.jar |Ensorcellation |ensorcellation |1.0.3
EnchantmentDescriptions-1.16.4-6.0.3.jar |EnchantmentDescriptions |enchdesc |6.0.3
theoneprobe-1.16-3.0.6.jar |The One Probe |theoneprobe |1.16-3.0.6
swingthroughgrass-1.16.4-1.5.3.jar |SwingThroughGrass |swingthroughgrass |1.16.4-1.5.3
CreativeCore_v2.0.10_mc1.16.4.jar |CreativeCore |creativecore |2.0.0
Ding-1.16.3-1.2.0.jar |Ding |ding |1.2.0
storage_overhaul-1.16.4-1.0.1.jar |Storage Overhaul |storage_overhaul |1.16.4-1.0.1
easy_villagers-1.16.4-1.1.29.jar |Easy Villagers |easy_villagers |1.16.4-1.1.29
SpartanShields-1.16.4-2.1.1.jar |Spartan Shields |spartanshields |2.1.1
Xaeros_Minimap_20.28.2_Forge_1.16.4.jar |Xaero's Minimap |xaerominimap |20.28.2
pamhc2foodcore-1.16.3-1.0.0.jar |Pam's HarvestCraft 2 Food Core|pamhc2foodcore |version
cyclepaintings_1.16.4-1.4.jar |Cycle Paintings |cyclepaintings |1.4
FastWorkbench-1.16.3-4.4.1.jar |FastWorkbench |fastbench |4.4.1
polymorph-forge-1.16.4-0.18.jar |Polymorph |polymorph |1.16.4-0.18
AutoRegLib-1.6-47.jar |AutoRegLib |autoreglib |1.6-47
Quark-r2.4-280.jar |Quark |quark |r2.4-280
StorageDrawers-1.16.3-8.2.1.jar |Storage Drawers |storagedrawers |8.2.1
DoubleSlabs-1.16-3.4.10.jar |Double Slabs |doubleslabs |3.4.10
cagedmobs-1.16.4-1.2.6.jar |Caged Mobs |cagedmobs |1.16.4-1.2.6
floormats-1.16.4-v1.1.1.jar |Floor Mats |floormats |1.16.4-v1.1.1
PickleTweaks-1.16.4-5.1.4.jar |Pickle Tweaks |pickletweaks |5.1.4
FastFurnace-1.16.3-4.3.0.jar |FastFurnace |fastfurnace |4.3.0
solcarrot-1.16.3-1.9.8.jar |Spice of Life: Carrot Edition |solcarrot |1.16.3-1.9.8
RingOfAttraction-1.16.4-1.2.10.jar |Ring of Attraction |ring_of_attraction |1.2.10
CraftingCraft_1.16.3-9.2.0.jar |CraftingCraft |craftingcraft |9.2.0
CosmeticArmorReworked-1.16.4-v1.jar |CosmeticArmorReworked |cosmeticarmorreworked |1.16.4-v1
SoundFilters-0.14_for_1.16.2.jar |Sound Filters |soundfilters |0.14_for_1.16.2
overloadedarmorbar-5.1.0.jar |Overloaded Armor Bar |overloadedarmorbar |5.1.0
chiselsandbits-0.2.8-RELEASE.jar |Chisels & bits |chiselsandbits |NONE
healingcf_1.16.4-3.1.jar |Healing Campfire |healingcf |3.1
xptome-1.16.2-v1.1.6.jar |XP Tome |xpbook |v1.1.6
Hey there! Although you stated there was no error, could you post the CraftTweaker logs here anyway? And perhaps the game's debug.log too, if you got it. Might still have something useful in there to troubleshoot.
Also, pardon me a bit, I'm generally unfamiliar with CraftTweaker, so I'm polling some help on this issue. x)
@jengendler Update Crafttweaker, the latest https://www.curseforge.com/minecraft/mc-mods/crafttweaker/files/3179182 should work on 1.16.4 and may fix the issue.
Updated to the latest CT file, but I still don't see the tag applied in the tooltip of the Chicken Soup item. As I said above, the Comfort Food effect still occurs when eating your soup and stew items, they just don't have the tag applied to the item.
Github does have Zenscript highlighting support though!
Amazing, thanks!
No problem. I decided to duplicate my instances of MC and removed most mods (and was able to reproduce the issue) so that the log files would be shorter. Here is the mod list:
Mods:
[✔️] CraftTweaker-1.16.4-7.1.0.84
[✔️] FarmersDelight-1.16.3-0.3.1
[✔️] jei-1.16.4-7.6.0.62
[✔️] jeiintegration_1.16.4-6.1.1.11
[✔️] modnametooltip_1.16.2-1.15.0
[✔️] theoneprobe-1.16-3.0.6
Log files attached.
crafttweaker.log
debug.log
Also here are the full contents of my ZenScript file (as GitHub doesn't accept .zs file uploads). Any line trailing // characters is a comment.
// Main [CraftTweaker]
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.tag.MCTag;
// ADD TAG
// MCTag.add(items as T[]) as void
// Examples:
//<tag:items:forge:gems>.add(<item:minecraft:bedrock>);
//<tag:items:forge:gems>.add(<item:minecraft:iron_ingot>, <item:minecraft:gold_ingot>);
//<tag:items:forge:gems>.add([<item:minecraft:iron_ingot>, <item:minecraft:gold_ingot>]);
<tag:items:farmersdelight:comfort_foods>.add(<item:farmersdelight:chicken_soup>);
Also to note, I know I can apply other modded tags to items in-game with CraftTweaker, as I was able to do it successfully by applying a Buzzier Bees tag to an item in Extended Lights. (Adding the tag <tag:items:buzzier_bees:candle_base>.add(<item:extlights:wax_lump>);
let's me use Extended Light's wax as an appropriate ingredient in Buzzier Bees candles.)
Thanks for looking into this!
@jengendler Update Crafttweaker, the latest https://www.curseforge.com/minecraft/mc-mods/crafttweaker/files/3179182 should work on 1.16.4 and may fix the issue.
as GitHub doesn't accept .zs file uploads
Github does have Zenscript highlighting support though!, so you could do:
```zenscript
code
```
to get some highlighting, like so:
// Main [CraftTweaker]
import crafttweaker.api.item.IItemStack;
import crafttweaker.api.item.IIngredient;
import crafttweaker.api.tag.MCTag;
// ADD TAG
// MCTag.add(items as T[]) as void
// Examples:
//<tag:items:forge:gems>.add(<item:minecraft:bedrock>);
//<tag:items:forge:gems>.add(<item:minecraft:iron_ingot>, <item:minecraft:gold_ingot>);
//<tag:items:forge:gems>.add([<item:minecraft:iron_ingot>, <item:minecraft:gold_ingot>]);
<tag:items:farmersdelight:comfort_foods>.add(<item:farmersdelight:chicken_soup>);
Update! I did a lot more testing. It looks like trying to add the tag to Farmer's Delight foods doesn't work, because the food already has the Comfort Foods effect upon eating, but it doesn't show up as a tag. I just testing eating the chicken soup with and without the CraftTweaker script. Both times the comfort foods buff applied after eating that soup.
I also then tried testing adding the buff to a different mod's food item and it successfully displayed the tag on the item tooltip (which I can see with other mods like JEI Integration) and it also successfully applied the Comfort Foods buff after eating.
So I guess the fact that I couldn't see the tag on the Farmer's Delight food item led me to believe it wasn't going to apply the buff. I apologize, as I should have testing eating the item before submitting this issue. However, it would be nice for your food items to have all their appropriate tags applied to help make JEI searching easier, and see what kind of buffs/effects items might give. Not sure if that's possible with how your mod is coded, but it would be nice to have consistency when searching by your mod's tags in JEI.
Also, this is my FAVORITE food mod in the game. Your graphics/models/textures/animations/etc. are so polished and look so beautiful in the game. The quality is on par with what the Mojang team themselves release. Just excellent work all around.
@jengendler Thank you for the kind words, and sorry for the late reply! 😄
I know this is rather old, but I'm still unsure why the tags themselves didn't apply to the items. Even if the effect is already into the item (e.g. Chicken Soup), it should still be able to obtain the tag, by Minecraft's own code. Did you have success tagging it, or is it still bugged? Alternatively, are you able to manually tag it with a datapack, or do both it and CT fail?
I'm actually considering removing this tag in the future. It doesn't permit good customization of the effect's length or power (it's always 5 minutes), and customizing effects in general is a hard ordeal, due to them being a coded item property.
I can do more tests, as I have only tried CT thus far. I really do like this effect and would be sad to see it go, but don’t think it would compromise the awesomeness of the mod at all.
This is an issue with CraftTweaker, we don't have a fix for it implemented yet, but we have some idea on how to resolve it.
This has been fixed in CraftTweaker/CraftTweaker@c188288 and will be released on CurseForge shortly.
This issue can be closed
Thank you so much, @jaredlll08! 😄