Loikas / MinecraftPlugins

3 stars 3 forks source link

Changing Recipes #31

Closed Dempseyy42 closed 3 months ago

Dempseyy42 commented 2 years ago

Hi,

I am attepmting to change the recipes for the custom enchant books, but I am not a coding guru, so I don't know what much of it means. I followed the tutorial correctly and it still does not work. Here is the edited crafting recipe for Anti-Gravity. Also, where do I find the origional crafting recipe file? It is not in the files for the plugin or on this wiki..

ee_recipe_antigravity: Ingredients: A: AIR B: FEATHER C: AIR D: FEATHER E: ENCHANTED_BOOK F: FEATHER G: AIR H: FEATHER I: AIR Amounts:

Loikas commented 2 years ago

Hi, Did you use the same spacing as what was used in the tutorial? Or are there any errors in your console?

You can't find the recipes on the wiki, I can maybe add that As long as you don't change them you can find all the original recipes in game using /ee recipes

Dempseyy42 commented 2 years ago

Hi,

I did use the same spacing, but I have a reconmendation for the tutorial. It would be much less confusing if you showed the amount of spaces, instead of just showing pictures... And what I meant by where can I find the crafting recipes, I would like to find the file with all the recipes in it, with the coding, so I can just copy the piece of code, and then edit it to what my server would like.

Thank you!

Loikas commented 2 years ago

All the spacing is just 1 tab per indent, if that makes sense, As for the code, all the default recipes are programmed differently, you could look at them in the source code but that won't be of use I think when creating custom recipes.

If you tell me what recipe you want I could maybe help you with creating it so you can just copy it

Dempseyy42 commented 2 years ago

so your saying all the spaces except the single spaces are a tab? because in the first image of code on the tutorial, it shows that the first letter of "Ingredients" is 4 characters to the right of the first letter of "ee_recipe_antigravity". and when i enter a tab infront of the "ingredients" when following the tutorial, the first letter of ingredients is 8 characters to the right of the "ee_recipe_antigravity" is that right? (I am doing the code in notepad, if that makes a difference) The font i have on my notepad is the exact same font as the images of code on the tutorial aswell.

Thanks!

Loikas commented 2 years ago

1 sec I'm suddenly not sure haha, I thought so but maybe I'm wrong What you are saying could be very true.

I just checked, I'm using notepad++ in which a tab equals four characters I think

Dempseyy42 commented 2 years ago

Okay, before I figured out i could use notepad, i downloaded notepad++, so should I use that to be on the same page as you? If so, are you able to make a draft up of the crafting recipe code, so i can copy it, change the enchantment name, items for crafting, and amount of items for crafting?

Loikas commented 2 years ago

I don't know if that would fix the problem but you could try. Yes I can do that but not right now, it's night time here and I just went to bed but I will do that tomorrow

Dempseyy42 commented 2 years ago

Well thank you for spending your evening helping me!

Loikas commented 2 years ago

No problem :)

Loikas commented 2 years ago

Here you go, this one should work if you rename it to recipes.yml Or you could just copy the text from it recipes.txt

Dempseyy42 commented 2 years ago

Thank you! Is there a way to craft the max level of the enchant?

Dempseyy42 commented 2 years ago

I just pasted the file in there and turned it to a .yml, and then restarted my server, and the recipe is still the original recipe.. In the tutorial it specifies that after adding the recipes.yml, you should have a total of 3 .yml files in the folder, but I have 4.. is that a problem? (ps: I'm doing all this in filezilla while connected to my server)

modspic

Loikas commented 2 years ago

Yes you can craft the max level by crafting level one, then using that to craft level two etc..

Mmh weird, and you are sure there aren't any errors? What does antigravity show in the recipes gui?

No four files is fine aswell!

Dempseyy42 commented 2 years ago

it still shows the origional recipe ingame, and i just copied the .txt file you sent me, and changed it to a .yml file and inserted it into the folder. image

Loikas commented 2 years ago

You are using the newest version right?

Dempseyy42 commented 2 years ago

When I downloaded the mod, I downloaded the "Main file"

Loikas commented 2 years ago

Did you download it recently?

Dempseyy42 commented 2 years ago

Yesterday morning

Loikas commented 2 years ago

Thats very weird

Loikas commented 2 years ago

I'll see if I can test it here and if it works

Dempseyy42 commented 2 years ago

Okay! I have the 1.7.1 version

Loikas commented 2 years ago

Good, on which Minecraft version are you?

Dempseyy42 commented 2 years ago

1.19, the latest version, not a snapshot

Loikas commented 2 years ago

recipes.txt Okay so i was getting an error, i have fixed that and this one should be working I found out using tabs is not the way to go

Dempseyy42 commented 2 years ago

How many spaces is it? and also, am I able to use that piece of code, and just replace the item names, amounts, and enchantment name to change the recipes of other enchants? and if so, is there a special spacing or format inbetween the pieces of code?

Dempseyy42 commented 2 years ago

Yes!! the code works! now, is there a way I can make it so certian enchants can be bought at the highest level instead of level 1?

Loikas commented 2 years ago

I believe it is four spaces, you can just copy it, paste it below and change the things yes. There is no special formatting in between.

How are you selling the enchants?

Dempseyy42 commented 2 years ago

I did not mean bought, sorry, i meant crafted, is there a way I can make it so when you craft the enchant, you get the highest level of it instead of level 1, excluding the max level of 1 enchants?

Loikas commented 2 years ago

Ehm not at the moment, I could maybe make an option for that

Dempseyy42 commented 2 years ago

I would greatly apriciate that! Ingame, how are you supposed to combine the books to make it into a higher level? In an anvil? If it is in an anvil, the higher level enchants will not be of much use because when you combine multiple books togather, it gets more and more expensive to add them onto tools, weapons, and armour. and you can only add books onto items upto the cost of 37 levels, and if you have to make a level 4 or 5 enchant out of combining level 1 enchants, it will be too expensive to add onto the tool or armour... Just something i thought could be fixed by making an option for crafting the max lvl of that enchant. And thanks for all the quick responses, almost all mod creators dont really help their product users!

Loikas commented 2 years ago

Well all vanilla enchants can be merged to level 10 because I changed the level system.

Custom enchants can be made higher by putting a level 1 book in the middle of the recipe, which is an empty book for level 1

Loikas commented 2 years ago

So if you put an stone fists lvl 1 book in the middle of the stone fists crafting recipe you'll get level two

Dempseyy42 commented 2 years ago

Ohhh okay, I did not know that. That is better. I went into the config files for the mod and brought the highest level down to 5.. because protection 10 and sharpness 10 seems like too much

Loikas commented 2 years ago

Yeah I understand

Dempseyy42 commented 2 years ago

Alright, thank you for your help! Do you know if you will add the ability to buy the max level of the enchant soon, or at all?

Loikas commented 2 years ago

I'll add it but I don't know how soon. I'll probably just make a small changed version for you which has the feature. I don't want to update the plugin each time I make a small change

Loikas commented 2 years ago

I'll send it next week I think

Dempseyy42 commented 2 years ago

Okay! Thanks alot!

Dempseyy42 commented 2 years ago

I have changed 3 recipes so far, and after changing autosmelt, it does not let me put the command /ee recipes in, or any other /ee command... image recipes.txt

Loikas commented 2 years ago

There should be an error in your console Could you send it to me?

Dempseyy42 commented 2 years ago

image

Loikas commented 2 years ago

When you are starting or reloading the server it should say something like expandedenchants failed to start or something with a whole bunch of text, could you send a picture of that? Or just copy the whole console and put it in a text file if that's possible

Dempseyy42 commented 2 years ago

I just figured it out, i had a couple extra characters in the code.. its crazy how a few letters can mess up an entire plugin!

Loikas commented 2 years ago

Yeah it's kinda funny

Loikas commented 2 years ago

Here is the plugin with the update https://easyupload.io/hsy1vh