js802025 / calcmod

Calculator Mod
MIT License
13 stars 4 forks source link

Item names #22

Open Pipeline929 opened 9 months ago

Pipeline929 commented 9 months ago

I love the idea and what little I can use this mod, I'm confused about how it pulls the names of the items though, specifically for modded items. It doesn't seem to go off of tags, or from what I have seen, the NBT data either, so I have a hard time using it trying to type out the name of the item and instead have to go through the auto-complete menu and hopefully find what I'm looking for. I wouldn't say this is a bug, but any assistance would be appreciated :). Thanks for your hard work on the mod and taking the time to address my "issue" (when you have the spare time).

js802025 commented 9 months ago

I assume you are referring to the craft sub command. To find objects it uses the recipe identifier. Ex: a piston would be minecraft:piston. If you want to use recipes added by mods or datapack instead of starting the id with "minecraft" you put the id of the mod. If you still need help feel free to ask.

Pipeline929 commented 9 months ago

MAJOR EDIT: So i just got to thinking, i know some of the modded items have had their recipe changed, I don't think in my example for the Powah mod that it had been altered, but that could be causing other issues and possibly my whole issue entirely. But sadly i haven't figured out which mod is causing the crafts to be changed for me to disable it and test it out without it =/. Of which this may not be something you have the power/ability to "fix". So for now, don't sweat this issue and we can close it out if you'd like. Im gonna load a new instance of Minecraft with Calc and Powah/any other mods, and see if i can get it to pull the recipes that way.

Yeah, so to give my best example, I've added the calc mod to ATM9. And say I want to craft an item called a "blazing furnator" which is added by the Powah mod. If I do "Powah:blazing furnator" using /calc craft "xxxx", there is no "autocomplete" option when I type "Powah:". I have attempted to just type it out anyway, but it is unable to find the recipe. Are you, by chance, able to tell me where I could find the recipe name within the game files? I know a bit about coding if i have to dig into it that way to find it, and i don't mind looking it up that way (obviously having it in game would be easier but idk how complex it all is). I know you don't have any connection to say the Powah mod, but when I say "tell me where I could find it", I just mean in a general sense. As in "typically it's in x folder under y name", or maybe where your mod is looking to pull the list from? If that isn't a guarded secret or anything, idk how much of the modding world is open source or whatever.

I thank you again for taking the time to assist me with this, and if you want, I can gladly get you anything you need to help answer this question. Screenshots, videos, logs, w/e. I've been enjoying your mod a lot and when I update my server I quickly realize when I forget to move it over to the updated folder. Also, a possible needed piece of info is I play modded Minecraft through the ATLauncher

Edit: so, after some googling I was able to locate roughly the location of the recipes for most/all the mods in the pack. I have noticed that the autocomplete/suggestion feature seems to die out after typing past a certain point for a handful of items. the 1 I noticed it with in the very limited testing I did was "/calc craft botanypots:botanypots/crafting/black_concrete_botany_pot 1", if you type out "/calc craft botanypots" you are given some suggested options, but the minute you type the ":" to continue it, all the suggestions go away and don't return. If you type out the rest by hand it does end up returning the correct crafting calculation, but in situations where there are many items, or in my case I cant seem to have it show any Powah specific crafts, it makes it difficult to guess what the recipe might be called without having those suggestions.

Pipeline929 commented 9 months ago

So, I was able to locate the recipe files that Calc looks for in modded items, and upon typing the full path out in the game it does return the crafting recipe as it should. So the only "issue" I see now is that Calc's suggestion/autocomplete function is not staying active/available for much past the containing folder where the recipe is. I noticed if I type out "Minecraft" I get options, but if I add the ":" like before it seems to end. The craft I tried (only one at the time of this comment) was a redstone torch, so "/calc craft Minecraft:Redstone_torch 1", typing out the command offers the suggestions above the text box until I reach ":" of which it stops and only displays "item amount" in the "><"s.

I want to apologize for the number of edits and stuff as I'm sure it ended up pinging you a few times via notifications/emails. Thank you again for taking the time to look into this. And by all means, there is no rush on my end for this to be "fixed" or anything.

Pipeline929 commented 9 months ago

For dev and anyone who may find this, I have found an easier way to find the recipe ID within Minecraft. Using the advanced tooltips option (F3+H) there should be a recipe ID at the bottom of the tooltip which seems to work pretty consistently with Calc. I'd say the issue of not having the auto-complete options is still there but at least I have found a way to utilize Calc easier and without having to tab out to the mod files looking for a recipe path.

js802025 commented 8 months ago

What version of minecraft are you using?

Pipeline929 commented 8 months ago

I believe 1.20.1, playing on the latest version of the ATM9 modpack.