mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-22 05:02:30 +00:00
Don't reinvent the wheel, GardenOfGlass recipe condition is just forge:mod_loaded
This commit is contained in:
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;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
{
|
||||
"conditions": {
|
||||
"garden_of_glass": "vazkii.botania.common.crafting.GardenOfGlassConditionFactory",
|
||||
"dark_quartz_enabled": "vazkii.botania.common.crafting.DarkQuartzConditionFactory",
|
||||
"fluxfield_enabled": "vazkii.botania.common.crafting.FluxfieldConditionFactory"
|
||||
}
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": false
|
||||
"type": "forge:not",
|
||||
"value": {
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": false
|
||||
"type": "forge:not",
|
||||
"value": {
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": false
|
||||
"type": "forge:not",
|
||||
"value": {
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": false
|
||||
"type": "forge:not",
|
||||
"value": {
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": true
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": true
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": true
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": true
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": true
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": true
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": true
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": true
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": true
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": true
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
@@ -1,8 +1,11 @@
|
||||
{
|
||||
"conditions": [
|
||||
{
|
||||
"type": "botania:garden_of_glass",
|
||||
"value": false
|
||||
"type": "forge:not",
|
||||
"value": {
|
||||
"type": "forge:mod_loaded",
|
||||
"modid": "gardenofglass"
|
||||
}
|
||||
}
|
||||
],
|
||||
"result": {
|
||||
|
||||
Reference in new issue
Block a user