AppleMilkTea2

AppleMilkTea2

608k Downloads

[Suggestion] Custom recipes

Belgabor opened this issue ยท 14 comments

commented

I am a bit reluctant to make this suggestion because I think it might be a lot of work. Would it be possible to have customization for all the nice processing methods you added? What I mean is being able to remove, change and especially add recipes for the food processor, jaw crusher, evaporator, cooking iron plate and ice maker. Maybe even, although that might be a bit hard to do because of the custom rendering when filled, pot and tea maker.
As part of a modpack team I enjoy making mods interact in new and interesting ways. For example, since we don't have a mod that adds coffee beans, I made a recipe that uses Thaumcraft mana beans with the grinder to make AMT coffee powder. I'd love to be able to add an equivalent recipe to the food processor =)
I've seen two good ways to implement that.

  • Using xml config files like Ender IO does
  • Integrating with MineTweaker

If you are not familiar with either or both of these, I am happy to explain in more detail.

I am aware that this is a lot to ask for, so I will understand if you decline =)

commented

Thanks for all the changes you made in 2.3c! Very awesome!

I am not really an experienced Java-programmer, it has been years since I used Java before working on AMTweaker. Therefore I have been working by example from ModTweaker (ModTweaker is an addon to MineTweaker that adds support for several additional mods MineTweaker itself does not support). It never occurred to me to use AMT classes directly (aka without going through the API). As my mod would not work without AMT, I probably wouldn't need to restrict myself to the API. Still I think using only the API is better as it, in my view, describes what other mods/addons should interact with.

the "output" parameter of registerCharger
Sorry, it will be deleted.

That is perfectly fine, I just mentioned it because it didn't seem to work as it was intended. If you are going to remove it that is perfectly fine.

It seems to be not considering possibility of to be modified by several Add-on. Elements cause of conflict processing would not be fed back to AMT2 body.
Currently, there are another AMT2 Add-on, or some AMT2 integrations included in the other mod. It seems difficult to add elements include the adverse effects for them.

I understand your concern. But if you allow modification of item charge amounts via the API, the changes should happen within AMT-managed lists. Also the presence of such functions in API should tell addon authors that these values are not immutable and therefore should always be requested via the AMT API whenever needed. Of course if you are still concerned, adding these is mostly for convenience, so it's fine if you don't.

Finally, with the API changes, I noticed that also all of the original heat sources are basically hardcoded. I managed to compile AMT now, so if you don't mind I will try to change that and send you a pull request. Is that ok for you?

commented

I noticed the slag getLootList function returns a copy of the internal list. Why do you not return the list itself?

commented

Many thanks!
I'm going to go to increase the things you can do with API.
It is desirable need of request of source code of AMT body is less. For it, I will support.

modification of item charge amounts

As the current initiative, I am considering the creation of a function of changing the modification of the charge amount in configuration. More than I expected, seems request of difficulty change is often.

I previously had a vision to change the conversion factor of other Mod of energy (eg, RF and EU) in the configuration.
I thought applying it to the other elements: charge generation rate, food of the recovery amount, such as. These will be implemented as a global changes that are common to all items.
API is still required to individual modification.

heat sources
slag getLootList

Simply, they are my mistakes. I'm sorry. They will be fixed in the next update.

commented

At 2.3a, I changed following :

  • Add config for changing the charge generating rate and the exchange rate to other mod energy.
  • Ice maker can handle the recipes that have multiple stacks in input.
  • Fix hard-coding of the heat sources and the ice sources.
  • fix slag getLootList.
commented

From my side all current API functions are fine, so I'll close this issue.

commented

Currently, AMT2 features an API for handling the recipe.
Through the API, you can add, delete, and modify the recipes of most of the apparatus of the AMT2. (Ie, tea maker, ice maker, pan, iron plate, food processor, jaw crusher and evaporator.)
In addition, at tea makers and ice maker, you can add a recipe by utilizing the InterModComms sending of FML function.

I think it is very good suggestion, but it is difficult for me. Sorry.
A modification by enough Mod knowledgeable people (like you) is desirable case for me.
But, there is a need to prepare for many unfortunate crash that caused by operation by ignorant children.
So, for me, it is desirable that the AMT recipe modifications have been limited to Mod integrated work with the API.

In the future, additional recipes by configuration might be implemented.
In addition, by other Mod or AMT add-on that I have created now, there is a possibility that another way to manipulate the AMT recipe is provided.
But, deleted or modified is difficult.

commented

I can absolutely understand that.
I took a look at ModTweaker's code and I want to try myself. Unfortunately I have an issue with the development version of PotionExtension. The link AMT tries to download it from doesn't work. Do you know where I can get it from? I searched but couldn't find a working version.

commented

PotionExtension1.0.3-dev is here.
This is one of Japan informal forum topic. In addition, he also has a repository in Github.
forum
github
But, I guess it doesn't work in development environment.

AMT2 has been created to work with PitionExtension free environment. Perhaps, it could also compile without it.
However, if PotionExtension has not yet been introduced, potions with ID large than 32 is null. So I made a substitution effect replacement and null check. This is a point that requires attention.

If if you are a necessary, I will create an API to get a new potion that will be added by AMT2.
It, if PotionExtension has not yet been introduced, has the ability to perform the replacement to the substitution effect.

commented

Thanks for the link, I was able to run my dev environment with that.
Currently I am just trying to get a grip on how things work with ModTweaker (also on Java, it has been years since I did anything with it), so I am not yet at a stage where I need any additions to the API =)

commented

I am not completely done yet, but here are a few things I hope you can change/add:

  • API access to the lists for heat sources for the iron plate and pot
  • API access to the slag loot lists
  • (Lower priority) API setters for charge item charge (battery and ice) so I can modify the charge an item provides without needing to remove the original list entry and add a new one.
  • Ice Maker: currently Minecraft ice and snow blocks are hardcoded as charge items, please make them part of the charge item list so I can manipulate them.
  • Ice Maker: if possible, allow X:1 recipes. Currently I cannot register a recipe that transforms an input stack > 1, it will only use one item. For example I'd like to make a recipe that makes packed ice from 4 regular ice blocks.
commented

There is also an error in PanRecipeRegister.java
The register function version without the second output for the japanese bowl calls itself and so recurses infinitely:

@Override
    public void register(ItemStack input, ItemStack output, String tex, String disp) {
        if (input != null)
        {
            register(input, output, null, tex);
        }
    }

Correct is probably:

@Override
    public void register(ItemStack input, ItemStack output, String tex, String disp) {
        if (input != null)
        {
            register(input, output, null, tex, disp);
        }
    }
commented

IChargeItemRegister.registerCharger:
I suspect the "output" parameter is supposed to configure an item you get back after using the charge item (like an empty battery). This does not seem to work, I don't get an item back. Is that a bug, not implemented or did I something wrong?

commented

Most I can be implemented. Some I would refuse. Sorry.

Because I do not fully understand about ModTweaker, therefore, I do not understand reasons you can not import the source code of AMT2 body for add-on. Some of the questions seems to be resolved by quotation of AMT2 body source code.
If the specification of ModTeaker causes of your unavailable import, I'll create some API.

Soon I create API :

  • list of the heat sources for the pan and plate
  • slag loot list, and I also create API event hook for using the slag : )

I guess it takes a time:

  • Ice maker system
    This machine was made in when I was unfamiliar with creating mod. So it's has old source.
    It require structural repairs.
  • the "output" parameter of registerCharger
    Sorry, it will be deleted.
    As same as other devices is the case, "the return of empty containers" is scheduled to be modified to refer the FluidContainer of Forge or the vanilla containerItem.
commented

(Lower priority) API setters for charge item charge (battery and ice) so I can modify the charge an item provides without needing to remove the original list entry and add a new one.

It seems to be not considering possibility of to be modified by several Add-on. Elements cause of conflict processing would not be fed back to AMT2 body.
Currently, there are another AMT2 Add-on, or some AMT2 integrations included in the other mod. It seems difficult to add elements include the adverse effects for them.