Removed reach condition for crafting recipes, too much effort to maintain for such a small feature.
Fixed saving modifier settings on closing the gui (don't override onClose() but removed()).
This commit is contained in:
@@ -25,7 +25,6 @@ import nl.requios.effortlessbuilding.capability.ModifierCapabilityManager;
|
||||
import nl.requios.effortlessbuilding.command.CommandReach;
|
||||
import nl.requios.effortlessbuilding.compatibility.CompatHelper;
|
||||
import nl.requios.effortlessbuilding.gui.RandomizerBagGuiHandler;
|
||||
import nl.requios.effortlessbuilding.helper.ReachConditionFactory;
|
||||
import nl.requios.effortlessbuilding.item.ItemRandomizerBag;
|
||||
import nl.requios.effortlessbuilding.item.ItemReachUpgrade1;
|
||||
import nl.requios.effortlessbuilding.item.ItemReachUpgrade2;
|
||||
@@ -44,7 +43,7 @@ public class EffortlessBuilding
|
||||
{
|
||||
public static final String MODID = "effortlessbuilding";
|
||||
public static final String NAME = "Effortless Building";
|
||||
public static final String VERSION = "1.13.2-2.16";
|
||||
public static final String VERSION = "1.14.4-2.16";
|
||||
|
||||
public static EffortlessBuilding instance;
|
||||
|
||||
@@ -96,9 +95,6 @@ public class EffortlessBuilding
|
||||
|
||||
PacketHandler.register();
|
||||
|
||||
//Register recipe condition
|
||||
CraftingHelper.register(new ResourceLocation(MODID, "enable_reach_upgrades"), new ReachConditionFactory());
|
||||
|
||||
//TODO 1.13 config
|
||||
// ConfigManager.sync(MODID, Config.Type.INSTANCE);
|
||||
|
||||
|
||||
@@ -114,7 +114,7 @@ public class ModifierSettingsGui extends Screen {
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onClose() {
|
||||
public void removed() {
|
||||
scrollPane.onGuiClosed();
|
||||
|
||||
//save everything
|
||||
|
||||
@@ -1,28 +0,0 @@
|
||||
package nl.requios.effortlessbuilding.helper;
|
||||
|
||||
import com.google.gson.JsonObject;
|
||||
import net.minecraft.item.crafting.Ingredient;
|
||||
import net.minecraft.network.PacketBuffer;
|
||||
import net.minecraftforge.common.crafting.IIngredientSerializer;
|
||||
import nl.requios.effortlessbuilding.BuildConfig;
|
||||
|
||||
public class ReachConditionFactory implements IIngredientSerializer {
|
||||
@Override
|
||||
public Ingredient parse(PacketBuffer buffer) {
|
||||
if (BuildConfig.reach.enableReachUpgrades.get())
|
||||
return Ingredient.read(buffer);
|
||||
return Ingredient.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Ingredient parse(JsonObject json) {
|
||||
if (BuildConfig.reach.enableReachUpgrades.get())
|
||||
return Ingredient.deserialize(json);
|
||||
return Ingredient.EMPTY;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(PacketBuffer buffer, Ingredient ingredient) {
|
||||
ingredient.write(buffer);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"conditions": {
|
||||
"enable_reach_upgrades": "nl.requios.effortlessbuilding.helper.ReachConditionFactory"
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,4 @@
|
||||
{
|
||||
"conditions": [{
|
||||
"type": "effortlessbuilding:enable_reach_upgrades"
|
||||
}],
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" S",
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
{
|
||||
"conditions": [{
|
||||
"type": "effortlessbuilding:enable_reach_upgrades"
|
||||
}],
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" M",
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
{
|
||||
"conditions": [{
|
||||
"type": "effortlessbuilding:enable_reach_upgrades"
|
||||
}],
|
||||
"type": "minecraft:crafting_shaped",
|
||||
"pattern": [
|
||||
" FE",
|
||||
|
||||
Reference in New Issue
Block a user