Skip to content

Commit fc1e13f

Browse files
committed
Fixed custom aura capability recipes throwing an error in kubejs
1 parent bd52427 commit fc1e13f

4 files changed

Lines changed: 11 additions & 6 deletions

File tree

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ org.gradle.jvmargs=-Xmx1G
1010
mapping_version=2023.09.03-1.20.1
1111

1212
# Mod Properties
13-
mod_version=2.3.1
13+
mod_version=2.3.2
1414
maven_group=com.illuminatijoe.refactorycore
1515
archives_base_name=refactorycore
1616
mod_id=refactorycore

src/main/java/com/illuminatijoe/refactorycore/ReFactoryCoreGTAddon.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,7 @@
1717

1818
import java.util.function.Consumer;
1919

20-
import static com.illuminatijoe.refactorycore.integration.kubejs.ReFactoryRecipeComponent.LP_IN;
21-
import static com.illuminatijoe.refactorycore.integration.kubejs.ReFactoryRecipeComponent.LP_OUT;
20+
import static com.illuminatijoe.refactorycore.integration.kubejs.ReFactoryRecipeComponent.*;
2221

2322
@SuppressWarnings("unused")
2423
@GTAddon
@@ -60,5 +59,6 @@ public void registerRecipeCapabilities() {
6059
@Override
6160
public void registerRecipeKeys(KJSRecipeKeyEvent event) {
6261
event.registerKey(ReFactoryRecipeCapabilities.LP, Pair.of(LP_IN, LP_OUT));
62+
event.registerKey(ReFactoryRecipeCapabilities.AURA, Pair.of(AURA_IN, AURA_OUT));
6363
}
6464
}

src/main/java/com/illuminatijoe/refactorycore/integration/kubejs/ReFactoryCoreKubeJSPlugin.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
import dev.latvian.mods.kubejs.script.BindingsEvent;
1414
import dev.latvian.mods.kubejs.script.ScriptType;
1515
import dev.latvian.mods.kubejs.util.ClassFilter;
16-
import org.apache.logging.log4j.Level;
1716

1817
public class ReFactoryCoreKubeJSPlugin extends KubeJSPlugin {
1918

@@ -47,14 +46,15 @@ public void registerBindings(BindingsEvent event) {
4746
public void registerRecipeSchemas(RegisterRecipeSchemasEvent event) {
4847
for (var entry : GTRegistries.RECIPE_TYPES.entries()) {
4948
event.register(entry.getKey(), ReFactoryRecipeSchema.SCHEMA);
50-
ReFactoryCore.LOGGER.log(Level.DEBUG, entry.getKey().toString());
5149
}
5250
}
5351

5452
@Override
5553
public void registerRecipeComponents(RecipeComponentFactoryRegistryEvent event) {
56-
ReFactoryCore.LOGGER.log(Level.DEBUG, "Registering Recipe Components");
5754
event.register("lpInput", ReFactoryRecipeComponent.LP_IN);
5855
event.register("lpOutput", ReFactoryRecipeComponent.LP_OUT);
56+
57+
event.register("auraInput", ReFactoryRecipeComponent.AURA_IN);
58+
event.register("auraOutput", ReFactoryRecipeComponent.AURA_OUT);
5959
}
6060
}

src/main/java/com/illuminatijoe/refactorycore/integration/kubejs/ReFactoryRecipeComponent.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
package com.illuminatijoe.refactorycore.integration.kubejs;
22

3+
import com.illuminatijoe.refactorycore.api.capabilities.recipe.AuraRecipeCapability;
34
import com.illuminatijoe.refactorycore.api.capabilities.recipe.LPRecipeCapability;
45

56
import com.gregtechceu.gtceu.integration.kjs.recipe.components.ContentJS;
@@ -12,4 +13,8 @@ public class ReFactoryRecipeComponent {
1213
LPRecipeCapability.CAP, false);
1314
public static final ContentJS<Integer> LP_OUT = new ContentJS<>(NumberComponent.ANY_INT,
1415
LPRecipeCapability.CAP, true);
16+
public static final ContentJS<Integer> AURA_IN = new ContentJS<>(NumberComponent.ANY_INT,
17+
AuraRecipeCapability.CAP, false);
18+
public static final ContentJS<Integer> AURA_OUT = new ContentJS<>(NumberComponent.ANY_INT,
19+
AuraRecipeCapability.CAP, true);
1520
}

0 commit comments

Comments
 (0)