This mod is CREATE and PASTERDREAM addon, Is a server mod, Use to repair CREATE mechanical_saw wrong add dyedream_block cutting recipe.
本模组为机械动力和帕斯特之梦的附属模组,是一个服务端模组,用于修复机械动力动力锯配方中错误添加的染梦合金块切削配方。
The RuntimeDataGenerator.cuttingRecipes in CREATE generates recipes based on item registry names. The advantage is that it can automatically create corresponding recipes without requiring dedicated recipe adaptation when integrated with mods that add new wood types. For example, logs can be stripped, stripped logs to produce 6 planks, and planks can then be cut into corresponding items like doors, buttons, pressure plates, etc.
机械动力的RuntimeDataGenerator.cuttingRecipes会根据物品注册名进行配方生成,这么做的好处是即使不和其他添加了新的木头种类的模组进行专门的配方适配,也能自动生成对应的配方,例如原木去皮,去皮原木生成6个木板,木板切割成对应的门,按钮,压力板等。
The CREATE determines whether an item is stripped wood by checking if its registered name has the "stripped_" prefix. However, the dyedream wood from PASTERDREAM is an exception—it is inherently stripped wood, yet its registered names (pasterdream:dyedream_log and pasterdream:dyedream_wood) lack the "stripped_" prefix, causing the CREATE to misidentify it as a regular wooden block. Meanwhile, the dyedream_block(is an alloy block) has the registered name pasterdream:dyedream_block, with the "_block" suffix, leading the CREATE to classify it similarly to bamboo blocks. This results in the automatic generation of those three recipes:
dyedream_block -> 3 * dyedream_planks
dyedream_log -> 3 * dyedream_planks
dyedream_wood -> 3 * dyedream_planks
机械动力靠识别注册名是否有stripped_前缀判定这个是否属于去皮木,但是帕斯特之梦的染梦木比较特殊,其本身就是去皮木,注册名pasterdream:dyedream_log和pasterdream:dyedream_wood并没有stripped_前缀,导致机械动力不认为这是一般的木头方块之间的关系,然而,染梦合金块的注册名是pasterdream:dyedream_block,因为有_block后缀,导致机械动力认为这类似于竹块,所以就出现了自动生成的那三个配方:
染梦合金块 -> 3 * 染梦木板
染梦原木 -> 3 * 染梦木板
染梦木头 -> 3 * 染梦木板
This mod solves this problem through Mixin RuntimeDataGenerator.cuttingRecipes. When the pasterdream: dydream_ prefix is recognized, the original method execution is directly canceled without generating the above three recipes. Additionally, the following two correct recipes are written in the data:
dyedream_log -> 6 * dyedream_planks
dyedream_wood -> 6 * dyedream_planks
本模组通过Mixin RuntimeDataGenerator.cuttingRecipes解决了这个问题,当识别到pasterdream:dyedream_前缀时直接取消原方法执行,不会生成以上 3 个配方,并额外在data中编写了以下两个正确的配方:
染梦原木 -> 6 * 染梦木板
染梦木头 -> 6 * 染梦木板