-
Notifications
You must be signed in to change notification settings - Fork 695
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
113 additions
and
132 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 was deleted.
Oops, something went wrong.
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,50 @@ | ||
package appeng.recipes; | ||
|
||
import appeng.core.AppEng; | ||
import appeng.core.definitions.AEItems; | ||
import appeng.items.parts.FacadeItem; | ||
import appeng.recipes.entropy.EntropyRecipe; | ||
import appeng.recipes.entropy.EntropyRecipeSerializer; | ||
import appeng.recipes.game.AddItemUpgradeRecipe; | ||
import appeng.recipes.game.AddItemUpgradeRecipeSerializer; | ||
import appeng.recipes.game.FacadeRecipe; | ||
import appeng.recipes.game.RemoveItemUpgradeRecipe; | ||
import appeng.recipes.game.RemoveItemUpgradeRecipeSerializer; | ||
import appeng.recipes.game.StorageCellUpgradeRecipe; | ||
import appeng.recipes.game.StorageCellUpgradeRecipeSerializer; | ||
import appeng.recipes.handlers.ChargerRecipe; | ||
import appeng.recipes.handlers.ChargerRecipeSerializer; | ||
import appeng.recipes.handlers.InscriberRecipe; | ||
import appeng.recipes.handlers.InscriberRecipeSerializer; | ||
import appeng.recipes.mattercannon.MatterCannonAmmo; | ||
import appeng.recipes.mattercannon.MatterCannonAmmoSerializer; | ||
import appeng.recipes.transform.TransformRecipe; | ||
import appeng.recipes.transform.TransformRecipeSerializer; | ||
import net.minecraft.core.registries.Registries; | ||
import net.minecraft.world.item.crafting.RecipeSerializer; | ||
import net.neoforged.neoforge.registries.DeferredRegister; | ||
|
||
public final class AERecipeSerializers { | ||
private AERecipeSerializers() { | ||
} | ||
|
||
public static final DeferredRegister<RecipeSerializer<?>> DR = DeferredRegister | ||
.create(Registries.RECIPE_SERIALIZER, AppEng.MOD_ID); | ||
|
||
static { | ||
FacadeItem facadeItem = AEItems.FACADE.get(); | ||
register("inscriber", InscriberRecipeSerializer.INSTANCE); | ||
register("facade", FacadeRecipe.SERIALIZER); | ||
register("entropy", EntropyRecipeSerializer.INSTANCE); | ||
register("matter_cannon", MatterCannonAmmoSerializer.INSTANCE); | ||
register("transform", TransformRecipeSerializer.INSTANCE); | ||
register("charger", ChargerRecipeSerializer.INSTANCE); | ||
register("storage_cell_upgrade", StorageCellUpgradeRecipeSerializer.INSTANCE); | ||
register("add_item_upgrade", AddItemUpgradeRecipeSerializer.INSTANCE); | ||
register("remove_item_upgrade", RemoveItemUpgradeRecipeSerializer.INSTANCE); | ||
} | ||
|
||
private static void register(String id, RecipeSerializer<?> serializer) { | ||
DR.register(id, () -> serializer); | ||
} | ||
} |
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,32 @@ | ||
package appeng.recipes; | ||
|
||
import appeng.core.AppEng; | ||
import appeng.recipes.entropy.EntropyRecipe; | ||
import appeng.recipes.handlers.ChargerRecipe; | ||
import appeng.recipes.handlers.InscriberRecipe; | ||
import appeng.recipes.mattercannon.MatterCannonAmmo; | ||
import appeng.recipes.transform.TransformRecipe; | ||
import net.minecraft.core.registries.Registries; | ||
import net.minecraft.world.item.crafting.Recipe; | ||
import net.minecraft.world.item.crafting.RecipeType; | ||
import net.neoforged.neoforge.registries.DeferredRegister; | ||
|
||
public final class AERecipeTypes { | ||
private AERecipeTypes() { | ||
} | ||
|
||
public static final DeferredRegister<RecipeType<?>> DR = DeferredRegister | ||
.create(Registries.RECIPE_TYPE, AppEng.MOD_ID); | ||
|
||
public static final RecipeType<TransformRecipe> TRANSFORM = register("transform"); | ||
public static final RecipeType<EntropyRecipe> ENTROPY = register("entropy"); | ||
public static final RecipeType<InscriberRecipe> INSCRIBER = register("inscriber"); | ||
public static final RecipeType<ChargerRecipe> CHARGER = register("charger"); | ||
public static final RecipeType<MatterCannonAmmo> MATTER_CANNON_AMMO = register("matter_cannon"); | ||
|
||
private static <T extends Recipe<?>> RecipeType<T> register(String id) { | ||
RecipeType<T> type = RecipeType.simple(AppEng.makeId(id)); | ||
DR.register(id, () -> type); | ||
return type; | ||
} | ||
} |
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
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
Oops, something went wrong.