Don't reinvent the wheel, GardenOfGlass recipe condition is just forge:mod_loaded

This commit is contained in:
Vincent Lee committed 2017-06-29 20:25:36 -05:00
1 parent cf0819e9b9
commit e571fc4915
17 files changed
+45 -56

No files matched your search

@@ -1,25 +0,0 @@
/**
* This class was created by <williewillus>. It's distributed as
* part of the Botania Mod. Get the Source Code in github:
* https://github.com/Vazkii/Botania
*
* Botania is Open Source and distributed under the
* Botania License: http://botaniamod.net/license.php
*/
package vazkii.botania.common.crafting;
import com.google.gson.JsonObject;
import net.minecraft.util.JsonUtils;
import net.minecraftforge.common.crafting.IConditionFactory;
import net.minecraftforge.common.crafting.JsonContext;
import vazkii.botania.common.Botania;
import java.util.function.BooleanSupplier;
public class GardenOfGlassConditionFactory implements IConditionFactory {
@Override
public BooleanSupplier parse(JsonContext context, JsonObject json) {
boolean value = JsonUtils.getBoolean(json , "value", true);
return () -> Botania.gardenOfGlassLoaded == value;
}
}