mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-11-22 07:13:28 +01:00
some crafting recipes.
This commit is contained in:
parent
9d6415e2f8
commit
215cd50608
12 changed files with 275 additions and 39 deletions
|
@ -586,9 +586,12 @@ c6cb7541b7390b0af525b3b6854a943e461b1a03 data/actuallyadditions/recipes/black_qu
|
|||
f1d41941b332faf0b495353f27ea83287643e044 data/actuallyadditions/recipes/black_quartz_stair.json
|
||||
c9fc3f11f3bf5a928ea9f5900c344461d61fe9e5 data/actuallyadditions/recipes/black_quartz_wall.json
|
||||
398ad1cb070aa294671f0294515fc7695042fd05 data/actuallyadditions/recipes/booklet.json
|
||||
1374eebdd31930f25c5b952b1da5785c2209950d data/actuallyadditions/recipes/canola_seeds.json
|
||||
bb052242ce10811ea68cf5bc649ef7a78c79d046 data/actuallyadditions/recipes/charcoal_to_tiny.json
|
||||
7dc02da1ff58eb4ff48e305437d4857c31cbd5c9 data/actuallyadditions/recipes/chiseled_black_quartz_slab.json
|
||||
bf1b5de98f29c2dabe25a143c8e63d2c0cd6ea72 data/actuallyadditions/recipes/chiseled_black_quartz_stair.json
|
||||
9d779585266046738b4bcf7447b918ec09b65f95 data/actuallyadditions/recipes/chiseled_black_quartz_wall.json
|
||||
dbd343ce63581f748ffd7664df83e55a174cd0ab data/actuallyadditions/recipes/coal_to_tiny.json
|
||||
c4e98d1507f68d5524c737d4e63156aa476fd085 data/actuallyadditions/recipes/colorchange/black_carpet.json
|
||||
fc68c61bed8857f42e762c750d85665b4ed88ed1 data/actuallyadditions/recipes/colorchange/black_dye.json
|
||||
b62468a9f5be60ae05258bc4502faa78d9e4b034 data/actuallyadditions/recipes/colorchange/black_glazed_terracotta.json
|
||||
|
@ -823,8 +826,10 @@ ccdc4ab92dc7c0aae4de1566435ef5d701e14934 data/actuallyadditions/recipes/miningle
|
|||
6a1050a9aaadea6d3961b7e77ee17880404a56e0 data/actuallyadditions/recipes/pressing/canola.json
|
||||
68e7d4bd5e6ea852ef57ff5032d922a9a703fd77 data/actuallyadditions/recipes/quadruple_battery.json
|
||||
6797b2f74af9eb67a8ea6bdfa198cab7052db2a0 data/actuallyadditions/recipes/quintuple_battery.json
|
||||
70fc9365035ac3642771f921513990c88618de8f data/actuallyadditions/recipes/rice_seeds.json
|
||||
5b104e2c32eafdf802743d0e8d4c1a7e14071668 data/actuallyadditions/recipes/rice_slime.json
|
||||
85d2537a973d520c9eaaf2f15109c265faa2df3a data/actuallyadditions/recipes/rice_slime_potion.json
|
||||
469f920b7b32f5d29c435cb73cec09776c882c3d data/actuallyadditions/recipes/ring_of_magnetizing.json
|
||||
d4ca5d77d16ff6fdfc60e665694fdd97bce25463 data/actuallyadditions/recipes/shock_suppressor.json
|
||||
655fab699bb97ec252deb61d91fbef6f4738fe1c data/actuallyadditions/recipes/single_battery.json
|
||||
000ef9362f2202191f74132c3079ec4c1e2bfec8 data/actuallyadditions/recipes/solid_fuel/charcoal.json
|
||||
|
@ -835,6 +840,8 @@ d4ca5d77d16ff6fdfc60e665694fdd97bce25463 data/actuallyadditions/recipes/shock_su
|
|||
652b6e46c68cc83528e47b09a57bef3c91ccbb07 data/actuallyadditions/recipes/solid_fuel/tiny-coal.json
|
||||
8ebd738f3968564e22ba6841eb821e5064c78588 data/actuallyadditions/recipes/stone_aiot.json
|
||||
430e4d51767c86fe7824e7d92b260bc430c753c4 data/actuallyadditions/recipes/teleport_staff.json
|
||||
1842427a08e134e2077bff91479f4d316a321f84 data/actuallyadditions/recipes/tiny_to_charcoal.json
|
||||
a229210cc01ea031f1eeb09c9030b6f2440af412 data/actuallyadditions/recipes/tiny_to_coal.json
|
||||
bdf7dbf563485903e444400d341e56d0bf308481 data/actuallyadditions/recipes/tiny_torch.json
|
||||
b1761a179c6a6a45cc5a8246680d65c45651911d data/actuallyadditions/recipes/travelers_sack.json
|
||||
aac4c1515b4751f768da8b374aa3e0299ff8c760 data/actuallyadditions/recipes/triple_battery.json
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "actuallyadditions:canola"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "actuallyadditions:canola_seeds"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"type": "forge:conditional",
|
||||
"recipes": [
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"config_name": "tinyCoalStuff",
|
||||
"type": "actuallyadditions:bool_config_condition"
|
||||
}
|
||||
],
|
||||
"recipe": {
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "minecraft:charcoal"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "actuallyadditions:tiny_charcoal",
|
||||
"count": 8
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"type": "forge:conditional",
|
||||
"recipes": [
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"config_name": "tinyCoalStuff",
|
||||
"type": "actuallyadditions:bool_config_condition"
|
||||
}
|
||||
],
|
||||
"recipe": {
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "minecraft:coal"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "actuallyadditions:tiny_coal",
|
||||
"count": 8
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shapeless",
|
||||
"ingredients": [
|
||||
{
|
||||
"item": "actuallyadditions:rice"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
"item": "actuallyadditions:rice_seeds"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"RIB",
|
||||
"IOI",
|
||||
"BIR"
|
||||
],
|
||||
"key": {
|
||||
"R": {
|
||||
"item": "actuallyadditions:restonia_crystal"
|
||||
},
|
||||
"I": {
|
||||
"item": "actuallyadditions:enori_crystal"
|
||||
},
|
||||
"B": {
|
||||
"item": "minecraft:lapis_lazuli"
|
||||
},
|
||||
"O": {
|
||||
"item": "actuallyadditions:ring"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "actuallyadditions:ring_of_magnetizing"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"type": "forge:conditional",
|
||||
"recipes": [
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"config_name": "tinyCoalStuff",
|
||||
"type": "actuallyadditions:bool_config_condition"
|
||||
}
|
||||
],
|
||||
"recipe": {
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"CCC",
|
||||
"C C",
|
||||
"CCC"
|
||||
],
|
||||
"key": {
|
||||
"C": {
|
||||
"item": "actuallyadditions:tiny_charcoal"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "minecraft:charcoal"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"type": "forge:conditional",
|
||||
"recipes": [
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"config_name": "tinyCoalStuff",
|
||||
"type": "actuallyadditions:bool_config_condition"
|
||||
}
|
||||
],
|
||||
"recipe": {
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
"CCC",
|
||||
"C C",
|
||||
"CCC"
|
||||
],
|
||||
"key": {
|
||||
"C": {
|
||||
"item": "actuallyadditions:tiny_coal"
|
||||
}
|
||||
},
|
||||
"result": {
|
||||
"item": "minecraft:coal"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,7 +1,9 @@
|
|||
package de.ellpeck.actuallyadditions.data;
|
||||
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.config.conditions.BoolConfigCondition;
|
||||
import net.minecraft.data.DataGenerator;
|
||||
import net.minecraftforge.common.crafting.CraftingHelper;
|
||||
import net.minecraftforge.common.data.ExistingFileHelper;
|
||||
import net.minecraftforge.eventbus.api.SubscribeEvent;
|
||||
import net.minecraftforge.fml.common.Mod;
|
||||
|
@ -12,6 +14,7 @@ public class ActuallyAdditionsData {
|
|||
|
||||
@SubscribeEvent
|
||||
public static void runGenerator(GatherDataEvent event) {
|
||||
CraftingHelper.register(BoolConfigCondition.Serializer.INSTANCE);
|
||||
DataGenerator generator = event.getGenerator();
|
||||
ExistingFileHelper helper = event.getExistingFileHelper();
|
||||
|
||||
|
|
|
@ -3,6 +3,7 @@ package de.ellpeck.actuallyadditions.data;
|
|||
import com.google.gson.JsonObject;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.config.conditions.BoolConfigCondition;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.ActuallyRecipes;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.TargetNBTIngredient;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.WrappedRecipe;
|
||||
|
@ -16,6 +17,7 @@ import net.minecraft.tags.ItemTags;
|
|||
import net.minecraft.util.IItemProvider;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.Tags;
|
||||
import net.minecraftforge.common.crafting.ConditionalRecipe;
|
||||
import net.minecraftforge.common.crafting.NBTIngredient;
|
||||
import net.minecraftforge.fml.RegistryObject;
|
||||
|
||||
|
@ -390,31 +392,66 @@ public class ItemRecipeGenerator extends RecipeProvider {
|
|||
.define('C', ActuallyItems.ADVANCED_COIL.get())
|
||||
.save(WrappedRecipe.Inject(consumer, ActuallyRecipes.KEEP_DATA_SHAPED_RECIPE.get()));
|
||||
|
||||
//Magnet Ring
|
||||
Recipe.shaped(ActuallyItems.RING_OF_MAGNETIZING.get())
|
||||
.pattern("RIB", "IOI", "BIR")
|
||||
.define('R', ActuallyItems.RESTONIA_CRYSTAL.get())
|
||||
.define('I', ActuallyItems.ENORI_CRYSTAL.get())
|
||||
.define('B', Items.LAPIS_LAZULI)
|
||||
.define('O', ActuallyItems.RING.get())
|
||||
.save(consumer);
|
||||
|
||||
Recipe.shapeless(ActuallyItems.CRAFTER_ON_A_STICK.get()).requires(Items.CRAFTING_TABLE).requires(ItemTags.SIGNS).save(consumer);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
ConditionalRecipe.builder()
|
||||
.addCondition(new BoolConfigCondition("tinyCoalStuff"))
|
||||
.addRecipe(
|
||||
Recipe.shapeless(ActuallyItems.TINY_COAL.get(), 8)
|
||||
.requires(Items.COAL)::save)
|
||||
.generateAdvancement().build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "coal_to_tiny"));
|
||||
ConditionalRecipe.builder()
|
||||
.addCondition(new BoolConfigCondition("tinyCoalStuff"))
|
||||
.addRecipe(
|
||||
Recipe.shapeless(ActuallyItems.TINY_CHARCOAL.get(), 8)
|
||||
.requires(Items.CHARCOAL)::save)
|
||||
.generateAdvancement().build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "charcoal_to_tiny"));
|
||||
|
||||
ConditionalRecipe.builder()
|
||||
.addCondition(new BoolConfigCondition("tinyCoalStuff"))
|
||||
.addRecipe(
|
||||
Recipe.shaped(Items.COAL)
|
||||
.pattern("CCC", "C C", "CCC").define('C', ActuallyItems.TINY_COAL.get())::save)
|
||||
.generateAdvancement().build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_to_coal"));
|
||||
ConditionalRecipe.builder()
|
||||
.addCondition(new BoolConfigCondition("tinyCoalStuff"))
|
||||
.addRecipe(
|
||||
Recipe.shaped(Items.CHARCOAL)
|
||||
.pattern("CCC", "C C", "CCC").define('C', ActuallyItems.TINY_CHARCOAL.get())::save)
|
||||
.generateAdvancement().build(consumer, new ResourceLocation(ActuallyAdditions.MODID, "tiny_to_charcoal"));
|
||||
|
||||
//Canola Seeds
|
||||
Recipe.shapeless(ActuallyItems.CANOLA_SEEDS.get())
|
||||
.requires(ActuallyItems.CANOLA.get())
|
||||
.save(consumer);
|
||||
|
||||
//Rice Seeds
|
||||
Recipe.shapeless(ActuallyItems.RICE_SEEDS.get())
|
||||
.requires(ActuallyItems.RICE.get())
|
||||
.save(consumer);
|
||||
|
||||
|
||||
|
||||
//
|
||||
// //Magnet Ring
|
||||
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMagnetRing), "RIB", "IOI", "BIR", 'R', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.REDSTONE.ordinal()), 'I', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.IRON.ordinal()), 'B', new ItemStack(Items.DYE, 1, 4), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
|
||||
// recipeMagnetRing = RecipeUtil.lastIRecipe();
|
||||
//
|
||||
// //Growth Ring
|
||||
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemGrowthRing), "SIS", "IOI", "SIS", 'S', new ItemStack(Items.WHEAT_SEEDS), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.IRON.ordinal()), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
|
||||
// recipeGrowthRing = RecipeUtil.lastIRecipe();
|
||||
//
|
||||
// //Water Ring
|
||||
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemWaterRemovalRing), "BIB", "IOI", "BIB", 'B', new ItemStack(Items.WATER_BUCKET), 'I', new ItemStack(InitItems.itemCrystalEmpowered, 1, TheCrystals.DIAMOND.ordinal()), 'O', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal()));
|
||||
// recipeWaterRing = RecipeUtil.lastIRecipe();
|
||||
//
|
||||
//
|
||||
// //Cup
|
||||
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CUP.ordinal()), "S S", "SCS", "SSS", 'S', "stone", 'C', "cropCoffee");
|
||||
// recipeCup = RecipeUtil.lastIRecipe();
|
||||
//
|
||||
// //Resonant Rice
|
||||
// if (!OreDictionary.getOres("nuggetEnderium", false).isEmpty()) {
|
||||
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemResonantRice), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()), "nuggetEnderium", Items.GUNPOWDER);
|
||||
// }
|
||||
//
|
||||
// //Advanced Leaf Blower
|
||||
// RecipeHandler.addOreDictRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced), " F", "DP", "DC", 'F', new ItemStack(Items.FLINT), 'D', new ItemStack(InitItems.itemCrystal, 1, TheCrystals.DIAMOND.ordinal()), 'P', new ItemStack(Blocks.PISTON), 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()));
|
||||
// recipeLeafBlowerAdvanced = RecipeUtil.lastIRecipe();
|
||||
|
@ -433,29 +470,7 @@ public class ItemRecipeGenerator extends RecipeProvider {
|
|||
// //Knife
|
||||
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemKnife), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()));
|
||||
// recipeKnife = RecipeUtil.lastIRecipe();
|
||||
//
|
||||
// //Crafter on a Stick
|
||||
// RecipeHandler.addShapelessOreDictRecipe(new ItemStack(InitItems.itemCrafterOnAStick), new ItemStack(Blocks.CRAFTING_TABLE), new ItemStack(Items.SIGN));
|
||||
//
|
||||
// //Tiny Coal
|
||||
// if (ConfigBoolValues.TINY_COAL_STUFF.isEnabled()) {
|
||||
// RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_COAL.ordinal()), new ItemStack(Items.COAL));
|
||||
// recipeTinyCoal = RecipeUtil.lastIRecipe();
|
||||
// RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemMisc, 8, TheMiscItems.TINY_CHAR.ordinal()), new ItemStack(Items.COAL, 1, 1));
|
||||
// recipeTinyChar = RecipeUtil.lastIRecipe();
|
||||
// RecipeHandler.addOreDictRecipe(new ItemStack(Items.COAL), "CCC", "C C", "CCC", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_COAL.ordinal()));
|
||||
// RecipeHandler.addOreDictRecipe(new ItemStack(Items.COAL, 1, 1), "CCC", "C C", "CCC", 'C', new ItemStack(InitItems.itemMisc, 1, TheMiscItems.TINY_CHAR.ordinal()));
|
||||
// }
|
||||
//
|
||||
// //Rice Seeds
|
||||
// RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemRiceSeed), new ItemStack(InitItems.itemFoods, 1, TheFoods.RICE.ordinal()));
|
||||
//
|
||||
// //Canola Seeds
|
||||
// RecipeHandler.addShapelessRecipe(new ItemStack(InitItems.itemCanolaSeed), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.CANOLA.ordinal()));
|
||||
//
|
||||
// //Rings
|
||||
// initPotionRingRecipes();
|
||||
//
|
||||
|
||||
// //Ingots from Dusts
|
||||
// GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.IRON.ordinal()), new ItemStack(Items.IRON_INGOT), 1F);
|
||||
// GameRegistry.addSmelting(new ItemStack(InitItems.itemDust, 1, TheDusts.GOLD.ordinal()), new ItemStack(Items.GOLD_INGOT), 1F);
|
||||
|
|
|
@ -14,6 +14,7 @@ import de.ellpeck.actuallyadditions.api.ActuallyAdditionsAPI;
|
|||
import de.ellpeck.actuallyadditions.api.farmer.IFarmerBehavior;
|
||||
import de.ellpeck.actuallyadditions.mod.blocks.ActuallyBlocks;
|
||||
import de.ellpeck.actuallyadditions.mod.config.CommonConfig;
|
||||
import de.ellpeck.actuallyadditions.mod.config.conditions.BoolConfigCondition;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.ActuallyRecipes;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.CrusherCrafting;
|
||||
import de.ellpeck.actuallyadditions.mod.crafting.TargetNBTIngredient;
|
||||
|
@ -119,6 +120,10 @@ public class ActuallyAdditions {
|
|||
private void setup(FMLCommonSetupEvent event) {
|
||||
PacketHandler.init();
|
||||
|
||||
event.enqueueWork(() -> {
|
||||
CraftingHelper.register(BoolConfigCondition.Serializer.INSTANCE);
|
||||
});
|
||||
|
||||
ActuallyAdditionsAPI.methodHandler = new MethodHandler();
|
||||
ActuallyAdditionsAPI.connectionHandler = new LaserRelayConnectionHandler();
|
||||
//Lenses.init();
|
||||
|
|
|
@ -0,0 +1,51 @@
|
|||
package de.ellpeck.actuallyadditions.mod.config.conditions;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import de.ellpeck.actuallyadditions.mod.ActuallyAdditions;
|
||||
import de.ellpeck.actuallyadditions.mod.config.CommonConfig;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.common.crafting.conditions.ICondition;
|
||||
import net.minecraftforge.common.crafting.conditions.IConditionSerializer;
|
||||
|
||||
public class BoolConfigCondition implements ICondition {
|
||||
private static final ResourceLocation NAME = new ResourceLocation(ActuallyAdditions.MODID, "bool_config_condition");
|
||||
private final String boolConfig;
|
||||
|
||||
public BoolConfigCondition(String config) {
|
||||
this.boolConfig = config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getID() {
|
||||
return NAME;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean test() {
|
||||
switch (boolConfig) {
|
||||
default:
|
||||
return true;
|
||||
case "tinyCoalStuff":
|
||||
return CommonConfig.Other.TINY_COAL_STUFF.get();
|
||||
}
|
||||
}
|
||||
|
||||
public static class Serializer implements IConditionSerializer<BoolConfigCondition> {
|
||||
public static final BoolConfigCondition.Serializer INSTANCE = new BoolConfigCondition.Serializer();
|
||||
|
||||
@Override
|
||||
public void write(JsonObject json, BoolConfigCondition value) {
|
||||
json.addProperty("config_name", value.boolConfig);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BoolConfigCondition read(JsonObject json) {
|
||||
return new BoolConfigCondition(json.get("config_name").getAsString());
|
||||
}
|
||||
|
||||
@Override
|
||||
public ResourceLocation getID() {
|
||||
return BoolConfigCondition.NAME;
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue