Added option for rotating items in the lexicon.

This commit is contained in:
Vasco Lavos committed 2014-02-14 20:41:56 +00:00
1 parent 31e2f94092
commit 9937428069
2 files changed
+10 -2

No files matched your search

@@ -14,6 +14,7 @@ package vazkii.botania.common.core.handler;
import java.io.File;
import net.minecraftforge.common.Configuration;
import net.minecraftforge.common.Property;
import vazkii.botania.common.lib.LibBlockIDs;
import vazkii.botania.common.lib.LibBlockNames;
import vazkii.botania.common.lib.LibItemIDs;
@@ -22,12 +23,18 @@ import vazkii.botania.common.lib.LibItemNames;
public final class ConfigHandler {
private static Configuration config;
public static boolean lexiconRotatingItems = true;
public static void loadConfig(File configFile) {
config = new Configuration(configFile);
config.load();
Property lexiconRotatingItemsProp = config.get(Configuration.CATEGORY_GENERAL, "lexicon.enable.rotatingItems", true);
lexiconRotatingItemsProp.comment = "Set to false to disable the rotating items in the petal and rune entries in the Lexica Botania.";
lexiconRotatingItems = lexiconRotatingItemsProp.getBoolean(true);
// Block IDs
LibBlockIDs.idFlower = loadBlock(LibBlockNames.FLOWER, LibBlockIDs.idFlower);
LibBlockIDs.idAltar = loadBlock(LibBlockNames.ALTAR, LibBlockIDs.idAltar);
@@ -28,6 +28,7 @@ import vazkii.botania.api.internal.MappableStackWrapper;
import vazkii.botania.api.recipe.RecipePetals;
import vazkii.botania.client.lib.LibResources;
import vazkii.botania.common.block.ModBlocks;
import vazkii.botania.common.core.handler.ConfigHandler;
public class PagePetalRecipe<T extends RecipePetals> extends PageRecipe {
@@ -56,7 +57,7 @@ public class PagePetalRecipe<T extends RecipePetals> extends PageRecipe {
List<Object> inputs = recipe.getInputs();
int degreePerInput = (int) (360F / inputs.size());
int currentDegree = 0;
int currentDegree = ConfigHandler.lexiconRotatingItems ? (int) Minecraft.getMinecraft().theWorld.getTotalWorldTime() * 2 : 0;
for(Object obj : inputs) {
Object input = obj;