Remove dark quartz disable config

This commit is contained in:
Vincent Lee committed 2017-12-15 19:11:30 -06:00
1 parent 01611be2a9
commit b124c60135
13 files changed
+30 -114

No files matched your search

@@ -175,13 +175,11 @@ public final class ModFluffBlocks {
r.register(dreamwoodPlankSlab);
r.register(dreamwoodPlankSlabFull);
if(ConfigHandler.darkQuartzEnabled) {
r.register(darkQuartz);
r.register(darkQuartzSlab);
r.register(darkQuartzSlabFull);
r.register(darkQuartzStairs);
}
r.register(darkQuartz);
r.register(darkQuartzSlab);
r.register(darkQuartzSlabFull);
r.register(darkQuartzStairs);
r.register(manaQuartz);
r.register(manaQuartzSlab);
r.register(manaQuartzSlabFull);
@@ -292,12 +290,10 @@ public final class ModFluffBlocks {
r.register(new ItemBlockMod(dreamwoodPlankStairs).setRegistryName(dreamwoodPlankStairs.getRegistryName()));
r.register(new ItemBlockModSlab(dreamwoodPlankSlab).setRegistryName(dreamwoodPlankSlab.getRegistryName()));
if(ConfigHandler.darkQuartzEnabled) {
r.register(new ItemBlockSpecialQuartz(darkQuartz).setRegistryName(darkQuartz.getRegistryName()));
r.register(new ItemBlockModSlab(darkQuartzSlab).setRegistryName(darkQuartzSlab.getRegistryName()));
r.register(new ItemBlockMod(darkQuartzStairs).setRegistryName(darkQuartzStairs.getRegistryName()));
}
r.register(new ItemBlockSpecialQuartz(darkQuartz).setRegistryName(darkQuartz.getRegistryName()));
r.register(new ItemBlockModSlab(darkQuartzSlab).setRegistryName(darkQuartzSlab.getRegistryName()));
r.register(new ItemBlockMod(darkQuartzStairs).setRegistryName(darkQuartzStairs.getRegistryName()));
r.register(new ItemBlockSpecialQuartz(manaQuartz).setRegistryName(manaQuartz.getRegistryName()));
r.register(new ItemBlockModSlab(manaQuartzSlab).setRegistryName(manaQuartzSlab.getRegistryName()));
r.register(new ItemBlockMod(manaQuartzStairs).setRegistryName(manaQuartzStairs.getRegistryName()));
@@ -352,11 +352,9 @@ public final class BotaniaCreativeTab extends CreativeTabs {
addBlock(ModFluffBlocks.shimmerrockSlab);
addItem(ModItems.quartz);
if(ConfigHandler.darkQuartzEnabled) {
addBlock(ModFluffBlocks.darkQuartz);
addBlock(ModFluffBlocks.darkQuartzSlab);
addBlock(ModFluffBlocks.darkQuartzStairs);
}
addBlock(ModFluffBlocks.darkQuartz);
addBlock(ModFluffBlocks.darkQuartzSlab);
addBlock(ModFluffBlocks.darkQuartzStairs);
addBlock(ModFluffBlocks.manaQuartz);
addBlock(ModFluffBlocks.manaQuartzSlab);
@@ -75,7 +75,6 @@ public final class ConfigHandler {
public static boolean enderPickpocketEnabled = true;
public static boolean fallenKanadeEnabled = true;
public static boolean darkQuartzEnabled = true;
public static boolean enchanterEnabled = true;
public static boolean fluxfieldEnabled = true;
public static boolean relicsEnabled = true;
@@ -204,9 +203,6 @@ public final class ConfigHandler {
desc = "Set this to false to disable the Fallen Kanade flower (gives Regeneration). This config option is here for those using Blood Magic. Note: Turning this off will not remove ones already in the world, it'll simply prevent the crafting.";
fallenKanadeEnabled = loadPropBool("fallenKanade.enabled", desc, fallenKanadeEnabled);
desc = "Set this to false to disable the Smokey Quartz blocks. This config option is here for those using Thaumic Tinkerer";
darkQuartzEnabled = loadPropBool("darkQuartz.enabled", desc, darkQuartzEnabled);
desc = "Set this to false to disable the Mana Enchanter. Since some people find it OP or something. This only disables the entry and creation. Old ones that are already in the world will stay.";
enchanterEnabled = loadPropBool("manaEnchanter.enabled", desc, enchanterEnabled);
@@ -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.core.handler.ConfigHandler;
import java.util.function.BooleanSupplier;
public class DarkQuartzConditionFactory implements IConditionFactory {
@Override
public BooleanSupplier parse(JsonContext context, JsonObject json) {
boolean value = JsonUtils.getBoolean(json , "value", true);
return () -> ConfigHandler.darkQuartzEnabled == value;
}
}
@@ -74,8 +74,7 @@ public final class ModManaAlchemyRecipes {
glowstoneDustRecipe = BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.GLOWSTONE_DUST, 4), new ItemStack(Blocks.GLOWSTONE), 25);
quartzRecipes = new ArrayList<>();
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(Items.QUARTZ, 4), new ItemStack(Blocks.QUARTZ_BLOCK, 1, Short.MAX_VALUE), 25));
if(ConfigHandler.darkQuartzEnabled)
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.quartz, 4, 0), new ItemStack(ModFluffBlocks.darkQuartz, 1, Short.MAX_VALUE), 25));
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.quartz, 4, 0), new ItemStack(ModFluffBlocks.darkQuartz, 1, Short.MAX_VALUE), 25));
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.quartz, 4, 1), new ItemStack(ModFluffBlocks.manaQuartz, 1, Short.MAX_VALUE), 25));
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.quartz, 4, 2), new ItemStack(ModFluffBlocks.blazeQuartz, 1, Short.MAX_VALUE), 25));
quartzRecipes.add(BotaniaAPI.registerManaAlchemyRecipe(new ItemStack(ModItems.quartz, 4, 3), new ItemStack(ModFluffBlocks.lavenderQuartz, 1, Short.MAX_VALUE), 25));
@@ -35,7 +35,7 @@ public class ItemQuartz extends ItemMod implements IElvenItem {
@Override
public void getSubItems(@Nonnull CreativeTabs tab, @Nonnull NonNullList<ItemStack> list) {
if(isInCreativeTab(tab)) {
for(int i = ConfigHandler.darkQuartzEnabled ? 0 : 1; i < SUBTYPES; i++)
for(int i = 0; i < SUBTYPES; i++)
list.add(new ItemStack(this, 1, i));
}
}
@@ -1329,39 +1329,22 @@ public final class LexiconData {
}
decorativeBlocks = new BasicLexiconEntry(LibLexicon.MISC_DECORATIVE_BLOCKS, categoryMisc);
if (ConfigHandler.darkQuartzEnabled)
decorativeBlocks.setLexiconPages(new PageText("0"),
new PageCraftingRecipe("1", ModCraftingRecipes.recipeLivingrockDecor1),
new PageCraftingRecipe("2", ModCraftingRecipes.recipeLivingrockDecor2),
new PageCraftingRecipe("3", ModCraftingRecipes.recipeLivingrockDecor3),
new PageCraftingRecipe("4", ModCraftingRecipes.recipeLivingrockDecor4),
new PageCraftingRecipe("5", ModCraftingRecipes.recipeLivingwoodDecor1),
new PageCraftingRecipe("6", ModCraftingRecipes.recipeLivingwoodDecor2),
new PageCraftingRecipe("7", ModCraftingRecipes.recipeLivingwoodDecor3),
new PageCraftingRecipe("8", ModCraftingRecipes.recipeLivingwoodDecor4),
new PageCraftingRecipe("9", ModCraftingRecipes.recipeLivingwoodDecor5), new PageText("10"),
new PageCraftingRecipe("11", ModCraftingRecipes.recipeDarkQuartz),
new PageManaInfusionRecipe("12", ModManaInfusionRecipes.manaQuartzRecipe),
new PageCraftingRecipe("13", ModCraftingRecipes.recipeBlazeQuartz),
new PageCraftingRecipe("14", ModCraftingRecipes.recipeLavenderQuartz),
new PageCraftingRecipe("15", ModCraftingRecipes.recipeRedQuartz),
new PageCraftingRecipe("23", ModCraftingRecipes.recipeSunnyQuartz), new PageText("16"));
else
decorativeBlocks.setLexiconPages(new PageText("0"),
new PageCraftingRecipe("1", ModCraftingRecipes.recipeLivingrockDecor1),
new PageCraftingRecipe("2", ModCraftingRecipes.recipeLivingrockDecor2),
new PageCraftingRecipe("3", ModCraftingRecipes.recipeLivingrockDecor3),
new PageCraftingRecipe("4", ModCraftingRecipes.recipeLivingrockDecor4),
new PageCraftingRecipe("5", ModCraftingRecipes.recipeLivingwoodDecor1),
new PageCraftingRecipe("6", ModCraftingRecipes.recipeLivingwoodDecor2),
new PageCraftingRecipe("7", ModCraftingRecipes.recipeLivingwoodDecor3),
new PageCraftingRecipe("8", ModCraftingRecipes.recipeLivingwoodDecor4),
new PageCraftingRecipe("9", ModCraftingRecipes.recipeLivingwoodDecor5), new PageText("10"),
new PageManaInfusionRecipe("12", ModManaInfusionRecipes.manaQuartzRecipe),
new PageCraftingRecipe("13", ModCraftingRecipes.recipeBlazeQuartz),
new PageCraftingRecipe("14", ModCraftingRecipes.recipeLavenderQuartz),
new PageCraftingRecipe("15", ModCraftingRecipes.recipeRedQuartz),
new PageCraftingRecipe("23", ModCraftingRecipes.recipeSunnyQuartz));
decorativeBlocks.setLexiconPages(new PageText("0"),
new PageCraftingRecipe("1", ModCraftingRecipes.recipeLivingrockDecor1),
new PageCraftingRecipe("2", ModCraftingRecipes.recipeLivingrockDecor2),
new PageCraftingRecipe("3", ModCraftingRecipes.recipeLivingrockDecor3),
new PageCraftingRecipe("4", ModCraftingRecipes.recipeLivingrockDecor4),
new PageCraftingRecipe("5", ModCraftingRecipes.recipeLivingwoodDecor1),
new PageCraftingRecipe("6", ModCraftingRecipes.recipeLivingwoodDecor2),
new PageCraftingRecipe("7", ModCraftingRecipes.recipeLivingwoodDecor3),
new PageCraftingRecipe("8", ModCraftingRecipes.recipeLivingwoodDecor4),
new PageCraftingRecipe("9", ModCraftingRecipes.recipeLivingwoodDecor5), new PageText("10"),
new PageCraftingRecipe("11", ModCraftingRecipes.recipeDarkQuartz),
new PageManaInfusionRecipe("12", ModManaInfusionRecipes.manaQuartzRecipe),
new PageCraftingRecipe("13", ModCraftingRecipes.recipeBlazeQuartz),
new PageCraftingRecipe("14", ModCraftingRecipes.recipeLavenderQuartz),
new PageCraftingRecipe("15", ModCraftingRecipes.recipeRedQuartz),
new PageCraftingRecipe("23", ModCraftingRecipes.recipeSunnyQuartz), new PageText("16"));
dispenserTweaks = new BasicLexiconEntry(LibLexicon.MISC_DISPENSER_TWEAKS, categoryMisc);
dispenserTweaks.setLexiconPages(new PageText("0")).setPriority().setIcon(new ItemStack(Blocks.DISPENSER));
@@ -1,6 +1,5 @@
{
"conditions": {
"dark_quartz_enabled": "vazkii.botania.common.crafting.DarkQuartzConditionFactory",
"fluxfield_enabled": "vazkii.botania.common.crafting.FluxfieldConditionFactory"
}
}
@@ -1,10 +1,4 @@
{
"conditions": [
{
"type": "botania:dark_quartz_enabled",
"value": true
}
],
"result": {
"item": "botania:quartzslabdarkhalf",
"data": 0,
@@ -1,10 +1,4 @@
{
"conditions": [
{
"type": "botania:dark_quartz_enabled",
"value": true
}
],
"result": {
"item": "botania:quartzstairsdark",
"count": 4
@@ -1,10 +1,4 @@
{
"conditions": [
{
"type": "botania:dark_quartz_enabled",
"value": true
}
],
"result": {
"item": "botania:quartztypedark",
"data": 0
@@ -1,10 +1,4 @@
{
"conditions": [
{
"type": "botania:dark_quartz_enabled",
"value": true
}
],
"result": {
"item": "botania:quartztypedark",
"data": 1
@@ -1,10 +1,4 @@
{
"conditions": [
{
"type": "botania:dark_quartz_enabled",
"value": true
}
],
"result": {
"item": "botania:quartztypedark",
"data": 2,