-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
+ fix #19
- Loading branch information
Showing
11 changed files
with
120 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
src/main/java/committee/nova/mods/avaritia/init/compat/kubejs/CompressRecipeSchema.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package committee.nova.mods.avaritia.init.compat.kubejs; | ||
|
||
import dev.latvian.mods.kubejs.item.InputItem; | ||
import dev.latvian.mods.kubejs.item.OutputItem; | ||
import dev.latvian.mods.kubejs.recipe.RecipeJS; | ||
import dev.latvian.mods.kubejs.recipe.RecipeKey; | ||
import dev.latvian.mods.kubejs.recipe.component.ItemComponents; | ||
import dev.latvian.mods.kubejs.recipe.component.NumberComponent; | ||
import dev.latvian.mods.kubejs.recipe.component.TimeComponent; | ||
import dev.latvian.mods.kubejs.recipe.schema.RecipeSchema; | ||
|
||
/** | ||
* Author cnlimiter | ||
* CreateTime 2023/9/17 0:50 | ||
* Name CompressRecipeSchema | ||
* Description | ||
*/ | ||
|
||
public interface CompressRecipeSchema { | ||
RecipeKey<InputItem[]> INGREDIENTS = ItemComponents.INPUT_ARRAY.key("ingredients"); | ||
RecipeKey<OutputItem> OUTPUT = ItemComponents.OUTPUT.key("result"); | ||
RecipeKey<Long> COMPRESS_TIME = TimeComponent.TICKS.key("timeRequired").optional(240L); | ||
RecipeKey<Integer> MATERIAL_COUNT = NumberComponent.INT.key("materialCount").optional(1000); | ||
RecipeSchema SCHEMA = new RecipeSchema(RecipeJS.class, RecipeJS::new, INGREDIENTS, OUTPUT, MATERIAL_COUNT, COMPRESS_TIME); | ||
|
||
} |
24 changes: 24 additions & 0 deletions
24
src/main/java/committee/nova/mods/avaritia/init/compat/kubejs/KubeJSAvaritiaPlugin.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package committee.nova.mods.avaritia.init.compat.kubejs; | ||
|
||
import committee.nova.mods.avaritia.init.registry.ModRecipeSerializers; | ||
import dev.latvian.mods.kubejs.KubeJSPlugin; | ||
import dev.latvian.mods.kubejs.recipe.schema.RegisterRecipeSchemasEvent; | ||
import dev.latvian.mods.kubejs.recipe.schema.minecraft.ShapedRecipeSchema; | ||
import dev.latvian.mods.kubejs.recipe.schema.minecraft.ShapelessRecipeSchema; | ||
|
||
/** | ||
* Name: Avaritia-forge / KubeJSAvaritiaPlugin | ||
* Author: cnlimiter | ||
* CreateTime: 2023/9/17 0:49 | ||
* Description: | ||
*/ | ||
|
||
public class KubeJSAvaritiaPlugin extends KubeJSPlugin { | ||
|
||
@Override | ||
public void registerRecipeSchemas(RegisterRecipeSchemasEvent event) { | ||
event.register(ModRecipeSerializers.SHAPED_EXTREME_CRAFT_SERIALIZER.getId(), ShapedRecipeSchema.SCHEMA); | ||
event.register(ModRecipeSerializers.SHAPELESS_EXTREME_CRAFT_SERIALIZER.getId(), ShapelessRecipeSchema.SCHEMA); | ||
event.register(ModRecipeSerializers.COMPRESSOR_SERIALIZER.getId(), CompressRecipeSchema.SCHEMA); | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
...va/committee/nova/mods/avaritia/init/compat/kubejs/ShapedExtremeCraftingRecipeSchema.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package committee.nova.mods.avaritia.init.compat.kubejs; | ||
|
||
import dev.latvian.mods.kubejs.recipe.schema.RecipeSchema; | ||
import dev.latvian.mods.kubejs.recipe.schema.minecraft.ShapedRecipeSchema; | ||
|
||
import static dev.latvian.mods.kubejs.recipe.schema.minecraft.ShapedRecipeSchema.INGREDIENTS; | ||
import static dev.latvian.mods.kubejs.recipe.schema.minecraft.ShapedRecipeSchema.RESULT; | ||
|
||
/** | ||
* Author cnlimiter | ||
* CreateTime 2023/9/17 2:07 | ||
* Name ShapedExtremeCraftingRecipeSchema | ||
* Description | ||
*/ | ||
|
||
public interface ShapedExtremeCraftingRecipeSchema { | ||
RecipeSchema SCHEMA = new RecipeSchema(ShapedRecipeSchema.ShapedRecipeJS.class, ShapedRecipeSchema.ShapedRecipeJS::new, INGREDIENTS, RESULT); | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 0 additions & 89 deletions
89
src/main/java/committee/nova/mods/avaritia/util/recipes/IngredientsCache.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
+committee.nova.mods.avaritia.common.crafting.recipe | ||
+committee.nova.mods.avaritia.init.compact.kubejs |
Oops, something went wrong.