Skip to content

Commit a801a95

Browse files
committed
Add support for EnderIO
woot woot
1 parent a7bcc3b commit a801a95

6 files changed

Lines changed: 224 additions & 1 deletion

File tree

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
99
### Added
1010
- Support for [Actually Additions] with EMC for Black Quarts (16), Coffee Beans (4), Canola (4), Bat Wings (16) and Bowl -> Water Bowl
1111
- NSSInput.Builder to make writing mappers easier with fewer imports
12+
- Support for [Ender IO]
1213

1314
### Changed
1415
- Changed all Mappers and MapperBases to use NSSInput.Builder instead and mark old methods as deprecated for removal
@@ -900,6 +901,7 @@ Added support for 18 more mods
900901
[Create]: https://www.curseforge.com/minecraft/mc-mods/create
901902
[Draconic Evolution]: https://www.curseforge.com/minecraft/mc-mods/draconic-evolution
902903
[Elemental Craft]: https://www.curseforge.com/minecraft/mc-mods/elemental-craft
904+
[Ender IO]: https://www.curseforge.com/minecraft/mc-mods/ender-io
903905
[EvilCraft]: https://www.curseforge.com/minecraft/mc-mods/evilcraft
904906
[Ex Nihilo Sequentia]: https://www.curseforge.com/minecraft/mc-mods/ex-nihilo-sequentia
905907
[Extended Crafting]: https://www.curseforge.com/minecraft/mc-mods/extended-crafting

build.gradle

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,7 @@ dependencies {
200200
implementation "curse.maven:corail-woodcutter-331983:${version_corail_woodcutter}"
201201
implementation("com.simibubi.create:create-${mc_version}:${version_create}-+"){ transitive = false }
202202
implementation "com.brandon3055.draconicevolution:Draconic-Evolution:${mc_version}-${version_draconicevolution}"
203+
implementation "com.enderio:enderio:${version_enderio}"
203204
implementation "curse.maven:evilcraft-74610:${version_evilcraft}"
204205
// implementation "novamachina.exnihilosequentia:exnihilosequentia:${version_exnihilo_sequentia}"
205206
implementation "com.blakebr0.extendedcrafting:ExtendedCrafting:${mc_version}-${version_extendedcrafting}"

gradle.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ version_chipped=5813117
7373
version_corail_woodcutter=5749639
7474
version_create=6.0.9
7575
version_draconicevolution=3.1.4.632
76+
version_enderio=8.2.3-beta
7677
# EvilCraft: 1.2.68
7778
version_evilcraft=6296089
7879
version_exnihilo_sequentia=1.21-7.0.0-build.1-beta

src/generated/resources/.cache/e404e8b58643e62cc093bad11a0fde6c8e79a76c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
// 1.21.1 2026-03-27T17:29:57.8876771 Custom EMC Conversions: projecteintegration
1+
// 1.21.1 2026-03-27T23:22:47.7655299 Custom EMC Conversions: projecteintegration
22
3787b1c098a11f85c4f0d489f06e544e78e1a2b4 data/actuallyadditions/pe_custom_conversions/actuallyadditions_default.json
33
582f60235625f3671a0fc445c2f60bafe5eed32b data/ae2/pe_custom_conversions/ae2_default.json
44
98f4158f81ea5ff1a3605c9d61013cee2448602d data/ars_nouveau/pe_custom_conversions/ars_nouveau_default.json
55
7682b0a6f53fe2c336cdd2069b2f43a24d64ed80 data/draconicevolution/pe_custom_conversions/draconicevolution_default.json
6+
628ff2590d4812076e6c2465270fdd3291b7cd63 data/enderio/pe_custom_conversions/enderio_default.json
67
ce7c5c230d09a26f49f96bbb62edf266d03878b1 data/evilcraft/pe_custom_conversions/evilcraft_default.json
78
c2cf52d4d7561a8f13a9022fe4cf59409f1eef34 data/farmersdelight/pe_custom_conversions/farmersdelight_default.json
89
f05bb8ccf9e604ea02570cec116fa042ab2d39d9 data/iceandfire/pe_custom_conversions/iceandfire_default.json
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"comment": "Default EMC for EnderIO",
3+
"values": {
4+
"before": [
5+
{
6+
"type": "projecte:item",
7+
"emc_value": 4,
8+
"id": "enderio:grains_of_infinity"
9+
},
10+
{
11+
"type": "projecte:item",
12+
"emc_value": 8,
13+
"id": "enderio:suspicious_seed"
14+
},
15+
{
16+
"type": "projecte:item",
17+
"emc_value": 2048,
18+
"id": "enderio:enderman_head"
19+
}
20+
],
21+
"conversion": [
22+
{
23+
"ingredients": [
24+
{
25+
"type": "projecte:item",
26+
"id": "minecraft:sand"
27+
}
28+
],
29+
"output": {
30+
"type": "projecte:item",
31+
"id": "enderio:silicon"
32+
}
33+
}
34+
]
35+
}
36+
}
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
/*
2+
* Copyright (c) 2019-2026 TagnumElite
3+
*
4+
* Permission is hereby granted, free of charge, to any person obtaining a copy
5+
* of this software and associated documentation files (the "Software"), to deal
6+
* in the Software without restriction, including without limitation the rights
7+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8+
* copies of the Software, and to permit persons to whom the Software is
9+
* furnished to do so, subject to the following conditions:
10+
*
11+
* The above copyright notice and this permission notice shall be included in all
12+
* copies or substantial portions of the Software.
13+
*
14+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20+
* SOFTWARE.
21+
*/
22+
23+
package com.tagnumelite.projecteintegration.addons;
24+
25+
import com.enderio.core.common.recipes.OutputStack;
26+
import com.enderio.enderio.content.machines.alloy.AlloySmeltingRecipe;
27+
import com.enderio.enderio.content.machines.painting.PaintingRecipe;
28+
import com.enderio.enderio.content.machines.sag_mill.SagMillingRecipe;
29+
import com.enderio.enderio.content.machines.slicer.SlicingRecipe;
30+
import com.enderio.enderio.content.machines.soul_binder.SoulBindingRecipe;
31+
import com.enderio.enderio.content.machines.vat.FermentingRecipe;
32+
import com.enderio.enderio.foundation.MachineRecipe;
33+
import com.enderio.enderio.init.EIOBlocks;
34+
import com.enderio.enderio.init.EIOItems;
35+
import com.enderio.enderio.init.EIORecipes;
36+
import com.tagnumelite.projecteintegration.api.conversion.AConversionProvider;
37+
import com.tagnumelite.projecteintegration.api.conversion.ConversionProvider;
38+
import com.tagnumelite.projecteintegration.api.recipe.ARecipeTypeMapper;
39+
import com.tagnumelite.projecteintegration.api.recipe.nss.NSSInput;
40+
import com.tagnumelite.projecteintegration.api.recipe.nss.NSSOutput;
41+
import moze_intel.projecte.api.data.CustomConversionBuilder;
42+
import moze_intel.projecte.api.mapper.recipe.RecipeTypeMapper;
43+
import net.minecraft.world.item.Items;
44+
import net.minecraft.world.item.crafting.Ingredient;
45+
import net.minecraft.world.item.crafting.RecipeType;
46+
47+
import java.util.List;
48+
49+
public class EnderIOAddon {
50+
protected static final String MODID = "enderio";
51+
52+
protected static String NAME(String name) {
53+
return "EnderIO" + name + "Mapper";
54+
}
55+
56+
protected abstract static class EIOMachineMapper<R extends MachineRecipe<?>> extends ARecipeTypeMapper<R> {
57+
@Override
58+
public NSSOutput getOutput(R recipe) {
59+
List<OutputStack> results = recipe.getResultStacks(registryAccess);
60+
if (results.isEmpty()) return null;
61+
if (results.size() == 1) {
62+
OutputStack result = results.getFirst();
63+
if (result.isFluid()) return new NSSOutput(result.getFluid());
64+
return new NSSOutput(result.getItem());
65+
}
66+
return mapOutputs(results.stream().map(o->o.isFluid() ? o.getFluid() : o.getItem()).toArray());
67+
}
68+
}
69+
70+
@RecipeTypeMapper(requiredMods = MODID, priority = 1)
71+
public static class EIOAlloySmeltingMapper extends EIOMachineMapper<AlloySmeltingRecipe> {
72+
@Override
73+
public String getName( ) {
74+
return NAME("AlloySmelting");
75+
}
76+
77+
@Override
78+
public boolean canHandle(RecipeType<?> recipeType) {
79+
return recipeType == EIORecipes.ALLOY_SMELTING.type().get();
80+
}
81+
82+
@Override
83+
public NSSInput getInput(AlloySmeltingRecipe recipe) {
84+
return convertSizedIngredients(recipe.inputs());
85+
}
86+
}
87+
88+
// We ignore Fire Crafting because we must
89+
90+
@RecipeTypeMapper(requiredMods = MODID, priority = 1)
91+
public static class EIOSagMillingMapper extends EIOMachineMapper<SagMillingRecipe> {
92+
@Override
93+
public String getName( ) {
94+
return NAME("SagMilling");
95+
}
96+
97+
@Override
98+
public boolean canHandle(RecipeType<?> recipeType) {
99+
return recipeType == EIORecipes.SAG_MILLING.type().get();
100+
}
101+
}
102+
103+
@RecipeTypeMapper(requiredMods = MODID, priority = 1)
104+
public static class EIOSlicingMapper extends EIOMachineMapper<SlicingRecipe> {
105+
@Override
106+
public String getName( ) {
107+
return NAME("Slicing");
108+
}
109+
110+
@Override
111+
public boolean canHandle(RecipeType<?> recipeType) {
112+
return recipeType == EIORecipes.SLICING.type().get();
113+
}
114+
}
115+
116+
@RecipeTypeMapper(requiredMods = MODID, priority = 1)
117+
public static class EIOSoulBindingMapper extends EIOMachineMapper<SoulBindingRecipe> {
118+
@Override
119+
public String getName( ) {
120+
return NAME("SoulBinding");
121+
}
122+
123+
@Override
124+
public boolean canHandle(RecipeType<?> recipeType) {
125+
return recipeType == EIORecipes.SOUL_BINDING.type().get();
126+
}
127+
128+
// We skip the soul vials because those are returned & TODO: Look at making souls have emc
129+
@Override
130+
protected List<Ingredient> getIngredients(SoulBindingRecipe recipe) {
131+
return List.of(recipe.getInput());
132+
}
133+
134+
@Override
135+
public NSSOutput getOutput(SoulBindingRecipe recipe) {
136+
return new NSSOutput(recipe.output());
137+
}
138+
}
139+
140+
@RecipeTypeMapper(requiredMods = MODID, priority = 1)
141+
public static class EIOPaintingMapper extends EIOMachineMapper<PaintingRecipe> {
142+
@Override
143+
public String getName( ) {
144+
return NAME("Painting");
145+
}
146+
147+
@Override
148+
public boolean canHandle(RecipeType<?> recipeType) {
149+
return recipeType == EIORecipes.PAINTING.type().get();
150+
}
151+
}
152+
153+
@RecipeTypeMapper(requiredMods = MODID, priority = 1)
154+
public static class EIOFermentingMapper extends EIOMachineMapper<FermentingRecipe> {
155+
@Override
156+
public String getName( ) {
157+
return NAME("Fermenting");
158+
}
159+
160+
@Override
161+
public boolean canHandle(RecipeType<?> recipeType) {
162+
return recipeType == EIORecipes.VAT_FERMENTING.type().get();
163+
}
164+
165+
@Override
166+
public NSSInput getInput(FermentingRecipe recipe) {
167+
return getInputBuilder().addFluid(recipe.input()).addItemKey(recipe.firstReagent())
168+
.addItemKey(recipe.secondReagent()).build();
169+
}
170+
}
171+
172+
@ConversionProvider(MODID)
173+
public static class EnderIOConversionProvider extends AConversionProvider {
174+
@Override
175+
public void convert(CustomConversionBuilder builder) {
176+
builder.comment("Default EMC for EnderIO").before(EIOItems.GRAINS_OF_INFINITY, 4)
177+
.before(EIOItems.SUSPICIOUS_SEED, 8)
178+
.before(EIOBlocks.ENDERMAN_HEAD, 2048)
179+
.conversion(EIOItems.SILICON).ingredient(Items.SAND).end(); // TODO: I don't like this conversion
180+
}
181+
}
182+
}

0 commit comments

Comments
 (0)