Ex Deorum

Ex Deorum

689 Downloads

recommendation

azezzed opened this issue · 14 comments

commented

Hello author, I am currently working on the extension module for exdeorum: exdeorum_ex. I have already made many compression tools, blocks, and items. I hope the author can change the recipe of the crock to be like a hammer that can be added by themselves. There is also an acceleration formula similar to adding a magma crucible.
Finally, I am a Uyghur from Xinjiang, China. I have translated these requirements from Chinese to English, and there may be many errors. I hope the author can understand my meaning. Thank you. Once the module is ready, I will send it out.

commented

I wrote a Python script to translate Ex Nihilo Sequentia recipes to Ex Deorum recipes: you can find it here

commented

-------原文-------
您好作者,我正在做exdeorum的扩展模组:exdeorum_ex。 已经做了很多压缩工具和方块,还有物品,希望作者能把crook的配方改成跟锤子一样可自己添加。还有跟类似加上岩浆坩埚的加速配方。
最后,我是来自中国新疆的维吾尔族,这些要求我都是汉文翻译成英文的,可能会有很多错误,希望作者能看明白我的意思。谢谢~模组做好了之后我会发出去的。

commented

This can really save a lot of time

commented

I really like the 1.19.2 version of the "make out of nothing" recipe. Its code is written neatly and can save a lot of space. If the author has considered it, they can refer to the synthetic formula in version 1.19.2. As follows:
---原文---
我真的很喜欢1.19.2版本的无中生有配方。它的代码写的很整齐而能节省很多空间。如果作者有考虑,可以参照1.19.2版本的合成配方。如下:

{"type":"exnihilosequentia:sieve",
"input":{"item":"minecraft:acacia_leaves"},
"result":{"item":"minecraft:acacia_sapling"},
"rolls":[
{"chance":0.05,"mesh":"string"},
{"chance":0.1,"mesh":"flint"},
{"chance":0.15,"mesh":"iron"},
{"chance":0.2,"mesh":"diamond"}]}

commented

希望作者能把crook的配方改成跟锤子一样可自己添加。还有跟类似加上岩浆坩埚的加速配方。

If you wish to make your Compressed Crook item usable on leaves for the crook recipes, you can add your crook to the exdeorum:crooks tag and it will be detected, similar to hammers. In the next update of Ex Deorum, I have made Crook recipes customizable. For example, you could add a Crook recipe that gives a slight chance of dropping a silkworm when breaking a Tall Grass block.

我真的很喜欢1.19.2版本的无中生有配方。它的代码写的很整齐而能节省很多空间。如果作者有考虑,可以参照1.19.2版本的合成配方

I can add some code to interpret the 1.19 recipes into Ex Deorum recipes. Personally, this change does not affect me because I use Data Generation to add recipes rather than JSON. If you would like to do the same or create a script to do it for your mod, you can see what I've done here: theadarkcolour/exdeorum/data/recipe/SieveRecipes.java

Let me know if you want me to include an API package to avoid breaking changes in your mod.

commented

Do you have Discord?

commented

I really want to know how you made these codes generate a separate file:
//Dirt ->String mesh
ForMesh (writer, ingredient (Items. DIRT), EIitems STRING-MESH, (addDrop, addTagDrop, addConditionalDrop) ->{
AddDrop. accept (EIitems. STONE-PEBBLE. get(), binary (7, 0.6f));
AddDrop. accept (Items. FLINT, chance (0.25f));
AddDrop. accept (Items. WHIAT-SEEDS, chance (0.125f));
AddDrop. accept (Items. MELON-SEEDS, chance (0.1f));
AddDrop. accept (Items. PUMPKIN_SEEDS, chance (0.1f));
AddDrop. accept (Items. BEETROOT.SEEDS, chance (0.1f));
AddDrop. accept (Items. POTATO, chance (0.1f));
AddDrop. accept (Items. CARROT, chance (0.1f));
AddDrop. accept (EIitems. GRASS-SEEDS. get(), chance (0.1f));
AddDrop. accept (EIitems. MYCELIUM_SPORES. get(), chance (0.03f));
AddDrop. accept (Items. SUGAR-CANE, chance (0.1f));
AddDrop. accept (Items. POISONOUS-POTATO, chance (0.05f));
AddDrop. accept (Items. BAMBOO, chance (0.04f));
});
The code is written like this, but each line of code in the module file generates a file, which is really cool. I really want to learnI am really tired of writing the sieve formula for compressed blocks one by one.
----原文----
我很想知道您是怎么让这些代码能单独生成一个文件的:
--这里展现了代码部分--
代码是这样写了,但是在模组文件中每一行代码生成了一个文件,真的太酷了,很想学
我一个一个写压缩方块的筛子配方真的很累。

commented

First of all, thank you for your answer. I'm sorry to say that I don't know the logic of the Java language, but my research on this "ex deorum" series of modules can be said to be very meticulous. I personally have many restrictions on accessing GitHub to leave messages with you. What I want to say is that if the author can solve the above problems and update the module, it would be great, so that I can use this module to expand it.
----原文----
首先,谢谢您的回答,很不好意思的说,我不会java语言的逻辑,但是我对这个《ex deorum》系列模组的研究可以说是很仔细。我个人访问GitHub也是通过很多限制才能跟您留言,我这边想说的就是,如果作者能把以上的问题解决以后把模组更新一下就太好了,那样我可以利用这个模组来做它的扩展。

commented

我个人访问GitHub也是通过很多限制才能跟您留言,我这边想说的就是,如果作者能把以上的问题解决以后把模组更新一下就太好了,那样我可以利用这个模组来做它的扩展。

Is there another way I can contact you besides through GitHub?

代码是这样写了,但是在模组文件中每一行代码生成了一个文件,真的太酷了,很想学我一个一个写压缩方块的筛子配方真的很累。

This code utilizes Java 8's Lambda functions. For a Java program, this code is very convoluted, but I will try to do my best to explain.
Here is the forMesh method, which is where you pass in that big lambda where all the recipes get added. Here is the code for that method:

private static void forMesh(Consumer<FinishedRecipe> writer, Ingredient block, RegistryObject<? extends Item> mesh, ForMeshContext addDrops) {
    var folder = mesh.getId().getPath().replace("_mesh", "/");
    var basePath = path(block.getItems()[0].getItem()) + "/" + folder;

    addDrops.accept(
            (result, resultAmount) -> sieveRecipe(writer, basePath + path(result), block, mesh, result, resultAmount),
            (resultTag, resultAmount) -> sieveRecipeTag(writer, basePath + resultTag.location().getPath().concat("_tag"), block, mesh, resultTag, resultAmount),
            ((result, resultAmount, condition) -> sieveConditional(writer, basePath + result.map(MKRecipeProvider::path, tag -> tag.location().getPath().concat("_tag")), block, mesh, result, resultAmount, condition))
    );
}

The recipes are added in the ForMeshContext lambda, which is basically a wrapper around the sieveRecipe, sieveRecipeTag, and sieveConditional methods which, by themselves, create individual .json recipe files. forMesh fills in a bunch of the information that all recipes within this mesh have in common. So when you call forMesh and pass in a lambda that looks like this:

forMesh(writer, ingredient(Items.MOSS_BLOCK), EItems.FLINT_MESH, (addDrop, addTagDrop, addConditionalDrop) -> {
    addDrop.accept(Items.SWEET_BERRIES, chance(0.03f));
    addDrop.accept(Items.FLOWERING_AZALEA, chance(0.03f));
    addDrop.accept(Items.GLOW_LICHEN, chance(0.04f));
    addDrop.accept(Items.LILY_PAD, chance(0.04f));
});

It is equivalent to this code:

sieveRecipe(writer, "moss_block/diamond/sweet_berries", ingredient(Items.MOSS_BLOCK), EItems.FLINT_MESH, Items.SWEET_BERRIES, chance(0.03f));
sieveRecipe(writer, "moss_block/diamond/flowering_azalea", ingredient(Items.MOSS_BLOCK), EItems.FLINT_MESH, Items.FLOWERING_AZALEA, chance(0.03f));
// ...

The trickiest part of the code here is the use of Java Lambda expressions. When you call forMesh, you pass a "lambda" which is basically an anonymous method, or a piece of code that gets stored in a variable. This lambda has three parameters, addDrop, addTagDrop, and addConditionalDrop. What makes this confusing for the reader is that these parameters are lambdas too. If you go back to the code the forMesh method, you'll see that these lambdas are (result, resultAmount) -> sieveRecipe(writer, basePath + path(result), block, mesh, result, resultAmount),
(resultTag, resultAmount) -> sieveRecipeTag(writer, basePath + resultTag.location().getPath().concat("_tag"), block, mesh, resultTag, resultAmount), and
((result, resultAmount, condition) -> sieveConditional(writer, basePath + result.map(MKRecipeProvider::path, tag -> tag.location().getPath().concat("_tag")), block, mesh, result, resultAmount, condition)), respectively. But forMesh runs the lambda you supply once, defining those three parameter lambdas, and you can invoke them by calling accept on them with the necessary parameters. You can consider the three lambda parameters as macros for the sieveRecipe, sieveRecipeTag, etc. methods. I'm sure this could be achieved in a simpler way without using lambdas, but I ended up writing it this way.

commented
commented
commented

I can't use Discord, I'm sorry. I tried to send you the project file for the extension module, but I'm not sure if you can use WeChat or QQ on your end. If only you have it
我没办法用discord,对不起。我想办法发给你那个扩展模组的工程文件,但是不知道你那边能不能用微信或者QQ,如果你有就好了...

commented

You should not upload ZIP files of your projects as GitHub projects. It should just show the file layout instead of being contained in a ZIP file.
I apologize, but I cannot endorse an MCreator project. I'm planning on making my own compressed blocks project soon, so stay tuned.