Made ready for next version: Crafting, Greenhouse Glass, Breaker, Placer, Compost Graphics, awesome!
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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()];
|
||||
}
|
||||
|
||||
}
|
|
@ -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()];
|
||||
}
|
||||
|
||||
}
|
|
@ -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()];
|
||||
}
|
||||
|
||||
}
|
|
@ -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()];
|
||||
}
|
||||
|
||||
}
|
|
@ -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));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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(){
|
||||
|
|
|
@ -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)));
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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 ",
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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());
|
||||
|
||||
|
|
|
@ -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")
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -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<ChunkCoordinates> theCoords = new ArrayList<ChunkCoordinates>();
|
||||
|
||||
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<ItemStack> drops = new ArrayList<ItemStack>();
|
||||
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<ItemStack> drops = new ArrayList<ItemStack>();
|
||||
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
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
|
@ -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;
|
||||
|
|
|
@ -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());
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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<ItemStack> drops = new ArrayList<ItemStack>();
|
||||
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<ItemStack> drops = new ArrayList<ItemStack>();
|
||||
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<ItemStack> stacks, boolean actuallyDo){
|
||||
|
|
|
@ -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++;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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<Integer> blocksAround = new ArrayList<Integer>();
|
||||
|
@ -42,5 +41,5 @@ public class TileEntityHeatCollector extends TileEntityBase{
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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){
|
||||
|
||||
}
|
||||
}
|
|
@ -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.
|
||||
|
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 2.2 KiB After Width: | Height: | Size: 2.3 KiB |
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 2.4 KiB |
Before Width: | Height: | Size: 2.5 KiB After Width: | Height: | Size: 2.5 KiB |
Before Width: | Height: | Size: 2.9 KiB After Width: | Height: | Size: 2.9 KiB |
After Width: | Height: | Size: 464 B |