From 66fcde800a52b018aedfacb09d68421750323339 Mon Sep 17 00:00:00 2001 From: Ellpeck Date: Fri, 24 Apr 2015 19:22:03 +0200 Subject: [PATCH] Made ready for next version: Crafting, Greenhouse Glass, Breaker, Placer, Compost Graphics, awesome! --- .../blocks/BlockCompost.java | 6 +- .../blocks/render/ModelCompost.java | 28 ++- .../blocks/render/RenderTileEntity.java | 6 +- .../config/ConfigCategories.java | 20 ++ .../config/ConfigValues.java | 176 +++--------------- .../config/ConfigurationHandler.java | 11 -- .../config/values/ConfigBoolValues.java | 39 ++++ .../config/values/ConfigCrafting.java | 90 +++++++++ .../config/values/ConfigFloatValues.java | 34 ++++ .../config/values/ConfigIntValues.java | 71 +++++++ .../crafting/BlockCrafting.java | 70 ++++--- .../crafting/FoodCrafting.java | 34 ++-- .../crafting/ItemCrafting.java | 55 ++++-- .../crafting/MiscCrafting.java | 11 +- .../crafting/ToolCrafting.java | 6 +- .../creative/CreativeTab.java | 1 + .../actuallyadditions/gen/InitVillager.java | 7 +- .../ellpeck/actuallyadditions/gen/OreGen.java | 5 +- .../gen/VillageComponentJamHouse.java | 4 +- .../inventory/ContainerFurnaceDouble.java | 9 +- .../inventory/ContainerGrinder.java | 15 +- .../actuallyadditions/items/InitItems.java | 5 + .../actuallyadditions/items/ItemKnife.java | 4 +- .../items/ItemLeafBlower.java | 49 +++-- .../actuallyadditions/items/ItemUpgrade.java | 65 +++++++ .../items/metalists/TheSpecialDrops.java | 14 +- .../material/InitItemMaterials.java | 7 +- .../actuallyadditions/proxy/ClientProxy.java | 4 +- .../tile/TileEntityBreaker.java | 68 ++++--- .../tile/TileEntityCompost.java | 12 +- .../tile/TileEntityFeeder.java | 8 +- .../tile/TileEntityFishingNet.java | 4 +- .../tile/TileEntityFurnaceDouble.java | 23 ++- .../tile/TileEntityFurnaceSolar.java | 14 +- .../tile/TileEntityGreenhouseGlass.java | 4 +- .../tile/TileEntityGrinder.java | 30 ++- .../tile/TileEntityHeatCollector.java | 23 ++- .../tile/TileEntityItemRepairer.java | 4 +- .../tile/TileEntityUpgradable.java | 40 ++++ .../assets/actuallyadditions/lang/en_US.lang | 17 +- .../textures/blocks/models/modelCompost.png | Bin 1301 -> 2065 bytes .../textures/gui/guiFurnaceDouble.png | Bin 2286 -> 2337 bytes .../textures/gui/guiGrinder.png | Bin 2392 -> 2456 bytes .../textures/gui/guiGrinderDouble.png | Bin 2547 -> 2601 bytes .../textures/gui/guiInventory.png | Bin 2933 -> 2933 bytes .../textures/items/itemUpgradeSpeed.png | Bin 0 -> 464 bytes 46 files changed, 732 insertions(+), 361 deletions(-) create mode 100644 src/main/java/ellpeck/actuallyadditions/config/ConfigCategories.java create mode 100644 src/main/java/ellpeck/actuallyadditions/config/values/ConfigBoolValues.java create mode 100644 src/main/java/ellpeck/actuallyadditions/config/values/ConfigCrafting.java create mode 100644 src/main/java/ellpeck/actuallyadditions/config/values/ConfigFloatValues.java create mode 100644 src/main/java/ellpeck/actuallyadditions/config/values/ConfigIntValues.java create mode 100644 src/main/java/ellpeck/actuallyadditions/items/ItemUpgrade.java create mode 100644 src/main/java/ellpeck/actuallyadditions/tile/TileEntityUpgradable.java create mode 100644 src/main/resources/assets/actuallyadditions/textures/items/itemUpgradeSpeed.png diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCompost.java b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCompost.java index 8ddffa1be..ec518b1c4 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/BlockCompost.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/BlockCompost.java @@ -3,7 +3,7 @@ package ellpeck.actuallyadditions.blocks; import cpw.mods.fml.client.registry.RenderingRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.items.ItemFertilizer; import ellpeck.actuallyadditions.items.ItemMisc; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; @@ -41,7 +41,7 @@ public class BlockCompost extends BlockContainerBase implements INameableItem{ ItemStack stackPlayer = player.getCurrentEquippedItem(); TileEntityCompost tile = (TileEntityCompost)world.getTileEntity(x, y, z); //Add items to be composted - if(stackPlayer != null && stackPlayer.getItem() instanceof ItemMisc && stackPlayer.getItemDamage() == TheMiscItems.MASHED_FOOD.ordinal() && (tile.slots[0] == null || (!(tile.slots[0].getItem() instanceof ItemFertilizer) && tile.slots[0].stackSize < ConfigValues.compostAmountNeededToConvert))){ + if(stackPlayer != null && stackPlayer.getItem() instanceof ItemMisc && stackPlayer.getItemDamage() == TheMiscItems.MASHED_FOOD.ordinal() && (tile.slots[0] == null || (!(tile.slots[0].getItem() instanceof ItemFertilizer) && tile.slots[0].stackSize < ConfigIntValues.COMPOST_AMOUNT.getValue()))){ if(tile.slots[0] == null) tile.slots[0] = new ItemStack(stackPlayer.getItem(), 1, TheMiscItems.MASHED_FOOD.ordinal()); else tile.slots[0].stackSize++; if(!player.capabilities.isCreativeMode) player.inventory.getCurrentItem().stackSize--; @@ -152,7 +152,7 @@ public class BlockCompost extends BlockContainerBase implements INameableItem{ @SuppressWarnings("unchecked") @SideOnly(Side.CLIENT) public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { - BlockUtil.addInformation(theBlock, list, 2, ""); + BlockUtil.addInformation(theBlock, list, 1, ""); } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelCompost.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelCompost.java index ac84d2e22..6dfc64af0 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelCompost.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/ModelCompost.java @@ -1,5 +1,6 @@ package ellpeck.actuallyadditions.blocks.render; +import ellpeck.actuallyadditions.tile.TileEntityCompost; import net.minecraft.client.model.ModelRenderer; public class ModelCompost extends ModelBaseAA{ @@ -9,10 +10,12 @@ public class ModelCompost extends ModelBaseAA{ public ModelRenderer wallTwo; public ModelRenderer wallThree; public ModelRenderer wallFour; + public ModelRenderer[] innerRawList = new ModelRenderer[13]; + public ModelRenderer innerDone; public ModelCompost(){ this.textureWidth = 64; - this.textureHeight = 64; + this.textureHeight = 128; this.wallThree = new ModelRenderer(this, 0, 0); this.wallThree.setRotationPoint(-6.0F, 8.0F, 6.0F); this.wallThree.addBox(0.0F, 0.0F, 0.0F, 12, 15, 1, 0.0F); @@ -28,6 +31,29 @@ public class ModelCompost extends ModelBaseAA{ this.floor = new ModelRenderer(this, 0, 0); this.floor.setRotationPoint(-7.0F, 23.0F, -7.0F); this.floor.addBox(0.0F, 0.0F, 0.0F, 14, 1, 14, 0.0F); + + for(int i = 0; i < this.innerRawList.length; i++){ + this.innerRawList[i] = new ModelRenderer(this, 0, 29); + this.innerRawList[i].setRotationPoint(-6.0F, 10.0F, -6.0F); + this.innerRawList[i].addBox(0.0F, 12-i, 0.0F, 12, i+1, 12, 0.0F); + } + + this.innerDone = new ModelRenderer(this, 0, 54); + this.innerDone.setRotationPoint(-6.0F, 10.0F, -6.0F); + this.innerDone.addBox(0.0F, 0.0F, 0.0F, 12, 13, 12, 0.0F); + } + + public void renderExtra(float f, TileEntityCompost tile){ + int meta = tile.getWorldObj().getBlockMetadata(tile.xCoord, tile.yCoord, tile.zCoord); + if(meta > 0 && meta <= tile.amountNeededToConvert){ + int heightToDisplay = meta*13/tile.amountNeededToConvert; + if(heightToDisplay > 13) heightToDisplay = 13; + + this.innerRawList[heightToDisplay-1].render(f); + } + if(meta == tile.amountNeededToConvert+1){ + this.innerDone.render(f); + } } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderTileEntity.java b/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderTileEntity.java index 1d4ddb04a..b500f1088 100644 --- a/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderTileEntity.java +++ b/src/main/java/ellpeck/actuallyadditions/blocks/render/RenderTileEntity.java @@ -1,5 +1,6 @@ package ellpeck.actuallyadditions.blocks.render; +import ellpeck.actuallyadditions.tile.TileEntityCompost; import ellpeck.actuallyadditions.util.ModUtil; import net.minecraft.client.renderer.tileentity.TileEntitySpecialRenderer; import net.minecraft.tileentity.TileEntity; @@ -17,11 +18,14 @@ public class RenderTileEntity extends TileEntitySpecialRenderer{ @Override public void renderTileEntityAt(TileEntity tile, double x, double y, double z, float par5){ GL11.glPushMatrix(); - GL11.glTranslatef((float)x+0.5F, (float)y-0.5F, (float)z+0.5F); + GL11.glTranslatef((float)x + 0.5F, (float)y - 0.5F, (float)z + 0.5F); GL11.glRotatef(180F, 0.0F, 0.0F, 1.0F); GL11.glTranslatef(0.0F, -2.0F, 0.0F); this.bindTexture(new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/blocks/models/" + this.theModel.getName() + ".png")); theModel.render(0.0625F); + + if(tile instanceof TileEntityCompost && theModel instanceof ModelCompost) ((ModelCompost)theModel).renderExtra(0.0625F, (TileEntityCompost)tile); + GL11.glPopMatrix(); } diff --git a/src/main/java/ellpeck/actuallyadditions/config/ConfigCategories.java b/src/main/java/ellpeck/actuallyadditions/config/ConfigCategories.java new file mode 100644 index 000000000..5d6565c11 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/config/ConfigCategories.java @@ -0,0 +1,20 @@ +package ellpeck.actuallyadditions.config; + +public enum ConfigCategories{ + + FOOD_CRAFTING("food crafting"), + MISC_CRAFTING("misc crafting"), + BLOCKS_CRAFTING("block crafting"), + ITEMS_CRAFTING("item crafting"), + TOOL_VALUES("tool values"), + MACHINE_VALUES("machine values"), + MOB_DROPS("mob drops"), + WORLD_GEN("world gen"), + POTION_RING_CRAFTING("ring crafting"); + + public final String name; + + ConfigCategories(String name){ + this.name = name; + } +} diff --git a/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java b/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java index bff46792b..731e7c82e 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java +++ b/src/main/java/ellpeck/actuallyadditions/config/ConfigValues.java @@ -1,167 +1,45 @@ package ellpeck.actuallyadditions.config; -import ellpeck.actuallyadditions.items.metalists.TheFoods; -import ellpeck.actuallyadditions.items.metalists.TheMiscItems; -import ellpeck.actuallyadditions.items.metalists.ThePotionRings; +import ellpeck.actuallyadditions.config.values.ConfigBoolValues; +import ellpeck.actuallyadditions.config.values.ConfigCrafting; +import ellpeck.actuallyadditions.config.values.ConfigFloatValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import net.minecraftforge.common.config.Configuration; public class ConfigValues{ - public static boolean[] enabledFoodRecipes = new boolean[TheFoods.values().length]; - public static boolean[] enabledMiscRecipes = new boolean[TheMiscItems.values().length]; - public static boolean[] enablePotionRingRecipes = new boolean[ThePotionRings.values().length]; - public static boolean enableCompostRecipe; - public static boolean enableKnifeRecipe; - public static boolean enableLeafBlowerRecipe; - public static boolean enableLeafBlowerAdvancedRecipe; - public static boolean enableCrusherRecipe; - public static boolean enableCrusherDoubleRecipe; - public static boolean enableFurnaceDoubleRecipe; - public static boolean enableGiantChestRecipe; - public static boolean enableFeederRecipe; - public static boolean enableCrafterRecipe; - public static boolean enableInputterRecipe; - public static boolean enableRepairerRecipe; - public static boolean enableSolarRecipe; - public static boolean enableFishingNetRecipe; - public static boolean enableHeatCollectorRecipe; - public static boolean enableToolEmeraldRecipe; - public static boolean enableToolObsidianRecipe; + public static ConfigCrafting[] craftingConfig = ConfigCrafting.values(); + public static boolean[] craftingValues = new boolean[craftingConfig.length]; - public static int knifeMaxDamage; - public static int toolEmeraldHarvestLevel; - public static int toolEmeraldMaxUses; - public static int toolEmeraldEnchantability; - public static int toolObsidianHarvestLevel; - public static int toolObsidianMaxUses; - public static int toolObsidianEnchantability; - public static float toolObsidianEfficiency; - public static float toolObsidianDamage; - public static float toolEmeraldEfficiency; - public static float toolEmeraldDamage; + public static ConfigIntValues[] intConfig = ConfigIntValues.values(); + public static int[] intValues = new int[intConfig.length]; - public static int compostAmountNeededToConvert; - public static int compostConversionTimeNeeded; - public static int feederReach; - public static int feederTimeNeeded; - public static int feederThreshold; - public static int fishingNetTime; - public static int furnaceDoubleSmeltTime; - public static int grinderDoubleCrushTime; - public static int grinderCrushTime; - public static int leafBlowerRangeSides; - public static int leafBlowerRangeUp; - public static int heatCollectorRandomChance; - public static int heatCollectorBlocksNeeded; - public static int repairerSpeedSlowdown; - public static boolean leafBlowerDropItems; - public static boolean leafBlowerParticles; - public static boolean leafBlowerHasSound; + public static ConfigFloatValues[] floatConfig = ConfigFloatValues.values(); + public static float[] floatValues = new float[floatConfig.length]; - public static boolean generateBlackQuartz; - public static int blackQuartzBaseAmount; - public static int blackQuartzAdditionalChance; - public static int blackQuartzChance; - public static int blackQuartzMinHeight; - public static int blackQuartzMaxHeight; - - public static boolean enableExperienceDrop; - public static boolean enableBloodDrop; - public static boolean enableHeartDrop; - public static boolean enableSubstanceDrop; - public static boolean enablePearlShardDrop; - public static boolean enableEmeraldShardDrop; - - public static int jamVillagerID; - public static boolean jamVillagerExists; - - public static int greenhouseGlassTimeNeeded; + public static ConfigBoolValues[] boolConfig = ConfigBoolValues.values(); + public static boolean[] boolValues = new boolean[boolConfig.length]; public static void defineConfigValues(Configuration config){ - for(int i = 0; i < enabledFoodRecipes.length; i++){ - enabledFoodRecipes[i] = config.getBoolean(TheFoods.values()[i].name, ConfigurationHandler.CATEGORY_FOOD_CRAFTING, true, "If the Crafting Recipe for " + TheFoods.values()[i].name + " is Enabled"); - } - for(int i = 0; i < enabledMiscRecipes.length; i++){ - enabledMiscRecipes[i] = config.getBoolean(TheMiscItems.values()[i].name, ConfigurationHandler.CATEGORY_MISC_CRAFTING, true, "If the Crafting Recipe for " + TheMiscItems.values()[i].name + " is Enabled"); - } - for(int i = 0; i < enablePotionRingRecipes.length; i++){ - enablePotionRingRecipes[i] = config.getBoolean(ThePotionRings.values()[i].name, ConfigurationHandler.CATEGORY_POTION_RING_CRAFTING, i != ThePotionRings.SATURATION.ordinal(), "If the Crafting Recipe for the Ring of " + ThePotionRings.values()[i].name + " is Enabled"); + for(int i = 0; i < craftingValues.length; i++){ + ConfigCrafting currConf = craftingConfig[i]; + craftingValues[i] = config.getBoolean(currConf.name, currConf.category, currConf.defaultValue, "If the Crafting Recipe for the " + currConf.name + " is Enabled"); } - jamVillagerID = config.getInt("Jam Villager: ID", ConfigurationHandler.CATEGORY_WORLD_GEN, 493827, 100, 1000000, "The ID of the Jam Selling Villager"); - jamVillagerExists = config.getBoolean("Jam Villager: Existence", ConfigurationHandler.CATEGORY_WORLD_GEN, true, "If the Jam Villager and his House exist"); + for(int i = 0; i < intValues.length; i++){ + ConfigIntValues currConf = intConfig[i]; + intValues[i] = config.getInt(currConf.name, currConf.category, currConf.defaultValue, currConf.min, currConf.max, currConf.desc); + } - enableLeafBlowerRecipe = config.getBoolean("Leaf Blower", ConfigurationHandler.CATEGORY_ITEMS_CRAFTING, true, "If the Crafting Recipe for the Leaf Blower is Enabled"); - enableLeafBlowerAdvancedRecipe = config.getBoolean("Advanced Leaf Blower", ConfigurationHandler.CATEGORY_ITEMS_CRAFTING, true, "If the Crafting Recipe for the Advanced Leaf Blower is Enabled"); - leafBlowerDropItems = config.getBoolean("Leaf Blower: Drops Items", ConfigurationHandler.CATEGORY_TOOL_VALUES, true, "If the Leaf Blower lets destroyed Blocks' Drops drop"); - leafBlowerParticles = config.getBoolean("Leaf Blower: Particles", ConfigurationHandler.CATEGORY_TOOL_VALUES, true, "If the Leaf Blower lets destroyed Blocks have particles when getting destroyed"); - leafBlowerHasSound = config.getBoolean("Leaf Blower: Sound", ConfigurationHandler.CATEGORY_TOOL_VALUES, true, "If the Leaf Blower makes Sounds"); - leafBlowerRangeSides = config.getInt("Leaf Blower: Side Range", ConfigurationHandler.CATEGORY_TOOL_VALUES, 5, 1, 25, "The Leaf Blower's Range to the Sides"); - leafBlowerRangeUp = config.getInt("Leaf Blower: Height Range", ConfigurationHandler.CATEGORY_TOOL_VALUES, 1, 1, 10, "The Leaf Blower's Range to the Top and Bottom"); + for(int i = 0; i < floatValues.length; i++){ + ConfigFloatValues currConf = floatConfig[i]; + floatValues[i] = config.getFloat(currConf.name, currConf.category, currConf.defaultValue, currConf.min, currConf.max, currConf.desc); + } - generateBlackQuartz = config.getBoolean("Black Quartz", ConfigurationHandler.CATEGORY_WORLD_GEN, true, "If the Black Quartz generates in the world"); - blackQuartzBaseAmount = config.getInt("Black Quartz Amount", ConfigurationHandler.CATEGORY_WORLD_GEN, 3, 1, 50, "How big a Black Quartz Vein is at least"); - blackQuartzAdditionalChance = config.getInt("Black Quartz Additional Chance", ConfigurationHandler.CATEGORY_WORLD_GEN, 3, 0, 50, "How much bigger than the Base Amount a Black Quartz Vein can get"); - blackQuartzChance = config.getInt("Black Quartz Chance", ConfigurationHandler.CATEGORY_WORLD_GEN, 25, 1, 150, "How often the Black Quartz tries to generate"); - blackQuartzMinHeight = config.getInt("Black Quartz Min Height", ConfigurationHandler.CATEGORY_WORLD_GEN, 0, 0, 256, "How high the Black Quartz starts to generate"); - blackQuartzMaxHeight = config.getInt("Black Quartz Max Height", ConfigurationHandler.CATEGORY_WORLD_GEN, 25, 0, 256, "How high the Black Quartz stops to generate at"); - - enableExperienceDrop = config.getBoolean("Solidified Experience", ConfigurationHandler.CATEGORY_MOB_DROPS, true, "If the Solidified Experience drops from Mobs"); - enableBloodDrop = config.getBoolean("Blood Fragments", ConfigurationHandler.CATEGORY_MOB_DROPS, false, "If the Blood Fragments drop from Mobs"); - enableHeartDrop = config.getBoolean("Heart Parts", ConfigurationHandler.CATEGORY_MOB_DROPS, false, "If the Heart Parts drop from Mobs"); - enableSubstanceDrop = config.getBoolean("Unknown Substance", ConfigurationHandler.CATEGORY_MOB_DROPS, false, "If the Unknown Substance drops from Mobs"); - enablePearlShardDrop = config.getBoolean("Ender Pearl Shard", ConfigurationHandler.CATEGORY_MOB_DROPS, true, "If the Ender Pearl Shard drops from Mobs"); - enableEmeraldShardDrop = config.getBoolean("Emerald Shard", ConfigurationHandler.CATEGORY_MOB_DROPS, true, "If the Emerald Shard drops from Mobs"); - - enableCompostRecipe = config.getBoolean("Compost", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the Compost is Enabled"); - enableRepairerRecipe = config.getBoolean("Item Repairer", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the Item Repairer is Enabled"); - enableKnifeRecipe = config.getBoolean("Knife", ConfigurationHandler.CATEGORY_ITEMS_CRAFTING, true, "If the Crafting Recipe for the Knife is Enabled"); - enableCrusherDoubleRecipe = config.getBoolean("Double Crusher", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the Double Crusher is Enabled"); - enableCrusherRecipe = config.getBoolean("Crusher", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the Crusher is Enabled"); - enableFurnaceDoubleRecipe = config.getBoolean("Double Furnace", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the Double Furnace is Enabled"); - enableGiantChestRecipe = config.getBoolean("Giant Chest", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the Giant Chest is Enabled"); - enableInputterRecipe = config.getBoolean("ESD", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the ESD is Enabled"); - enableFeederRecipe = config.getBoolean("Feeder", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the Feeder is Enabled"); - enableCrafterRecipe = config.getBoolean("Crafting Table On A Stick", ConfigurationHandler.CATEGORY_ITEMS_CRAFTING, true, "If the Crafting Recipe for the Crafting Table On A Stick is Enabled"); - - enableSolarRecipe = config.getBoolean("Solar Panel", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the Solar Panel is Enabled"); - enableFishingNetRecipe = config.getBoolean("Fishing Net", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the Fishing Net is Enabled"); - enableHeatCollectorRecipe = config.getBoolean("Heat Collector", ConfigurationHandler.CATEGORY_BLOCKS_CRAFTING, true, "If the Crafting Recipe for the Heat Collector is Enabled"); - - compostAmountNeededToConvert = config.getInt("Compost: Amount Needed To Convert", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 10, 1, 64, "How many items are needed in the Compost to convert to Fertilizer"); - compostConversionTimeNeeded = config.getInt("Compost: Conversion Time Needed", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 1000, 30, 10000, "How long the Compost needs to convert to Fertilizer"); - - fishingNetTime = config.getInt("Fishing Net: Time Needed", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 2000, 50, 50000, "How long it takes on Average until the Fishing Net catches a Fish"); - - feederReach = config.getInt("Feeder: Reach", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 5, 1, 20, "The Radius of Action of the Feeder"); - feederTimeNeeded = config.getInt("Feeder: Time Needed", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 100, 50, 5000, "The time spent between feeding animals with the Feeder"); - feederThreshold = config.getInt("Feeder: Threshold", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 30, 3, 500, "How many animals need to be in the area for the Feeder to stop"); - - knifeMaxDamage = config.getInt("Knife: Max Uses", ConfigurationHandler.CATEGORY_TOOL_VALUES, 100, 5, 5000, "How often the Knife can be crafted with"); - - toolEmeraldHarvestLevel = config.getInt("Emerald: Harvest Level", ConfigurationHandler.CATEGORY_TOOL_VALUES, 3, 0, 3, "What Harvest Level Emerald Tools have (0 = Wood, 1 = Stone, 2 = Iron, 3 = Diamond)"); - toolEmeraldMaxUses = config.getInt("Emerald: Max Uses", ConfigurationHandler.CATEGORY_TOOL_VALUES, 2000, 50, 10000, "How often Emerald Tools can be used"); - toolEmeraldEfficiency = config.getFloat("Emerald: Efficiency", ConfigurationHandler.CATEGORY_TOOL_VALUES, 9.0F, 1.0F, 20.0F, "How fast Emerald Tools are"); - toolEmeraldDamage = config.getFloat("Emerald: Damage", ConfigurationHandler.CATEGORY_TOOL_VALUES, 5.0F, 0.1F, 50.0F, "How much damage an Emerald Tool deals"); - toolEmeraldEnchantability = config.getInt("Emerald: Enchantability", ConfigurationHandler.CATEGORY_TOOL_VALUES, 15, 1, 30, "How enchantable an Emerald Tool is"); - enableToolEmeraldRecipe = config.getBoolean("Emerald Tools", ConfigurationHandler.CATEGORY_ITEMS_CRAFTING, true, "If the Crafting Recipe for Emerald Tools is Enabled"); - - toolObsidianHarvestLevel = config.getInt("Obsidian: Harvest Level", ConfigurationHandler.CATEGORY_TOOL_VALUES, 3, 0, 3, "What Harvest Level Obsidian Tools have (0 = Wood, 1 = Stone, 2 = Iron, 3 = Diamond)"); - toolObsidianMaxUses = config.getInt("Obsidian: Max Uses", ConfigurationHandler.CATEGORY_TOOL_VALUES, 8000, 50, 20000, "How often Obsidian Tools can be used"); - toolObsidianEfficiency = config.getFloat("Obsidian: Efficiency", ConfigurationHandler.CATEGORY_TOOL_VALUES, 4.0F, 1.0F, 20.0F, "How fast Obsidian Tools are"); - toolObsidianDamage = config.getFloat("Obsidian: Damage", ConfigurationHandler.CATEGORY_TOOL_VALUES, 2.0F, 0.1F, 50.0F, "How much damage an Obsidian Tool deals"); - toolObsidianEnchantability = config.getInt("Obsidian: Enchantability", ConfigurationHandler.CATEGORY_TOOL_VALUES, 15, 1, 30, "How enchantable an Obsidian Tool is"); - enableToolObsidianRecipe = config.getBoolean("Obsidian Tools", ConfigurationHandler.CATEGORY_ITEMS_CRAFTING, true, "If the Crafting Recipe for Obsidian Tools is Enabled"); - - grinderCrushTime = config.getInt("Crusher: Crush Time", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 200, 10, 1000, "How long the Crusher takes to crush an item"); - grinderDoubleCrushTime = config.getInt("Double Crusher: Crush Time", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 300, 10, 1000, "How long the Double Crusher takes to crush an item"); - furnaceDoubleSmeltTime = config.getInt("Double Furnace: Smelt Time", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 300, 10, 1000, "How long the Double Furnace takes to crush an item"); - - repairerSpeedSlowdown = config.getInt("Item Repairer: Speed Slowdown", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 2, 1, 100, "How much slower the Item Repairer repairs"); - heatCollectorBlocksNeeded = config.getInt("Heat Collector: Blocks Needed", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 4, 1, 5, "How many Blocks are needed for the Heat Collector to power Machines above it"); - heatCollectorRandomChance = config.getInt("Heat Collector: Random Chance", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 10000, 10, 100000, "The Chance of the Heat Collector destroying a Lava Block around (Default Value 2000 meaning a 1/2000 Chance!)"); - - greenhouseGlassTimeNeeded = config.getInt("Greenhouse Glass: Time Needed", ConfigurationHandler.CATEGORY_MACHINE_VALUES, 1000, 10, 1000000, "The Time Needed for the Greenhouse Glass to grow a Plant below it"); + for(int i = 0; i < boolValues.length; i++){ + ConfigBoolValues currConf = boolConfig[i]; + boolValues[i] = config.getBoolean(currConf.name, currConf.category, currConf.defaultValue, currConf.desc); + } } } diff --git a/src/main/java/ellpeck/actuallyadditions/config/ConfigurationHandler.java b/src/main/java/ellpeck/actuallyadditions/config/ConfigurationHandler.java index 55b7665b0..735f1ce90 100644 --- a/src/main/java/ellpeck/actuallyadditions/config/ConfigurationHandler.java +++ b/src/main/java/ellpeck/actuallyadditions/config/ConfigurationHandler.java @@ -7,17 +7,6 @@ import java.io.File; public class ConfigurationHandler{ - public static final String CATEGORY_FOOD_CRAFTING = "food crafting"; - public static final String CATEGORY_MISC_CRAFTING = "misc crafting"; - public static final String CATEGORY_BLOCKS_CRAFTING = "block crafting"; - public static final String CATEGORY_ITEMS_CRAFTING = "items crafting"; - public static final String CATEGORY_TOOL_VALUES = "tool values"; - public static final String CATEGORY_MACHINE_VALUES = "machine values"; - public static final String CATEGORY_MOB_DROPS = "mob drops"; - public static final String CATEGORY_WORLD_GEN = "world gen"; - public static final String CATEGORY_POTION_RING_CRAFTING = "ring crafting"; - - public static void init(File configFile){ Util.logInfo("Grabbing Configurations..."); Configuration config = new Configuration(configFile); diff --git a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigBoolValues.java b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigBoolValues.java new file mode 100644 index 000000000..0a6ec0f91 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigBoolValues.java @@ -0,0 +1,39 @@ +package ellpeck.actuallyadditions.config.values; + +import ellpeck.actuallyadditions.config.ConfigCategories; +import ellpeck.actuallyadditions.config.ConfigValues; + +public enum ConfigBoolValues{ + + LEAF_BLOWER_ITEMS("Leaf Blower: Drops Items", ConfigCategories.TOOL_VALUES, true, "If the Leaf Blower lets destroyed Blocks' Drops drop"), + LEAF_BLOWER_PARTICLES("Leaf Blower: Particles", ConfigCategories.TOOL_VALUES, true, "If the Leaf Blower lets destroyed Blocks have particles when getting destroyed"), + LEAF_BLOWER_SOUND("Leaf Blower: Sound", ConfigCategories.TOOL_VALUES, true, "If the Leaf Blower makes Sounds"), + + JAM_VILLAGER_EXISTS("Jam Villager: Existence", ConfigCategories.WORLD_GEN, true, "If the Jam Villager and his House exist"), + + GENERATE_QUARTZ("Black Quartz", ConfigCategories.WORLD_GEN, true, "If the Black Quartz generates in the world"), + + EXPERIENCE_DROP("Solidified Experience", ConfigCategories.MOB_DROPS, true, "If the Solidified Experience drops from Mobs"), + BLOOD_DROP("Blood Fragments", ConfigCategories.MOB_DROPS, false, "If the Blood Fragments drop from Mobs"), + HEART_DROP("Heart Parts", ConfigCategories.MOB_DROPS, false, "If the Heart Parts drop from Mobs"), + SUBSTANCE_DROP("Unknown Substance", ConfigCategories.MOB_DROPS, false, "If the Unknown Substance drops from Mobs"), + PEARL_SHARD_DROP("Ender Pearl Shard", ConfigCategories.MOB_DROPS, true, "If the Ender Pearl Shard drops from Mobs"), + EMERALD_SHARD_CROP("Emerald Shard", ConfigCategories.MOB_DROPS, true, "If the Emerald Shard drops from Mobs"); + + public final String name; + public final String category; + public final boolean defaultValue; + public final String desc; + + ConfigBoolValues(String name, ConfigCategories category, boolean defaultValue, String desc){ + this.name = name; + this.category = category.name; + this.defaultValue = defaultValue; + this.desc = desc; + } + + public boolean isEnabled(){ + return ConfigValues.boolValues[this.ordinal()]; + } + +} diff --git a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigCrafting.java b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigCrafting.java new file mode 100644 index 000000000..95f2e1011 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigCrafting.java @@ -0,0 +1,90 @@ +package ellpeck.actuallyadditions.config.values; + +import ellpeck.actuallyadditions.config.ConfigCategories; +import ellpeck.actuallyadditions.config.ConfigValues; + +public enum ConfigCrafting{ + + COMPOST("Compost", ConfigCategories.BLOCKS_CRAFTING), + WOOD_CASING("Wood Casing", ConfigCategories.BLOCKS_CRAFTING), + STONE_CASING("Stone Casing", ConfigCategories.BLOCKS_CRAFTING), + FISHING_NET("Fishing Net", ConfigCategories.BLOCKS_CRAFTING), + REPAIRER("Repairer", ConfigCategories.BLOCKS_CRAFTING), + SOLAR_PANEL("Solar Panel", ConfigCategories.BLOCKS_CRAFTING), + HEAT_COLLECTOR("Heat Collector", ConfigCategories.BLOCKS_CRAFTING), + INPUTTER("ESD", ConfigCategories.BLOCKS_CRAFTING), + CRUSHER("Crusher", ConfigCategories.BLOCKS_CRAFTING), + DOUBLE_CRUSHER("Double Crusher", ConfigCategories.BLOCKS_CRAFTING), + DOUBLE_FURNACE("Double Furnace", ConfigCategories.BLOCKS_CRAFTING), + FEEDER("Feeder", ConfigCategories.BLOCKS_CRAFTING), + GIANT_CHEST("Storage Crate", ConfigCategories.BLOCKS_CRAFTING), + + GREENHOUSE_GLASS("Greenhouse Glass", ConfigCategories.BLOCKS_CRAFTING), + BREAKER("Breaker", ConfigCategories.BLOCKS_CRAFTING), + PLACER("Placer", ConfigCategories.BLOCKS_CRAFTING), + SPEED_UPGRADE("Speed Upgrade", ConfigCategories.BLOCKS_CRAFTING), + + BAGUETTE("Baguette", ConfigCategories.FOOD_CRAFTING), + PIZZA("Pizza", ConfigCategories.FOOD_CRAFTING), + HAMBURGER("Hamburger", ConfigCategories.FOOD_CRAFTING), + BIG_COOKIE("Big Cookie", ConfigCategories.FOOD_CRAFTING), + SUB("Sub Sandwich", ConfigCategories.FOOD_CRAFTING), + FRENCH_FRY("French Fry", ConfigCategories.FOOD_CRAFTING), + FRENCH_FRIES("French Fries", ConfigCategories.FOOD_CRAFTING), + FISH_N_CHIPS("Fish And Chips", ConfigCategories.FOOD_CRAFTING), + CHEESE("Cheese", ConfigCategories.FOOD_CRAFTING), + PUMPKIN_STEW("Pumpkin Stew", ConfigCategories.FOOD_CRAFTING), + CARROT_JUICE("Carrot Juice", ConfigCategories.FOOD_CRAFTING), + SPAGHETTI("Spaghetti", ConfigCategories.FOOD_CRAFTING), + NOODLE("Noodle", ConfigCategories.FOOD_CRAFTING), + CHOCOLATE("Chocolate", ConfigCategories.FOOD_CRAFTING), + CHOCOLATE_CAKE("Chocolate Cake", ConfigCategories.FOOD_CRAFTING), + TOAST("Toast", ConfigCategories.FOOD_CRAFTING), + + LEAF_BLOWER("Leaf Blower", ConfigCategories.ITEMS_CRAFTING), + LEAF_BLOWER_ADVANCED("Advanced Leaf Blower", ConfigCategories.ITEMS_CRAFTING), + COIL("Coil", ConfigCategories.ITEMS_CRAFTING), + ADV_COIL("Advanced Coil", ConfigCategories.ITEMS_CRAFTING), + KNIFE("Knife", ConfigCategories.ITEMS_CRAFTING), + STICK_CRAFTER("Crafting Table On A Stick", ConfigCategories.ITEMS_CRAFTING), + MASHED_FOOD("Mashed Food", ConfigCategories.ITEMS_CRAFTING), + + RING_SPEED("Speed Ring", ConfigCategories.POTION_RING_CRAFTING), + RING_HASTE("Haste Ring", ConfigCategories.POTION_RING_CRAFTING), + RING_STRENGTH("Strength Ring", ConfigCategories.POTION_RING_CRAFTING), + RING_JUMP_BOOST("Jump Boost Ring", ConfigCategories.POTION_RING_CRAFTING), + RING_REGEN("Regen Ring", ConfigCategories.POTION_RING_CRAFTING), + RING_RESISTANCE("Resistance Ring", ConfigCategories.POTION_RING_CRAFTING), + RING_FIRE_RESISTANCE("Fire Resistance Ring", ConfigCategories.POTION_RING_CRAFTING), + RING_WATER_BREATHING("Water Breathing Ring", ConfigCategories.POTION_RING_CRAFTING), + RING_INVISIBILITY("Invisibility Ring", ConfigCategories.POTION_RING_CRAFTING), + RING_NIGHT_VISION("Night Vision Ring", ConfigCategories.POTION_RING_CRAFTING), + RING_SATURATION("Saturation Ring", ConfigCategories.POTION_RING_CRAFTING, false), + + DOUGH("Dough", ConfigCategories.ITEMS_CRAFTING), + PAPER_CONE("Paper Cone", ConfigCategories.ITEMS_CRAFTING), + KNIFE_HANDLE("Knife Handle", ConfigCategories.ITEMS_CRAFTING), + KNIFE_BLADE("Knife Blade", ConfigCategories.ITEMS_CRAFTING), + + TOOL_EMERALD("Emerald Tools", ConfigCategories.ITEMS_CRAFTING), + TOOL_OBSIDIAN("Obsidian Tools", ConfigCategories.ITEMS_CRAFTING); + + public final String name; + public final String category; + public final boolean defaultValue; + + ConfigCrafting(String name, ConfigCategories category){ + this(name, category, true); + } + + ConfigCrafting(String name, ConfigCategories category, boolean defaultValue){ + this.name = name; + this.category = category.name; + this.defaultValue = defaultValue; + } + + public boolean isEnabled(){ + return ConfigValues.craftingValues[this.ordinal()]; + } + +} diff --git a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigFloatValues.java b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigFloatValues.java new file mode 100644 index 000000000..1af7ea863 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigFloatValues.java @@ -0,0 +1,34 @@ +package ellpeck.actuallyadditions.config.values; + +import ellpeck.actuallyadditions.config.ConfigCategories; +import ellpeck.actuallyadditions.config.ConfigValues; + +public enum ConfigFloatValues{ + + EMERALD_SPEED("Emerald: Efficiency", ConfigCategories.TOOL_VALUES, 9.0F, 1.0F, 20.0F, "How fast Emerald Tools are"), + EMERALD_MAX_DAMAGE("Emerald: Damage", ConfigCategories.TOOL_VALUES, 5.0F, 0.1F, 50.0F, "How much damage an Emerald Tool deals"), + + OBSIDIAN_SPEED("Obsidian: Efficiency", ConfigCategories.TOOL_VALUES, 4.0F, 1.0F, 20.0F, "How fast Obsidian Tools are"), + OBSIDIAN_MAX_DAMAGE("Obsidian: Damage", ConfigCategories.TOOL_VALUES, 2.0F, 0.1F, 50.0F, "How much damage an Obsidian Tool deals"); + + public final String name; + public final String category; + public final float defaultValue; + public final float min; + public final float max; + public final String desc; + + ConfigFloatValues(String name, ConfigCategories category, float defaultValue, float min, float max, String desc){ + this.name = name; + this.category = category.name; + this.defaultValue = defaultValue; + this.min = min; + this.max = max; + this.desc = desc; + } + + public float getValue(){ + return ConfigValues.floatValues[this.ordinal()]; + } + +} diff --git a/src/main/java/ellpeck/actuallyadditions/config/values/ConfigIntValues.java b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigIntValues.java new file mode 100644 index 000000000..4fbb5f2a9 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/config/values/ConfigIntValues.java @@ -0,0 +1,71 @@ +package ellpeck.actuallyadditions.config.values; + +import ellpeck.actuallyadditions.config.ConfigCategories; +import ellpeck.actuallyadditions.config.ConfigValues; + +public enum ConfigIntValues{ + + JAM_VILLAGER_ID("Jam Villager: ID", ConfigCategories.WORLD_GEN, 493827, 100, 1000000, "The ID of the Jam Villager"), + + LEAF_BLOWER_RANGE_SIDES("Leaf Blower: Side Range", ConfigCategories.TOOL_VALUES, 5, 1, 25, "The Leaf Blower's Range to the Sides"), + LEAF_BLOWER_RANGE_UP("Leaf Blower: Range Up", ConfigCategories.TOOL_VALUES, 1, 1, 10, "The Leaf Blower's Range Up"), + + BLACK_QUARTZ_BASE_AMOUNT("Black Quartz Amount", ConfigCategories.WORLD_GEN, 3, 1, 50, "How big a Black Quartz Vein is at least"), + BLACK_QUARTZ_ADD_CHANCE("Black Quartz Additional Chance", ConfigCategories.WORLD_GEN, 3, 0, 50, "How much bigger than the Base Amount a Black Quartz Vein can get"), + BLACK_QUARTZ_CHANCE("Black Quartz Chance", ConfigCategories.WORLD_GEN, 25, 1, 150, "How often the Black Quartz tries to generate"), + BLACK_QUARTZ_MIN_HEIGHT("Black Quartz Min Height", ConfigCategories.WORLD_GEN, 0, 0, 256, "How high the Black Quartz starts to generate"), + BLACK_QUARTZ_MAX_HEIGHT("Black Quartz Max Height", ConfigCategories.WORLD_GEN, 25, 0, 256, "How high the Black Quartz stops to generate at"), + + COMPOST_AMOUNT("Compost: Amount Needed To Convert", ConfigCategories.MACHINE_VALUES, 10, 1, 64, "How many items are needed in the Compost to convert to Fertilizer"), + COMPOST_TIME("Compost: Conversion Time Needed", ConfigCategories.MACHINE_VALUES, 1000, 30, 10000, "How long the Compost needs to convert to Fertilizer"), + + FISHER_TIME("Fishing Net: Time Needed", ConfigCategories.MACHINE_VALUES, 2000, 50, 50000, "How long it takes on Average until the Fishing Net catches a Fish"), + + FEEDER_REACH("Feeder: Reach", ConfigCategories.MACHINE_VALUES, 5, 1, 20, "The Radius of Action of the Feeder"), + FEEDER_TIME("Feeder: Time Needed", ConfigCategories.MACHINE_VALUES, 100, 50, 5000, "The time spent between feeding animals with the Feeder"), + FEEDER_THRESHOLD("Feeder: Threshold", ConfigCategories.MACHINE_VALUES, 30, 3, 500, "How many animals need to be in the area for the Feeder to stop"), + + KNIFE_DAMAGE("Knife: Max Uses", ConfigCategories.TOOL_VALUES, 100, 5, 5000, "How often the Knife can be crafted with"), + + EMERALD_HARVEST_LEVEL("Emerald: Harvest Level", ConfigCategories.TOOL_VALUES, 3, 0, 3, "What Harvest Level Emerald Tools have (0 = Wood, 1 = Stone, 2 = Iron, 3 = Diamond)"), + EMERALD_USES("Emerald: Max Uses", ConfigCategories.TOOL_VALUES, 2000, 50, 10000, "How often Emerald Tools can be used"), + EMERALD_ENCHANTABILITY("Emerald: Enchantability", ConfigCategories.TOOL_VALUES, 15, 1, 30, "How enchantable an Emerald Tool is"), + + OBSIDIAN_HARVEST_LEVEL("Obsidian: Harvest Level", ConfigCategories.TOOL_VALUES, 3, 0, 3, "What Harvest Level Obsidian Tools have (0 = Wood, 1 = Stone, 2 = Iron, 3 = Diamond)"), + OBSIDIAN_USES("Obsidian: Max Uses", ConfigCategories.TOOL_VALUES, 8000, 50, 20000, "How often Obsidian Tools can be used"), + OBSIDIAN_ENCHANTABILITY("Obsidian: Enchantability", ConfigCategories.TOOL_VALUES, 15, 1, 30, "How enchantable an Obsidian Tool is"), + + GRINDER_CRUSH_TIME("Crusher: Crush Time", ConfigCategories.MACHINE_VALUES, 200, 10, 1000, "How long the Crusher takes to crush an item"), + GRINDER_DOUBLE_CRUSH_TIME("Double Crusher: Crush Time", ConfigCategories.MACHINE_VALUES, 300, 10, 1000, "How long the Double Crusher takes to crush an item"), + FURNACE_DOUBLE_SMELT_TIME("Double Furnace: Smelt Time", ConfigCategories.MACHINE_VALUES, 300, 10, 1000, "How long the Double Furnace takes to crush an item"), + + REPAIRER_SPEED_SLOWDOWN("Item Repairer: Speed Slowdown", ConfigCategories.MACHINE_VALUES, 2, 1, 100, "How much slower the Item Repairer repairs"), + HEAT_COLLECTOR_BLOCKS("Heat Collector: Blocks Needed", ConfigCategories.MACHINE_VALUES, 4, 1, 5, "How many Blocks are needed for the Heat Collector to power Machines above it"), + HEAT_COLLECTOR_LAVA_CHANCE("Heat Collector: Random Chance", ConfigCategories.MACHINE_VALUES, 10000, 10, 100000, "The Chance of the Heat Collector destroying a Lava Block around (Default Value 2000 meaning a 1/2000 Chance!)"), + + GLASS_TIME_NEEDED("Greenhouse Glass: Time Needed", ConfigCategories.MACHINE_VALUES, 1000, 10, 1000000, "The Time Needed for the Greenhouse Glass to grow a Plant below it"), + + BREAKER_TIME_NEEDED("Breaker and Placer: Time Needed", ConfigCategories.MACHINE_VALUES, 15, 1, 10000, "The Time Needed for the Breaker and the Placer to place or break a Block"); + + + public final String name; + public final String category; + public final int defaultValue; + public final int min; + public final int max; + public final String desc; + + ConfigIntValues(String name, ConfigCategories category, int defaultValue, int min, int max, String desc){ + this.name = name; + this.category = category.name; + this.defaultValue = defaultValue; + this.min = min; + this.max = max; + this.desc = desc; + } + + public int getValue(){ + return ConfigValues.intValues[this.ordinal()]; + } + +} diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java index 9bc37a535..28f2578d0 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/BlockCrafting.java @@ -3,7 +3,7 @@ package ellpeck.actuallyadditions.crafting; import cpw.mods.fml.common.registry.GameRegistry; import ellpeck.actuallyadditions.blocks.InitBlocks; import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigCrafting; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; import ellpeck.actuallyadditions.util.INameableItem; import net.minecraft.init.Blocks; @@ -17,25 +17,27 @@ public class BlockCrafting{ public static void init(){ //Compost - if(ConfigValues.enableCompostRecipe) + if(ConfigCrafting.COMPOST.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockCompost), "W W", "W W", "WCW", 'W', "plankWood", 'C', TheMiscBlocks.WOOD_CASING.getOredictName())); //Wood Casing - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), - "WSW", "SRS", "WSW", - 'W', "plankWood", - 'R', "dustRedstone", - 'S', "stickWood")); + if(ConfigCrafting.WOOD_CASING.isEnabled()) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.WOOD_CASING.ordinal()), + "WSW", "SRS", "WSW", + 'W', "plankWood", + 'R', "dustRedstone", + 'S', "stickWood")); //Stone Casing - GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), - "WSW", "SRS", "WSW", - 'W', "cobblestone", - 'R', "dustRedstone", - 'S', "stickWood")); + if(ConfigCrafting.STONE_CASING.isEnabled()) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.STONE_CASING.ordinal()), + "WSW", "SRS", "WSW", + 'W', "cobblestone", + 'R', "dustRedstone", + 'S', "stickWood")); //Quartz Block GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.QUARTZ.ordinal()), @@ -43,14 +45,14 @@ public class BlockCrafting{ 'Q', TheMiscItems.QUARTZ.getOredictName())); //Fishing Net - if(ConfigValues.enableFishingNetRecipe) + if(ConfigCrafting.FISHING_NET.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFishingNet), "SSS", "SDS", "SSS", 'D', "gemDiamond", 'S', Items.string)); //Repairer - if(ConfigValues.enableRepairerRecipe) + if(ConfigCrafting.REPAIRER.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockItemRepairer), "DID", "OCO", "DID", 'D', "gemDiamond", @@ -59,7 +61,7 @@ public class BlockCrafting{ 'C', TheMiscBlocks.STONE_CASING.getOredictName())); //Solar Panel - if(ConfigValues.enableSolarRecipe) + if(ConfigCrafting.SOLAR_PANEL.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFurnaceSolar), "IQI", "CDC", "IBI", 'D', "blockDiamond", @@ -69,7 +71,7 @@ public class BlockCrafting{ 'B', new ItemStack(Blocks.iron_bars))); //Heat Collector - if(ConfigValues.enableHeatCollectorRecipe) + if(ConfigCrafting.HEAT_COLLECTOR.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockHeatCollector), "BRB", "CDC", "BQB", 'D', "blockDiamond", @@ -90,7 +92,7 @@ public class BlockCrafting{ 'Q', TheMiscBlocks.QUARTZ.getOredictName())); //Inputter - if(ConfigValues.enableInputterRecipe){ + if(ConfigCrafting.INPUTTER.isEnabled()){ GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockInputter), "WWW", "CHC", "WWW", 'W', "plankWood", @@ -105,7 +107,7 @@ public class BlockCrafting{ } //Crusher - if(ConfigValues.enableCrusherRecipe) + if(ConfigCrafting.CRUSHER.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGrinder), "CFC", "DQD", "CFC", 'C', "cobblestone", @@ -115,7 +117,7 @@ public class BlockCrafting{ 'F', new ItemStack(Items.flint))); //Double Crusher - if(ConfigValues.enableCrusherDoubleRecipe) + if(ConfigCrafting.DOUBLE_CRUSHER.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGrinderDouble), "CDC", "RFR", "CDC", 'C', "cobblestone", @@ -125,7 +127,7 @@ public class BlockCrafting{ 'P', new ItemStack(Blocks.piston))); //Double Furnace - if(ConfigValues.enableFurnaceDoubleRecipe) + if(ConfigCrafting.COMPOST.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFurnaceDouble), "CDC", "RFR", "CDC", 'C', "cobblestone", @@ -135,7 +137,7 @@ public class BlockCrafting{ 'P', "ingotBrick")); //Feeder - if(ConfigValues.enableFeederRecipe) + if(ConfigCrafting.DOUBLE_FURNACE.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockFeeder), "WCW", "DHD", "WCW", 'W', "plankWood", @@ -144,13 +146,37 @@ public class BlockCrafting{ 'H', TheMiscBlocks.WOOD_CASING.getOredictName())); //Giant Chest - if(ConfigValues.enableGiantChestRecipe) + if(ConfigCrafting.GIANT_CHEST.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGiantChest), "CWC", "WDW", "CWC", 'C', new ItemStack(Blocks.chest), 'D', TheMiscBlocks.WOOD_CASING.getOredictName(), 'W', "plankWood")); + //Greenhouse Glass + if(ConfigCrafting.GREENHOUSE_GLASS.isEnabled()) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockGreenhouseGlass), + "GSG", "SDS", "GSG", + 'G', "blockGlass", + 'D', "gemDiamond", + 'S', "treeSapling")); + + //Placer + if(ConfigCrafting.PLACER.isEnabled()) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockPlacer), + "CCC", "CRP", "CCC", + 'C', "cobblestone", + 'R', TheMiscItems.COIL.getOredictName(), + 'P', Blocks.piston)); + + //Breaker + if(ConfigCrafting.BREAKER.isEnabled()) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitBlocks.blockBreaker), + "CCC", "CRP", "CCC", + 'C', "cobblestone", + 'R', TheMiscItems.COIL.getOredictName(), + 'P', Items.diamond_pickaxe)); + } } diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/FoodCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/FoodCrafting.java index d10ce842f..ab4d04a5a 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/FoodCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/FoodCrafting.java @@ -1,7 +1,7 @@ package ellpeck.actuallyadditions.crafting; import cpw.mods.fml.common.registry.GameRegistry; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigCrafting; import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.metalists.TheFoods; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; @@ -20,12 +20,12 @@ public class FoodCrafting{ String knifeStack = ((INameableItem)InitItems.itemKnife).getOredictName(); //Baguette - if(ConfigValues.enabledFoodRecipes[TheFoods.BAGUETTE.ordinal()]) + if(ConfigCrafting.BAGUETTE.isEnabled()) GameRegistry.addSmelting(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.DOUGH.ordinal()), new ItemStack(InitItems.itemFoods, 1, TheFoods.BAGUETTE.ordinal()), 1F); //Pizza - if(ConfigValues.enabledFoodRecipes[TheFoods.PIZZA.ordinal()]) + if(ConfigCrafting.PIZZA.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PIZZA.ordinal()), "HKH", "MCF", " D ", 'D', TheMiscItems.DOUGH.getOredictName(), @@ -36,7 +36,7 @@ public class FoodCrafting{ 'H', TheFoods.CHEESE.getOredictName())); //Hamburger - if(ConfigValues.enabledFoodRecipes[TheFoods.HAMBURGER.ordinal()]) + if(ConfigCrafting.HAMBURGER.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.HAMBURGER.ordinal()), "KT ", "CB ", " T ", 'T', TheFoods.TOAST.getOredictName(), @@ -45,14 +45,14 @@ public class FoodCrafting{ 'B', new ItemStack(Items.cooked_beef))); //Big Cookie - if(ConfigValues.enabledFoodRecipes[TheFoods.BIG_COOKIE.ordinal()]) + if(ConfigCrafting.BIG_COOKIE.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.BIG_COOKIE.ordinal()), "DCD", "CDC", "DCD", 'D', TheMiscItems.DOUGH.getOredictName(), 'C', new ItemStack(Items.dye, 1, 3))); //Sub Sandwich - if(ConfigValues.enabledFoodRecipes[TheFoods.SUBMARINE_SANDWICH.ordinal()]) + if(ConfigCrafting.SUB.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SUBMARINE_SANDWICH.ordinal()), "KCP", "FB ", "PCP", 'P', new ItemStack(Items.paper), @@ -62,20 +62,20 @@ public class FoodCrafting{ 'K', knifeStack)); //French Fry - if(ConfigValues.enabledFoodRecipes[TheFoods.FRENCH_FRY.ordinal()]) + if(ConfigCrafting.FRENCH_FRY.isEnabled()) GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.FRENCH_FRY.ordinal()), new ItemStack(Items.baked_potato), knifeStack)); //French Fries - if(ConfigValues.enabledFoodRecipes[TheFoods.FRENCH_FRIES.ordinal()]) + if(ConfigCrafting.FRENCH_FRIES.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FRENCH_FRIES.ordinal()), "FFF", " P ", 'P', TheMiscItems.PAPER_CONE.getOredictName(), 'F', TheFoods.FRENCH_FRY.getOredictName())); //Fish N Chips - if(ConfigValues.enabledFoodRecipes[TheFoods.FISH_N_CHIPS.ordinal()]) + if(ConfigCrafting.FISH_N_CHIPS.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.FISH_N_CHIPS.ordinal()), "FIF", " P ", 'I', new ItemStack(Items.cooked_fished, 1, Util.WILDCARD), @@ -83,43 +83,43 @@ public class FoodCrafting{ 'F', TheFoods.FRENCH_FRY.getOredictName())); //Cheese - if(ConfigValues.enabledFoodRecipes[TheFoods.CHEESE.ordinal()]) + if(ConfigCrafting.CHEESE.isEnabled()) GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHEESE.ordinal()), new ItemStack(Items.milk_bucket)); //Pumpkin Stew - if(ConfigValues.enabledFoodRecipes[TheFoods.PUMPKIN_STEW.ordinal()]) + if(ConfigCrafting.PUMPKIN_STEW.isEnabled()) GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.PUMPKIN_STEW.ordinal()), "P", "B", 'P', new ItemStack(Blocks.pumpkin), 'B', new ItemStack(Items.bowl)); //Carrot Juice - if(ConfigValues.enabledFoodRecipes[TheFoods.CARROT_JUICE.ordinal()]) + if(ConfigCrafting.CARROT_JUICE.isEnabled()) GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CARROT_JUICE.ordinal()), new ItemStack(Items.glass_bottle), "cropCarrot", knifeStack)); //Spaghetti - if(ConfigValues.enabledFoodRecipes[TheFoods.SPAGHETTI.ordinal()]) + if(ConfigCrafting.SPAGHETTI.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.SPAGHETTI.ordinal()), "NNN", " B ", 'N', TheFoods.NOODLE.getOredictName(), 'B', new ItemStack(Items.bowl))); //Noodle - if(ConfigValues.enabledFoodRecipes[TheFoods.NOODLE.ordinal()]) + if(ConfigCrafting.NOODLE.isEnabled()) GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.NOODLE.ordinal()), "cropWheat", knifeStack)); //Chocolate - if(ConfigValues.enabledFoodRecipes[TheFoods.CHOCOLATE.ordinal()]) + if(ConfigCrafting.CHOCOLATE.isEnabled()) GameRegistry.addRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE.ordinal()), "C C", "CMC", "C C", 'C', new ItemStack(Items.dye, 1, 3), 'M', new ItemStack(Items.milk_bucket)); //Chocolate Cake - if(ConfigValues.enabledFoodRecipes[TheFoods.CHOCOLATE_CAKE.ordinal()]) + if(ConfigCrafting.CHOCOLATE_CAKE.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemFoods, 1, TheFoods.CHOCOLATE_CAKE.ordinal()), "MMM", "CCC", "EDS", 'M', new ItemStack(Items.milk_bucket), @@ -129,7 +129,7 @@ public class FoodCrafting{ 'C', new ItemStack(Items.dye, 1, 3))); //Toast - if(ConfigValues.enabledFoodRecipes[TheFoods.TOAST.ordinal()]) + if(ConfigCrafting.TOAST.isEnabled()) GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemFoods, 2, TheFoods.TOAST.ordinal()), new ItemStack(Items.bread)); } diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java index 4e9c0b45c..fe349c6ba 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/ItemCrafting.java @@ -3,7 +3,7 @@ package ellpeck.actuallyadditions.crafting; import cpw.mods.fml.common.registry.GameRegistry; import ellpeck.actuallyadditions.blocks.InitBlocks; import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigCrafting; import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.metalists.TheDusts; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; @@ -22,8 +22,8 @@ public class ItemCrafting{ public static void init(){ - //Leaf Blower - if(ConfigValues.enableLeafBlowerRecipe) + //Leaf Blower + if(ConfigCrafting.LEAF_BLOWER.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlower), " F", "IP", "IC", 'F', new ItemStack(Items.flint), @@ -32,14 +32,14 @@ public class ItemCrafting{ 'C', TheMiscItems.COIL_ADVANCED.getOredictName())); //Coil - if(ConfigValues.enabledMiscRecipes[TheMiscItems.COIL.ordinal()]) + if(ConfigCrafting.COIL.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL.ordinal()), " R ", "RIR", " R ", 'I', "ingotIron", 'R', "dustRedstone")); //Advanced Coil - if(ConfigValues.enabledMiscRecipes[TheMiscItems.COIL_ADVANCED.ordinal()]) + if(ConfigCrafting.ADV_COIL.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.COIL_ADVANCED.ordinal()), " G ", "GCG", " G ", 'C', TheMiscItems.COIL.getOredictName(), @@ -56,7 +56,7 @@ public class ItemCrafting{ 'X', new ItemStack(InitItems.itemSpecialDrop, 1, TheSpecialDrops.EMERALD_SHARD.ordinal())); //Advanced Leaf Blower - if(ConfigValues.enableLeafBlowerAdvancedRecipe) + if(ConfigCrafting.LEAF_BLOWER_ADVANCED.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemLeafBlowerAdvanced), " F", "DP", "DC", 'F', new ItemStack(Items.flint), @@ -65,25 +65,32 @@ public class ItemCrafting{ 'C', TheMiscItems.COIL_ADVANCED.getOredictName())); //Quartz - if(ConfigValues.enabledMiscRecipes[TheMiscItems.QUARTZ.ordinal()]) - GameRegistry.addSmelting(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()), - new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F); + GameRegistry.addSmelting(new ItemStack(InitBlocks.blockMisc, 1, TheMiscBlocks.ORE_QUARTZ.ordinal()), + new ItemStack(InitItems.itemMisc, 1, TheMiscItems.QUARTZ.ordinal()), 1F); //Knife - if(ConfigValues.enableKnifeRecipe) + if(ConfigCrafting.KNIFE.isEnabled()) GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemKnife), TheMiscItems.KNIFE_BLADE.getOredictName(), TheMiscItems.KNIFE_HANDLE.getOredictName())); //Crafter on a Stick - if(ConfigValues.enableCrafterRecipe) + if(ConfigCrafting.STICK_CRAFTER.isEnabled()) GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemCrafterOnAStick), new ItemStack(Blocks.crafting_table), new ItemStack(Items.sign), new ItemStack(Items.slime_ball)); + //SpeedUpgrade + if(ConfigCrafting.SPEED_UPGRADE.isEnabled()) + GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemSpeedUpgrade), + "RGR", "GUG", "RGR", + 'U', TheMiscItems.COIL.getOredictName(), + 'R', "dustRedstone", + 'G', "ingotGold")); + //Mashed Food - if(ConfigValues.enabledMiscRecipes[TheMiscItems.MASHED_FOOD.ordinal()]) + if(ConfigCrafting.MASHED_FOOD.isEnabled()) initMashedFoodRecipes(); //Rings @@ -116,13 +123,23 @@ public class ItemCrafting{ 'I', "ingotIron", 'D', "dustGlowstone")); - for(int i = 0; i < ThePotionRings.values().length; i++){ - if(ConfigValues.enablePotionRingRecipes[i]){ - ItemStack mainStack = ThePotionRings.values()[i].craftingItem; - GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRing, 1, i), mainStack, mainStack, mainStack, mainStack, new ItemStack(Blocks.diamond_block), new ItemStack(Items.nether_wart), new ItemStack(Items.potionitem), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())); - GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRingAdvanced, 1, i), new ItemStack(InitItems.itemPotionRing, 1, i), new ItemStack(Items.nether_star)); - } - } + if(ConfigCrafting.RING_SPEED.isEnabled()) addRingRecipeWithStack(ThePotionRings.SPEED.craftingItem, ThePotionRings.SPEED.ordinal()); + if(ConfigCrafting.RING_HASTE.isEnabled()) addRingRecipeWithStack(ThePotionRings.HASTE.craftingItem, ThePotionRings.HASTE.ordinal()); + if(ConfigCrafting.RING_STRENGTH.isEnabled()) addRingRecipeWithStack(ThePotionRings.STRENGTH.craftingItem, ThePotionRings.STRENGTH.ordinal()); + if(ConfigCrafting.RING_JUMP_BOOST.isEnabled()) addRingRecipeWithStack(ThePotionRings.JUMP_BOOST.craftingItem, ThePotionRings.JUMP_BOOST.ordinal()); + if(ConfigCrafting.RING_REGEN.isEnabled()) addRingRecipeWithStack(ThePotionRings.REGEN.craftingItem, ThePotionRings.REGEN.ordinal()); + if(ConfigCrafting.RING_RESISTANCE.isEnabled()) addRingRecipeWithStack(ThePotionRings.RESISTANCE.craftingItem, ThePotionRings.RESISTANCE.ordinal()); + if(ConfigCrafting.RING_FIRE_RESISTANCE.isEnabled()) addRingRecipeWithStack(ThePotionRings.FIRE_RESISTANCE.craftingItem, ThePotionRings.FIRE_RESISTANCE.ordinal()); + if(ConfigCrafting.RING_WATER_BREATHING.isEnabled()) addRingRecipeWithStack(ThePotionRings.WATER_BREATHING.craftingItem, ThePotionRings.WATER_BREATHING.ordinal()); + if(ConfigCrafting.RING_INVISIBILITY.isEnabled()) addRingRecipeWithStack(ThePotionRings.INVISIBILITY.craftingItem, ThePotionRings.INVISIBILITY.ordinal()); + if(ConfigCrafting.RING_NIGHT_VISION.isEnabled()) addRingRecipeWithStack(ThePotionRings.NIGHT_VISION.craftingItem, ThePotionRings.NIGHT_VISION.ordinal()); + if(ConfigCrafting.RING_SATURATION.isEnabled()) addRingRecipeWithStack(ThePotionRings.SATURATION.craftingItem, ThePotionRings.SATURATION.ordinal()); + + } + + public static void addRingRecipeWithStack(ItemStack mainStack, int meta){ + GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRing, 1, meta), mainStack, mainStack, mainStack, mainStack, new ItemStack(Blocks.diamond_block), new ItemStack(Items.nether_wart), new ItemStack(Items.potionitem), new ItemStack(InitItems.itemMisc, 1, TheMiscItems.RING.ordinal())); + GameRegistry.addShapelessRecipe(new ItemStack(InitItems.itemPotionRingAdvanced, 1, meta), new ItemStack(InitItems.itemPotionRing, 1, meta), new ItemStack(Items.nether_star)); } public static void initMashedFoodRecipes(){ diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java index 990d694fa..56e1bc903 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/MiscCrafting.java @@ -1,7 +1,7 @@ package ellpeck.actuallyadditions.crafting; import cpw.mods.fml.common.registry.GameRegistry; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigCrafting; import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.metalists.TheMiscItems; import net.minecraft.init.Items; @@ -14,29 +14,28 @@ public class MiscCrafting{ public static void init(){ //Dough - if(ConfigValues.enabledMiscRecipes[TheMiscItems.DOUGH.ordinal()]) + if(ConfigCrafting.DOUGH.isEnabled()) GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 2, TheMiscItems.DOUGH.ordinal()), "cropWheat", "cropWheat")); //Paper Cone - if(ConfigValues.enabledMiscRecipes[TheMiscItems.PAPER_CONE.ordinal()]) + if(ConfigCrafting.PAPER_CONE.isEnabled()) GameRegistry.addRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.PAPER_CONE.ordinal()), "P P", " P ", 'P', new ItemStack(Items.paper)); //Knife Handle - if(ConfigValues.enabledMiscRecipes[TheMiscItems.KNIFE_HANDLE.ordinal()]) + if(ConfigCrafting.KNIFE_HANDLE.isEnabled()) GameRegistry.addRecipe(new ShapelessOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_HANDLE.ordinal()), "stickWood", new ItemStack(Items.leather))); //Knife Blade - if(ConfigValues.enabledMiscRecipes[TheMiscItems.KNIFE_BLADE.ordinal()]) + if(ConfigCrafting.KNIFE_BLADE.isEnabled()) GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemMisc, 1, TheMiscItems.KNIFE_BLADE.ordinal()), "KF", 'K', "ingotIron", 'F', new ItemStack(Items.flint))); - } } diff --git a/src/main/java/ellpeck/actuallyadditions/crafting/ToolCrafting.java b/src/main/java/ellpeck/actuallyadditions/crafting/ToolCrafting.java index a7efe83a1..103b1bf17 100644 --- a/src/main/java/ellpeck/actuallyadditions/crafting/ToolCrafting.java +++ b/src/main/java/ellpeck/actuallyadditions/crafting/ToolCrafting.java @@ -1,7 +1,7 @@ package ellpeck.actuallyadditions.crafting; import cpw.mods.fml.common.registry.GameRegistry; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigCrafting; import ellpeck.actuallyadditions.items.InitItems; import net.minecraft.init.Blocks; import net.minecraft.init.Items; @@ -12,7 +12,7 @@ public class ToolCrafting{ public static void init(){ - if(ConfigValues.enableToolEmeraldRecipe){ + if(ConfigCrafting.TOOL_EMERALD.isEnabled()){ //Pickaxe GameRegistry.addRecipe(new ShapedOreRecipe(new ItemStack(InitItems.itemPickaxeEmerald), "EEE", " S ", " S ", @@ -44,7 +44,7 @@ public class ToolCrafting{ 'S', new ItemStack(Items.stick))); } - if(ConfigValues.enableToolObsidianRecipe){ + if(ConfigCrafting.TOOL_OBSIDIAN.isEnabled()){ //Pickaxe GameRegistry.addRecipe(new ItemStack(InitItems.itemPickaxeObsidian), "EEE", " S ", " S ", diff --git a/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java b/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java index 62e5708d7..22c8683b7 100644 --- a/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java +++ b/src/main/java/ellpeck/actuallyadditions/creative/CreativeTab.java @@ -44,6 +44,7 @@ public class CreativeTab extends CreativeTabs{ this.addBlock(InitBlocks.blockCompost); this.addBlock(InitBlocks.blockGiantChest); + this.addItem(InitItems.itemSpeedUpgrade); this.addItem(InitItems.itemMisc); this.addItem(InitItems.itemFertilizer); this.addItem(InitItems.itemFoods); diff --git a/src/main/java/ellpeck/actuallyadditions/gen/InitVillager.java b/src/main/java/ellpeck/actuallyadditions/gen/InitVillager.java index 9ca8e6c8e..3d58b94d7 100644 --- a/src/main/java/ellpeck/actuallyadditions/gen/InitVillager.java +++ b/src/main/java/ellpeck/actuallyadditions/gen/InitVillager.java @@ -1,7 +1,8 @@ package ellpeck.actuallyadditions.gen; import cpw.mods.fml.common.registry.VillagerRegistry; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigBoolValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.metalists.TheJams; import ellpeck.actuallyadditions.util.ModUtil; @@ -21,9 +22,9 @@ public class InitVillager{ public static void init(){ Util.logInfo("Initializing Village Addons..."); - if(ConfigValues.jamVillagerExists){ + if(ConfigBoolValues.JAM_VILLAGER_EXISTS.isEnabled()){ - int jamID = ConfigValues.jamVillagerID; + int jamID = ConfigIntValues.JAM_VILLAGER_ID.getValue(); VillagerRegistry.instance().registerVillagerId(jamID); VillagerRegistry.instance().registerVillageTradeHandler(jamID, new JamVillagerTradeHandler()); diff --git a/src/main/java/ellpeck/actuallyadditions/gen/OreGen.java b/src/main/java/ellpeck/actuallyadditions/gen/OreGen.java index 2f882b001..1559282b5 100644 --- a/src/main/java/ellpeck/actuallyadditions/gen/OreGen.java +++ b/src/main/java/ellpeck/actuallyadditions/gen/OreGen.java @@ -4,7 +4,8 @@ import cpw.mods.fml.common.IWorldGenerator; import cpw.mods.fml.common.registry.GameRegistry; import ellpeck.actuallyadditions.blocks.InitBlocks; import ellpeck.actuallyadditions.blocks.metalists.TheMiscBlocks; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigBoolValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.util.ModUtil; import ellpeck.actuallyadditions.util.Util; import net.minecraft.block.Block; @@ -36,7 +37,7 @@ public class OreGen implements IWorldGenerator{ } private void generateSurface(World world, Random random, int x, int z){ - if(ConfigValues.generateBlackQuartz) this.addOreSpawn(InitBlocks.blockMisc, TheMiscBlocks.ORE_QUARTZ.ordinal(), Blocks.stone, world, random, x, z, this.getRandom(ConfigValues.blackQuartzBaseAmount, ConfigValues.blackQuartzAdditionalChance, random), ConfigValues.blackQuartzChance, ConfigValues.blackQuartzMinHeight, ConfigValues.blackQuartzMaxHeight); + if(ConfigBoolValues.GENERATE_QUARTZ.isEnabled()) this.addOreSpawn(InitBlocks.blockMisc, TheMiscBlocks.ORE_QUARTZ.ordinal(), Blocks.stone, world, random, x, z, this.getRandom(ConfigIntValues.BLACK_QUARTZ_BASE_AMOUNT.getValue(), ConfigIntValues.BLACK_QUARTZ_ADD_CHANCE.getValue(), random), ConfigIntValues.BLACK_QUARTZ_CHANCE.getValue(), ConfigIntValues.BLACK_QUARTZ_MIN_HEIGHT.getValue(), ConfigIntValues.BLACK_QUARTZ_MAX_HEIGHT.getValue()); } @SuppressWarnings("unused") diff --git a/src/main/java/ellpeck/actuallyadditions/gen/VillageComponentJamHouse.java b/src/main/java/ellpeck/actuallyadditions/gen/VillageComponentJamHouse.java index c889519af..e2fda48a1 100644 --- a/src/main/java/ellpeck/actuallyadditions/gen/VillageComponentJamHouse.java +++ b/src/main/java/ellpeck/actuallyadditions/gen/VillageComponentJamHouse.java @@ -1,6 +1,6 @@ package ellpeck.actuallyadditions.gen; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import net.minecraft.block.Block; import net.minecraft.init.Blocks; import net.minecraft.tileentity.TileEntity; @@ -188,6 +188,6 @@ public class VillageComponentJamHouse extends StructureVillagePieces.House1{ @Override protected int getVillagerType(int par1){ - return ConfigValues.jamVillagerID; + return ConfigIntValues.JAM_VILLAGER_ID.getValue(); } } diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFurnaceDouble.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFurnaceDouble.java index d923304b1..0e680e1f6 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFurnaceDouble.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerFurnaceDouble.java @@ -22,6 +22,7 @@ public class ContainerFurnaceDouble extends Container{ private int lastCoalTimeLeft; private int lastFirstCrushTime; private int lastSecondCrushTime; + private int lastBurnTime; public ContainerFurnaceDouble(InventoryPlayer inventory, TileEntityBase tile){ this.tileFurnace = (TileEntityFurnaceDouble)tile; @@ -33,6 +34,8 @@ public class ContainerFurnaceDouble extends Container{ this.addSlotToContainer(new Slot(this.tileFurnace, TileEntityFurnaceDouble.SLOT_INPUT_2, 109, 21)); this.addSlotToContainer(new SlotOutput(this.tileFurnace, TileEntityFurnaceDouble.SLOT_OUTPUT_2, 108, 69)); + this.addSlotToContainer(new Slot(this.tileFurnace, this.tileFurnace.speedUpgradeSlot, 155, 21)); + for (int i = 0; i < 3; i++){ for (int j = 0; j < 9; j++){ this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18)); @@ -50,6 +53,7 @@ public class ContainerFurnaceDouble extends Container{ iCraft.sendProgressBarUpdate(this, 1, this.tileFurnace.coalTimeLeft); iCraft.sendProgressBarUpdate(this, 2, this.tileFurnace.firstSmeltTime); iCraft.sendProgressBarUpdate(this, 3, this.tileFurnace.secondSmeltTime); + iCraft.sendProgressBarUpdate(this, 4, this.tileFurnace.maxBurnTime); } @Override @@ -62,12 +66,14 @@ public class ContainerFurnaceDouble extends Container{ if(this.lastCoalTimeLeft != this.tileFurnace.coalTimeLeft) iCraft.sendProgressBarUpdate(this, 1, this.tileFurnace.coalTimeLeft); if(this.lastFirstCrushTime != this.tileFurnace.firstSmeltTime) iCraft.sendProgressBarUpdate(this, 2, this.tileFurnace.firstSmeltTime); if(this.lastSecondCrushTime != this.tileFurnace.secondSmeltTime) iCraft.sendProgressBarUpdate(this, 3, this.tileFurnace.secondSmeltTime); + if(this.lastBurnTime != this.tileFurnace.maxBurnTime) iCraft.sendProgressBarUpdate(this, 4, this.tileFurnace.maxBurnTime); } this.lastCoalTime = this.tileFurnace.coalTime; this.lastCoalTimeLeft = this.tileFurnace.coalTimeLeft; this.lastFirstCrushTime = this.tileFurnace.firstSmeltTime; this.lastSecondCrushTime = this.tileFurnace.secondSmeltTime; + this.lastBurnTime = this.tileFurnace.maxBurnTime; } @Override @@ -77,6 +83,7 @@ public class ContainerFurnaceDouble extends Container{ if(par1 == 1) this.tileFurnace.coalTimeLeft = par2; if(par1 == 2) this.tileFurnace.firstSmeltTime = par2; if(par1 == 3) this.tileFurnace.secondSmeltTime = par2; + if(par1 == 4) this.tileFurnace.maxBurnTime = par2; } @Override @@ -86,7 +93,7 @@ public class ContainerFurnaceDouble extends Container{ @Override public ItemStack transferStackInSlot(EntityPlayer player, int slot){ - final int inventoryStart = 5; + final int inventoryStart = 6; final int inventoryEnd = inventoryStart+26; final int hotbarStart = inventoryEnd+1; final int hotbarEnd = hotbarStart+8; diff --git a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGrinder.java b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGrinder.java index 2718c0dc2..fdd439a3a 100644 --- a/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGrinder.java +++ b/src/main/java/ellpeck/actuallyadditions/inventory/ContainerGrinder.java @@ -23,6 +23,7 @@ public class ContainerGrinder extends Container{ private int lastCoalTimeLeft; private int lastFirstCrushTime; private int lastSecondCrushTime; + private int lastMaxCrushTime; public ContainerGrinder(InventoryPlayer inventory, TileEntityBase tile, boolean isDouble){ this.tileGrinder = (TileEntityGrinder)tile; @@ -39,6 +40,8 @@ public class ContainerGrinder extends Container{ this.addSlotToContainer(new SlotOutput(this.tileGrinder, TileEntityGrinder.SLOT_OUTPUT_2_2, 121, 69)); } + this.addSlotToContainer(new Slot(this.tileGrinder, this.tileGrinder.speedUpgradeSlot, this.isDouble ? 155 : 146, 21)); + for (int i = 0; i < 3; i++){ for (int j = 0; j < 9; j++){ this.addSlotToContainer(new Slot(inventory, j + i * 9 + 9, 8 + j * 18, 97 + i * 18)); @@ -55,7 +58,8 @@ public class ContainerGrinder extends Container{ iCraft.sendProgressBarUpdate(this, 0, this.tileGrinder.coalTime); iCraft.sendProgressBarUpdate(this, 1, this.tileGrinder.coalTimeLeft); iCraft.sendProgressBarUpdate(this, 2, this.tileGrinder.firstCrushTime); - if(this.isDouble) iCraft.sendProgressBarUpdate(this, 3, this.tileGrinder.secondCrushTime); + iCraft.sendProgressBarUpdate(this, 3, this.tileGrinder.maxCrushTime); + if(this.isDouble) iCraft.sendProgressBarUpdate(this, 4, this.tileGrinder.secondCrushTime); } @Override @@ -67,12 +71,14 @@ public class ContainerGrinder extends Container{ if(this.lastCoalTime != this.tileGrinder.coalTime) iCraft.sendProgressBarUpdate(this, 0, this.tileGrinder.coalTime); if(this.lastCoalTimeLeft != this.tileGrinder.coalTimeLeft) iCraft.sendProgressBarUpdate(this, 1, this.tileGrinder.coalTimeLeft); if(this.lastFirstCrushTime != this.tileGrinder.firstCrushTime) iCraft.sendProgressBarUpdate(this, 2, this.tileGrinder.firstCrushTime); - if(this.isDouble) if(this.lastSecondCrushTime != this.tileGrinder.secondCrushTime) iCraft.sendProgressBarUpdate(this, 3, this.tileGrinder.secondCrushTime); + if(this.lastMaxCrushTime != this.tileGrinder.maxCrushTime) iCraft.sendProgressBarUpdate(this, 3, this.tileGrinder.maxCrushTime); + if(this.isDouble) if(this.lastSecondCrushTime != this.tileGrinder.secondCrushTime) iCraft.sendProgressBarUpdate(this, 4, this.tileGrinder.secondCrushTime); } this.lastCoalTime = this.tileGrinder.coalTime; this.lastCoalTimeLeft = this.tileGrinder.coalTimeLeft; this.lastFirstCrushTime = this.tileGrinder.firstCrushTime; + this.lastMaxCrushTime = this.tileGrinder.maxCrushTime; if(this.isDouble) this.lastSecondCrushTime = this.tileGrinder.secondCrushTime; } @@ -82,7 +88,8 @@ public class ContainerGrinder extends Container{ if(par1 == 0) this.tileGrinder.coalTime = par2; if(par1 == 1) this.tileGrinder.coalTimeLeft = par2; if(par1 == 2) this.tileGrinder.firstCrushTime = par2; - if(this.isDouble && par1 == 3) this.tileGrinder.secondCrushTime = par2; + if(par1 == 3) this.tileGrinder.maxCrushTime = par2; + if(this.isDouble && par1 == 4) this.tileGrinder.secondCrushTime = par2; } @Override @@ -92,7 +99,7 @@ public class ContainerGrinder extends Container{ @Override public ItemStack transferStackInSlot(EntityPlayer player, int slot){ - final int inventoryStart = this.isDouble ? 7 : 4; + final int inventoryStart = this.isDouble ? 8 : 5; final int inventoryEnd = inventoryStart+26; final int hotbarStart = inventoryEnd+1; final int hotbarEnd = hotbarStart+8; diff --git a/src/main/java/ellpeck/actuallyadditions/items/InitItems.java b/src/main/java/ellpeck/actuallyadditions/items/InitItems.java index 7a2aecd56..c0062a2c5 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/InitItems.java +++ b/src/main/java/ellpeck/actuallyadditions/items/InitItems.java @@ -38,6 +38,8 @@ public class InitItems{ public static Item itemSwordObsidian; public static Item itemHoeObsidian; + public static Item itemSpeedUpgrade; + public static void init(){ Util.logInfo("Initializing Items..."); @@ -77,6 +79,9 @@ public class InitItems{ itemPotionRingAdvanced = new ItemPotionRing(true); ItemUtil.register(itemPotionRingAdvanced); + itemSpeedUpgrade = new ItemUpgrade(ItemUpgrade.UpgradeType.SPEED, "itemUpgradeSpeed", 2+3); + ItemUtil.register(itemSpeedUpgrade); + itemPickaxeEmerald = new ItemPickaxeAA(InitItemMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemPickaxeEmerald", EnumRarity.rare); itemAxeEmerald = new ItemAxeAA(InitItemMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemAxeEmerald", EnumRarity.rare); itemShovelEmerald = new ItemShovelAA(InitItemMaterials.toolMaterialEmerald, new ItemStack(Items.emerald), "itemShovelEmerald", EnumRarity.rare); diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java b/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java index e1e324382..0c22c527c 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemKnife.java @@ -2,7 +2,7 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.util.INameableItem; import ellpeck.actuallyadditions.util.ItemUtil; import ellpeck.actuallyadditions.util.KeyUtil; @@ -20,7 +20,7 @@ import java.util.List; public class ItemKnife extends Item implements INameableItem{ public ItemKnife(){ - this.setMaxDamage(ConfigValues.knifeMaxDamage); + this.setMaxDamage(ConfigIntValues.KNIFE_DAMAGE.getValue()); this.setMaxStackSize(1); this.setContainerItem(this); } diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemLeafBlower.java b/src/main/java/ellpeck/actuallyadditions/items/ItemLeafBlower.java index afade1b83..a1a246a69 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/ItemLeafBlower.java +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemLeafBlower.java @@ -2,7 +2,8 @@ package ellpeck.actuallyadditions.items; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigBoolValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.util.*; import net.minecraft.block.Block; import net.minecraft.block.BlockBush; @@ -21,15 +22,14 @@ import net.minecraft.world.World; import java.util.ArrayList; import java.util.List; -import java.util.Random; public class ItemLeafBlower extends Item implements INameableItem{ - public final int range = ConfigValues.leafBlowerRangeSides; - public final int rangeUp = ConfigValues.leafBlowerRangeUp; - public final boolean doesDrop = ConfigValues.leafBlowerDropItems; - public final boolean hasParticles = ConfigValues.leafBlowerParticles; - public final boolean hasSound = ConfigValues.leafBlowerHasSound; + public final int range = ConfigIntValues.LEAF_BLOWER_RANGE_SIDES.getValue(); + public final int rangeUp = ConfigIntValues.LEAF_BLOWER_RANGE_UP.getValue(); + public final boolean doesDrop = ConfigBoolValues.LEAF_BLOWER_ITEMS.isEnabled(); + public final boolean hasParticles = ConfigBoolValues.LEAF_BLOWER_PARTICLES.isEnabled(); + public final boolean hasSound = ConfigBoolValues.LEAF_BLOWER_SOUND.isEnabled(); private final boolean isAdvanced; @@ -54,35 +54,30 @@ public class ItemLeafBlower extends Item implements INameableItem{ } public void breakStuff(World world, int x, int y, int z){ - ArrayList theCoords = new ArrayList(); - for(int reachX = -range; reachX < range+1; reachX++){ for(int reachZ = -range; reachZ < range+1; reachZ++){ for(int reachY = (this.isAdvanced ? -range : -rangeUp); reachY < (this.isAdvanced ? range+1 : rangeUp+1); reachY++){ Block block = world.getBlock(x+reachX, y+reachY, z+reachZ); if(block != null && (block instanceof BlockBush || (this.isAdvanced && block instanceof BlockLeavesBase))){ - theCoords.add(new ChunkCoordinates(x+reachX, y+reachY, z+reachZ)); + ChunkCoordinates theCoord = new ChunkCoordinates(x+reachX, y+reachY, z+reachZ); + Block theBlock = world.getBlock(theCoord.posX, theCoord.posY, theCoord.posZ); + ArrayList drops = new ArrayList(); + int meta = world.getBlockMetadata(theCoord.posX, theCoord.posY, theCoord.posZ); + drops.addAll(theBlock.getDrops(world, theCoord.posX, theCoord.posY, theCoord.posZ, meta, 0)); + + world.setBlockToAir(theCoord.posX, theCoord.posY, theCoord.posZ); + if(this.hasParticles) world.playAuxSFX(2001, theCoord.posX, theCoord.posY, theCoord.posZ, Block.getIdFromBlock(theBlock)+(meta << 12)); + + if(this.doesDrop){ + for(ItemStack theDrop : drops){ + world.spawnEntityInWorld(new EntityItem(world, theCoord.posX + 0.5, theCoord.posY + 0.5, theCoord.posZ + 0.5, theDrop)); + } + } + return; } } } } - - if(theCoords.size() > 0){ - ChunkCoordinates theCoord = theCoords.get(new Random().nextInt(theCoords.size())); - Block theBlock = world.getBlock(theCoord.posX, theCoord.posY, theCoord.posZ); - ArrayList drops = new ArrayList(); - int meta = world.getBlockMetadata(theCoord.posX, theCoord.posY, theCoord.posZ); - drops.addAll(theBlock.getDrops(world, theCoord.posX, theCoord.posY, theCoord.posZ, meta, 0)); - - world.setBlockToAir(theCoord.posX, theCoord.posY, theCoord.posZ); - if(this.hasParticles) world.playAuxSFX(2001, theCoord.posX, theCoord.posY, theCoord.posZ, Block.getIdFromBlock(theBlock)+(meta << 12)); - - if(this.doesDrop){ - for(ItemStack theDrop : drops){ - world.spawnEntityInWorld(new EntityItem(world, theCoord.posX + 0.5, theCoord.posY + 0.5, theCoord.posZ + 0.5, theDrop)); - } - } - } } @Override diff --git a/src/main/java/ellpeck/actuallyadditions/items/ItemUpgrade.java b/src/main/java/ellpeck/actuallyadditions/items/ItemUpgrade.java new file mode 100644 index 000000000..292f07809 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/items/ItemUpgrade.java @@ -0,0 +1,65 @@ +package ellpeck.actuallyadditions.items; + +import cpw.mods.fml.relauncher.Side; +import cpw.mods.fml.relauncher.SideOnly; +import ellpeck.actuallyadditions.util.INameableItem; +import ellpeck.actuallyadditions.util.ItemUtil; +import ellpeck.actuallyadditions.util.ModUtil; +import net.minecraft.client.renderer.texture.IIconRegister; +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.EnumRarity; +import net.minecraft.item.Item; +import net.minecraft.item.ItemStack; +import net.minecraft.util.IIcon; + +import java.util.List; + +public class ItemUpgrade extends Item implements INameableItem{ + + private String name; + public UpgradeType type; + private int textAmount; + + public ItemUpgrade(UpgradeType type, String name, int textAmount){ + this.name = name; + this.type = type; + this.textAmount = textAmount; + } + + @Override + public EnumRarity getRarity(ItemStack stack){ + return EnumRarity.rare; + } + + @Override + @SuppressWarnings("unchecked") + @SideOnly(Side.CLIENT) + public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean isHeld) { + ItemUtil.addInformation(this, list, this.textAmount, ""); + } + + @Override + public IIcon getIcon(ItemStack stack, int pass){ + return this.itemIcon; + } + + @Override + @SideOnly(Side.CLIENT) + public void registerIcons(IIconRegister iconReg){ + this.itemIcon = iconReg.registerIcon(ModUtil.MOD_ID_LOWER + ":" + this.getName()); + } + + @Override + public String getName(){ + return this.name; + } + + @Override + public String getOredictName(){ + return this.getName(); + } + + public enum UpgradeType{ + SPEED + } +} diff --git a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheSpecialDrops.java b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheSpecialDrops.java index 4e40b2dd4..1458edd53 100644 --- a/src/main/java/ellpeck/actuallyadditions/items/metalists/TheSpecialDrops.java +++ b/src/main/java/ellpeck/actuallyadditions/items/metalists/TheSpecialDrops.java @@ -1,6 +1,6 @@ package ellpeck.actuallyadditions.items.metalists; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigBoolValues; import ellpeck.actuallyadditions.util.INameableItem; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.monster.EntityCreeper; @@ -10,12 +10,12 @@ import net.minecraft.item.EnumRarity; public enum TheSpecialDrops implements INameableItem{ - SOLIDIFIED_EXPERIENCE("SolidifiedExperience", 40, 3, EntityCreature.class, EnumRarity.uncommon, ConfigValues.enableExperienceDrop, "itemSolidifiedExperience"), - BLOOD_FRAGMENT("BloodFragment", 15, 1, EntityCreature.class, EnumRarity.uncommon, ConfigValues.enableBloodDrop, "itemBloodFragment"), - HEART_PART("HeartPart", 5, 1, EntityCreature.class, EnumRarity.rare, ConfigValues.enableHeartDrop, "itemHeartPart"), - UNKNOWN_SUBSTANCE("UnknownSubstance", 3, 1, EntitySkeleton.class, EnumRarity.epic, ConfigValues.enableSubstanceDrop, "itemUnknownSubstance"), - PEARL_SHARD("PearlShard", 30, 3, EntityEnderman.class, EnumRarity.epic, ConfigValues.enablePearlShardDrop, "nuggetEnderpearl"), - EMERALD_SHARD("EmeraldShard", 30, 3, EntityCreeper.class, EnumRarity.rare, ConfigValues.enableEmeraldShardDrop, "nuggetEmerald"); + SOLIDIFIED_EXPERIENCE("SolidifiedExperience", 40, 3, EntityCreature.class, EnumRarity.uncommon, ConfigBoolValues.EXPERIENCE_DROP.isEnabled(), "itemSolidifiedExperience"), + BLOOD_FRAGMENT("BloodFragment", 15, 1, EntityCreature.class, EnumRarity.uncommon, ConfigBoolValues.BLOOD_DROP.isEnabled(), "itemBloodFragment"), + HEART_PART("HeartPart", 5, 1, EntityCreature.class, EnumRarity.rare, ConfigBoolValues.HEART_DROP.isEnabled(), "itemHeartPart"), + UNKNOWN_SUBSTANCE("UnknownSubstance", 3, 1, EntitySkeleton.class, EnumRarity.epic, ConfigBoolValues.SUBSTANCE_DROP.isEnabled(), "itemUnknownSubstance"), + PEARL_SHARD("PearlShard", 30, 3, EntityEnderman.class, EnumRarity.epic, ConfigBoolValues.PEARL_SHARD_DROP.isEnabled(), "nuggetEnderpearl"), + EMERALD_SHARD("EmeraldShard", 30, 3, EntityCreeper.class, EnumRarity.rare, ConfigBoolValues.EMERALD_SHARD_CROP.isEnabled(), "nuggetEmerald"); public final String name; public final String oredictName; diff --git a/src/main/java/ellpeck/actuallyadditions/material/InitItemMaterials.java b/src/main/java/ellpeck/actuallyadditions/material/InitItemMaterials.java index b02444705..91e5d0811 100644 --- a/src/main/java/ellpeck/actuallyadditions/material/InitItemMaterials.java +++ b/src/main/java/ellpeck/actuallyadditions/material/InitItemMaterials.java @@ -1,6 +1,7 @@ package ellpeck.actuallyadditions.material; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigFloatValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.util.Util; import net.minecraft.item.Item.ToolMaterial; import net.minecraftforge.common.util.EnumHelper; @@ -13,8 +14,8 @@ public class InitItemMaterials{ public static void init(){ Util.logInfo("Initializing Materials..."); - toolMaterialEmerald = EnumHelper.addToolMaterial("toolMaterialEmerald", ConfigValues.toolEmeraldHarvestLevel, ConfigValues.toolEmeraldMaxUses, ConfigValues.toolEmeraldEfficiency, ConfigValues.toolEmeraldDamage, ConfigValues.toolEmeraldEnchantability); - toolMaterialObsidian = EnumHelper.addToolMaterial("toolMaterialObsidian", ConfigValues.toolObsidianHarvestLevel, ConfigValues.toolObsidianMaxUses, ConfigValues.toolObsidianEfficiency, ConfigValues.toolObsidianDamage, ConfigValues.toolObsidianEnchantability); + toolMaterialEmerald = EnumHelper.addToolMaterial("toolMaterialEmerald", ConfigIntValues.EMERALD_HARVEST_LEVEL.getValue(), ConfigIntValues.EMERALD_USES.getValue(), ConfigFloatValues.EMERALD_SPEED.getValue(), ConfigFloatValues.EMERALD_MAX_DAMAGE.getValue(), ConfigIntValues.EMERALD_ENCHANTABILITY.getValue()); + toolMaterialObsidian = EnumHelper.addToolMaterial("toolMaterialObsidian", ConfigIntValues.OBSIDIAN_HARVEST_LEVEL.getValue(), ConfigIntValues.OBSIDIAN_USES.getValue(), ConfigFloatValues.OBSIDIAN_SPEED.getValue(), ConfigFloatValues.OBSIDIAN_MAX_DAMAGE.getValue(), ConfigIntValues.OBSIDIAN_ENCHANTABILITY.getValue()); } diff --git a/src/main/java/ellpeck/actuallyadditions/proxy/ClientProxy.java b/src/main/java/ellpeck/actuallyadditions/proxy/ClientProxy.java index 9ef01bb93..f357546b2 100644 --- a/src/main/java/ellpeck/actuallyadditions/proxy/ClientProxy.java +++ b/src/main/java/ellpeck/actuallyadditions/proxy/ClientProxy.java @@ -5,7 +5,7 @@ import cpw.mods.fml.client.registry.ClientRegistry; import cpw.mods.fml.common.registry.VillagerRegistry; import ellpeck.actuallyadditions.blocks.InitBlocks; import ellpeck.actuallyadditions.blocks.render.*; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.event.RenderPlayerEventAA; import ellpeck.actuallyadditions.tile.TileEntityCompost; import ellpeck.actuallyadditions.tile.TileEntityFishingNet; @@ -37,7 +37,7 @@ public class ClientProxy implements IProxy{ ClientRegistry.bindTileEntitySpecialRenderer(TileEntityFurnaceSolar.class, new RenderTileEntity(new ModelFurnaceSolar())); MinecraftForgeClient.registerItemRenderer(Item.getItemFromBlock(InitBlocks.blockFurnaceSolar), new RenderItems(new ModelFurnaceSolar())); - VillagerRegistry.instance().registerVillagerSkin(ConfigValues.jamVillagerID, new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png")); + VillagerRegistry.instance().registerVillagerSkin(ConfigIntValues.JAM_VILLAGER_ID.getValue(), new ResourceLocation(ModUtil.MOD_ID_LOWER, "textures/entity/villager/jamVillager.png")); Util.registerEvent(new RenderPlayerEventAA()); } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java index 6a2a1b291..b2641ffc5 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityBreaker.java @@ -1,5 +1,6 @@ package ellpeck.actuallyadditions.tile; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.util.WorldUtil; import net.minecraft.block.Block; import net.minecraft.block.BlockAir; @@ -13,6 +14,9 @@ public class TileEntityBreaker extends TileEntityInventoryBase{ private boolean isPlacer; + private final int timeNeeded = ConfigIntValues.BREAKER_TIME_NEEDED.getValue(); + private int currentTime; + @SuppressWarnings("unused") public TileEntityBreaker(){ super(9, ""); @@ -28,40 +32,46 @@ public class TileEntityBreaker extends TileEntityInventoryBase{ public void updateEntity(){ if(!worldObj.isRemote){ if(!worldObj.isBlockIndirectlyGettingPowered(xCoord, yCoord, zCoord)){ - int sideToBreak = -1; + if(this.currentTime > 0){ + this.currentTime--; + if(this.currentTime <= 0){ + int sideToBreak = -1; - int metaOfCurrentBlock = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); - if(metaOfCurrentBlock == 0) sideToBreak = 1; - else if(metaOfCurrentBlock == 1) sideToBreak = 0; - else if(metaOfCurrentBlock == 2) sideToBreak = 2; - else if(metaOfCurrentBlock == 3) sideToBreak = 4; - else if(metaOfCurrentBlock == 4) sideToBreak = 5; - else if(metaOfCurrentBlock == 5) sideToBreak = 3; + int metaOfCurrentBlock = worldObj.getBlockMetadata(xCoord, yCoord, zCoord); + if(metaOfCurrentBlock == 0) sideToBreak = 1; + else if(metaOfCurrentBlock == 1) sideToBreak = 0; + else if(metaOfCurrentBlock == 2) sideToBreak = 2; + else if(metaOfCurrentBlock == 3) sideToBreak = 4; + else if(metaOfCurrentBlock == 4) sideToBreak = 5; + else if(metaOfCurrentBlock == 5) sideToBreak = 3; - ChunkCoordinates coordsOfBlockToBreak = WorldUtil.getCoordsFromSide(sideToBreak, xCoord, yCoord, zCoord); - if(coordsOfBlockToBreak != null){ - Block blockToBreak = worldObj.getBlock(coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ); - if(!this.isPlacer && blockToBreak != null && blockToBreak.getBlockHardness(worldObj, coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ) > -1.0F){ - ArrayList drops = new ArrayList(); - int meta = worldObj.getBlockMetadata(coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ); - drops.addAll(blockToBreak.getDrops(worldObj, coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ, meta, 0)); + ChunkCoordinates coordsOfBlockToBreak = WorldUtil.getCoordsFromSide(sideToBreak, xCoord, yCoord, zCoord); + if(coordsOfBlockToBreak != null){ + Block blockToBreak = worldObj.getBlock(coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ); + if(!this.isPlacer && blockToBreak != null && blockToBreak.getBlockHardness(worldObj, coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ) > -1.0F){ + ArrayList drops = new ArrayList(); + int meta = worldObj.getBlockMetadata(coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ); + drops.addAll(blockToBreak.getDrops(worldObj, coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ, meta, 0)); - if(this.addToInventory(drops, false)){ - worldObj.playAuxSFX(2001, coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ, Block.getIdFromBlock(blockToBreak) + (meta << 12)); - WorldUtil.breakBlockAtSide(sideToBreak, worldObj, xCoord, yCoord, zCoord); - this.addToInventory(drops, true); - this.markDirty(); - } - } - else if(this.isPlacer && (worldObj.getBlock(coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ).isReplaceable(worldObj, coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ))){ - ItemStack removeFalse = this.removeFromInventory(false); - if(removeFalse != null && Block.getBlockFromItem(removeFalse.getItem()) != blockToBreak && Block.getBlockFromItem(removeFalse.getItem()).canPlaceBlockAt(worldObj, coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ)){ - ItemStack stack = this.removeFromInventory(true); - //TODO insert sound effect - WorldUtil.placeBlockAtSide(sideToBreak, worldObj, xCoord, yCoord, zCoord, stack); + if(this.addToInventory(drops, false)){ + worldObj.playAuxSFX(2001, coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ, Block.getIdFromBlock(blockToBreak) + (meta << 12)); + WorldUtil.breakBlockAtSide(sideToBreak, worldObj, xCoord, yCoord, zCoord); + this.addToInventory(drops, true); + this.markDirty(); + } + } + else if(this.isPlacer && (worldObj.getBlock(coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ).isReplaceable(worldObj, coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ))){ + ItemStack removeFalse = this.removeFromInventory(false); + if(removeFalse != null && Block.getBlockFromItem(removeFalse.getItem()) != blockToBreak && Block.getBlockFromItem(removeFalse.getItem()).canPlaceBlockAt(worldObj, coordsOfBlockToBreak.posX, coordsOfBlockToBreak.posY, coordsOfBlockToBreak.posZ)){ + ItemStack stack = this.removeFromInventory(true); + //TODO insert sound effect + WorldUtil.placeBlockAtSide(sideToBreak, worldObj, xCoord, yCoord, zCoord, stack); + } + } } } } + else this.currentTime = this.timeNeeded; } } } @@ -71,6 +81,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase{ super.writeToNBT(compound); compound.setBoolean("IsPlacer", this.isPlacer); compound.setString("Name", this.name); + compound.setInteger("CurrentTime", this.currentTime); } @Override @@ -78,6 +89,7 @@ public class TileEntityBreaker extends TileEntityInventoryBase{ super.readFromNBT(compound); this.isPlacer = compound.getBoolean("IsPlacer"); this.name = compound.getString("Name"); + this.currentTime = compound.getInteger("CurrentTime"); } public boolean addToInventory(ArrayList stacks, boolean actuallyDo){ diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCompost.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCompost.java index b6b2797ba..1959426ff 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCompost.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityCompost.java @@ -1,6 +1,6 @@ package ellpeck.actuallyadditions.tile; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.items.InitItems; import ellpeck.actuallyadditions.items.ItemFertilizer; import ellpeck.actuallyadditions.items.ItemMisc; @@ -10,8 +10,8 @@ import net.minecraft.nbt.NBTTagCompound; public class TileEntityCompost extends TileEntityInventoryBase{ - public final int amountNeededToConvert = ConfigValues.compostAmountNeededToConvert; - public final int conversionTimeNeeded = ConfigValues.compostConversionTimeNeeded; + public final int amountNeededToConvert = ConfigIntValues.COMPOST_AMOUNT.getValue(); + public final int conversionTimeNeeded = ConfigIntValues.COMPOST_TIME.getValue(); public int conversionTime; @@ -22,6 +22,12 @@ public class TileEntityCompost extends TileEntityInventoryBase{ @Override public void updateEntity(){ if(!worldObj.isRemote){ + + if(this.slots[0] != null && this.slots[0].stackSize > 0){ + worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, this.slots[0].stackSize + (this.slots[0].getItem() instanceof ItemFertilizer ? 1 : 0), 2); + } + else worldObj.setBlockMetadataWithNotify(xCoord, yCoord, zCoord, 0, 2); + boolean theFlag = this.conversionTime > 0; if(this.slots[0] != null && !(this.slots[0].getItem() instanceof ItemFertilizer) && this.slots[0].stackSize >= this.amountNeededToConvert){ this.conversionTime++; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFeeder.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFeeder.java index d4ef447ed..5d809834b 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFeeder.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFeeder.java @@ -3,7 +3,7 @@ package ellpeck.actuallyadditions.tile; import cpw.mods.fml.common.network.NetworkRegistry; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.network.PacketHandler; import ellpeck.actuallyadditions.network.PacketTileEntityFeeder; import net.minecraft.entity.passive.EntityAnimal; @@ -16,9 +16,9 @@ import java.util.Random; public class TileEntityFeeder extends TileEntityInventoryBase{ - public int reach = ConfigValues.feederReach; - public int timerGoal = ConfigValues.feederTimeNeeded; - public int animalThreshold = ConfigValues.feederThreshold; + public int reach = ConfigIntValues.FEEDER_REACH.getValue(); + public int timerGoal = ConfigIntValues.FEEDER_TIME.getValue(); + public int animalThreshold = ConfigIntValues.FEEDER_THRESHOLD.getValue(); public int currentTimer; public int currentAnimalAmount; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFishingNet.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFishingNet.java index 29db19999..d4d84c4f2 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFishingNet.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFishingNet.java @@ -1,6 +1,6 @@ package ellpeck.actuallyadditions.tile; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import net.minecraft.block.material.Material; import net.minecraft.entity.item.EntityItem; import net.minecraft.nbt.NBTTagCompound; @@ -10,7 +10,7 @@ import java.util.Random; public class TileEntityFishingNet extends TileEntityBase{ - public int timeUntilNextDropToSet = ConfigValues.fishingNetTime; + public int timeUntilNextDropToSet = ConfigIntValues.FISHER_TIME.getValue(); public int timeUntilNextDrop; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceDouble.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceDouble.java index 4061dea70..efdfb5363 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceDouble.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceDouble.java @@ -2,14 +2,14 @@ package ellpeck.actuallyadditions.tile; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.item.crafting.FurnaceRecipes; import net.minecraft.nbt.NBTTagCompound; import net.minecraft.tileentity.TileEntityFurnace; -public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements IPowerAcceptor{ +public class TileEntityFurnaceDouble extends TileEntityUpgradable implements IPowerAcceptor{ public static final int SLOT_COAL = 0; public static final int SLOT_INPUT_1 = 1; @@ -20,22 +20,25 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements public int coalTime; public int coalTimeLeft; - public final int maxBurnTime = ConfigValues.furnaceDoubleSmeltTime; + public int maxBurnTime = this.getStandardSpeed(); public int firstSmeltTime; public int secondSmeltTime; public TileEntityFurnaceDouble(){ - super(5, "furnaceDouble"); + super(6, "furnaceDouble"); + this.speedUpgradeSlot = 5; } @Override @SuppressWarnings("unchecked") public void updateEntity(){ if(!worldObj.isRemote){ + this.speedUp(); + boolean theFlag = this.coalTimeLeft > 0; - if(this.coalTimeLeft > 0) this.coalTimeLeft--; + if(this.coalTimeLeft > 0) this.coalTimeLeft -= 1+this.burnTimeAmplifier; boolean canSmeltOnFirst = this.canSmeltOn(SLOT_INPUT_1, SLOT_OUTPUT_1); boolean canSmeltOnSecond = this.canSmeltOn(SLOT_INPUT_2, SLOT_OUTPUT_2); @@ -174,4 +177,14 @@ public class TileEntityFurnaceDouble extends TileEntityInventoryBase implements public int getItemPower(){ return this.coalTime; } + + @Override + public int getStandardSpeed(){ + return ConfigIntValues.FURNACE_DOUBLE_SMELT_TIME.getValue(); + } + + @Override + public void setSpeed(int newSpeed){ + this.maxBurnTime = newSpeed; + } } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceSolar.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceSolar.java index 219a17dd3..3b8fa4d91 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceSolar.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityFurnaceSolar.java @@ -1,13 +1,15 @@ package ellpeck.actuallyadditions.tile; -import ellpeck.actuallyadditions.util.WorldUtil; -import net.minecraft.block.BlockFurnace; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.tileentity.TileEntityFurnace; - public class TileEntityFurnaceSolar extends TileEntityBase{ @Override + public boolean canUpdate(){ + return false; + } + + //TODO Reimplement + + /*@Override public void updateEntity(){ if(!worldObj.isRemote){ if(worldObj.canBlockSeeTheSky(xCoord, yCoord, zCoord) && worldObj.isDaytime()){ @@ -38,5 +40,5 @@ public class TileEntityFurnaceSolar extends TileEntityBase{ BlockFurnace.updateFurnaceBlockState(true, tile.getWorldObj(), furnaceBelow.xCoord, furnaceBelow.yCoord, furnaceBelow.zCoord); } } - } + }*/ } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGreenhouseGlass.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGreenhouseGlass.java index 925bb0f34..c59eea2dc 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGreenhouseGlass.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGreenhouseGlass.java @@ -1,6 +1,6 @@ package ellpeck.actuallyadditions.tile; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import net.minecraft.block.Block; import net.minecraft.block.BlockAir; import net.minecraft.block.BlockGrass; @@ -16,7 +16,7 @@ import java.util.Random; public class TileEntityGreenhouseGlass extends TileEntityBase{ - private int timeUntilNextFertToSet = ConfigValues.greenhouseGlassTimeNeeded; + private int timeUntilNextFertToSet = ConfigIntValues.GLASS_TIME_NEEDED.getValue(); private int timeUntilNextFert; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java index b6ded0b57..14151d0d3 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityGrinder.java @@ -2,7 +2,7 @@ package ellpeck.actuallyadditions.tile; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import ellpeck.actuallyadditions.recipe.GrinderRecipes; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; @@ -11,7 +11,7 @@ import net.minecraft.tileentity.TileEntityFurnace; import java.util.Random; -public class TileEntityGrinder extends TileEntityInventoryBase implements IPowerAcceptor{ +public class TileEntityGrinder extends TileEntityUpgradable implements IPowerAcceptor{ public static final int SLOT_COAL = 0; public static final int SLOT_INPUT_1 = 1; @@ -36,25 +36,28 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IPower } public TileEntityGrinder(boolean isDouble){ - super(isDouble ? 7 : 4, isDouble ? "grinderDouble" : "grinder"); - this.maxCrushTime = isDouble ? ConfigValues.grinderDoubleCrushTime : ConfigValues.grinderCrushTime; + super(isDouble ? 8 : 5, isDouble ? "grinderDouble" : "grinder"); + this.maxCrushTime = this.getStandardSpeed(); this.isDouble = isDouble; + this.speedUpgradeSlot = isDouble ? 7 : 4; } @Override @SuppressWarnings("unchecked") public void updateEntity(){ if(!worldObj.isRemote){ + this.speedUp(); + boolean theFlag = this.coalTimeLeft > 0; - if(this.coalTimeLeft > 0) this.coalTimeLeft--; + if(this.coalTimeLeft > 0) this.coalTimeLeft -= 1+this.burnTimeAmplifier; boolean canCrushOnFirst = this.canCrushOn(SLOT_INPUT_1, SLOT_OUTPUT_1_1, SLOT_OUTPUT_1_2); boolean canCrushOnSecond = false; if(this.isDouble) canCrushOnSecond = this.canCrushOn(SLOT_INPUT_2, SLOT_OUTPUT_2_1, SLOT_OUTPUT_2_2); if((canCrushOnFirst || canCrushOnSecond) && this.coalTimeLeft <= 0 && this.slots[SLOT_COAL] != null){ - this.coalTime = TileEntityFurnace.getItemBurnTime(this.slots[SLOT_COAL]); + this.coalTime = TileEntityFurnace.getItemBurnTime(this.slots[SLOT_COAL]); this.coalTimeLeft = this.coalTime; if(this.coalTime > 0){ this.slots[SLOT_COAL].stackSize--; @@ -150,9 +153,10 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IPower this.secondCrushTime = compound.getInteger("SecondCrushTime"); this.isDouble = compound.getBoolean("IsDouble"); this.name = compound.getString("Name"); - this.maxCrushTime = isDouble ? ConfigValues.grinderDoubleCrushTime : ConfigValues.grinderCrushTime; + this.maxCrushTime = this.getStandardSpeed(); + this.speedUpgradeSlot = isDouble ? 7 : 4; int slots = compound.getInteger("Slots"); - this.initializeSlots(slots == 0 ? 4 : slots); + this.initializeSlots(slots == 0 ? 5 : slots); super.readFromNBT(compound); } @@ -205,4 +209,14 @@ public class TileEntityGrinder extends TileEntityInventoryBase implements IPower public int getItemPower(){ return this.coalTime; } + + @Override + public int getStandardSpeed(){ + return this.isDouble ? ConfigIntValues.GRINDER_DOUBLE_CRUSH_TIME.getValue() : ConfigIntValues.GRINDER_CRUSH_TIME.getValue(); + } + + @Override + public void setSpeed(int newSpeed){ + this.maxCrushTime = newSpeed; + } } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityHeatCollector.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityHeatCollector.java index da76a4578..eca959c5b 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityHeatCollector.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityHeatCollector.java @@ -1,21 +1,20 @@ package ellpeck.actuallyadditions.tile; -import ellpeck.actuallyadditions.config.ConfigValues; -import ellpeck.actuallyadditions.util.WorldUtil; -import net.minecraft.block.Block; -import net.minecraft.block.material.Material; -import net.minecraft.tileentity.TileEntity; -import net.minecraft.util.ChunkCoordinates; - -import java.util.ArrayList; -import java.util.Random; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; public class TileEntityHeatCollector extends TileEntityBase{ - private int randomChance = ConfigValues.heatCollectorRandomChance; - private int blocksNeeded = ConfigValues.heatCollectorBlocksNeeded; + private int randomChance = ConfigIntValues.HEAT_COLLECTOR_LAVA_CHANCE.getValue(); + private int blocksNeeded = ConfigIntValues.HEAT_COLLECTOR_BLOCKS.getValue(); @Override + public boolean canUpdate(){ + return false; + } + + //TODO Reimplement + + /*@Override public void updateEntity(){ if(!worldObj.isRemote){ ArrayList blocksAround = new ArrayList(); @@ -42,5 +41,5 @@ public class TileEntityHeatCollector extends TileEntityBase{ } } } - } + }*/ } diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityItemRepairer.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityItemRepairer.java index 841d99428..d7873dd15 100644 --- a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityItemRepairer.java +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityItemRepairer.java @@ -2,7 +2,7 @@ package ellpeck.actuallyadditions.tile; import cpw.mods.fml.relauncher.Side; import cpw.mods.fml.relauncher.SideOnly; -import ellpeck.actuallyadditions.config.ConfigValues; +import ellpeck.actuallyadditions.config.values.ConfigIntValues; import net.minecraft.init.Items; import net.minecraft.item.ItemStack; import net.minecraft.nbt.NBTTagCompound; @@ -14,7 +14,7 @@ public class TileEntityItemRepairer extends TileEntityInventoryBase implements I public static final int SLOT_INPUT = 1; public static final int SLOT_OUTPUT = 2; - private final int speedSlowdown = ConfigValues.repairerSpeedSlowdown; + private final int speedSlowdown = ConfigIntValues.REPAIRER_SPEED_SLOWDOWN.getValue(); public int coalTime; public int coalTimeLeft; diff --git a/src/main/java/ellpeck/actuallyadditions/tile/TileEntityUpgradable.java b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityUpgradable.java new file mode 100644 index 000000000..864678128 --- /dev/null +++ b/src/main/java/ellpeck/actuallyadditions/tile/TileEntityUpgradable.java @@ -0,0 +1,40 @@ +package ellpeck.actuallyadditions.tile; + +import ellpeck.actuallyadditions.items.ItemUpgrade; +import net.minecraft.item.ItemStack; + +public abstract class TileEntityUpgradable extends TileEntityInventoryBase{ + + public int speedUpgradeSlot; + public int burnTimeAmplifier; + + public TileEntityUpgradable(int slots, String name){ + super(slots, name); + } + + public void speedUp(){ + ItemStack stack = this.slots[speedUpgradeSlot]; + if(stack != null && stack.getItem() instanceof ItemUpgrade && ((ItemUpgrade)stack.getItem()).type == ItemUpgrade.UpgradeType.SPEED){ + int newSpeed = this.getStandardSpeed() - 10*stack.stackSize; + this.speedUpBurnTimeBySpeed(stack.stackSize); + if(newSpeed < 5) newSpeed = 5; + this.setSpeed(newSpeed); + } + else{ + this.speedUpBurnTimeBySpeed(0); + this.setSpeed(this.getStandardSpeed()); + } + } + + public void speedUpBurnTimeBySpeed(int upgradeAmount){ + this.burnTimeAmplifier = upgradeAmount*2; + } + + public int getStandardSpeed(){ + return 0; + } + + public void setSpeed(int newSpeed){ + + } +} diff --git a/src/main/resources/assets/actuallyadditions/lang/en_US.lang b/src/main/resources/assets/actuallyadditions/lang/en_US.lang index 65e2e4436..85671e07f 100644 --- a/src/main/resources/assets/actuallyadditions/lang/en_US.lang +++ b/src/main/resources/assets/actuallyadditions/lang/en_US.lang @@ -12,8 +12,8 @@ tile.actuallyadditions.blockGrinder.name=Crusher tile.actuallyadditions.blockGrinderDouble.name=Double Crusher tile.actuallyadditions.blockFurnaceDouble.name=Double Furnace tile.actuallyadditions.blockFishingNet.name=Fishing Net -tile.actuallyadditions.blockFurnaceSolar.name=Solar Panel -tile.actuallyadditions.blockHeatCollector.name=Heat Collector +tile.actuallyadditions.blockFurnaceSolar.name=Solar Panel [TEMPORARILY UNIMPLEMENTED] +tile.actuallyadditions.blockHeatCollector.name=Heat Collector [TEMPORARILY UNIMPLEMENTED] tile.actuallyadditions.blockItemRepairer.name=Item Repairer tile.actuallyadditions.blockMiscWoodCasing.name=Wood Casing @@ -55,6 +55,7 @@ item.actuallyadditions.itemJamGraKiBa.name=GraKiBa-Jam item.actuallyadditions.itemJamPlApLe.name=PlApLe-Jam item.actuallyadditions.itemJamChApCi.name=ChApCi-Jam item.actuallyadditions.itemJamHoMeKi.name=HoMeKi-Jam +item.actuallyadditions.itemJamPiCo.name=PiCo-Jam item.actuallyadditions.itemLeafBlower.name=Leaf Blower item.actuallyadditions.itemLeafBlowerAdvanced.name=Advanced Leaf Blower @@ -88,6 +89,8 @@ item.actuallyadditions.itemFoodCarrotJuice.name=Carrot Juice item.actuallyadditions.itemFoodPumpkinStew.name=Pumpkin Stew item.actuallyadditions.itemFoodCheese.name=Cheese +item.actuallyadditions.itemUpgradeSpeed=Speed Upgrade + item.actuallyadditions.itemMiscCoil.name=Basic Coil item.actuallyadditions.itemMiscCoilAdvanced.name=Advanced Coil @@ -123,9 +126,15 @@ tooltip.actuallyadditions.itemJamGraKiBa.desc=Grape, Kiwi and Banana tooltip.actuallyadditions.itemJamPlApLe.desc=Plum, Apple and Lemon tooltip.actuallyadditions.itemJamChApCi.desc=Cherry, Apple and Cinnamon tooltip.actuallyadditions.itemJamHoMeKi.desc=Honeydew Melon and Kiwi +tooltip.actuallyadditions.itemJamPiCo.desc=Pineapple and Coconut -tooltip.actuallyadditions.blockCompost.desc.1=Used to make Fertilizer with Mashed Food -tooltip.actuallyadditions.blockCompost.desc.2=BETA INFO: Will visually contain Compost in the Future! +tooltip.actuallyadditions.itemUpgradeSpeed.desc.1=Speeds up Machines when placed in their Upgrade Slot +tooltip.actuallyadditions.itemUpgradeSpeed.desc.2=Works in: +tooltip.actuallyadditions.itemUpgradeSpeed.desc.3=-Double Furnace +tooltip.actuallyadditions.itemUpgradeSpeed.desc.4=-Crusher +tooltip.actuallyadditions.itemUpgradeSpeed.desc.5=-Double Crusher + +tooltip.actuallyadditions.blockCompost.desc=Used to make Fertilizer with Mashed Food tooltip.actuallyadditions.blockMiscOreBlackQuartz.desc=The darkest form of Quartz. tooltip.actuallyadditions.blockMiscBlackQuartz.desc=Black, eerie Quartz! Nice for decorating. tooltip.actuallyadditions.blockMiscBlackQuartzChiseled.desc=Black, eerie chiseled Quartz! Nice for decorating. diff --git a/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelCompost.png b/src/main/resources/assets/actuallyadditions/textures/blocks/models/modelCompost.png index 2da473943b888eb1690af67ee21a06f713c7b9b3..5f8316a13b3d95b06909d3c40b6ba287272acc86 100644 GIT binary patch literal 2065 zcmc&#`9Is)8jf~a+w@|rlcX0lifU6_v0St$wagW@rk2`cZ6y&?v`I|0v}mXiRivRP z+AGP&Hl&ucwXYea(v~I_MAZ^Y?ZJH0e(v9Je|XRPd7pEh=XuY2emLou5Dv#=z%n2Z z=$MnEojZ`Nf%skOD6lr)LPrBh0_W~v3!)D}=YZme2pbn05U3_wRup^$sHHKEJ~$BQ zAMN6h=tftC0iasE{pENMba;G1a2yJR366@5hsC1eHH={fFgPmJ2n7O3ra0NzcqRtS zJhb`maeMjH;tc0s+>Aq1oJ@`?d!{@f*^EAw9fWDvVH7Y=nq*UgCYW)WSgqL6^Cb}M z9IHnT%rkwqX2zi1 z`&YVp>eB0$cdcx6R+&trJi7-hs`FKk%Quydly#OW^)JWMu*v!J7nW8xW)>m0t!rGC zE!l%jKT>CzKj&*s!_e8N6fpZX_K1jUD9o| z5J%{_!j(TNx-!7+y;gIYE4Z48S~1Z9MD{z5$gGaSIq(5Q&+Kd1*xiX4lI~|&vCJhx6*dR5Wlq}=)B|oJN`~2H-t7{HaOUotGdM7`}BD)SBMo9 zw;b%aWp!Jl2xK0s!IfQHLa!8@QCe%DvaX3CC;1R_?TgZAO==E&3&(NT-YWw4bQ~&N zJvkFY+Ra;cBOX*F{7DG(OQg<*`yXW=27rf;sR*aGMDTF$PSh#be|*$uHqixUa7iKb z5;613jxH;CBuYYB^%s@DfDw6)0h*B4*1K7UI%}J{YZHq`x=Ka+gRb`029*`ez+m(!_FScYfM!3(5B75$5D84kHT}(#R!Xw*({o?UV`K zx_}D{%WE@}i|RaR8*6!0ms%0|sePWEjqBPizLKP*FSuBsJU*#+4nOn3Ei^joq8cHf z*UGo<`i1G`e)JT4e@*ZzG4H1ow=JtE{NJwrW?He2ZSVbo@2pvLEH|byR zVtmK!;(TvJ{Pw~>0z7tLMbt*($vzCtH_3wzP--axnH;f|=fC0>-kRpP*MKc0zS!~8 zN(<~&R!5D+-1~uYy0TKR-?sPpUz=sKRP*TSLRodx&`{HjMT>MbJ3|g!a5ux>j(Bq= zwMG;C>39T!4tB5pL%*#wHL2c^C*l+&yh(nn&`ohm_LypbO~<&P4xD4_u`)#~tpUA^ zh4T)-#vAh9mGAto0!X9sLPh(;gL-phcB#}-n)HZt8r04dsHEZ%Fctgd9RAo!I$QQtnU-VU-x za{0<>SKO>*Tl9G7q@8Ue2fj%x-&WpDfLX!$q5CVMY7LhPty(isyXt`T3isWBhx~U zF3CSZ(pzu zKJk_e_Bb3J;^%MPmn)a30la912X1)DmDDVhI|Z102p5$fFXC@49#fDj9k@YLUMvHT zt8gaPEL8x%_s_y9EM5m8{$+Xu0nm4U;R06mN}GkoDY7? zA@b|9cb|VW@$7uYFn(YrjiXv(w~D~GVm7^~?7XvW0K)18JQ+Z*iN7ti{$xs~;YL58)s= z!YT63wF_S5Jc+Gy2~{?D>6jyZ9J8l6%=PiK=VmuRi-P;hQVQ9OljMX&e%(|RL16MG z?!Lztpr;iU@}+71*?%HVOz-Ljq|CGzkKP-z&QMCf_c&=b{0_4#4|1t)?^Y z#z1lylxJdH$6o4#KddyhZ`wL<+#xSW>%CWWuhl6JbNxSW5DlOr$>j*mC+{VE#h*XO M$sS=xw+%}98zcoB9smFU delta 1210 zcmV;r1V#Ii5S0p$7YaZK1^@s6s%dfFks(-r1cpgOK~#8N?Uu2Nl~)kOUkr&TZbDSt zLbr(|0SywciHKUJNbD8@8%QBoD0UJEs9mZQqD@E>{Rd(bQu<%)AN0AuFLRdjCi5P< z@_l=^xCaj3+?hMvIWzaZ-3564+ugzW_Ro7G|9!Euw9Zt_bAA7m`D3ATzz=);^NsO; ztAjJ;=SvRuQRPRu(?bR1162q`d6BY}2en3ejYInu?2a-`aqulAiL81;8bAcYKIA?y8J3S~2 z`dh5tOQj z5#=IfE644_y_K(`?}KrCdsNfYlw`|~5KY#nsknHM{5ZZns^TOL zzx$x}XC5{`j&Bc53#xEY#X>GY^s<$9HsebaZrdbaZrdbaZrdbaZrobR02uA8rh< z9)B^sc=Y*j=Eu9;mEJf zo)}sAw$6O86xTP(XopeI%ZtO;zh4>oY~%crNbEb;KH2|1{pr%Md*Skbd-n1Wf>0O8 z8gcTeA#M|cQARr;M$@i;Zi4K}hplNs1o>KmeJ$bgM;Q&VCxRw0?R*oMxa`V@t!Yb; z-v)fFHGO^MKNbx@#PG*oOK+aH{^t6%u`&6#fVIb69KsMUpZwmC?29tmVH6n+@F(C6 z;C9den#J4qI3grk!X;3|r+u;^4T&<^0TJ+@?Y&=qdjd29@uUBL($%HrcwAF;QEqGP zwl^xuXa_`8*PUN`rj37mCe|E}XR&@0Br@L+`C*jN4v5Itz4~k5&GC2^BSGJMEO*;cA;4~HVuk08ey?` Y2cdjf4=m;-zyJUM07*qoM6N<$f(Ku0FaQ7m diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/guiFurnaceDouble.png b/src/main/resources/assets/actuallyadditions/textures/gui/guiFurnaceDouble.png index 407b5b952e566f29880266da32327a5375ccd4d0..c4a1f8bf99dd44922bbdfb89f0cb0345a3aff3dc 100644 GIT binary patch literal 2337 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5Fo{p?&#~tz_78O`%fY(0|PTd zfKP}kP~61dt{?4unjB3sTkH}&M2EHvI%(&64N(U$?QQ{g=5}cn_Ql40p%21G)nOCBh zms+A=qGzCIn%ZiV3M^mRJzX3_D&pSG>7KO8Ld11$X8fQ3?AGdujTiRtY|+^Kebppc z=S7yM9l|Sjzkg|X{H5@Rd%|~&|Fe~@ZoGW-%)YxTf3bXKdsXyZ@WaestADR)+;!(K z%ZE?ZpFSIJUr}`?kE!Bo?8b)0+&d=T4dWCm_~ET^^{!1=0%QArmZFD+E2NJ`95~2& zr|9m>fbCtD`x?G!=seiTdupcm1h4mpmgMhdu@dWwyum2Kcjo7=*$Par`kb;DYb-CQ z|9buQ{(&h9>nm9Eg)c;CsB?FGms9jR!qCP4ic|7h%$fV#3%)%I@DnnKtN*o1p?ATb zd$|)##Xq;nZkX!E;J^FG$~lLBeHZy~K7ZGI<5>SVyPHi78!z@Y{_!bo0C}!U?+wH)F z`Rf|yHOA^UmQQA}@mqOIaMyRBFCKAb>!s~&C<(o!laiPw_Q4{saQ?68his?LZ$DUd z@@dW5hL!b_i2-Lf|NFnNfm4Dd_wOpELkzrr;>9+M>1}s|yU+2;_#aS}JkfvJH|W4$ zq2yQX%NjnLs>LUBFJYf6Z85LGTWG?z1Ez8%c@HX>)`j}`U9T5advWK$LzX$~1FLI( zZNI^l?#ej*Rn6}CmzU2Exv;bGFz1PIhngRSJlsG%1x%~7-qlXmihKCUka1;$Udet2 z;iwnyHW%=F?6%Ku&W_RHo%E8G>)6(Qz9M(0bDRLY4D=EBM5P0U#nZq0v;$k1pGW}S4SFw9K^W!$2w7TsL zCCt*vh3og&U1ribz!Y&nE`q_bjWwcyb;B|-?u4t%It`4IBN&+3fjA1NK&OHAO(W}s zWT1iwhU~133}Lnhm?R83Sq%yfJZJr|`iC+PE6@MF<&BJ!_t+V;_#9mHf6|}lmXkLu znfvgpdqs2O7eoI;O=a!d<&FN=>#bMfeo(uAzWE)wdxep*T-*w&8ySMcMk$OSaILiY Z$Lz{z(9CRZ_W@LGdAj1dt{?4unjB3sTkH}&M2EMHz%$Qs_;{;GpqQo_#Bsf2snv5B z?)~%l_jh)5Ncq`Bri$;*8yjx1#+>{e#wix?SJ0#Mdp~c4!&i3&aXJ6k#S+{rVh)&I zpF3|?nBiA$iFvK8HTlg&&sdjSdY^b{xoo2~_fefU3|#EbYVP<7Fvhwodb>AVGWOw= z(0i83RK@*N=N_|$-3zr8ApbjSK=uESbDw-Ce3H*=<`MtgB)egHDx<`SvvO_SHx(Y7 z_kXuPeb>H7TZ;`&4rUj&R!QikbvN9&#eXM$Yi&V7Z-aru;`WD0S)vU0ts5UE=`_@| zu|_nomgN8IVBPSGkvl;lk?{*}1OqcC_k#QbOcE6bm~;*>MI12Rp)tLV|M1Zqfr7Vn zlb`aj3EgIA4|~VJ)vjEAV0C0Qi-v9S3&9H0)$bWaxue_e!|Hlj)LJ#v?HM!WKizx&O_4F6?Z6#WH913fp~uvvXQE zFKY0v-gocZ%iI21FYY*&GJWFg(6^s=m}#!{3O|S2$M(Lzbj&*Do|=Ma0smd?ghLE> z`*rRxUwU``_JYpC4$t|_-ZD(%FIm^5>F}KY8S9-}8v8P5TQFW+P|QA?#pa6Rb*~vy z7QR;ZHb3}NE^|=!seK}Lfxc_Vz zE~a1B^C&O7_Gv{6GJL zGnw)6{$DR2HhEq<&%+qJ;l=$YQ}#XgjJS00!$bdy#>OwE{)d|Q+WX~=|JzSDpUC=Q z=lt{BdHm}w!a@@nm*|K&oJty{FoHlMKK?)Bzx0jiB718ZKy{F(tDnm{r-UW|8U+VJ diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/guiGrinder.png b/src/main/resources/assets/actuallyadditions/textures/gui/guiGrinder.png index b17b169ef15c12db356a801ebbe087508dbc39de..483f9f8bab233d929ce1cf8691fba7583975eb7e 100644 GIT binary patch literal 2456 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5Fo{p?&#~tz_78O`%fY(0|PTd zfKP}kNL-hJ#f-t++?>smfjxwQvxq?>S|~I$^oEb?|7{Ha|I4?vwRLoKbai!gcX#*n z^h}&Map}^f$BrHQ|NlQw`zROfO3MP66dZwwZMybGZV7E5R((Fs+kY0v!#t*4Iq6~ZGuIRy zwkfxCo!7hT>VblMA@#V>ot~xv({BrHh&!IJ!#wlzv-SI}RHZtuZev-~tt15$ddc*t z%z zBZ_VE1TBRr_u9_>KdgFTlL6~V?S?~*YyThj6<{nqULkN`JM;7-$qiLM%{Od3Sdf2= zBSXi>N%w%-F2~;rZ-{RU3HE zhnTa>V3gwJ`Tp!7i%&1hgu5OMEFKKUGd&pC%iNeGI6N3?(^VQ8t3kp*bRe0-;@bV- ztqBSjEN>i*JkV>a-{zQ_I$@;fnt8v)un$U_AzMN$1&v#bKQ8Cd%ilF z>7nCuj!#?`Q?{}B9GIe=AkNaFx?wx}T;&s52Y6&oeR^9kf9k<@){qQW$UVy_%Q)Kf^n5cMYSX<1P1tA&k4Ts%>%)-{jYNA>&xaxN-?sM|i{B znrbudlD-EISwg1X{arToZQXVs#)V(ZO75%vloJT6k729cE%8F;;1^Kbp8LIo%OW)F z&%Rr?MH6_f+zs|Na5I;vPN);+$!Aztk*)hBw&4-4RggyeDi&>(;5M=aAK##xoT^q(gc{u3 zb7RdP-#T@B&L98yYu+7R7Cxilcfp0=O1m>)h-JK&hsx^kDt-}}?6 z1y~DMPOBg8RXU#fHNb=6r5LBeT_wgP(JBok-7FLGCNf;o6>`|+%H*+qR1y*hQ_i2S YXJ=_is@~ literal 2392 zcmeAS@N?(olHy`uVBq!ia0y~yU<5K58911MRQ8&P5Fo{p?&#~tz_78O`%fY(0|PTd zfKP}kNL-hJ#f-t++?>smfjxwQvxq?>S|~I$^oEb?|7{Ha|I4?vwRLoKbai!gcX#*n z^h}&Map}^f$BrHQ|NlQw`zRO94u{?CGf+5_Zh`Ehg~vx%-2kx0s6V9=~qFBeWqWiMOR;_4)>BK>@aD zzMuER#MSekXg$6#+vlJH<3~-6`~Oz|7ug}n=;`=9aKghZHqIMQcU@kX?RzkQ(OqI) z+Jc7ji#IgvKb;`t#k%B@|HCi;KXA;6n9=k|)ZyWQoBxxAT^z0(&imxvaLIU%j6uv< z2}XDB$pIVL18OeJot3y_mLt=OzZElDX8BI|v_GerC)_xP^^8L=1J9FZf^DlM6&@V7 zT;AQVZvT{Z6SNp_I)FpVndQi?|A$__dLjE}v7dv)g2I-ES?~M~T!~<~+0Po$z*;c3 zku~6!y4V4SLrgDzA7PT%(E<`SxLLZ9VUs+!h3JOYb<3Z!unFyLuDvs{p>jjRaiIzG z>SndttZTR)F7?-DO~dtVx<(&XFvZ=!egC!)GryL?yZYOC-aJ#dZmhRRoF7%vmk`Ie z^IzHTZ*?~vHa3(RO^APecP)3v*ZcqS?r%Tn%6ydR+v^|i-j)7lTJ+}+#~xpegsq+B z_l^j8=v%oPtZ&Gb&Q@UY*~xUx(;P+W1Q{0r?~1Le`3=) z!86(lcC1ft*YEt7#JJk`id=cUxOXDZ)JaX7`kR(AU2DIZx8JMWe&vExYlZm4s?vT3()fyI$~+wG3rUY{TAp!HW|mwwP5_9a*6Pd}(8#|Cu9U#yx+py7KRx zWYRgnG~>-KL>#3@FocFCFwUuJLynvc4BQW_&Tn8?wdw$q#aA9~AU|Q#YoX1b=J!_r z^gFP>Ua3UV&sLcwrmcJ4q~#^$+z*V>TRN*|9(35XleJ*t=0hR1Q~rH_%C(7M-Ggs4 w6Bo~Tym6PdPQ#R=OdgS=6h;t;JbnC_Ut-&5R{iW{r$LpOr>mdKI;Vst0POf-=l}o! diff --git a/src/main/resources/assets/actuallyadditions/textures/gui/guiGrinderDouble.png b/src/main/resources/assets/actuallyadditions/textures/gui/guiGrinderDouble.png index f57b24fca566ee19ae0a96eb2ddc3e9b4d646075..608242579be4f4c7161f7f57ccb60f214c540e93 100644 GIT binary patch delta 1208 zcmV;p1V{Vx6R8xiR0ImP000iQ0nW&|rITI+Cx4GgL_t(|UhSL>ccMBJMcY2dR_*9m z{r`Wp?Ve31L{@zFJ@s?R~d>-+rAEE!;T zF@HS*@ za8ChALG@LT-NjsAz$Vw7-m0x)$^_J~yMLHl2spe83pg%=a=Hbi(wi`7YL`I6LNPrn zfWm<>le-BbplT?j62QZOHql-!{~Cq_dBy{{nSk0tIaxp)`vkEgI#7I24ahL(Vy-WM z+UvJ+l7Q3or$+^;2j#bJgUq>@8?1n_)B^a}BzEQeUH?4={P&aQd8X;e#XAom;D1!_ zT0k~XZPhU6VulEarQM?0YxvFs2LW_Cus;e218meV=VG2!0325Wb1vpN1@I(TRzUqE zSXIE`NwBDZf5Gsq`kyxtIY0Hr3;)2JA=--+y_a7I30>a|KX1+;auonp(hbKAHkr2JU(Z+?pid z`z2L-g62Jd;)D3WoQoMQAYGMg7Sb~^3;2Ga;x^S&;Tp=%x4~-4+G|=ibPQWr5$gkyQ0s>-XZ~tw-)) zcFX8fy(S?b3QOm9{kKy#S%y_8b>f%zH6P?2^vQ*T0nfi$tSk6{&ufX0v4;NJ2WW27a}P+XKQDt-TnsdhV9*L+`at7FFa&7)L4UV^-9Cz6?N@OH z#0HHc7$l%o2Td2kpbSkv>AMN09{{QN*m~Sg0ZIsHxEO{7H2k7x1>}+S8;v6vDBw^B z9}8gM`H|fMuFX&Z)WL@$`bIv9fLsTgh4hSk76DNQ8^v^wd>R3_!U85HfM3)tffdfD z64J=Y2}t*>GFUhRM}Jy?1y}$RxCa(Mp27kwzygMsF?^&2SbzmEfqP&9m5zlwi?Ea3M)-RURSKXhaWI0uuyCi$P|oTVz{-f-{} z+`vFO&1YdkcZb9Oru+X~9z+(vai`A>ZV$J(tey%BAZ4)tQj_-xzw50000bD}&LMQdNzuG;Ea z{r`Wp?~`y;><18{7U$kGqcj4-2zhSZJ0E*OQ2<;n4T3t z;lP~9-2@TPbQIEe2~c{5DFMU9+)TjHLOH$n0E!Qq2^ofqxxN5uKfaaIe-otqi`yW> z#oS;8)Y2~i1G#yG;bKMz`0q3A^Gw&7!Gk9T2*?JS))9t_86zN;_66;&#t)ttB7YzZ z&^W?yF^?($&MSf8VjfcfPl9Cy9G?WM3OGFp78P)Q609kp^(0tQK>JCsrhwLyU`+w7 zC&8lkfb)}JO#!VZ!J-0^g5y^~Q2}QxKvzI2y$!>~j1aJGev_pI1Bvm2CkCzn3Ws~H zfLk;45}@?VT`z%KGx#1r@j-lGxPO@O0@5{1vyh&d!*7C=pKpT<7jqQ>udg&ZIc;?{ z0T{?lhKsp|fY;q_fPwQ?*AtKpG%bdUxq^V#_uaouuYuN9R}>HiXfRw%y?{8gyWOVG zKzpk?0ZTU9rxu+RR13(J?KW@kodzzpsuQqE2J&mQoq&K?*}H$c_f61Y;D2(fIsyAt zY}33ZAs`A%=XUefDd1wOIswadOkT$lNH01os1~r<#o3M0x>vx(R&@eaNkCcx>v+*w zL9KwOZL{0GZ8kmkfc92(0@jC^oUZ>vn4q(QY60>6CZE{O`Y*St60lrH?Q!TG>Rh59%VY%He(|_4dD(I}>8UjkG5|FQeIQj7&7U-aQHyyAeaJlexh5z{t(5l59_!BqCsZ` zqXb;kLDxW-l%eZ0eK*1M10WS2t>618KnVdIgJD`g#}|55K%RMgqkpr4kpfP2@UZ|U z{yei=z_l4GfI9e4MBmH@5s>SkSxC>!M-dQp&?u&R=EDfM6&5ft0sLBT39N8Fm5^pm zPC&Y6mBGRpInx3xzydgcdtd?NcUXW0Sitx)#?Q0>3$OqV;2u~2`5hKu0TwX6jPWxq zzyd6Q1GonkKz@e>SVMq@0REowH)H`{|D#Vox&E;;L%>gP(AVTCo#!8E3b{Az{2Ojy zAf4tP;ehTAyZ=h}-&`I=7QlX|&kb%5x45hx3X@R@zmqTtTNy?9`1l`>s&@nKaWnq_ O00000WbcEP)N2bZe?^J zG%heMHD!e|WdHyHPDw;TR5(walUqvyK^TUW?mOJN+eQ5muL23e5>J`irs7s>Db<}2 zTbAj%sIhC&fr5yjf++fF{eidrCUb>UIwyYf{p`1{#Ywtn1EU~ah>Q+I;u5khv zUeNorQF_#|`BY`0iK7`#lDy92`1uU=yF;%sc~ literal 0 HcmV?d00001