Rename files to be more consistent. Add missing headers, tidy up Utils

This commit is contained in:
mezz committed 2015-09-25 15:09:54 -07:00
1 parent 37dd0efee2
commit 1e89bab556
576 files changed
+3811 -3923

No files matched your search

@@ -21,11 +21,11 @@ import cpw.mods.fml.common.IFuelHandler;
import cpw.mods.fml.common.event.FMLInterModComms.IMCMessage;
import cpw.mods.fml.common.network.IGuiHandler;
import forestry.core.interfaces.IPickupHandler;
import forestry.core.interfaces.IResupplyHandler;
import forestry.core.interfaces.ISaveEventHandler;
import forestry.core.IPickupHandler;
import forestry.core.IResupplyHandler;
import forestry.core.ISaveEventHandler;
import forestry.core.network.IPacketHandler;
import forestry.core.proxy.Proxies;
import forestry.core.utils.Log;
public abstract class ForestryPlugin {
@@ -77,7 +77,7 @@ public abstract class ForestryPlugin {
protected static void logInvalidIMCMessage(IMCMessage message) {
String invalidIMCMessageText = getInvalidIMCMessageText(message);
Proxies.log.warning(invalidIMCMessageText);
Log.warning(invalidIMCMessageText);
}
public IGuiHandler getGuiHandler() {
@@ -19,13 +19,13 @@ import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.farming.Farmables;
import forestry.api.recipes.RecipeManagers;
import forestry.core.GameMode;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
import forestry.farming.logic.FarmableBasicAgricraft;
@Plugin(pluginID = "AgriCraft", name = "AgriCraft", author = "Nirek", url = Defaults.URL, unlocalizedDescription = "for.plugin.agricraft.description")
@Plugin(pluginID = "AgriCraft", name = "AgriCraft", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.agricraft.description")
public class PluginAgriCraft extends ForestryPlugin {
private static final String AgriCraft = "AgriCraft";
@@ -20,7 +20,6 @@ import java.util.Map;
import java.util.Random;
import java.util.Set;
import forestry.apiculture.ArmorApiaristHelper;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.init.Blocks;
@@ -67,35 +66,16 @@ import forestry.api.genetics.IFlowerRegistry;
import forestry.api.recipes.RecipeManagers;
import forestry.api.storage.ICrateRegistry;
import forestry.api.storage.StorageManager;
import forestry.apiculture.ArmorApiaristHelper;
import forestry.apiculture.GuiHandlerApiculture;
import forestry.apiculture.SaveEventHandlerApiculture;
import forestry.apiculture.VillageHandlerApiculture;
import forestry.apiculture.blocks.BlockAlveary;
import forestry.apiculture.blocks.BlockBeehives;
import forestry.apiculture.blocks.BlockCandle;
import forestry.apiculture.blocks.BlockStump;
import forestry.apiculture.commands.CommandBee;
import forestry.apiculture.flowers.FlowerRegistry;
import forestry.apiculture.gadgets.BlockAlveary;
import forestry.apiculture.gadgets.BlockBeehives;
import forestry.apiculture.gadgets.BlockCandle;
import forestry.apiculture.gadgets.BlockStump;
import forestry.apiculture.gadgets.TileApiaristChest;
import forestry.apiculture.gadgets.TileApiary;
import forestry.apiculture.gadgets.TileBeehouse;
import forestry.apiculture.gadgets.TileCandle;
import forestry.apiculture.gadgets.TileSwarm;
import forestry.apiculture.genetics.AlleleEffectAggressive;
import forestry.apiculture.genetics.AlleleEffectCreeper;
import forestry.apiculture.genetics.AlleleEffectExploration;
import forestry.apiculture.genetics.AlleleEffectFertile;
import forestry.apiculture.genetics.AlleleEffectFungification;
import forestry.apiculture.genetics.AlleleEffectGlacial;
import forestry.apiculture.genetics.AlleleEffectHeroic;
import forestry.apiculture.genetics.AlleleEffectIgnition;
import forestry.apiculture.genetics.AlleleEffectMisanthrope;
import forestry.apiculture.genetics.AlleleEffectNone;
import forestry.apiculture.genetics.AlleleEffectPotion;
import forestry.apiculture.genetics.AlleleEffectRadioactive;
import forestry.apiculture.genetics.AlleleEffectRepulsion;
import forestry.apiculture.genetics.AlleleEffectResurrection;
import forestry.apiculture.genetics.AlleleEffectSnowing;
import forestry.apiculture.genetics.BeeBranchDefinition;
import forestry.apiculture.genetics.BeeDefinition;
import forestry.apiculture.genetics.BeeFactory;
@@ -104,11 +84,26 @@ import forestry.apiculture.genetics.BeeMutationFactory;
import forestry.apiculture.genetics.BeekeepingMode;
import forestry.apiculture.genetics.HiveDrop;
import forestry.apiculture.genetics.JubilanceFactory;
import forestry.apiculture.items.ItemAlvearyBlock;
import forestry.apiculture.genetics.alleles.AlleleEffectAggressive;
import forestry.apiculture.genetics.alleles.AlleleEffectCreeper;
import forestry.apiculture.genetics.alleles.AlleleEffectExploration;
import forestry.apiculture.genetics.alleles.AlleleEffectFertile;
import forestry.apiculture.genetics.alleles.AlleleEffectFungification;
import forestry.apiculture.genetics.alleles.AlleleEffectGlacial;
import forestry.apiculture.genetics.alleles.AlleleEffectHeroic;
import forestry.apiculture.genetics.alleles.AlleleEffectIgnition;
import forestry.apiculture.genetics.alleles.AlleleEffectMisanthrope;
import forestry.apiculture.genetics.alleles.AlleleEffectNone;
import forestry.apiculture.genetics.alleles.AlleleEffectPotion;
import forestry.apiculture.genetics.alleles.AlleleEffectRadioactive;
import forestry.apiculture.genetics.alleles.AlleleEffectRepulsion;
import forestry.apiculture.genetics.alleles.AlleleEffectResurrection;
import forestry.apiculture.genetics.alleles.AlleleEffectSnowing;
import forestry.apiculture.items.ItemArmorApiarist;
import forestry.apiculture.items.ItemBeeGE;
import forestry.apiculture.items.ItemBeealyzer;
import forestry.apiculture.items.ItemCandleBlock;
import forestry.apiculture.items.ItemBlockAlveary;
import forestry.apiculture.items.ItemBlockCandle;
import forestry.apiculture.items.ItemHabitatLocator;
import forestry.apiculture.items.ItemHiveFrame;
import forestry.apiculture.items.ItemHoneycomb;
@@ -124,40 +119,47 @@ import forestry.apiculture.multiblock.TileAlvearyStabiliser;
import forestry.apiculture.multiblock.TileAlvearySwarmer;
import forestry.apiculture.network.PacketHandlerApiculture;
import forestry.apiculture.proxy.ProxyApiculture;
import forestry.apiculture.tiles.TileApiaristChest;
import forestry.apiculture.tiles.TileApiary;
import forestry.apiculture.tiles.TileBeeHouse;
import forestry.apiculture.tiles.TileCandle;
import forestry.apiculture.tiles.TileSwarm;
import forestry.apiculture.trigger.ApicultureTriggers;
import forestry.apiculture.worldgen.HiveDecorator;
import forestry.apiculture.worldgen.HiveDescription;
import forestry.apiculture.worldgen.HiveGenHelper;
import forestry.apiculture.worldgen.HiveRegistry;
import forestry.core.GameMode;
import forestry.core.ISaveEventHandler;
import forestry.core.blocks.BlockBase;
import forestry.core.config.Config;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
import forestry.core.config.GameMode;
import forestry.core.config.LocalizedConfiguration;
import forestry.core.entities.EntityFXSnow;
import forestry.core.fluids.Fluids;
import forestry.core.gadgets.BlockBase;
import forestry.core.gadgets.MachineDefinition;
import forestry.core.gadgets.TileAnalyzer;
import forestry.core.genetics.alleles.Allele;
import forestry.core.interfaces.ISaveEventHandler;
import forestry.core.items.ItemBlockForestry;
import forestry.core.items.ItemForestry;
import forestry.core.items.ItemForestryBlock;
import forestry.core.items.ItemOverlay;
import forestry.core.items.ItemOverlay.OverlayInfo;
import forestry.core.items.ItemScoop;
import forestry.core.network.IPacketHandler;
import forestry.core.proxy.Proxies;
import forestry.core.render.EntitySnowFX;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.render.RenderNaturalistChest;
import forestry.core.utils.ShapedRecipeCustom;
import forestry.core.utils.StackUtils;
import forestry.core.tiles.MachineDefinition;
import forestry.core.tiles.TileAnalyzer;
import forestry.core.utils.ItemStackUtil;
import forestry.core.utils.Log;
import forestry.core.utils.Stack;
import forestry.core.utils.StringUtil;
@Plugin(pluginID = "Apiculture", name = "Apiculture", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.apiculture.description")
@Plugin(pluginID = "Apiculture", name = "Apiculture", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.apiculture.description")
public class PluginApiculture extends ForestryPlugin {
@SidedProxy(clientSide = "forestry.apiculture.proxy.ClientProxyApiculture", serverSide = "forestry.apiculture.proxy.ProxyApiculture")
@SidedProxy(clientSide = "forestry.apiculture.proxy.ProxyApicultureClient", serverSide = "forestry.apiculture.proxy.ProxyApiculture")
public static ProxyApiculture proxy;
private static final String CONFIG_CATEGORY = "apiculture";
private static final String[] EMPTY_STRINGS = new String[0];
@@ -212,16 +214,16 @@ public class PluginApiculture extends ForestryPlugin {
MinecraftForge.EVENT_BUS.register(this);
ForestryBlock.apiculture.registerBlock(new BlockBase(Material.iron), ItemForestryBlock.class, "apiculture");
ForestryBlock.apiculture.registerBlock(new BlockBase(Material.iron), ItemBlockForestry.class, "apiculture");
ForestryBlock.apiculture.block().setCreativeTab(Tabs.tabApiculture);
ForestryBlock.apiculture.block().setHarvestLevel("axe", 0);
ForestryBlock.apicultureChest.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "apicultureChest");
ForestryBlock.apicultureChest.registerBlock(new BlockBase(Material.iron, true), ItemBlockForestry.class, "apicultureChest");
ForestryBlock.apicultureChest.block().setCreativeTab(Tabs.tabApiculture);
ForestryBlock.apicultureChest.block().setHarvestLevel("axe", 0);
definitionApiary = ((BlockBase) ForestryBlock.apiculture.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_APIARY_META, "forestry.Apiary", TileApiary.class,
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.apiculture.getItemStack(1, Defaults.DEFINITION_APIARY_META),
definitionApiary = ((BlockBase) ForestryBlock.apiculture.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_APIARY_META, "forestry.Apiary", TileApiary.class,
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.apiculture.getItemStack(1, Constants.DEFINITION_APIARY_META),
"XXX",
"#C#",
"###",
@@ -230,10 +232,10 @@ public class PluginApiculture extends ForestryPlugin {
'C', ForestryItem.impregnatedCasing))
.setFaces(0, 1, 2, 2, 4, 4, 0, 7));
definitionChestLegacy = ((BlockBase) ForestryBlock.apiculture.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_APIARISTCHEST_LEGACY_META, "forestry.ApiaristChest", TileApiaristChest.class).setLegacy());
definitionChestLegacy = ((BlockBase) ForestryBlock.apiculture.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_APIARISTCHEST_LEGACY_META, "forestry.ApiaristChest", TileApiaristChest.class).setLegacy());
definitionChest = ((BlockBase) ForestryBlock.apicultureChest.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_APIARISTCHEST_META, "forestry.ApiaristChestNew", TileApiaristChest.class, new RenderNaturalistChest("apiaristchest"),
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.apicultureChest.getItemStack(1, Defaults.DEFINITION_APIARISTCHEST_META),
definitionChest = ((BlockBase) ForestryBlock.apicultureChest.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_APIARISTCHEST_META, "forestry.ApiaristChestNew", TileApiaristChest.class, new RenderNaturalistChest("apiaristchest"),
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.apicultureChest.getItemStack(1, Constants.DEFINITION_APIARISTCHEST_META),
" # ",
"XYX",
"XXX",
@@ -242,8 +244,8 @@ public class PluginApiculture extends ForestryPlugin {
'Y', "chestWood"))
.setBoundingBox(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F));
definitionBeehouse = ((BlockBase) ForestryBlock.apiculture.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_BEEHOUSE_META, "forestry.Beehouse", TileBeehouse.class,
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.apiculture.getItemStack(1, Defaults.DEFINITION_BEEHOUSE_META),
definitionBeehouse = ((BlockBase) ForestryBlock.apiculture.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_BEEHOUSE_META, "forestry.Beehouse", TileBeeHouse.class,
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.apiculture.getItemStack(1, Constants.DEFINITION_BEEHOUSE_META),
"XXX",
"#C#",
"###",
@@ -252,17 +254,17 @@ public class PluginApiculture extends ForestryPlugin {
'C', "beeComb"))
.setFaces(0, 1, 2, 2, 4, 4, 0, 7));
definitionAnalyzer = ((BlockBase) ForestryBlock.core.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_ANALYZER_META, "forestry.Analyzer", TileAnalyzer.class,
PluginApiculture.proxy.getRendererAnalyzer(Defaults.TEXTURE_PATH_BLOCKS + "/analyzer_")));
definitionAnalyzer = ((BlockBase) ForestryBlock.core.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_ANALYZER_META, "forestry.Analyzer", TileAnalyzer.class,
PluginApiculture.proxy.getRendererAnalyzer(Constants.TEXTURE_PATH_BLOCKS + "/analyzer_")));
ForestryBlock.beehives.registerBlock(new BlockBeehives(), ItemForestryBlock.class, "beehives");
ForestryBlock.beehives.registerBlock(new BlockBeehives(), ItemBlockForestry.class, "beehives");
// Candles
ForestryBlock.candle.registerBlock(new BlockCandle(), ItemCandleBlock.class, "candle");
ForestryBlock.stump.registerBlock(new BlockStump(), ItemForestryBlock.class, "stump");
ForestryBlock.candle.registerBlock(new BlockCandle(), ItemBlockCandle.class, "candle");
ForestryBlock.stump.registerBlock(new BlockStump(), ItemBlockForestry.class, "stump");
// Alveary and Components
ForestryBlock.alveary.registerBlock(new BlockAlveary(), ItemAlvearyBlock.class, "alveary");
ForestryBlock.alveary.registerBlock(new BlockAlveary(), ItemBlockAlveary.class, "alveary");
ForestryBlock.alveary.block().setHarvestLevel("axe", 0);
// Add triggers
@@ -296,7 +298,7 @@ public class PluginApiculture extends ForestryPlugin {
final String oldConfigRenamed = CONFIG_CATEGORY + ".conf.old";
File oldConfigFileRenamed = new File(Forestry.instance.getConfigFolder(), oldConfigRenamed);
if (oldConfigFile.renameTo(oldConfigFileRenamed)) {
Proxies.log.info("Migrated " + CONFIG_CATEGORY + " settings to the new file '" + newConfig + "' and renamed '" + oldConfig + "' to '" + oldConfigRenamed + "'.");
Log.info("Migrated " + CONFIG_CATEGORY + " settings to the new file '" + newConfig + "' and renamed '" + oldConfig + "' to '" + oldConfigRenamed + "'.");
}
}
@@ -316,7 +318,7 @@ public class PluginApiculture extends ForestryPlugin {
}
beekeepingMode = config.getStringLocalized("beekeeping", "mode", "NORMAL", validBeekeepingModeNames);
Proxies.log.finer("Beekeeping mode read from config: " + beekeepingMode);
Log.finer("Beekeeping mode read from config: " + beekeepingMode);
secondPrincessChance = config.getFloatLocalized("beekeeping", "second.princess", secondPrincessChance, 0.0f, 100.0f);
@@ -342,7 +344,7 @@ public class PluginApiculture extends ForestryPlugin {
Set<IFlower> acceptableFlowers = FlowerManager.flowerRegistry.getAcceptableFlowers(flowerType);
if (acceptableFlowers == null || acceptableFlowers.size() == 0) {
Proxies.log.severe("Flower type '" + flowerType + "' has no valid flowers set in apiculture.cfg. Add valid flowers or delete the config to set it to default.");
Log.severe("Flower type '" + flowerType + "' has no valid flowers set in apiculture.cfg. Add valid flowers or delete the config to set it to default.");
}
}
@@ -390,9 +392,9 @@ public class PluginApiculture extends ForestryPlugin {
// Register villager stuff
VillageHandlerApiculture villageHandler = new VillageHandlerApiculture();
VillagerRegistry.instance().registerVillageCreationHandler(villageHandler);
VillagerRegistry.instance().registerVillagerId(Defaults.ID_VILLAGER_BEEKEEPER);
Proxies.render.registerVillagerSkin(Defaults.ID_VILLAGER_BEEKEEPER, Defaults.TEXTURE_SKIN_BEEKPEEPER);
VillagerRegistry.instance().registerVillageTradeHandler(Defaults.ID_VILLAGER_BEEKEEPER, villageHandler);
VillagerRegistry.instance().registerVillagerId(Constants.ID_VILLAGER_BEEKEEPER);
Proxies.render.registerVillagerSkin(Constants.ID_VILLAGER_BEEKEEPER, Constants.TEXTURE_SKIN_BEEKPEEPER);
VillagerRegistry.instance().registerVillageTradeHandler(Constants.ID_VILLAGER_BEEKEEPER, villageHandler);
}
proxy.initializeRendering();
@@ -441,7 +443,7 @@ public class PluginApiculture extends ForestryPlugin {
for (IFlower flower : flowers) {
String name = GameData.getBlockRegistry().getNameForObject(flower.getBlock());
if (name == null) {
Proxies.log.severe("Could not find name for flower: " + flower + " with type: " + flowerType);
Log.severe("Could not find name for flower: " + flower + " with type: " + flowerType);
continue;
}
@@ -477,7 +479,7 @@ public class PluginApiculture extends ForestryPlugin {
property = apicultureConfig.get("beekeeping.mode", CONFIG_CATEGORY, "NORMAL");
property.comment = "change beekeeping modes here. possible values EASY, NORMAL, HARD, HARDCORE, INSANE. mods may add additional modes.";
beekeepingMode = property.value.trim();
Proxies.log.finer("Beekeeping mode read from config: " + beekeepingMode);
Log.finer("Beekeeping mode read from config: " + beekeepingMode);
property = apicultureConfig.get("beekeeping.secondprincess", CONFIG_CATEGORY, secondPrincessChance);
property.comment = "percent chance of second princess drop, for limited/skyblock maps. Acceptable values up to 2 decimals.";
@@ -737,9 +739,9 @@ public class PluginApiculture extends ForestryPlugin {
if (PluginManager.Module.FACTORY.isEnabled()) {
// / SQUEEZER
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{ForestryItem.honeyDrop.getItemStack()}, Fluids.HONEY.getFluid(Defaults.FLUID_PER_HONEY_DROP),
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{ForestryItem.honeyDrop.getItemStack()}, Fluids.HONEY.getFluid(Constants.FLUID_PER_HONEY_DROP),
ForestryItem.propolis.getItemStack(), 5);
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{ForestryItem.honeydew.getItemStack()}, Fluids.HONEY.getFluid(Defaults.FLUID_PER_HONEY_DROP));
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{ForestryItem.honeydew.getItemStack()}, Fluids.HONEY.getFluid(Constants.FLUID_PER_HONEY_DROP));
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{ForestryItem.phosphor.getItemStack(2), new ItemStack(Blocks.sand)}, Fluids.LAVA.getFluid(2000));
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{ForestryItem.phosphor.getItemStack(2), new ItemStack(Blocks.sand, 1, 1)}, Fluids.LAVA.getFluid(2000));
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{ForestryItem.phosphor.getItemStack(2), new ItemStack(Blocks.dirt)}, Fluids.LAVA.getFluid(1600));
@@ -870,7 +872,7 @@ public class PluginApiculture extends ForestryPlugin {
}
// ANALYZER
definitionAnalyzer.recipes = createAlyzerRecipes(ForestryBlock.core.block(), Defaults.DEFINITION_ANALYZER_META);
definitionAnalyzer.recipes = createAlyzerRecipes(ForestryBlock.core.block(), Constants.DEFINITION_ANALYZER_META);
definitionAnalyzer.register();
definitionApiary.register();
@@ -944,16 +946,16 @@ public class PluginApiculture extends ForestryPlugin {
tag.setInteger(BlockCandle.colourTagName, 0xffffff);
stack.setTagCompound(tag);
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(stack, 7, 12, 12));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.scoop.getItemStack(), 1, 1, 8));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.propolis.getItemStack(), 2, 4, 6));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.beeComb.getItemStack(), 4, 12, 7));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.beeComb.getItemStack(1, 4), 2, 10, 7));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.beeComb.getItemStack(1, 6), 1, 6, 7));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(stack, 7, 12, 12));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.scoop.getItemStack(), 1, 1, 8));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.propolis.getItemStack(), 2, 4, 6));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.beeComb.getItemStack(), 4, 12, 7));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.beeComb.getItemStack(1, 4), 2, 10, 7));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.beeComb.getItemStack(1, 6), 1, 6, 7));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(BeeDefinition.FOREST.getRainResist().getMemberStack(EnumBeeType.PRINCESS), 1, 1, 5));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(BeeDefinition.COMMON.getMemberStack(EnumBeeType.DRONE), 1, 2, 8));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(BeeDefinition.MEADOWS.getMemberStack(EnumBeeType.PRINCESS), 1, 1, 5));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(BeeDefinition.FOREST.getRainResist().getMemberStack(EnumBeeType.PRINCESS), 1, 1, 5));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(BeeDefinition.COMMON.getMemberStack(EnumBeeType.DRONE), 1, 2, 8));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(BeeDefinition.MEADOWS.getMemberStack(EnumBeeType.PRINCESS), 1, 1, 5));
}
private static void createHives() {
@@ -1005,7 +1007,7 @@ public class PluginApiculture extends ForestryPlugin {
}
private static void parseAdditionalFlowers(String list, ArrayList<ItemStack> target) {
List<ItemStack> flowers = StackUtils.parseItemStackStrings(list, 0);
List<ItemStack> flowers = ItemStackUtil.parseItemStackStrings(list, 0);
target.addAll(flowers);
}
@@ -1026,21 +1028,21 @@ public class PluginApiculture extends ForestryPlugin {
}
private static void parseAcceptedFlowers(String[] acceptedFlowers, String flowerType) {
List<StackUtils.Stack> acceptedFlowerItemStacks = StackUtils.parseStackStrings(acceptedFlowers, OreDictionary.WILDCARD_VALUE);
for (StackUtils.Stack acceptedFlower : acceptedFlowerItemStacks) {
List<Stack> acceptedFlowerItemStacks = Stack.parseStackStrings(acceptedFlowers, OreDictionary.WILDCARD_VALUE);
for (Stack acceptedFlower : acceptedFlowerItemStacks) {
Block acceptedFlowerBlock = acceptedFlower.getBlock();
int meta = acceptedFlower.getMeta();
if (acceptedFlowerBlock != null) {
FlowerManager.flowerRegistry.registerAcceptableFlower(acceptedFlowerBlock, meta, flowerType);
} else {
Proxies.log.warning("No block found for '" + acceptedFlower + "' in apiculture config for '" + flowerType + "'.");
Log.warning("No block found for '" + acceptedFlower + "' in apiculture config for '" + flowerType + "'.");
}
}
}
private static void parsePlantableFlowers(Property property, String flowerType) {
for (String string : property.getStringList()) {
StackUtils.Stack plantableFlower = StackUtils.parseStackString(string, OreDictionary.WILDCARD_VALUE);
Stack plantableFlower = Stack.parseStackString(string, OreDictionary.WILDCARD_VALUE);
if (plantableFlower == null) {
continue;
}
@@ -1050,7 +1052,7 @@ public class PluginApiculture extends ForestryPlugin {
if (plantableFlowerBlock != null) {
FlowerManager.flowerRegistry.registerPlantableFlower(plantableFlowerBlock, meta, 1.0, flowerType);
} else {
Proxies.log.warning("No block found for '" + string + "' in config '" + property.getName() + "'.");
Log.warning("No block found for '" + string + "' in config '" + property.getName() + "'.");
}
}
}
@@ -1086,7 +1088,7 @@ public class PluginApiculture extends ForestryPlugin {
return true;
} else if (message.key.equals("add-alveary-slab") && message.isStringMessage()) {
String messageString = String.format("Received a '%s' request from mod '%s'. This IMC message has been replaced with the oreDictionary for 'slabWood'. Please contact the author and report this issue.", message.key, message.getSender());
Proxies.log.warning(messageString);
Log.warning(messageString);
return true;
}
@@ -1097,9 +1099,9 @@ public class PluginApiculture extends ForestryPlugin {
@SideOnly(Side.CLIENT)
public void textureHook(TextureStitchEvent.Pre event) {
if (event.map.getTextureType() == 1) {
EntitySnowFX.icons = new IIcon[3];
for (int i = 0; i < EntitySnowFX.icons.length; i++) {
EntitySnowFX.icons[i] = event.map.registerIcon("forestry:particles/snow." + (i + 1));
EntityFXSnow.icons = new IIcon[3];
for (int i = 0; i < EntityFXSnow.icons.length; i++) {
EntityFXSnow.icons[i] = event.map.registerIcon("forestry:particles/snow." + (i + 1));
}
}
}
@@ -47,23 +47,15 @@ import forestry.arboriculture.FruitProviderRipening;
import forestry.arboriculture.GuiHandlerArboriculture;
import forestry.arboriculture.VillageHandlerArboriculture;
import forestry.arboriculture.WoodType;
import forestry.arboriculture.blocks.BlockArbFence;
import forestry.arboriculture.blocks.BlockArbStairs;
import forestry.arboriculture.blocks.BlockForestryLeaves;
import forestry.arboriculture.blocks.BlockFruitPod;
import forestry.arboriculture.blocks.BlockLog;
import forestry.arboriculture.blocks.BlockPlanks;
import forestry.arboriculture.blocks.BlockSapling;
import forestry.arboriculture.blocks.BlockSlab;
import forestry.arboriculture.commands.CommandTree;
import forestry.arboriculture.gadgets.BlockArbFence;
import forestry.arboriculture.gadgets.BlockArbStairs;
import forestry.arboriculture.gadgets.BlockFruitPod;
import forestry.arboriculture.gadgets.BlockLog;
import forestry.arboriculture.gadgets.BlockPlanks;
import forestry.arboriculture.gadgets.BlockSapling;
import forestry.arboriculture.gadgets.BlockSlab;
import forestry.arboriculture.gadgets.ForestryBlockLeaves;
import forestry.arboriculture.gadgets.TileArboristChest;
import forestry.arboriculture.gadgets.TileFruitPod;
import forestry.arboriculture.gadgets.TileLeaves;
import forestry.arboriculture.gadgets.TileSapling;
import forestry.arboriculture.gadgets.TileWood;
import forestry.arboriculture.genetics.AlleleFruit;
import forestry.arboriculture.genetics.AlleleGrowth;
import forestry.arboriculture.genetics.AlleleLeafEffectNone;
import forestry.arboriculture.genetics.GrowthProvider;
import forestry.arboriculture.genetics.GrowthProviderTropical;
import forestry.arboriculture.genetics.TreeBranchDefinition;
@@ -72,42 +64,49 @@ import forestry.arboriculture.genetics.TreeFactory;
import forestry.arboriculture.genetics.TreeHelper;
import forestry.arboriculture.genetics.TreeMutationFactory;
import forestry.arboriculture.genetics.TreekeepingMode;
import forestry.arboriculture.genetics.alleles.AlleleFruit;
import forestry.arboriculture.genetics.alleles.AlleleGrowth;
import forestry.arboriculture.genetics.alleles.AlleleLeafEffectNone;
import forestry.arboriculture.items.ItemBlockLeaves;
import forestry.arboriculture.items.ItemBlockWood;
import forestry.arboriculture.items.ItemGermlingGE;
import forestry.arboriculture.items.ItemGrafter;
import forestry.arboriculture.items.ItemLeavesBlock;
import forestry.arboriculture.items.ItemTreealyzer;
import forestry.arboriculture.items.ItemWoodBlock;
import forestry.arboriculture.network.PacketHandlerArboriculture;
import forestry.arboriculture.proxy.ProxyArboriculture;
import forestry.core.GameMode;
import forestry.arboriculture.tiles.TileArboristChest;
import forestry.arboriculture.tiles.TileFruitPod;
import forestry.arboriculture.tiles.TileLeaves;
import forestry.arboriculture.tiles.TileSapling;
import forestry.arboriculture.tiles.TileWood;
import forestry.core.blocks.BlockBase;
import forestry.core.config.Config;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.gadgets.BlockBase;
import forestry.core.gadgets.MachineDefinition;
import forestry.core.genetics.alleles.Allele;
import forestry.core.items.ItemForestryBlock;
import forestry.core.items.ItemBlockForestry;
import forestry.core.items.ItemFruit.EnumFruit;
import forestry.core.network.IPacketHandler;
import forestry.core.proxy.Proxies;
import forestry.core.recipes.RecipeUtil;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.recipes.ShapelessRecipeCustom;
import forestry.core.render.RenderNaturalistChest;
import forestry.core.utils.RecipeUtil;
import forestry.core.utils.ShapedRecipeCustom;
import forestry.core.utils.ShapelessRecipeCustom;
import forestry.core.tiles.MachineDefinition;
import forestry.factory.recipes.FabricatorRecipe;
@Plugin(pluginID = "Arboriculture", name = "Arboriculture", author = "Binnie & SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.arboriculture.description")
@Plugin(pluginID = "Arboriculture", name = "Arboriculture", author = "Binnie & SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.arboriculture.description")
public class PluginArboriculture extends ForestryPlugin {
@SidedProxy(clientSide = "forestry.arboriculture.proxy.ClientProxyArboriculture", serverSide = "forestry.arboriculture.proxy.ProxyArboriculture")
@SidedProxy(clientSide = "forestry.arboriculture.proxy.ProxyArboricultureClient", serverSide = "forestry.arboriculture.proxy.ProxyArboriculture")
public static ProxyArboriculture proxy;
public static String treekeepingMode = "NORMAL";
public static int modelIdSaplings;
public static int modelIdLeaves;
public static int modelIdFences;
public static int modelIdPods;
private static MachineDefinition definitionChest;
@@ -137,26 +136,26 @@ public class PluginArboriculture extends ForestryPlugin {
super.preInit();
// Wood blocks
ForestryBlock.logs.registerBlock(new BlockLog(false), ItemWoodBlock.class, "logs");
ForestryBlock.logs.registerBlock(new BlockLog(false), ItemBlockWood.class, "logs");
OreDictionary.registerOre("logWood", ForestryBlock.logs.getWildcard());
ForestryBlock.planks.registerBlock(new BlockPlanks(false), ItemWoodBlock.class, "planks");
ForestryBlock.planks.registerBlock(new BlockPlanks(false), ItemBlockWood.class, "planks");
OreDictionary.registerOre("plankWood", ForestryBlock.planks.getWildcard());
ForestryBlock.slabs.registerBlock(new BlockSlab(false), ItemWoodBlock.class, "slabs");
ForestryBlock.slabs.registerBlock(new BlockSlab(false), ItemBlockWood.class, "slabs");
OreDictionary.registerOre("slabWood", ForestryBlock.slabs.getWildcard());
ForestryBlock.fences.registerBlock(new BlockArbFence(false), ItemWoodBlock.class, "fences");
ForestryBlock.fences.registerBlock(new BlockArbFence(false), ItemBlockWood.class, "fences");
OreDictionary.registerOre("fenceWood", ForestryBlock.fences.getWildcard());
ForestryBlock.stairs.registerBlock(new BlockArbStairs(ForestryBlock.planks.block(), false), ItemWoodBlock.class, "stairs");
ForestryBlock.stairs.registerBlock(new BlockArbStairs(ForestryBlock.planks.block(), false), ItemBlockWood.class, "stairs");
OreDictionary.registerOre("stairWood", ForestryBlock.stairs.getWildcard());
ForestryBlock.logsFireproof.registerBlock(new BlockLog(true), ItemWoodBlock.class, "logsFireproof");
ForestryBlock.planksFireproof.registerBlock(new BlockPlanks(true), ItemWoodBlock.class, "planksFireproof");
ForestryBlock.slabsFireproof.registerBlock(new BlockSlab(true), ItemWoodBlock.class, "slabsFireproof");
ForestryBlock.fencesFireproof.registerBlock(new BlockArbFence(true), ItemWoodBlock.class, "fencesFireproof");
ForestryBlock.stairsFireproof.registerBlock(new BlockArbStairs(ForestryBlock.planksFireproof.block(), true), ItemWoodBlock.class, "stairsFireproof");
ForestryBlock.logsFireproof.registerBlock(new BlockLog(true), ItemBlockWood.class, "logsFireproof");
ForestryBlock.planksFireproof.registerBlock(new BlockPlanks(true), ItemBlockWood.class, "planksFireproof");
ForestryBlock.slabsFireproof.registerBlock(new BlockSlab(true), ItemBlockWood.class, "slabsFireproof");
ForestryBlock.fencesFireproof.registerBlock(new BlockArbFence(true), ItemBlockWood.class, "fencesFireproof");
ForestryBlock.stairsFireproof.registerBlock(new BlockArbStairs(ForestryBlock.planksFireproof.block(), true), ItemBlockWood.class, "stairsFireproof");
for (WoodType woodType : WoodType.VALUES) {
woodType.registerLog(ForestryBlock.logs.block(), false);
@@ -173,23 +172,23 @@ public class PluginArboriculture extends ForestryPlugin {
}
// Saplings
ForestryBlock.saplingGE.registerBlock(new BlockSapling(), ItemForestryBlock.class, "saplingGE");
ForestryBlock.saplingGE.registerBlock(new BlockSapling(), ItemBlockForestry.class, "saplingGE");
OreDictionary.registerOre("treeSapling", ForestryBlock.saplingGE.getWildcard());
// Leaves
ForestryBlock.leaves.registerBlock(new ForestryBlockLeaves(), ItemLeavesBlock.class, "leaves");
ForestryBlock.leaves.registerBlock(new BlockForestryLeaves(), ItemBlockLeaves.class, "leaves");
OreDictionary.registerOre("treeLeaves", ForestryBlock.leaves.getWildcard());
// Pods
ForestryBlock.pods.registerBlock(new BlockFruitPod(), ItemForestryBlock.class, "pods");
ForestryBlock.pods.registerBlock(new BlockFruitPod(), ItemBlockForestry.class, "pods");
// Machines
ForestryBlock.arboriculture.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "arboriculture");
ForestryBlock.arboriculture.registerBlock(new BlockBase(Material.iron, true), ItemBlockForestry.class, "arboriculture");
ForestryBlock.arboriculture.block().setCreativeTab(Tabs.tabArboriculture);
definitionChest = ((BlockBase) ForestryBlock.arboriculture.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_ARBCHEST_META,
"forestry.ArbChest", TileArboristChest.class, new RenderNaturalistChest("arbchest"),
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.arboriculture.getItemStack(1, Defaults.DEFINITION_ARBCHEST_META),
definitionChest = ((BlockBase) ForestryBlock.arboriculture.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_ARBCHEST_META,
"forestry.ArbChest", TileArboristChest.class, new RenderNaturalistChest("arbchest"),
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.arboriculture.getItemStack(1, Constants.DEFINITION_ARBCHEST_META),
" # ",
"XYX",
"XXX",
@@ -228,9 +227,9 @@ public class PluginArboriculture extends ForestryPlugin {
definitionChest.register();
if (Config.enableVillagers) {
VillagerRegistry.instance().registerVillagerId(Defaults.ID_VILLAGER_LUMBERJACK);
Proxies.render.registerVillagerSkin(Defaults.ID_VILLAGER_LUMBERJACK, Defaults.TEXTURE_SKIN_LUMBERJACK);
VillagerRegistry.instance().registerVillageTradeHandler(Defaults.ID_VILLAGER_LUMBERJACK, new VillageHandlerArboriculture());
VillagerRegistry.instance().registerVillagerId(Constants.ID_VILLAGER_LUMBERJACK);
Proxies.render.registerVillagerSkin(Constants.ID_VILLAGER_LUMBERJACK, Constants.TEXTURE_SKIN_LUMBERJACK);
VillagerRegistry.instance().registerVillageTradeHandler(Constants.ID_VILLAGER_LUMBERJACK, new VillageHandlerArboriculture());
}
}
@@ -323,7 +322,7 @@ public class PluginArboriculture extends ForestryPlugin {
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{EnumFruit.PAPAYA.getStack()}, Fluids.JUICE.getFluid(juiceMultiplier * 3), ForestryItem.mulch.getItemStack(), (int) Math.floor(mulchMultiplier * 0.5f));
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{EnumFruit.DATES.getStack()}, Fluids.JUICE.getFluid((int) Math.floor(juiceMultiplier * 0.25)), ForestryItem.mulch.getItemStack(), mulchMultiplier);
RecipeUtil.injectLeveledRecipe(ForestryItem.sapling.getItemStack(), GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(ForestryItem.sapling.getItemStack(), GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
}
// Stairs
@@ -426,20 +425,20 @@ public class PluginArboriculture extends ForestryPlugin {
}
private static void registerDungeonLoot() {
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.grafter.getItemStack(), 1, 1, 8));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(ForestryItem.grafter.getItemStack(), 1, 1, 8));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Oak.getMemberStack(EnumGermlingType.SAPLING), 2, 3, 6));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Spruce.getMemberStack(EnumGermlingType.SAPLING), 2, 3, 6));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Birch.getMemberStack(EnumGermlingType.SAPLING), 2, 3, 6));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Larch.getMemberStack(EnumGermlingType.SAPLING), 1, 2, 4));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Lime.getMemberStack(EnumGermlingType.SAPLING), 1, 2, 4));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Oak.getMemberStack(EnumGermlingType.SAPLING), 2, 3, 6));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Spruce.getMemberStack(EnumGermlingType.SAPLING), 2, 3, 6));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Birch.getMemberStack(EnumGermlingType.SAPLING), 2, 3, 6));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Larch.getMemberStack(EnumGermlingType.SAPLING), 1, 2, 4));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Lime.getMemberStack(EnumGermlingType.SAPLING), 1, 2, 4));
if (PluginManager.Module.APICULTURE.isEnabled()) {
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Oak.getMemberStack(EnumGermlingType.POLLEN), 2, 3, 4));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Spruce.getMemberStack(EnumGermlingType.POLLEN), 2, 3, 4));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Birch.getMemberStack(EnumGermlingType.POLLEN), 2, 3, 4));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Larch.getMemberStack(EnumGermlingType.POLLEN), 1, 2, 3));
ChestGenHooks.addItem(Defaults.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Lime.getMemberStack(EnumGermlingType.POLLEN), 1, 2, 3));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Oak.getMemberStack(EnumGermlingType.POLLEN), 2, 3, 4));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Spruce.getMemberStack(EnumGermlingType.POLLEN), 2, 3, 4));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Birch.getMemberStack(EnumGermlingType.POLLEN), 2, 3, 4));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Larch.getMemberStack(EnumGermlingType.POLLEN), 1, 2, 3));
ChestGenHooks.addItem(Constants.CHEST_GEN_HOOK_NATURALIST_CHEST, new WeightedRandomChestContent(TreeDefinition.Lime.getMemberStack(EnumGermlingType.POLLEN), 1, 2, 3));
}
}
@@ -27,17 +27,18 @@ import forestry.api.apiculture.FlowerManager;
import forestry.api.farming.Farmables;
import forestry.api.recipes.RecipeManagers;
import forestry.api.storage.BackpackManager;
import forestry.core.GameMode;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
import forestry.core.utils.RecipeUtil;
import forestry.core.recipes.RecipeUtil;
import forestry.core.utils.Log;
import forestry.farming.logic.FarmableBasicFruit;
import forestry.farming.logic.FarmableGenericCrop;
import forestry.farming.logic.FarmableGenericSapling;
@Plugin(pluginID = "BiomesOPlenty", name = "BiomesOPlenty", author = "Nirek", url = Defaults.URL, unlocalizedDescription = "for.plugin.biomesoplenty.description")
@Plugin(pluginID = "BiomesOPlenty", name = "BiomesOPlenty", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.biomesoplenty.description")
public class PluginBiomesOPlenty extends ForestryPlugin {
private static final String BoP = "BiomesOPlenty";
@@ -87,7 +88,7 @@ public class PluginBiomesOPlenty extends ForestryPlugin {
for (String key : saplingItemKeys) {
Item saplingItem = GameRegistry.findItem(BoP, key);
String saplingName = GameData.getItemRegistry().getNameForObject(saplingItem);
FMLInterModComms.sendMessage(Defaults.MOD, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName));
FMLInterModComms.sendMessage(Constants.MOD, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName));
}
if (saplings != null && persimmon != null) {
@@ -109,11 +110,11 @@ public class PluginBiomesOPlenty extends ForestryPlugin {
int saplingYield = GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling");
if (saplings != null) {
RecipeUtil.injectLeveledRecipe(new ItemStack(saplings, 1, OreDictionary.WILDCARD_VALUE), saplingYield, Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(new ItemStack(saplings, 1, OreDictionary.WILDCARD_VALUE), saplingYield, Fluids.BIOMASS);
}
if (colorizedSaplings != null) {
RecipeUtil.injectLeveledRecipe(new ItemStack(colorizedSaplings, 1, OreDictionary.WILDCARD_VALUE), saplingYield, Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(new ItemStack(colorizedSaplings, 1, OreDictionary.WILDCARD_VALUE), saplingYield, Fluids.BIOMASS);
}
}
@@ -211,7 +212,7 @@ public class PluginBiomesOPlenty extends ForestryPlugin {
ItemStack blockStack = new ItemStack(block, 1, OreDictionary.WILDCARD_VALUE);
BackpackManager.backpackItems[backpackId].add(blockStack);
} else {
Proxies.log.warning("Missing block: ", blockName);
Log.warning("Missing block: ", blockName);
}
}
}
@@ -14,14 +14,14 @@ import net.minecraftforge.fluids.Fluid;
import cpw.mods.fml.common.Optional;
import forestry.core.GameMode;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
import buildcraft.api.fuels.BuildcraftFuelRegistry;
@Plugin(pluginID = "BC6|Fuels", name = "BuildCraft 6 Fuels", author = "mezz", url = Defaults.URL, unlocalizedDescription = "for.plugin.buildcraft6.description")
@Plugin(pluginID = "BC6|Fuels", name = "BuildCraft 6 Fuels", author = "mezz", url = Constants.URL, unlocalizedDescription = "for.plugin.buildcraft6.description")
public class PluginBuildCraftFuels extends ForestryPlugin {
@Override
@@ -42,7 +42,7 @@ public class PluginBuildCraftFuels extends ForestryPlugin {
Fluid ethanol = Fluids.ETHANOL.getFluid();
if (ethanol != null) {
int ethanolPower = 40;
int ethanolBurnTime = Math.round(Defaults.ENGINE_CYCLE_DURATION_ETHANOL * GameMode.getGameMode().getFloatSetting("fuel.ethanol.combustion"));
int ethanolBurnTime = Math.round(Constants.ENGINE_CYCLE_DURATION_ETHANOL * GameMode.getGameMode().getFloatSetting("fuel.ethanol.combustion"));
BuildcraftFuelRegistry.fuel.addFuel(ethanol, ethanolPower, ethanolBurnTime);
}
}
@@ -12,13 +12,13 @@ package forestry.plugins;
import cpw.mods.fml.common.Optional;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
import buildcraft.api.recipes.BuildcraftRecipeRegistry;
@Plugin(pluginID = "BC6|Recipes", name = "BuildCraft 6 Recipes", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.buildcraft6.description")
@Plugin(pluginID = "BC6|Recipes", name = "BuildCraft 6 Recipes", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.buildcraft6.description")
public class PluginBuildCraftRecipes extends ForestryPlugin {
@Override
@@ -18,7 +18,7 @@ import net.minecraftforge.common.util.ForgeDirection;
import cpw.mods.fml.common.Optional;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.proxy.Proxies;
import buildcraft.api.statements.IStatementContainer;
@@ -27,7 +27,7 @@ import buildcraft.api.statements.ITriggerInternal;
import buildcraft.api.statements.ITriggerProvider;
import buildcraft.api.statements.StatementManager;
@Plugin(pluginID = "BC6|Statements", name = "BuildCraft 6 Statements", author = "mezz", url = Defaults.URL, unlocalizedDescription = "for.plugin.buildcraft6.description")
@Plugin(pluginID = "BC6|Statements", name = "BuildCraft 6 Statements", author = "mezz", url = Constants.URL, unlocalizedDescription = "for.plugin.buildcraft6.description")
@Optional.Interface(iface = "buildcraft.api.statements.ITriggerProvider", modid = "BuildCraftAPI|statements")
public class PluginBuildCraftStatements extends ForestryPlugin implements ITriggerProvider {
@@ -15,11 +15,12 @@ import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.registry.GameRegistry;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.proxy.Proxies;
import forestry.core.utils.Log;
@Plugin(pluginID = "BC6|Transport", name = "BuildCraft 6 Transport", author = "mezz", url = Defaults.URL, unlocalizedDescription = "for.plugin.buildcraft6.description")
@Plugin(pluginID = "BC6|Transport", name = "BuildCraft 6 Transport", author = "mezz", url = Constants.URL, unlocalizedDescription = "for.plugin.buildcraft6.description")
public class PluginBuildCraftTransport extends ForestryPlugin {
private static final String BCT = "BuildCraft|Transport";
@@ -42,7 +43,7 @@ public class PluginBuildCraftTransport extends ForestryPlugin {
if (pipeWaterproof != null) {
Proxies.common.addShapelessRecipe(new ItemStack(pipeWaterproof), beeswax);
} else {
Proxies.log.fine("No BuildCraft pipe waterproof found.");
Log.fine("No BuildCraft pipe waterproof found.");
}
}
}
@@ -14,10 +14,10 @@ import com.google.common.collect.ImmutableList;
import cpw.mods.fml.common.event.FMLInterModComms;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.proxy.Proxies;
@Plugin(pluginID = "Chisel", name = "Chisel", author = "Nirek", url = Defaults.URL, unlocalizedDescription = "for.plugin.chisel.description")
@Plugin(pluginID = "Chisel", name = "Chisel", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.chisel.description")
public class PluginChisel extends ForestryPlugin {
private static final String Chisel = "chisel";
@@ -43,7 +43,7 @@ public class PluginChisel extends ForestryPlugin {
"diorite"
);
for (String wBlocks : worldgenBlocks) {
FMLInterModComms.sendMessage(Defaults.MOD, "add-backpack-items", String.format("digger@%s:%s", Chisel, wBlocks));
FMLInterModComms.sendMessage(Constants.MOD, "add-backpack-items", String.format("digger@%s:%s", Chisel, wBlocks));
}
}
+23 -23
View File
@@ -32,9 +32,14 @@ import forestry.api.genetics.AlleleManager;
import forestry.api.storage.ICrateRegistry;
import forestry.api.storage.StorageManager;
import forestry.core.CreativeTabForestry;
import forestry.core.GameMode;
import forestry.core.IPickupHandler;
import forestry.core.ISaveEventHandler;
import forestry.core.PickupHandlerCore;
import forestry.core.SaveEventHandlerCore;
import forestry.core.blocks.BlockBase;
import forestry.core.blocks.BlockResourceOre;
import forestry.core.blocks.BlockResourceStorage;
import forestry.core.blocks.BlockSoil;
import forestry.core.circuits.CircuitRegistry;
import forestry.core.circuits.ItemCircuitBoard;
import forestry.core.circuits.ItemSolderingIron;
@@ -42,42 +47,37 @@ import forestry.core.commands.CommandPlugins;
import forestry.core.commands.CommandVersion;
import forestry.core.commands.RootCommand;
import forestry.core.config.Config;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
import forestry.core.gadgets.BlockBase;
import forestry.core.gadgets.BlockResource;
import forestry.core.gadgets.BlockResourceStorageBlock;
import forestry.core.gadgets.BlockSoil;
import forestry.core.gadgets.MachineDefinition;
import forestry.core.gadgets.TileEscritoire;
import forestry.core.genetics.ClimateHelper;
import forestry.core.config.GameMode;
import forestry.core.genetics.ItemResearchNote;
import forestry.core.genetics.alleles.Allele;
import forestry.core.genetics.alleles.AlleleFactory;
import forestry.core.genetics.alleles.AlleleHelper;
import forestry.core.genetics.alleles.AlleleRegistry;
import forestry.core.interfaces.IPickupHandler;
import forestry.core.interfaces.ISaveEventHandler;
import forestry.core.items.ItemArmorNaturalist;
import forestry.core.items.ItemAssemblyKit;
import forestry.core.items.ItemBlockForestry;
import forestry.core.items.ItemBlockTyped;
import forestry.core.items.ItemElectronTube;
import forestry.core.items.ItemForestry;
import forestry.core.items.ItemForestryBlock;
import forestry.core.items.ItemForestryPickaxe;
import forestry.core.items.ItemForestryShovel;
import forestry.core.items.ItemFruit;
import forestry.core.items.ItemMisc;
import forestry.core.items.ItemOverlay.OverlayInfo;
import forestry.core.items.ItemPipette;
import forestry.core.items.ItemTypedBlock;
import forestry.core.items.ItemWrench;
import forestry.core.proxy.Proxies;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.recipes.ShapelessRecipeCustom;
import forestry.core.tiles.MachineDefinition;
import forestry.core.tiles.TileEscritoire;
import forestry.core.utils.ClimateUtil;
import forestry.core.utils.ForestryModEnvWarningCallable;
import forestry.core.utils.ShapedRecipeCustom;
import forestry.core.utils.ShapelessRecipeCustom;
@Plugin(pluginID = "Core", name = "Core", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.core.description")
@Plugin(pluginID = "Core", name = "Core", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.core.description")
public class PluginCore extends ForestryPlugin {
private static MachineDefinition definitionEscritoire;
@@ -96,7 +96,7 @@ public class PluginCore extends ForestryPlugin {
AlleleRegistry alleleRegistry = new AlleleRegistry();
AlleleManager.alleleRegistry = alleleRegistry;
AlleleManager.climateHelper = new ClimateHelper();
AlleleManager.climateHelper = new ClimateUtil();
AlleleManager.alleleFactory = new AlleleFactory();
alleleRegistry.initialize();
}
@@ -110,23 +110,23 @@ public class PluginCore extends ForestryPlugin {
Allele.helper = alleleHelper = new AlleleHelper();
ForestryBlock.core.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "core");
ForestryBlock.core.registerBlock(new BlockBase(Material.iron, true), ItemBlockForestry.class, "core");
definitionEscritoire = ((BlockBase) ForestryBlock.core.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_ESCRITOIRE_META, "forestry.Escritoire", TileEscritoire.class,
definitionEscritoire = ((BlockBase) ForestryBlock.core.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_ESCRITOIRE_META, "forestry.Escritoire", TileEscritoire.class,
Proxies.render.getRenderEscritoire()));
ForestryBlock.soil.registerBlock(new BlockSoil(), ItemTypedBlock.class, "soil");
ForestryBlock.soil.registerBlock(new BlockSoil(), ItemBlockTyped.class, "soil");
ForestryBlock.soil.block().setHarvestLevel("shovel", 0, 0);
ForestryBlock.soil.block().setHarvestLevel("shovel", 0, 1);
ForestryBlock.resources.registerBlock(new BlockResource(), ItemForestryBlock.class, "resources");
ForestryBlock.resources.registerBlock(new BlockResourceOre(), ItemBlockForestry.class, "resources");
ForestryBlock.resources.block().setHarvestLevel("pickaxe", 1);
OreDictionary.registerOre("oreApatite", ForestryBlock.resources.getItemStack(1, 0));
OreDictionary.registerOre("oreCopper", ForestryBlock.resources.getItemStack(1, 1));
OreDictionary.registerOre("oreTin", ForestryBlock.resources.getItemStack(1, 2));
ForestryBlock.resourceStorage.registerBlock(new BlockResourceStorageBlock(), ItemForestryBlock.class, "resourceStorage");
ForestryBlock.resourceStorage.registerBlock(new BlockResourceStorage(), ItemBlockForestry.class, "resourceStorage");
ForestryBlock.resourceStorage.block().setHarvestLevel("pickaxe", 0);
OreDictionary.registerOre("blockApatite", ForestryBlock.resourceStorage.getItemStack(1, 0));
@@ -424,7 +424,7 @@ public class PluginCore extends ForestryPlugin {
Proxies.common.addRecipe(new ItemStack(Items.string), "#", "#", "#", '#', ForestryItem.craftingMaterial.getItemStack(1, 2));
// / Pipette
Proxies.common.addRecipe(ForestryItem.pipette.getItemStack(), " #", " X ", "X ", 'X', "paneGlass", '#', new ItemStack(Blocks.wool, 1, Defaults.WILDCARD));
Proxies.common.addRecipe(ForestryItem.pipette.getItemStack(), " #", " X ", "X ", 'X', "paneGlass", '#', new ItemStack(Blocks.wool, 1, Constants.WILDCARD));
// Storage Blocks
Proxies.common.addRecipe(ForestryBlock.resourceStorage.getItemStack(1, 0), "###", "###", "###", '#', "gemApatite");
@@ -6,12 +6,12 @@ import net.minecraftforge.fluids.Fluid;
import cpw.mods.fml.common.event.FMLInterModComms;
import forestry.core.GameMode;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
@Plugin(pluginID = "EnderIO", name = "EnderIO", author = "mezz", url = Defaults.URL, unlocalizedDescription = "for.plugin.enderIO.description")
@Plugin(pluginID = "EnderIO", name = "EnderIO", author = "mezz", url = Constants.URL, unlocalizedDescription = "for.plugin.enderIO.description")
public class PluginEnderIO extends ForestryPlugin {
private static final String EnderIO = "EnderIO";
@@ -38,7 +38,7 @@ public class PluginEnderIO extends ForestryPlugin {
public void doInit() {
Fluid ethanol = Fluids.ETHANOL.getFluid();
if (ethanol != null) {
int ethanolBurnTime = Math.round(Defaults.ENGINE_CYCLE_DURATION_ETHANOL * GameMode.getGameMode().getFloatSetting("fuel.ethanol.combustion"));
int ethanolBurnTime = Math.round(Constants.ENGINE_CYCLE_DURATION_ETHANOL * GameMode.getGameMode().getFloatSetting("fuel.ethanol.combustion"));
addFuel(ethanol, 40, ethanolBurnTime);
}
@@ -17,38 +17,38 @@ import net.minecraft.init.Items;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.network.IGuiHandler;
import forestry.core.GameMode;
import forestry.core.config.Defaults;
import forestry.core.blocks.BlockBase;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.gadgets.BlockBase;
import forestry.core.gadgets.MachineDefinition;
import forestry.core.items.ItemForestryBlock;
import forestry.core.utils.ShapedRecipeCustom;
import forestry.core.config.GameMode;
import forestry.core.items.ItemBlockForestry;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.tiles.MachineDefinition;
import forestry.energy.GuiHandlerEnergy;
import forestry.energy.gadgets.EngineBronze;
import forestry.energy.gadgets.EngineClockwork;
import forestry.energy.gadgets.EngineCopper;
import forestry.energy.gadgets.EngineDefinition;
import forestry.energy.proxy.ProxyEnergy;
import forestry.energy.tiles.EngineDefinition;
import forestry.energy.tiles.TileEngineBiogas;
import forestry.energy.tiles.TileEngineClockwork;
import forestry.energy.tiles.TileEnginePeat;
@Plugin(pluginID = "Energy", name = "Energy", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.energy.description")
@Plugin(pluginID = "Energy", name = "Energy", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.energy.description")
public class PluginEnergy extends ForestryPlugin {
@SidedProxy(clientSide = "forestry.energy.proxy.ClientProxyEnergy", serverSide = "forestry.energy.proxy.ProxyEnergy")
@SidedProxy(clientSide = "forestry.energy.proxy.ProxyEnergyClient", serverSide = "forestry.energy.proxy.ProxyEnergy")
public static ProxyEnergy proxy;
private static MachineDefinition definitionEngineCopper;
private static MachineDefinition definitionEngineBronze;
private static MachineDefinition definitionEnginePeat;
private static MachineDefinition definitionEngineBiogas;
private static MachineDefinition definitionEngineClockwork;
@Override
public void preInit() {
super.preInit();
ForestryBlock.engine.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "engine");
ForestryBlock.engine.registerBlock(new BlockBase(Material.iron, true), ItemBlockForestry.class, "engine");
definitionEngineCopper = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINECOPPER_META, "forestry.EngineCopper", EngineCopper.class,
PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_copper_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINECOPPER_META),
definitionEnginePeat = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Constants.DEFINITION_ENGINE_PEAT_META, "forestry.EngineCopper", TileEnginePeat.class,
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_copper_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_ENGINE_PEAT_META),
"###",
" X ",
"YVY",
@@ -56,9 +56,9 @@ public class PluginEnergy extends ForestryPlugin {
'X', "blockGlass",
'Y', "gearCopper",
'V', Blocks.piston)));
definitionEngineBronze = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINEBRONZE_META, "forestry.EngineBronze", EngineBronze.class,
PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_bronze_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINEBRONZE_META),
definitionEngineBiogas = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Constants.DEFINITION_ENGINE_BIOGAS_META, "forestry.EngineBronze", TileEngineBiogas.class,
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_bronze_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_ENGINE_BIOGAS_META),
"###",
" X ",
"YVY",
@@ -70,7 +70,7 @@ public class PluginEnergy extends ForestryPlugin {
ShapedRecipeCustom clockworkRecipe = null;
if (GameMode.getGameMode().getBooleanSetting("energy.engine.clockwork")) {
clockworkRecipe = ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINECLOCKWORK_META),
ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_ENGINE_CLOCKWORK_META),
"###",
" X ",
"ZVY",
@@ -81,16 +81,16 @@ public class PluginEnergy extends ForestryPlugin {
'V', Blocks.piston);
}
definitionEngineClockwork = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINECLOCKWORK_META, "forestry.EngineClockwork", EngineClockwork.class,
PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_clock_"), clockworkRecipe));
definitionEngineClockwork = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Constants.DEFINITION_ENGINE_CLOCKWORK_META, "forestry.EngineClockwork", TileEngineClockwork.class,
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_clock_"), clockworkRecipe));
}
@Override
public void doInit() {
super.doInit();
definitionEngineCopper.register();
definitionEngineBronze.register();
definitionEnginePeat.register();
definitionEngineBiogas.register();
definitionEngineClockwork.register();
}
@@ -16,12 +16,12 @@ import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.recipes.RecipeManagers;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
@Plugin(pluginID = "Erebus", name = "Erebus", author = "Nirek", url = Defaults.URL, unlocalizedDescription = "for.plugin.erebus.description")
@Plugin(pluginID = "Erebus", name = "Erebus", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.erebus.description")
public class PluginErebus extends ForestryPlugin {
private static final String EREBUS = "erebus";
@@ -40,9 +40,9 @@ public class PluginErebus extends ForestryPlugin {
protected void registerRecipes() {
super.registerRecipes();
Item materials = GameRegistry.findItem(EREBUS, "materials");
ItemStack honeyDrip = new ItemStack(materials,1,21);
ItemStack honeyDrip = new ItemStack(materials, 1, 21);
if (PluginManager.Module.FACTORY.isEnabled()) {
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{honeyDrip}, Fluids.HONEY.getFluid(Defaults.FLUID_PER_HONEY_DROP),
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{honeyDrip}, Fluids.HONEY.getFluid(Constants.FLUID_PER_HONEY_DROP),
ForestryItem.propolis.getItemStack(), 5);
}
@@ -23,14 +23,14 @@ import forestry.api.farming.Farmables;
import forestry.api.farming.IFarmable;
import forestry.core.circuits.Circuit;
import forestry.core.config.Config;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.proxy.Proxies;
import forestry.farming.circuits.CircuitFarmLogic;
import forestry.farming.logic.FarmLogicEnder;
import forestry.farming.logic.FarmableGenericCrop;
@Plugin(pluginID = "ExtraUtilities", name = "ExtraUtilities", author = "Nirek", url = Defaults.URL, unlocalizedDescription = "for.plugin.extrautilities.description")
@Plugin(pluginID = "ExtraUtilities", name = "ExtraUtilities", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.extrautilities.description")
public class PluginExtraUtilities extends ForestryPlugin {
private static final String ExU = "ExtraUtilities";
@@ -24,41 +24,42 @@ import cpw.mods.fml.common.network.IGuiHandler;
import forestry.api.circuits.ChipsetManager;
import forestry.api.circuits.ICircuitLayout;
import forestry.api.recipes.RecipeManagers;
import forestry.core.GameMode;
import forestry.core.blocks.BlockBase;
import forestry.core.circuits.Circuit;
import forestry.core.circuits.CircuitLayout;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.gadgets.BlockBase;
import forestry.core.gadgets.MachineDefinition;
import forestry.core.items.ItemForestryBlock;
import forestry.core.items.ItemNBTTile;
import forestry.core.items.ItemBlockForestry;
import forestry.core.items.ItemBlockNBT;
import forestry.core.network.IPacketHandler;
import forestry.core.proxy.Proxies;
import forestry.core.utils.RecipeUtil;
import forestry.core.utils.ShapedRecipeCustom;
import forestry.core.recipes.RecipeUtil;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.recipes.craftguide.CraftGuideIntegration;
import forestry.core.tiles.MachineDefinition;
import forestry.core.utils.Log;
import forestry.factory.DummyManagers;
import forestry.factory.GuiHandlerFactory;
import forestry.factory.circuits.CircuitSpeedUpgrade;
import forestry.factory.gadgets.MachineBottler;
import forestry.factory.gadgets.MachineCarpenter;
import forestry.factory.gadgets.MachineCentrifuge;
import forestry.factory.gadgets.MachineFabricator;
import forestry.factory.gadgets.MachineFermenter;
import forestry.factory.gadgets.MachineMoistener;
import forestry.factory.gadgets.MachineRaintank;
import forestry.factory.gadgets.MachineSqueezer;
import forestry.factory.gadgets.MachineStill;
import forestry.factory.gadgets.MillRainmaker;
import forestry.factory.gadgets.TileWorktable;
import forestry.factory.network.PacketHandlerFactory;
import forestry.factory.recipes.craftguide.CraftGuideIntegration;
import forestry.factory.tiles.TileBottler;
import forestry.factory.tiles.TileCarpenter;
import forestry.factory.tiles.TileCentrifuge;
import forestry.factory.tiles.TileFabricator;
import forestry.factory.tiles.TileFermenter;
import forestry.factory.tiles.TileMillRainmaker;
import forestry.factory.tiles.TileMoistener;
import forestry.factory.tiles.TileRaintank;
import forestry.factory.tiles.TileSqueezer;
import forestry.factory.tiles.TileStill;
import forestry.factory.tiles.TileWorktable;
import forestry.factory.triggers.FactoryTriggers;
@Plugin(pluginID = "Factory", name = "Factory", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.factory.description")
@Plugin(pluginID = "Factory", name = "Factory", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.factory.description")
public class PluginFactory extends ForestryPlugin {
private static MachineDefinition definitionBottler;
@@ -78,13 +79,13 @@ public class PluginFactory extends ForestryPlugin {
super.setupAPI();
RecipeManagers.craftingProviders = ImmutableList.of(
RecipeManagers.carpenterManager = new MachineCarpenter.RecipeManager(),
RecipeManagers.centrifugeManager = new MachineCentrifuge.RecipeManager(),
RecipeManagers.fabricatorManager = new MachineFabricator.RecipeManager(),
RecipeManagers.fermenterManager = new MachineFermenter.RecipeManager(),
RecipeManagers.moistenerManager = new MachineMoistener.RecipeManager(),
RecipeManagers.squeezerManager = new MachineSqueezer.RecipeManager(),
RecipeManagers.stillManager = new MachineStill.RecipeManager()
RecipeManagers.carpenterManager = new TileCarpenter.RecipeManager(),
RecipeManagers.centrifugeManager = new TileCentrifuge.RecipeManager(),
RecipeManagers.fabricatorManager = new TileFabricator.RecipeManager(),
RecipeManagers.fermenterManager = new TileFermenter.RecipeManager(),
RecipeManagers.moistenerManager = new TileMoistener.RecipeManager(),
RecipeManagers.squeezerManager = new TileSqueezer.RecipeManager(),
RecipeManagers.stillManager = new TileStill.RecipeManager()
);
}
@@ -112,13 +113,13 @@ public class PluginFactory extends ForestryPlugin {
public void preInit() {
super.preInit();
ForestryBlock.factoryTESR.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "factory");
ForestryBlock.factoryTESR.registerBlock(new BlockBase(Material.iron, true), ItemBlockForestry.class, "factory");
BlockBase factoryTESR = ((BlockBase) ForestryBlock.factoryTESR.block());
definitionBottler = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_BOTTLER_META, "forestry.Bottler", MachineBottler.class,
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/bottler_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_BOTTLER_META),
definitionBottler = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_BOTTLER_META, "forestry.Bottler", TileBottler.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/bottler_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_BOTTLER_META),
"X#X",
"#Y#",
"X#X",
@@ -126,9 +127,9 @@ public class PluginFactory extends ForestryPlugin {
'X', ForestryItem.canEmpty,
'Y', ForestryItem.sturdyCasing)));
definitionCarpenter = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_CARPENTER_META, "forestry.Carpenter", MachineCarpenter.class,
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/carpenter_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_CARPENTER_META),
definitionCarpenter = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_CARPENTER_META, "forestry.Carpenter", TileCarpenter.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/carpenter_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_CARPENTER_META),
"X#X",
"XYX",
"X#X",
@@ -136,9 +137,9 @@ public class PluginFactory extends ForestryPlugin {
'X', "ingotBronze",
'Y', ForestryItem.sturdyCasing)));
definitionCentrifuge = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_CENTRIFUGE_META, "forestry.Centrifuge", MachineCentrifuge.class,
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/centrifuge_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_CENTRIFUGE_META),
definitionCentrifuge = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_CENTRIFUGE_META, "forestry.Centrifuge", TileCentrifuge.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/centrifuge_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_CENTRIFUGE_META),
"X#X",
"XYX",
"X#X",
@@ -146,9 +147,9 @@ public class PluginFactory extends ForestryPlugin {
'X', "ingotCopper",
'Y', ForestryItem.sturdyCasing.getItemStack())));
definitionFermenter = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_FERMENTER_META, "forestry.Fermenter", MachineFermenter.class,
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/fermenter_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_FERMENTER_META),
definitionFermenter = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_FERMENTER_META, "forestry.Fermenter", TileFermenter.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/fermenter_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_FERMENTER_META),
"X#X",
"#Y#",
"X#X",
@@ -156,9 +157,9 @@ public class PluginFactory extends ForestryPlugin {
'X', "gearBronze",
'Y', ForestryItem.sturdyCasing)));
definitionMoistener = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_MOISTENER_META, "forestry.Moistener", MachineMoistener.class,
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/moistener_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_MOISTENER_META),
definitionMoistener = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_MOISTENER_META, "forestry.Moistener", TileMoistener.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/moistener_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_MOISTENER_META),
"X#X",
"#Y#",
"X#X",
@@ -166,9 +167,9 @@ public class PluginFactory extends ForestryPlugin {
'X', "gearCopper",
'Y', ForestryItem.sturdyCasing)));
definitionSqueezer = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_SQUEEZER_META, "forestry.Squeezer", MachineSqueezer.class,
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/squeezer_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_SQUEEZER_META),
definitionSqueezer = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_SQUEEZER_META, "forestry.Squeezer", TileSqueezer.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/squeezer_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_SQUEEZER_META),
"X#X",
"XYX",
"X#X",
@@ -176,9 +177,9 @@ public class PluginFactory extends ForestryPlugin {
'X', "ingotTin",
'Y', ForestryItem.sturdyCasing.getItemStack())));
definitionStill = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_STILL_META, "forestry.Still", MachineStill.class,
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/still_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_STILL_META),
definitionStill = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_STILL_META, "forestry.Still", TileStill.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/still_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_STILL_META),
"X#X",
"#Y#",
"X#X",
@@ -186,9 +187,9 @@ public class PluginFactory extends ForestryPlugin {
'X', "dustRedstone",
'Y', ForestryItem.sturdyCasing)));
definitionRainmaker = factoryTESR.addDefinition(new MachineDefinition(Defaults.DEFINITION_RAINMAKER_META, "forestry.Rainmaker", MillRainmaker.class,
Proxies.render.getRenderMill(Defaults.TEXTURE_PATH_BLOCKS + "/rainmaker_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Defaults.DEFINITION_RAINMAKER_META),
definitionRainmaker = factoryTESR.addDefinition(new MachineDefinition(Constants.DEFINITION_RAINMAKER_META, "forestry.Rainmaker", TileMillRainmaker.class,
Proxies.render.getRenderMill(Constants.TEXTURE_PATH_BLOCKS + "/rainmaker_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryTESR.getItemStack(1, Constants.DEFINITION_RAINMAKER_META),
"X#X",
"#Y#",
"X#X",
@@ -196,13 +197,13 @@ public class PluginFactory extends ForestryPlugin {
'X', "gearTin",
'Y', ForestryItem.hardenedCasing)));
ForestryBlock.factoryPlain.registerBlock(new BlockBase(Material.iron), ItemNBTTile.class, "factory2");
ForestryBlock.factoryPlain.registerBlock(new BlockBase(Material.iron), ItemBlockNBT.class, "factory2");
BlockBase factoryPlain = ((BlockBase) ForestryBlock.factoryPlain.block());
definitionFabricator = factoryPlain.addDefinition(new MachineDefinition(Defaults.DEFINITION_FABRICATOR_META, "forestry.Fabricator", MachineFabricator.class,
definitionFabricator = factoryPlain.addDefinition(new MachineDefinition(Constants.DEFINITION_FABRICATOR_META, "forestry.Fabricator", TileFabricator.class,
ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.factoryPlain.getItemStack(1, Defaults.DEFINITION_FABRICATOR_META),
ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_FABRICATOR_META),
"X#X",
"#Y#",
"XZX",
@@ -212,8 +213,8 @@ public class PluginFactory extends ForestryPlugin {
'Z', "chestWood"))
.setFaces(0, 1, 2, 3, 4, 4));
definitionRaintank = factoryPlain.addDefinition(new MachineDefinition(Defaults.DEFINITION_RAINTANK_META, "forestry.Raintank", MachineRaintank.class,
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.factoryPlain.getItemStack(1, Defaults.DEFINITION_RAINTANK_META),
definitionRaintank = factoryPlain.addDefinition(new MachineDefinition(Constants.DEFINITION_RAINTANK_META, "forestry.Raintank", TileRaintank.class,
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_RAINTANK_META),
"X#X",
"XYX",
"X#X",
@@ -222,8 +223,8 @@ public class PluginFactory extends ForestryPlugin {
'Y', ForestryItem.sturdyCasing))
.setFaces(0, 1, 0, 0, 0, 0));
definitionWorktable = factoryPlain.addDefinition(new MachineDefinition(Defaults.DEFINITION_WORKTABLE_META, "forestry.Worktable", TileWorktable.class,
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.factoryPlain.getItemStack(1, Defaults.DEFINITION_WORKTABLE_META),
definitionWorktable = factoryPlain.addDefinition(new MachineDefinition(Constants.DEFINITION_WORKTABLE_META, "forestry.Worktable", TileWorktable.class,
ShapedRecipeCustom.createShapedRecipe(ForestryBlock.factoryPlain.getItemStack(1, Constants.DEFINITION_WORKTABLE_META),
"B",
"W",
"C",
@@ -270,7 +271,7 @@ public class PluginFactory extends ForestryPlugin {
if (Proxies.common.isModLoaded("craftguide")) {
CraftGuideIntegration.register();
} else {
Proxies.log.info("Skipping CraftGuide integration.");
Log.info("Skipping CraftGuide integration.");
}
}
@@ -308,10 +309,10 @@ public class PluginFactory extends ForestryPlugin {
"dyeYellow", "dyeLightBlue", "dyeMagenta", "dyeOrange", "dyeWhite"};
if (PluginManager.Module.APICULTURE.isEnabled()) {
FluidStack liquidGlass = Fluids.GLASS.getFluid(Defaults.BUCKET_VOLUME);
FluidStack liquidGlass = Fluids.GLASS.getFluid(Constants.BUCKET_VOLUME);
for (int i = 0; i < 16; i++) {
RecipeManagers.fabricatorManager.addRecipe(ForestryItem.waxCast.getItemStack(1, Defaults.WILDCARD), liquidGlass, new ItemStack(Blocks.stained_glass, 4, 15 - i), new Object[]{"#", "X", '#', dyes[i],
'X', ForestryItem.propolis.getItemStack(1, Defaults.WILDCARD)});
RecipeManagers.fabricatorManager.addRecipe(ForestryItem.waxCast.getItemStack(1, Constants.WILDCARD), liquidGlass, new ItemStack(Blocks.stained_glass, 4, 15 - i), new Object[]{"#", "X", '#', dyes[i],
'X', ForestryItem.propolis.getItemStack(1, Constants.WILDCARD)});
}
}
@@ -331,8 +332,8 @@ public class PluginFactory extends ForestryPlugin {
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{new ItemStack(Items.snowball), ForestryItem.craftingMaterial.getItemStack(4, 5)}, Fluids.ICE.getFluid(4000));
// STILL
RecipeManagers.stillManager.addRecipe(Defaults.STILL_DESTILLATION_DURATION, Fluids.BIOMASS.getFluid(Defaults.STILL_DESTILLATION_INPUT),
Fluids.ETHANOL.getFluid(Defaults.STILL_DESTILLATION_OUTPUT));
RecipeManagers.stillManager.addRecipe(Constants.STILL_DESTILLATION_DURATION, Fluids.BIOMASS.getFluid(Constants.STILL_DESTILLATION_INPUT),
Fluids.ETHANOL.getFluid(Constants.STILL_DESTILLATION_OUTPUT));
// convert old honey to new honey
RecipeManagers.stillManager.addRecipe(1, Fluids.LEGACY_HONEY.getFluid(1000), Fluids.HONEY.getFluid(1000));
@@ -344,14 +345,14 @@ public class PluginFactory extends ForestryPlugin {
// FERMENTER
for (int i = 0; i < 6; i++) {
RecipeUtil.injectLeveledRecipe(new ItemStack(Blocks.sapling, 1, i), GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(new ItemStack(Blocks.sapling, 1, i), GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
}
RecipeUtil.injectLeveledRecipe(new ItemStack(Blocks.cactus), GameMode.getGameMode().getIntegerSetting("fermenter.yield.cactus"), Fluids.BIOMASS);
RecipeUtil.injectLeveledRecipe(new ItemStack(Items.wheat), GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
RecipeUtil.injectLeveledRecipe(new ItemStack(Items.reeds), GameMode.getGameMode().getIntegerSetting("fermenter.yield.cane"), Fluids.BIOMASS);
RecipeUtil.injectLeveledRecipe(new ItemStack(Blocks.brown_mushroom), GameMode.getGameMode().getIntegerSetting("fermenter.yield.mushroom"), Fluids.BIOMASS);
RecipeUtil.injectLeveledRecipe(new ItemStack(Blocks.red_mushroom), GameMode.getGameMode().getIntegerSetting("fermenter.yield.mushroom"), Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(new ItemStack(Blocks.cactus), GameMode.getGameMode().getIntegerSetting("fermenter.yield.cactus"), Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(new ItemStack(Items.wheat), GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(new ItemStack(Items.reeds), GameMode.getGameMode().getIntegerSetting("fermenter.yield.cane"), Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(new ItemStack(Blocks.brown_mushroom), GameMode.getGameMode().getIntegerSetting("fermenter.yield.mushroom"), Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(new ItemStack(Blocks.red_mushroom), GameMode.getGameMode().getIntegerSetting("fermenter.yield.mushroom"), Fluids.BIOMASS);
// FABRICATOR
@@ -366,7 +367,7 @@ public class PluginFactory extends ForestryPlugin {
"###",
'#', "logWood");
RecipeManagers.carpenterManager.addRecipe(50, Fluids.SEEDOIL.getFluid(500), null,
ForestryBlock.core.getItemStack(1, Defaults.DEFINITION_ESCRITOIRE_META),
ForestryBlock.core.getItemStack(1, Constants.DEFINITION_ESCRITOIRE_META),
"# ",
"###",
"# #",
@@ -37,17 +37,18 @@ import forestry.api.farming.Farmables;
import forestry.api.farming.IFarmable;
import forestry.core.circuits.Circuit;
import forestry.core.circuits.CircuitLayout;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
import forestry.core.items.ItemTypedBlock;
import forestry.core.proxy.Proxies;
import forestry.core.utils.ShapedRecipeCustom;
import forestry.core.items.ItemBlockTyped;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.utils.Log;
import forestry.farming.EventHandlerFarming;
import forestry.farming.GuiHandlerFarming;
import forestry.farming.blocks.BlockFarm;
import forestry.farming.blocks.BlockMushroom;
import forestry.farming.circuits.CircuitFarmLogic;
import forestry.farming.gadgets.BlockMushroom;
import forestry.farming.items.ItemFarmBlock;
import forestry.farming.items.ItemBlockFarm;
import forestry.farming.logic.FarmLogicArboreal;
import forestry.farming.logic.FarmLogicCereal;
import forestry.farming.logic.FarmLogicCocoa;
@@ -67,20 +68,19 @@ import forestry.farming.logic.FarmableGourd;
import forestry.farming.logic.FarmableStacked;
import forestry.farming.logic.FarmableVanillaSapling;
import forestry.farming.logic.FarmableVanillaShroom;
import forestry.farming.multiblock.BlockFarm;
import forestry.farming.multiblock.EnumFarmBlockTexture;
import forestry.farming.multiblock.TileControl;
import forestry.farming.multiblock.TileFarmPlain;
import forestry.farming.multiblock.TileGearbox;
import forestry.farming.multiblock.TileHatch;
import forestry.farming.multiblock.TileValve;
import forestry.farming.proxy.ProxyFarming;
import forestry.farming.render.EnumFarmBlockTexture;
import forestry.farming.tiles.TileControl;
import forestry.farming.tiles.TileFarmPlain;
import forestry.farming.tiles.TileGearbox;
import forestry.farming.tiles.TileHatch;
import forestry.farming.tiles.TileValve;
import forestry.farming.triggers.FarmingTriggers;
@Plugin(pluginID = "Farming", name = "Farming", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.farming.description")
@Plugin(pluginID = "Farming", name = "Farming", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.farming.description")
public class PluginFarming extends ForestryPlugin {
@SidedProxy(clientSide = "forestry.farming.proxy.ClientProxyFarming", serverSide = "forestry.farming.proxy.ProxyFarming")
@SidedProxy(clientSide = "forestry.farming.proxy.ProxyFarmingClient", serverSide = "forestry.farming.proxy.ProxyFarming")
public static ProxyFarming proxy;
public static int modelIdFarmBlock;
public static ItemStack farmFertilizer;
@@ -89,7 +89,7 @@ public class PluginFarming extends ForestryPlugin {
public void preInit() {
super.preInit();
ForestryBlock.mushroom.registerBlock(new BlockMushroom(), ItemTypedBlock.class, "mushroom");
ForestryBlock.mushroom.registerBlock(new BlockMushroom(), ItemBlockTyped.class, "mushroom");
Farmables.farmables.put("farmArboreal", new ArrayList<IFarmable>());
Farmables.farmables.get("farmArboreal").add(new FarmableVanillaSapling());
@@ -125,9 +125,9 @@ public class PluginFarming extends ForestryPlugin {
Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(new ItemStack(Items.potato), Blocks.potatoes, 7));
Farmables.farmables.get("farmVegetables").add(new FarmableGenericCrop(new ItemStack(Items.carrot), Blocks.carrots, 7));
ForestryBlock.farm.registerBlock(new BlockFarm(), ItemFarmBlock.class, "ffarm");
ForestryBlock.farm.registerBlock(new BlockFarm(), ItemBlockFarm.class, "ffarm");
/*Item.itemsList[ForestryBlock.farm] = null;
Item.itemsList[ForestryBlock.farm] = (new ItemFarmBlock(ForestryBlock.farm - 256, "ffarm"));*/
Item.itemsList[ForestryBlock.farm] = (new ItemBlockFarm(ForestryBlock.farm - 256, "ffarm"));*/
ForestryBlock.farm.block().setHarvestLevel("pickaxe", 0);
proxy.initializeRendering();
@@ -188,12 +188,12 @@ public class PluginFarming extends ForestryPlugin {
String[] tokens = message.getStringValue().split("@");
String errormsg = getInvalidIMCMessageText(message);
if (tokens.length != 2) {
Proxies.log.warning(errormsg);
Log.warning(errormsg);
return true;
}
if (!Farmables.farmables.containsKey(tokens[0])) {
Proxies.log.warning("%s For non-existent farm %s.", errormsg, tokens[0]);
Log.warning("%s For non-existent farm %s.", errormsg, tokens[0]);
return true;
}
@@ -203,7 +203,7 @@ public class PluginFarming extends ForestryPlugin {
Matcher matcher = Pattern.compile("(.+?)\\.(-?[0-9][0-9]?)(?:\\.(.+?)\\.(-?[0-9][0-9]?))?").matcher(itemString);
if (!matcher.matches()) {
Proxies.log.warning("%s For farm '%s': unable to parse string.", errormsg, tokens[0]);
Log.warning("%s For farm '%s': unable to parse string.", errormsg, tokens[0]);
return true;
}
@@ -233,7 +233,7 @@ public class PluginFarming extends ForestryPlugin {
farmables.add(new FarmableGenericSapling(sapling, saplingMeta, windfallStack));
}
} catch (Exception ex) {
Proxies.log.warning("%s for farm '%s': %s", errormsg, tokens[0], ex.getMessage());
Log.warning("%s for farm '%s': %s", errormsg, tokens[0], ex.getMessage());
}
return true;
@@ -242,18 +242,18 @@ public class PluginFarming extends ForestryPlugin {
String[] tokens = message.getStringValue().split("@");
String errormsg = getInvalidIMCMessageText(message);
if (tokens.length != 2) {
Proxies.log.warning(errormsg);
Log.warning(errormsg);
return true;
}
if (!Farmables.farmables.containsKey(tokens[0])) {
Proxies.log.warning("%s For non-existent farm %s.", errormsg, tokens[0]);
Log.warning("%s For non-existent farm %s.", errormsg, tokens[0]);
return true;
}
String[] items = tokens[1].split("[\\.]+");
if (items.length != 4) {
Proxies.log.warning("%s For farm '%s': id definitions did not match.", errormsg, tokens[0]);
Log.warning("%s For farm '%s': id definitions did not match.", errormsg, tokens[0]);
return true;
}
@@ -272,7 +272,7 @@ public class PluginFarming extends ForestryPlugin {
crop,
Integer.parseInt(items[3])));
} catch (Exception ex) {
Proxies.log.warning("%s for farm '%s': %s", errormsg, tokens[0], ex.getMessage());
Log.warning("%s for farm '%s': %s", errormsg, tokens[0], ex.getMessage());
}
return true;
@@ -35,19 +35,20 @@ import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.fuels.FuelManager;
import forestry.api.fuels.GeneratorFuel;
import forestry.core.GameMode;
import forestry.core.config.Config;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.config.GameMode;
import forestry.core.fluids.BlockForestryFluid;
import forestry.core.fluids.Fluids;
import forestry.core.fluids.LiquidRegistryHelper;
import forestry.core.items.ItemLiquidContainer;
import forestry.core.proxy.Proxies;
import forestry.core.utils.LiquidHelper;
import forestry.core.utils.Log;
import static forestry.core.items.ItemLiquidContainer.EnumContainerType;
@Plugin(pluginID = "Fluids", name = "Fluids", author = "mezz", url = Defaults.URL, unlocalizedDescription = "for.plugin.fluids.description")
@Plugin(pluginID = "Fluids", name = "Fluids", author = "mezz", url = Constants.URL, unlocalizedDescription = "for.plugin.fluids.description")
public class PluginFluids extends ForestryPlugin {
private static final List<Fluids> forestryFluidsWithBlocks = new ArrayList<Fluids>();
@@ -77,7 +78,7 @@ public class PluginFluids extends ForestryPlugin {
}
} else {
GameRegistry.UniqueIdentifier blockID = GameRegistry.findUniqueIdentifierFor(fluidBlock);
Proxies.log.severe("Pre-existing {0} fluid block detected, deferring to {1}:{2}, "
Log.severe("Pre-existing {0} fluid block detected, deferring to {1}:{2}, "
+ "this may cause issues if the server/client have different mod load orders, "
+ "recommended that you disable all but one instance of {0} fluid blocks via your configs.", fluid.getName(), blockID.modId, blockID.name);
}
@@ -135,11 +136,11 @@ public class PluginFluids extends ForestryPlugin {
continue;
}
LiquidHelper.injectLiquidContainer(fluidType, container.getItemStack());
LiquidRegistryHelper.registerLiquidContainer(fluidType, container.getItemStack());
}
for (ItemStack filledContainer : fluidType.getOtherContainers()) {
LiquidHelper.injectLiquidContainer(fluidType, filledContainer);
LiquidRegistryHelper.registerLiquidContainer(fluidType, filledContainer);
}
}
@@ -18,12 +18,12 @@ import net.minecraft.item.ItemStack;
import cpw.mods.fml.common.network.IGuiHandler;
import forestry.api.food.BeverageManager;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.fluids.Fluids;
import forestry.core.fluids.LiquidRegistryHelper;
import forestry.core.items.ItemForestryFood;
import forestry.core.proxy.Proxies;
import forestry.core.utils.LiquidHelper;
import forestry.food.BeverageEffect;
import forestry.food.GuiHandlerFood;
import forestry.food.items.ItemAmbrosia;
@@ -31,7 +31,7 @@ import forestry.food.items.ItemBeverage;
import forestry.food.items.ItemBeverage.BeverageInfo;
import forestry.food.items.ItemInfuser;
@Plugin(pluginID = "Food", name = "Food", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.food.description")
@Plugin(pluginID = "Food", name = "Food", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.food.description")
public class PluginFood extends ForestryPlugin {
@Override
@@ -68,7 +68,7 @@ public class PluginFood extends ForestryPlugin {
ItemStack meadBottle = ForestryItem.beverage.getItemStack();
BeverageInfo.saveEffects(meadBottle, Collections.singletonList(BeverageEffect.weakAlcoholic));
LiquidHelper.injectLiquidContainer(Fluids.SHORT_MEAD, Defaults.BUCKET_VOLUME, meadBottle, new ItemStack(Items.glass_bottle));
LiquidRegistryHelper.registerLiquidContainer(Fluids.SHORT_MEAD, Constants.BUCKET_VOLUME, meadBottle, new ItemStack(Items.glass_bottle));
}
@Override
@@ -20,15 +20,15 @@ import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.farming.Farmables;
import forestry.api.recipes.RecipeManagers;
import forestry.api.storage.BackpackManager;
import forestry.core.GameMode;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
import forestry.core.utils.RecipeUtil;
import forestry.core.recipes.RecipeUtil;
import forestry.farming.logic.FarmableBasicGrowthCraft;
@Plugin(pluginID = "Growthcraft", name = "Growthcraft", author = "Nirek", url = Defaults.URL, unlocalizedDescription = "for.plugin.growthcraft.description")
@Plugin(pluginID = "Growthcraft", name = "Growthcraft", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.growthcraft.description")
public class PluginGrowthCraft extends ForestryPlugin {
private static final String GC = "Growthcraft";
@@ -54,7 +54,7 @@ public class PluginGrowthCraft extends ForestryPlugin {
ItemStack hopSeed = GameRegistry.findItemStack("Growthcraft|Hops", "grc.hopSeeds", 1);
ItemStack riceSeed = GameRegistry.findItemStack("Growthcraft|Rice", "grc.rice", 1);
if ( appleSeed != null) {
if (appleSeed != null) {
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{appleSeed}, Fluids.SEEDOIL.getFluid(seedamount));
BackpackManager.backpackItems[2].add(appleSeed);
}
@@ -71,10 +71,10 @@ public class PluginGrowthCraft extends ForestryPlugin {
BackpackManager.backpackItems[2].add(riceSeed);
}
ItemStack hops = GameRegistry.findItemStack("Growthcraft|Hops","grc.hops", 1);
ItemStack hops = GameRegistry.findItemStack("Growthcraft|Hops", "grc.hops", 1);
if (hops != null) {
RecipeUtil.injectLeveledRecipe(hops, saplingYield, Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(hops, saplingYield, Fluids.BIOMASS);
BackpackManager.backpackItems[2].add(hops);
}
@@ -84,7 +84,7 @@ public class PluginGrowthCraft extends ForestryPlugin {
}
Block riceBlock = GameRegistry.findBlock("Growthcraft|Rice", "grc.riceBlock");
if (riceBlock != null) {
Farmables.farmables.get("farmOrchard").add(new FarmableBasicGrowthCraft(riceBlock, 7, true,false)); //need to set paddyfield to 7
Farmables.farmables.get("farmOrchard").add(new FarmableBasicGrowthCraft(riceBlock, 7, true, false)); //need to set paddyfield to 7
}
ItemStack emptyComb = new ItemStack(GameRegistry.findItem("Growthcraft|Bees", "grc.honeyComb"), 1, 0);
@@ -102,29 +102,29 @@ public class PluginGrowthCraft extends ForestryPlugin {
ItemStack bambooShoot = GameRegistry.findItemStack("Growthcraft|Bamboo", "grc.bambooShoot", 1);
ItemStack bambooShootFood = GameRegistry.findItemStack("Growthcraft|Bamboo", "grc.bambooShootFood", 1);
if (bamboo != null) {
RecipeUtil.injectLeveledRecipe(bamboo, saplingYield, Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(bamboo, saplingYield, Fluids.BIOMASS);
BackpackManager.backpackItems[2].add(bamboo);
}
if (bambooShoot != null) {
RecipeUtil.injectLeveledRecipe(bambooShoot, saplingYield, Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(bambooShoot, saplingYield, Fluids.BIOMASS);
BackpackManager.backpackItems[2].add(bambooShoot);
}
if (bambooShootFood != null) {
RecipeUtil.injectLeveledRecipe(bambooShootFood, saplingYield, Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(bambooShootFood, saplingYield, Fluids.BIOMASS);
BackpackManager.backpackItems[2].add(bambooShootFood);
}
ItemStack grapes = GameRegistry.findItemStack("Growthcraft|Grapes","grc.grapes",1); //squeeze
ItemStack grapes = GameRegistry.findItemStack("Growthcraft|Grapes", "grc.grapes", 1); //squeeze
if (grapes != null) {
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{grapes}, Fluids.JUICE.getFluid(juiceAmount));
}
Block grapeBlock = GameRegistry.findBlock("Growthcraft|Grapes","grc.grapeBlock");
Block grapeBlock = GameRegistry.findBlock("Growthcraft|Grapes", "grc.grapeBlock");
if (grapeBlock != null) {
Farmables.farmables.get("farmOrchard").add(new FarmableBasicGrowthCraft(grapeBlock, 0,false,true));
Farmables.farmables.get("farmOrchard").add(new FarmableBasicGrowthCraft(grapeBlock, 0, false, true));
}
ItemStack bambooLeaves = GameRegistry.findItemStack("Growthcraft|Bamboo","grc.bambooLeaves",1);
ItemStack bambooLeaves = GameRegistry.findItemStack("Growthcraft|Bamboo", "grc.bambooLeaves", 1);
if (bambooLeaves != null) {
BackpackManager.backpackItems[2].add(bambooLeaves);
}
@@ -22,16 +22,16 @@ import forestry.api.farming.Farmables;
import forestry.api.fuels.FuelManager;
import forestry.api.fuels.MoistenerFuel;
import forestry.api.recipes.RecipeManagers;
import forestry.core.GameMode;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
import forestry.core.utils.RecipeUtil;
import forestry.core.recipes.RecipeUtil;
import forestry.farming.logic.FarmableBasicFruit;
import forestry.farming.logic.FarmableGenericCrop;
@Plugin(pluginID = "HarvestCraft", name = "HarvestCraft", author = "Nirek", url = Defaults.URL, unlocalizedDescription = "for.plugin.harvestcraft.description")
@Plugin(pluginID = "HarvestCraft", name = "HarvestCraft", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.harvestcraft.description")
public class PluginHarvestCraft extends ForestryPlugin {
private static final String HC = "harvestcraft";
@@ -305,7 +305,7 @@ public class PluginHarvestCraft extends ForestryPlugin {
for (String plantName : plants.build()) {
ItemStack plant = GameRegistry.findItemStack(HC, plantName + "Item", 1);
if (plant != null) {
RecipeUtil.injectLeveledRecipe(plant, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(plant, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
}
}
@@ -338,7 +338,7 @@ public class PluginHarvestCraft extends ForestryPlugin {
ItemStack hcHoneyItem = GameRegistry.findItemStack(HC, "honeyItem", 1);
if (hcHoneyItem != null) {
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{hcHoneyItem}, Fluids.HONEY.getFluid(Defaults.FLUID_PER_HONEY_DROP));
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{hcHoneyItem}, Fluids.HONEY.getFluid(Constants.FLUID_PER_HONEY_DROP));
}
ItemStack hcBeeswaxItem = GameRegistry.findItemStack(HC, "beeswaxItem", 1);
+34 -33
View File
@@ -33,27 +33,28 @@ import forestry.api.storage.BackpackManager;
import forestry.api.storage.IBackpackDefinition;
import forestry.api.storage.ICrateRegistry;
import forestry.api.storage.StorageManager;
import forestry.core.GameMode;
import forestry.core.blocks.BlockBase;
import forestry.core.circuits.Circuit;
import forestry.core.circuits.CircuitLayout;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.gadgets.BlockBase;
import forestry.core.gadgets.MachineDefinition;
import forestry.core.fluids.LiquidRegistryHelper;
import forestry.core.proxy.Proxies;
import forestry.core.utils.LiquidHelper;
import forestry.core.utils.RecipeUtil;
import forestry.core.utils.ShapedRecipeCustom;
import forestry.core.utils.StackUtils;
import forestry.core.recipes.RecipeUtil;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.tiles.MachineDefinition;
import forestry.core.utils.ItemStackUtil;
import forestry.core.utils.Log;
import forestry.energy.circuits.CircuitElectricBoost;
import forestry.energy.circuits.CircuitElectricChoke;
import forestry.energy.circuits.CircuitElectricEfficiency;
import forestry.energy.circuits.CircuitFireDampener;
import forestry.energy.gadgets.EngineDefinition;
import forestry.energy.gadgets.EngineTin;
import forestry.energy.gadgets.MachineGenerator;
import forestry.energy.tiles.EngineDefinition;
import forestry.energy.tiles.TileEngineElectric;
import forestry.energy.tiles.TileGenerator;
import forestry.farming.circuits.CircuitFarmLogic;
import forestry.farming.logic.FarmLogicRubber;
@@ -61,14 +62,14 @@ import ic2.api.item.IC2Items;
import ic2.api.recipe.RecipeInputItemStack;
import ic2.api.recipe.Recipes;
@Plugin(pluginID = "IC2", name = "IndustrialCraft2", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.ic2.description")
@Plugin(pluginID = "IC2", name = "IndustrialCraft2", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.ic2.description")
public class PluginIC2 extends ForestryPlugin {
public static PluginIC2 instance;
// Forestry stuff
private static MachineDefinition definitionGenerator;
private static MachineDefinition definitionEngineTin;
private static MachineDefinition definitionEngineElectric;
// IC2 stuff
private static ItemStack plantBall;
@@ -119,9 +120,9 @@ public class PluginIC2 extends ForestryPlugin {
public void preInit() {
super.preInit();
definitionEngineTin = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Defaults.DEFINITION_ENGINETIN_META, "forestry.EngineTin", EngineTin.class,
PluginEnergy.proxy.getRenderDefaultEngine(Defaults.TEXTURE_PATH_BLOCKS + "/engine_tin_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_ENGINETIN_META),
definitionEngineElectric = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new EngineDefinition(Constants.DEFINITION_ENGINE_ELECTRIC_META, "forestry.EngineTin", TileEngineElectric.class,
PluginEnergy.proxy.getRenderDefaultEngine(Constants.TEXTURE_PATH_BLOCKS + "/engine_tin_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_ENGINE_ELECTRIC_META),
"###",
" X ",
"YVY",
@@ -130,9 +131,9 @@ public class PluginIC2 extends ForestryPlugin {
'Y', "gearTin",
'V', Blocks.piston)));
definitionGenerator = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new MachineDefinition(Defaults.DEFINITION_GENERATOR_META, "forestry.Generator", MachineGenerator.class,
Proxies.render.getRenderDefaultMachine(Defaults.TEXTURE_PATH_BLOCKS + "/generator_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Defaults.DEFINITION_GENERATOR_META),
definitionGenerator = ((BlockBase) ForestryBlock.engine.block()).addDefinition(new MachineDefinition(Constants.DEFINITION_GENERATOR_META, "forestry.Generator", TileGenerator.class,
Proxies.render.getRenderDefaultMachine(Constants.TEXTURE_PATH_BLOCKS + "/generator_"), ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.engine.getItemStack(1, Constants.DEFINITION_GENERATOR_META),
"X#X",
"XYX",
"X#X",
@@ -145,7 +146,7 @@ public class PluginIC2 extends ForestryPlugin {
lavaCell = IC2Items.getItem("lavaCell");
waterCell = IC2Items.getItem("waterCell");
} else {
Proxies.log.fine("IC2 empty cell could not be found. Skipped adding IC2 liquid containers.");
Log.fine("IC2 empty cell could not be found. Skipped adding IC2 liquid containers.");
}
// rubber chain
@@ -185,10 +186,10 @@ public class PluginIC2 extends ForestryPlugin {
Recipes.recyclerBlacklist.add(new RecipeInputItemStack(ForestryItem.beePrincessGE.getItemStack()));
}
} else {
Proxies.log.severe("IC2 Recipes.recyclerBlacklist not found.");
Log.severe("IC2 Recipes.recyclerBlacklist not found.");
}
definitionEngineTin.register();
definitionEngineElectric.register();
definitionGenerator.register();
Circuit.energyElectricChoke1 = new CircuitElectricChoke("electric.choke.1");
@@ -261,45 +262,45 @@ public class PluginIC2 extends ForestryPlugin {
}
if (plantBall != null) {
RecipeUtil.injectLeveledRecipe(plantBall, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat") * 9, Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(plantBall, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat") * 9, Fluids.BIOMASS);
}
if (compressedPlantBall != null) {
RecipeUtil.injectLeveledRecipe(compressedPlantBall, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat") * 9, Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(compressedPlantBall, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat") * 9, Fluids.BIOMASS);
}
if (resin != null) {
RecipeManagers.centrifugeManager.addRecipe(20, ForestryItem.propolis.getItemStack(), ImmutableMap.of(resin, 1.0f));
} else {
Proxies.log.fine("Missing IC2 resin, skipping centrifuge recipe for propolis to resin.");
Log.fine("Missing IC2 resin, skipping centrifuge recipe for propolis to resin.");
}
if (rubbersapling != null) {
RecipeUtil.injectLeveledRecipe(rubbersapling, GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(rubbersapling, GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
} else {
Proxies.log.fine("Missing IC2 rubber sapling, skipping fermenter recipe for converting rubber sapling to biomass.");
Log.fine("Missing IC2 rubber sapling, skipping fermenter recipe for converting rubber sapling to biomass.");
}
if (rubbersapling != null && resin != null) {
String saplingName = GameData.getBlockRegistry().getNameForObject(StackUtils.getBlock(rubbersapling));
String saplingName = GameData.getBlockRegistry().getNameForObject(ItemStackUtil.getBlock(rubbersapling));
String resinName = GameData.getItemRegistry().getNameForObject(resin.getItem());
String imc = String.format("farmArboreal@%s.%s.%s.%s",
saplingName, rubbersapling.getItemDamage(),
resinName, resin.getItemDamage());
Proxies.log.finest("Sending IMC '%s'.", imc);
FMLInterModComms.sendMessage(Defaults.MOD, "add-farmable-sapling", imc);
Log.finest("Sending IMC '%s'.", imc);
FMLInterModComms.sendMessage(Constants.MOD, "add-farmable-sapling", imc);
}
FluidStack biogas = FluidRegistry.getFluidStack("ic2biogas", 1000);
if (biogas != null && PluginManager.Module.ENERGY.isEnabled()) {
FuelManager.bronzeEngineFuel.put(biogas.getFluid(), new EngineBronzeFuel(Fluids.BIOMASS.getFluid(),
Defaults.ENGINE_FUEL_VALUE_BIOMASS, (int) ((Defaults.ENGINE_CYCLE_DURATION_BIOMASS * GameMode.getGameMode().getFloatSetting("fuel.biomass.biogas"))), 1));
Constants.ENGINE_FUEL_VALUE_BIOMASS, (int) ((Constants.ENGINE_CYCLE_DURATION_BIOMASS * GameMode.getGameMode().getFloatSetting("fuel.biomass.biogas"))), 1));
}
if (lavaCell != null) {
LiquidHelper.injectTinContainer(Fluids.LAVA, Defaults.BUCKET_VOLUME, lavaCell, emptyCell);
LiquidRegistryHelper.registerTinContainer(Fluids.LAVA, Constants.BUCKET_VOLUME, lavaCell, emptyCell);
}
if (waterCell != null) {
LiquidHelper.injectTinContainer(Fluids.WATER, Defaults.BUCKET_VOLUME, waterCell, emptyCell);
LiquidRegistryHelper.registerTinContainer(Fluids.WATER, Constants.BUCKET_VOLUME, waterCell, emptyCell);
ItemStack bogEarthCan = GameMode.getGameMode().getStackSetting("recipe.output.bogearth.can");
if (bogEarthCan.stackSize > 0) {
@@ -17,13 +17,13 @@ import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.farming.Farmables;
import forestry.api.recipes.RecipeManagers;
import forestry.core.GameMode;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
import forestry.farming.logic.FarmableGenericCrop;
@Plugin(pluginID = "ImmersiveEngineering", name = "ImmersiveEngineering", author = "Nirek", url = Defaults.URL, unlocalizedDescription = "for.plugin.immersiveengineering.description")
@Plugin(pluginID = "ImmersiveEngineering", name = "ImmersiveEngineering", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.immersiveengineering.description")
public class PluginImmersiveEngineering extends ForestryPlugin {
private static final String ImEng = "ImmersiveEngineering";
@@ -33,26 +33,24 @@ import forestry.api.genetics.IClassification.EnumClassLevel;
import forestry.api.lepidopterology.EnumFlutterType;
import forestry.api.lepidopterology.IButterflyRoot;
import forestry.api.recipes.RecipeManagers;
import forestry.core.config.Defaults;
import forestry.core.blocks.BlockBase;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
import forestry.core.config.LocalizedConfiguration;
import forestry.core.fluids.Fluids;
import forestry.core.gadgets.BlockBase;
import forestry.core.gadgets.MachineDefinition;
import forestry.core.genetics.Branch;
import forestry.core.genetics.alleles.Allele;
import forestry.core.items.ItemForestryBlock;
import forestry.core.proxy.Proxies;
import forestry.core.items.ItemBlockForestry;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.render.RenderNaturalistChest;
import forestry.core.utils.ShapedRecipeCustom;
import forestry.core.utils.Utils;
import forestry.core.tiles.MachineDefinition;
import forestry.core.utils.EntityUtil;
import forestry.core.utils.Log;
import forestry.lepidopterology.ButterflySpawner;
import forestry.lepidopterology.GuiHandlerLepidopterology;
import forestry.lepidopterology.MatingRecipe;
import forestry.lepidopterology.commands.CommandButterfly;
import forestry.lepidopterology.entities.EntityButterfly;
import forestry.lepidopterology.gadgets.TileLepidopteristChest;
import forestry.lepidopterology.genetics.AlleleButterflySpecies;
import forestry.lepidopterology.genetics.AlleleEffectNone;
import forestry.lepidopterology.genetics.ButterflyHelper;
@@ -60,11 +58,13 @@ import forestry.lepidopterology.genetics.ButterflyTemplates;
import forestry.lepidopterology.items.ItemButterflyGE;
import forestry.lepidopterology.items.ItemFlutterlyzer;
import forestry.lepidopterology.proxy.ProxyLepidopterology;
import forestry.lepidopterology.recipes.MatingRecipe;
import forestry.lepidopterology.tiles.TileLepidopteristChest;
@Plugin(pluginID = "Lepidopterology", name = "Lepidopterology", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.lepidopterology.description")
@Plugin(pluginID = "Lepidopterology", name = "Lepidopterology", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.lepidopterology.description")
public class PluginLepidopterology extends ForestryPlugin {
@SidedProxy(clientSide = "forestry.lepidopterology.proxy.ClientProxyLepidopterology", serverSide = "forestry.lepidopterology.proxy.ProxyLepidopterology")
@SidedProxy(clientSide = "forestry.lepidopterology.proxy.ProxyLepidopterologyClient", serverSide = "forestry.lepidopterology.proxy.ProxyLepidopterology")
public static ProxyLepidopterology proxy;
private static final String CONFIG_CATEGORY = "lepidopterology";
public static int spawnConstraint = 100;
@@ -84,7 +84,7 @@ public class PluginLepidopterology extends ForestryPlugin {
@Override
public void preInit() {
ForestryBlock.lepidopterology.registerBlock(new BlockBase(Material.iron, true), ItemForestryBlock.class, "lepidopterology");
ForestryBlock.lepidopterology.registerBlock(new BlockBase(Material.iron, true), ItemBlockForestry.class, "lepidopterology");
ForestryBlock.lepidopterology.block().setCreativeTab(Tabs.tabLepidopterology);
createAlleles();
@@ -110,7 +110,7 @@ public class PluginLepidopterology extends ForestryPlugin {
final String oldConfigRenamed = CONFIG_CATEGORY + ".conf.old";
File oldConfigFileRenamed = new File(Forestry.instance.getConfigFolder(), oldConfigRenamed);
if (oldConfigFile.renameTo(oldConfigFileRenamed)) {
Proxies.log.info("Migrated " + CONFIG_CATEGORY + " settings to the new file '" + newConfig + "' and renamed '" + oldConfig + "' to '" + oldConfigRenamed + "'.");
Log.info("Migrated " + CONFIG_CATEGORY + " settings to the new file '" + newConfig + "' and renamed '" + oldConfig + "' to '" + oldConfigRenamed + "'.");
}
}
@@ -118,20 +118,20 @@ public class PluginLepidopterology extends ForestryPlugin {
PluginCore.rootCommand.addChildCommand(new CommandButterfly());
Utils.registerEntity(EntityButterfly.class, "butterflyGE", 0, 0x000000, 0xffffff, 50, 1, true);
EntityUtil.registerEntity(EntityButterfly.class, "butterflyGE", 0, 0x000000, 0xffffff, 50, 1, true);
proxy.initializeRendering();
registerTemplates();
BlockBase lepidopterology = ((BlockBase) ForestryBlock.lepidopterology.block());
MachineDefinition definitionChest = lepidopterology.addDefinition(new MachineDefinition(Defaults.DEFINITION_LEPICHEST_META, "forestry.LepiChest", TileLepidopteristChest.class, new RenderNaturalistChest("lepichest"),
MachineDefinition definitionChest = lepidopterology.addDefinition(new MachineDefinition(Constants.DEFINITION_LEPICHEST_META, "forestry.LepiChest", TileLepidopteristChest.class, new RenderNaturalistChest("lepichest"),
ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.lepidopterology.getItemStack(1, Defaults.DEFINITION_LEPICHEST_META),
ForestryBlock.lepidopterology.getItemStack(1, Constants.DEFINITION_LEPICHEST_META),
" # ",
"XYX",
"XXX",
'#', "blockGlass",
'X', ForestryItem.butterflyGE.getItemStack(1, Defaults.WILDCARD),
'X', ForestryItem.butterflyGE.getItemStack(1, Constants.WILDCARD),
'Y', "chestWood"))
.setBoundingBox(0.0625F, 0.0F, 0.0625F, 0.9375F, 0.875F, 0.9375F));
definitionChest.register();
@@ -20,15 +20,15 @@ import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.farming.Farmables;
import forestry.api.recipes.RecipeManagers;
import forestry.core.GameMode;
import forestry.core.config.Config;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
import forestry.core.utils.RecipeUtil;
import forestry.core.recipes.RecipeUtil;
import forestry.farming.logic.FarmableGenericCrop;
@Plugin(pluginID = "MagicalCrops", name = "MagicalCrops", author = "Nirek", url = Defaults.URL, unlocalizedDescription = "for.plugin.magicalcrops.description")
@Plugin(pluginID = "MagicalCrops", name = "MagicalCrops", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.magicalcrops.description")
public class PluginMagicalCrops extends ForestryPlugin {
private static final String MagCrop = "magicalcrops";
@@ -233,8 +233,8 @@ public class PluginMagicalCrops extends ForestryPlugin {
Item cropProduce = GameRegistry.findItem(MagCrop, MagCrop + "_CropProduce");
if (cropProduce != null) {
int juiceAmount = GameMode.getGameMode().getIntegerSetting("squeezer.liquid.apple");
ItemStack produce = new ItemStack(GameRegistry.findItem(MagCrop, MagCrop + "_CropProduce"), 1, Defaults.WILDCARD);
RecipeUtil.injectLeveledRecipe(produce, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
ItemStack produce = new ItemStack(GameRegistry.findItem(MagCrop, MagCrop + "_CropProduce"), 1, Constants.WILDCARD);
RecipeUtil.addFermenterRecipes(produce, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
RecipeManagers.squeezerManager.addRecipe(10, new ItemStack[]{produce}, Fluids.JUICE.getFluid(juiceAmount));
}
}
@@ -249,8 +249,9 @@ public class PluginMagicalCrops extends ForestryPlugin {
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(seed, crop, 7));
}
}
private static void addBetaRecipes(String seedSuffix, String cropSuffix, String name) {
ItemStack seed = GameRegistry.findItemStack(MagCrop, MagCrop +"_"+ name + seedSuffix, 1);
ItemStack seed = GameRegistry.findItemStack(MagCrop, MagCrop + "_" + name + seedSuffix, 1);
Block crop = GameRegistry.findBlock(MagCrop, MagCrop + "_" + name + cropSuffix);
if (seed != null && crop != null && Config.isMagicalCropsSupportEnabled()) {
Farmables.farmables.get("farmWheat").add(new FarmableGenericCrop(seed, crop, 7));
+19 -19
View File
@@ -21,18 +21,18 @@ import forestry.api.mail.EnumAddressee;
import forestry.api.mail.EnumPostage;
import forestry.api.mail.PostManager;
import forestry.api.recipes.RecipeManagers;
import forestry.core.ISaveEventHandler;
import forestry.core.blocks.BlockBase;
import forestry.core.config.Config;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
import forestry.core.fluids.Fluids;
import forestry.core.gadgets.BlockBase;
import forestry.core.gadgets.MachineDefinition;
import forestry.core.interfaces.ISaveEventHandler;
import forestry.core.items.ItemForestryBlock;
import forestry.core.items.ItemBlockForestry;
import forestry.core.network.IPacketHandler;
import forestry.core.proxy.Proxies;
import forestry.core.utils.ShapedRecipeCustom;
import forestry.core.recipes.ShapedRecipeCustom;
import forestry.core.tiles.MachineDefinition;
import forestry.mail.GuiHandlerMail;
import forestry.mail.PacketHandlerMail;
import forestry.mail.PostRegistry;
@@ -40,16 +40,16 @@ import forestry.mail.PostalCarrier;
import forestry.mail.SaveEventHandlerMail;
import forestry.mail.TickHandlerMailClient;
import forestry.mail.commands.CommandMail;
import forestry.mail.gadgets.MachineMailbox;
import forestry.mail.gadgets.MachinePhilatelist;
import forestry.mail.gadgets.MachineTrader;
import forestry.mail.items.ItemCatalogue;
import forestry.mail.items.ItemLetter;
import forestry.mail.items.ItemStamps;
import forestry.mail.items.ItemStamps.StampInfo;
import forestry.mail.tiles.TileMailbox;
import forestry.mail.tiles.TilePhilatelist;
import forestry.mail.tiles.TileTrader;
import forestry.mail.triggers.MailTriggers;
@Plugin(pluginID = "Mail", name = "Mail", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.mail.description")
@Plugin(pluginID = "Mail", name = "Mail", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.mail.description")
public class PluginMail extends ForestryPlugin {
private static MachineDefinition definitionMailbox;
@@ -74,9 +74,9 @@ public class PluginMail extends ForestryPlugin {
new TickHandlerMailClient();
ForestryBlock.mail.registerBlock(new BlockBase(Material.iron), ItemForestryBlock.class, "mail");
ForestryBlock.mail.registerBlock(new BlockBase(Material.iron), ItemBlockForestry.class, "mail");
ShapedRecipeCustom recipe = ShapedRecipeCustom.createShapedRecipe(ForestryBlock.mail.getItemStack(1, Defaults.DEFINITION_MAILBOX_META),
ShapedRecipeCustom recipe = ShapedRecipeCustom.createShapedRecipe(ForestryBlock.mail.getItemStack(1, Constants.DEFINITION_MAILBOX_META),
" # ", "#Y#", "XXX",
'#', "ingotTin",
'X', "chestWood",
@@ -84,10 +84,10 @@ public class PluginMail extends ForestryPlugin {
BlockBase mail = ((BlockBase) ForestryBlock.mail.block());
definitionMailbox = mail.addDefinition(new MachineDefinition(Defaults.DEFINITION_MAILBOX_META, "forestry.Mailbox", MachineMailbox.class, recipe).setFaces(0, 1, 2, 2, 2, 2, 0, 7));
definitionMailbox = mail.addDefinition(new MachineDefinition(Constants.DEFINITION_MAILBOX_META, "forestry.Mailbox", TileMailbox.class, recipe).setFaces(0, 1, 2, 2, 2, 2, 0, 7));
recipe = ShapedRecipeCustom.createShapedRecipe(
ForestryBlock.mail.getItemStack(1, Defaults.DEFINITION_TRADESTATION_META),
ForestryBlock.mail.getItemStack(1, Constants.DEFINITION_TRADESTATION_META),
"Z#Z",
"#Y#",
"XWX",
@@ -96,9 +96,9 @@ public class PluginMail extends ForestryPlugin {
'Y', ForestryItem.sturdyCasing,
'Z', ForestryItem.tubes.getItemStack(1, 3),
'W', ForestryItem.circuitboards.getItemStack(1, 2));
definitionTradestation = mail.addDefinition(new MachineDefinition(Defaults.DEFINITION_TRADESTATION_META, "forestry.Tradestation", MachineTrader.class, recipe).setFaces(0, 1, 2, 3, 4, 4, 0, 7));
definitionTradestation = mail.addDefinition(new MachineDefinition(Constants.DEFINITION_TRADESTATION_META, "forestry.Tradestation", TileTrader.class, recipe).setFaces(0, 1, 2, 3, 4, 4, 0, 7));
definitionPhilatelist = mail.addDefinition(new MachineDefinition(Defaults.DEFINITION_PHILATELIST_META, "forestry.Philatelist", MachinePhilatelist.class)
definitionPhilatelist = mail.addDefinition(new MachineDefinition(Constants.DEFINITION_PHILATELIST_META, "forestry.Philatelist", TilePhilatelist.class)
.setFaces(0, 1, 2, 3, 2, 2, 0, 7));
}
@@ -154,7 +154,7 @@ public class PluginMail extends ForestryPlugin {
Item stampGlue;
if (PluginManager.Module.APICULTURE.isEnabled()) {
Proxies.common.addShapelessRecipe(ForestryItem.letters.getItemStack(), Items.paper, ForestryItem.propolis.getItemStack(1, Defaults.WILDCARD));
Proxies.common.addShapelessRecipe(ForestryItem.letters.getItemStack(), Items.paper, ForestryItem.propolis.getItemStack(1, Constants.WILDCARD));
stampGlue = ForestryItem.honeyDrop.item();
} else {
Proxies.common.addShapelessRecipe(ForestryItem.letters.getItemStack(), Items.paper, Items.slime_ball);
@@ -180,12 +180,12 @@ public class PluginMail extends ForestryPlugin {
}
// Recycling
Proxies.common.addRecipe(new ItemStack(Items.paper), "###", '#', ForestryItem.letters.getItemStack(1, Defaults.WILDCARD));
Proxies.common.addRecipe(new ItemStack(Items.paper), "###", '#', ForestryItem.letters.getItemStack(1, Constants.WILDCARD));
// Carpenter
RecipeManagers.carpenterManager.addRecipe(10, Fluids.WATER.getFluid(250), null, ForestryItem.letters.getItemStack(), "###", "###", '#', ForestryItem.woodPulp);
Proxies.common.addShapelessRecipe(ForestryItem.catalogue.getItemStack(), ForestryItem.stamps.getItemStack(1, Defaults.WILDCARD), new ItemStack(Items.book));
Proxies.common.addShapelessRecipe(ForestryItem.catalogue.getItemStack(), ForestryItem.stamps.getItemStack(1, Constants.WILDCARD), new ItemStack(Items.book));
}
@Override
@@ -39,11 +39,11 @@ import cpw.mods.fml.common.registry.GameRegistry;
import forestry.Forestry;
import forestry.api.core.ForestryAPI;
import forestry.core.interfaces.IPickupHandler;
import forestry.core.interfaces.IResupplyHandler;
import forestry.core.interfaces.ISaveEventHandler;
import forestry.core.IPickupHandler;
import forestry.core.IResupplyHandler;
import forestry.core.ISaveEventHandler;
import forestry.core.network.IPacketHandler;
import forestry.core.proxy.Proxies;
import forestry.core.utils.Log;
public class PluginManager {
@@ -144,7 +144,7 @@ public class PluginManager {
}
private static void registerHandlers(ForestryPlugin plugin) {
Proxies.log.fine("Registering Handlers for Plugin: {0}", plugin);
Log.fine("Registering Handlers for Plugin: {0}", plugin);
IGuiHandler guiHandler = plugin.getGuiHandler();
if (guiHandler != null) {
@@ -196,13 +196,13 @@ public class PluginManager {
}
if (!isEnabled(config, m)) {
it.remove();
Proxies.log.info("Module disabled: {0}", m);
Log.info("Module disabled: {0}", m);
continue;
}
ForestryPlugin plugin = m.instance;
if (!plugin.isAvailable()) {
it.remove();
Proxies.log.info("Module {0} failed to load: {1}", plugin, plugin.getFailMessage());
Log.info("Module {0} failed to load: {1}", plugin, plugin.getFailMessage());
continue;
}
}
@@ -217,7 +217,7 @@ public class PluginManager {
if (!toLoad.containsAll(deps)) {
it.remove();
changed = true;
Proxies.log.warning("Module {0} is missing dependencies: {1}", m, deps);
Log.warning("Module {0} is missing dependencies: {1}", m, deps);
continue;
}
}
@@ -243,17 +243,17 @@ public class PluginManager {
for (Module m : loadedModules) {
ForestryPlugin plugin = m.instance;
Proxies.log.fine("Setup Start: {0}", plugin);
Log.fine("Setup Start: {0}", plugin);
plugin.setupAPI();
Proxies.log.fine("Setup Complete: {0}", plugin);
Log.fine("Setup Complete: {0}", plugin);
}
stage = Stage.SETUP_DISABLED;
for (Module m : unloadedModules) {
ForestryPlugin plugin = m.instance;
Proxies.log.fine("Disabled-Setup Start: {0}", plugin);
Log.fine("Disabled-Setup Start: {0}", plugin);
plugin.disabledSetupAPI();
Proxies.log.fine("Disabled-Setup Complete: {0}", plugin);
Log.fine("Disabled-Setup Complete: {0}", plugin);
}
}
@@ -261,7 +261,7 @@ public class PluginManager {
stage = Stage.PRE_INIT;
for (Module m : loadedModules) {
ForestryPlugin plugin = m.instance;
Proxies.log.fine("Pre-Init Start: {0}", plugin);
Log.fine("Pre-Init Start: {0}", plugin);
registerHandlers(plugin);
plugin.preInit();
plugin.registerItems();
@@ -272,7 +272,7 @@ public class PluginManager {
plugin.registerBackpackItems();
plugin.registerCrates();
}
Proxies.log.fine("Pre-Init Complete: {0}", plugin);
Log.fine("Pre-Init Complete: {0}", plugin);
}
}
@@ -280,10 +280,10 @@ public class PluginManager {
stage = Stage.INIT;
for (Module m : loadedModules) {
ForestryPlugin plugin = m.instance;
Proxies.log.fine("Init Start: {0}", plugin);
Log.fine("Init Start: {0}", plugin);
plugin.doInit();
plugin.registerRecipes();
Proxies.log.fine("Init Complete: {0}", plugin);
Log.fine("Init Complete: {0}", plugin);
}
}
@@ -291,9 +291,9 @@ public class PluginManager {
stage = Stage.POST_INIT;
for (Module m : loadedModules) {
ForestryPlugin plugin = m.instance;
Proxies.log.fine("Post-Init Start: {0}", plugin);
Log.fine("Post-Init Start: {0}", plugin);
plugin.postInit();
Proxies.log.fine("Post-Init Complete: {0}", plugin);
Log.fine("Post-Init Complete: {0}", plugin);
}
stage = Stage.FINISHED;
@@ -28,15 +28,15 @@ import forestry.api.fuels.MoistenerFuel;
import forestry.api.recipes.RecipeManagers;
import forestry.api.storage.ICrateRegistry;
import forestry.api.storage.StorageManager;
import forestry.core.GameMode;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.ForestryItem;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
import forestry.core.utils.RecipeUtil;
import forestry.core.recipes.RecipeUtil;
import forestry.farming.logic.FarmableGenericCrop;
@Plugin(pluginID = "Natura", name = "Natura", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.natura.description")
@Plugin(pluginID = "Natura", name = "Natura", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.natura.description")
public class PluginNatura extends ForestryPlugin {
private static final String NATURA = "Natura";
@@ -89,11 +89,11 @@ public class PluginNatura extends ForestryPlugin {
for (String key : saplingItemKeys) {
Item saplingItem = GameRegistry.findItem(NATURA, key);
ItemStack saplingWild = new ItemStack(saplingItem, 1, Defaults.WILDCARD);
RecipeUtil.injectLeveledRecipe(saplingWild, GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
ItemStack saplingWild = new ItemStack(saplingItem, 1, Constants.WILDCARD);
RecipeUtil.addFermenterRecipes(saplingWild, GameMode.getGameMode().getIntegerSetting("fermenter.yield.sapling"), Fluids.BIOMASS);
String saplingName = GameData.getItemRegistry().getNameForObject(saplingItem);
FMLInterModComms.sendMessage(Defaults.MOD, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName));
FMLInterModComms.sendMessage(Constants.MOD, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName));
}
berryBlight = GameRegistry.findItemStack(NATURA, "berryBlight", 1);
@@ -255,7 +255,7 @@ public class PluginNatura extends ForestryPlugin {
}
if (itemBarley != null) {
RecipeUtil.injectLeveledRecipe(itemBarley, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(itemBarley, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
if (GameMode.getGameMode().getStackSetting("recipe.output.compost.wheat").stackSize > 0) {
ItemStack compostWheat = GameMode.getGameMode().getStackSetting("recipe.output.compost.wheat");
Proxies.common.addRecipe(compostWheat, " X ", "X#X", " X ", '#', Blocks.dirt, 'X', itemBarley);
@@ -23,16 +23,16 @@ import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.apiculture.FlowerManager;
import forestry.api.farming.Farmables;
import forestry.api.recipes.RecipeManagers;
import forestry.core.GameMode;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
import forestry.core.utils.RecipeUtil;
import forestry.core.recipes.RecipeUtil;
import forestry.farming.logic.FarmableBasicFruit;
import forestry.farming.logic.FarmableGenericCrop;
import forestry.farming.logic.FarmableStacked;
@Plugin(pluginID = "PlantMegaPack", name = "PlantMegaPack", author = "Nirek", url = Defaults.URL, unlocalizedDescription = "for.plugin.plantmegapack.description")
@Plugin(pluginID = "PlantMegaPack", name = "PlantMegaPack", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.plantmegapack.description")
public class PluginPlantMegaPack extends ForestryPlugin {
private static final String PlantMP = "plantmegapack";
@@ -362,7 +362,7 @@ public class PluginPlantMegaPack extends ForestryPlugin {
Block reedBlock = GameRegistry.findBlock(PlantMP, reedLike);
ItemStack reedStack = GameRegistry.findItemStack(PlantMP, reedLike, 1);
if (reedBlock != null && reedStack != null) {
RecipeUtil.injectLeveledRecipe(reedStack, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(reedStack, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
Farmables.farmables.get("farmPoales").add(new FarmableStacked(reedBlock, 14, 4));
}
}
@@ -433,7 +433,7 @@ public class PluginPlantMegaPack extends ForestryPlugin {
for (String wPlant : waterPlant) {
ItemStack waterPlantStack = GameRegistry.findItemStack(PlantMP, wPlant, 1);
if (waterPlantStack != null) {
RecipeUtil.injectLeveledRecipe(waterPlantStack, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
RecipeUtil.addFermenterRecipes(waterPlantStack, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
}
}
}
@@ -57,21 +57,22 @@ import forestry.api.storage.BackpackManager;
import forestry.api.storage.EnumBackpackType;
import forestry.api.storage.IBackpackDefinition;
import forestry.api.storage.StorageManager;
import forestry.core.config.Defaults;
import forestry.core.IPickupHandler;
import forestry.core.IResupplyHandler;
import forestry.core.config.Constants;
import forestry.core.config.ForestryBlock;
import forestry.core.config.ForestryItem;
import forestry.core.config.LocalizedConfiguration;
import forestry.core.fluids.Fluids;
import forestry.core.interfaces.IPickupHandler;
import forestry.core.interfaces.IResupplyHandler;
import forestry.core.items.ItemCrated;
import forestry.core.network.GuiId;
import forestry.core.proxy.Proxies;
import forestry.core.utils.StackUtils;
import forestry.core.utils.ItemStackUtil;
import forestry.core.utils.Log;
import forestry.core.utils.StringUtil;
import forestry.factory.gadgets.MachineCarpenter;
import forestry.factory.tiles.TileCarpenter;
import forestry.storage.BackpackDefinition;
import forestry.storage.BackpackHelper;
import forestry.storage.BackpackInterface;
import forestry.storage.CrateRegistry;
import forestry.storage.GuiHandlerStorage;
import forestry.storage.PickupHandlerStorage;
@@ -81,13 +82,13 @@ import forestry.storage.items.ItemNaturalistBackpack.BackpackDefinitionApiarist;
import forestry.storage.items.ItemNaturalistBackpack.BackpackDefinitionLepidopterist;
import forestry.storage.proxy.ProxyStorage;
@Plugin(pluginID = "Storage", name = "Storage", author = "SirSengir", url = Defaults.URL, unlocalizedDescription = "for.plugin.storage.description")
@Plugin(pluginID = "Storage", name = "Storage", author = "SirSengir", url = Constants.URL, unlocalizedDescription = "for.plugin.storage.description")
public class PluginStorage extends ForestryPlugin {
private static final List<ItemCrated> crates = new ArrayList<ItemCrated>();
private static final String CONFIG_CATEGORY = "backpacks";
@SidedProxy(clientSide = "forestry.storage.proxy.ClientProxyStorage", serverSide = "forestry.storage.proxy.ProxyStorage")
@SidedProxy(clientSide = "forestry.storage.proxy.ProxyStorageClient", serverSide = "forestry.storage.proxy.ProxyStorage")
public static ProxyStorage proxy;
private final ArrayList<ItemStack> minerItems = new ArrayList<ItemStack>();
private final ArrayList<ItemStack> diggerItems = new ArrayList<ItemStack>();
@@ -103,7 +104,7 @@ public class PluginStorage extends ForestryPlugin {
StorageManager.crateRegistry = new CrateRegistry();
BackpackManager.backpackInterface = new BackpackHelper();
BackpackManager.backpackInterface = new BackpackInterface();
BackpackManager.backpackItems = new ArrayList[6];
@@ -162,7 +163,7 @@ public class PluginStorage extends ForestryPlugin {
final String oldConfigRenamed = CONFIG_CATEGORY + ".conf.old";
File oldConfigFileRenamed = new File(Forestry.instance.getConfigFolder(), oldConfigRenamed);
if (oldConfigFile.renameTo(oldConfigFileRenamed)) {
Proxies.log.info("Migrated " + CONFIG_CATEGORY + " settings to the new file '" + newConfig + "' and renamed '" + oldConfig + "' to '" + oldConfigRenamed + "'.");
Log.info("Migrated " + CONFIG_CATEGORY + " settings to the new file '" + newConfig + "' and renamed '" + oldConfig + "' to '" + oldConfigRenamed + "'.");
}
}
@@ -235,7 +236,7 @@ public class PluginStorage extends ForestryPlugin {
}
private static void old_parseBackpackItems(String list, IBackpackDefinition backpackDefinition) {
List<ItemStack> backpackItems = StackUtils.parseItemStackStrings(list, 0);
List<ItemStack> backpackItems = ItemStackUtil.parseItemStackStrings(list, 0);
backpackDefinition.addValidItems(backpackItems);
}
@@ -313,7 +314,7 @@ public class PluginStorage extends ForestryPlugin {
digger.addValidOreDictNames(diggerOreDictNames);
digger.addValidItems(Arrays.asList(
new ItemStack(Blocks.dirt, 1, Defaults.WILDCARD),
new ItemStack(Blocks.dirt, 1, Constants.WILDCARD),
new ItemStack(Blocks.gravel),
new ItemStack(Items.flint),
new ItemStack(Blocks.netherrack),
@@ -332,7 +333,7 @@ public class PluginStorage extends ForestryPlugin {
new ItemStack(Blocks.red_flower),
new ItemStack(Blocks.yellow_flower),
new ItemStack(Blocks.cactus),
new ItemStack(Blocks.tallgrass, 1, Defaults.WILDCARD),
new ItemStack(Blocks.tallgrass, 1, Constants.WILDCARD),
new ItemStack(Blocks.vine),
new ItemStack(Blocks.pumpkin),
new ItemStack(Blocks.melon_block),
@@ -367,7 +368,7 @@ public class PluginStorage extends ForestryPlugin {
new ItemStack(Items.slime_ball),
new ItemStack(Items.dye, 1, 0),
new ItemStack(Blocks.hay_block),
new ItemStack(Blocks.wool, 1, Defaults.WILDCARD),
new ItemStack(Blocks.wool, 1, Constants.WILDCARD),
new ItemStack(Items.ender_eye),
new ItemStack(Items.magma_cream),
new ItemStack(Items.speckled_melon),
@@ -387,13 +388,13 @@ public class PluginStorage extends ForestryPlugin {
new ItemStack(Blocks.torch),
new ItemStack(Blocks.redstone_torch),
new ItemStack(Blocks.redstone_lamp),
new ItemStack(Blocks.stonebrick, 1, Defaults.WILDCARD),
new ItemStack(Blocks.stonebrick, 1, Constants.WILDCARD),
new ItemStack(Blocks.sandstone, 1, 1),
new ItemStack(Blocks.sandstone, 1, 2),
new ItemStack(Blocks.brick_block),
new ItemStack(Blocks.clay),
new ItemStack(Blocks.hardened_clay, 1, Defaults.WILDCARD),
new ItemStack(Blocks.stained_hardened_clay, 1, Defaults.WILDCARD),
new ItemStack(Blocks.hardened_clay, 1, Constants.WILDCARD),
new ItemStack(Blocks.stained_hardened_clay, 1, Constants.WILDCARD),
new ItemStack(Blocks.packed_ice),
new ItemStack(Blocks.nether_brick),
new ItemStack(Blocks.crafting_table),
@@ -403,7 +404,7 @@ public class PluginStorage extends ForestryPlugin {
new ItemStack(Blocks.dropper),
new ItemStack(Blocks.ladder),
new ItemStack(Blocks.iron_bars),
new ItemStack(Blocks.quartz_block, 1, Defaults.WILDCARD),
new ItemStack(Blocks.quartz_block, 1, Constants.WILDCARD),
new ItemStack(Items.sign),
new ItemStack(Items.item_frame)
));
@@ -429,7 +430,7 @@ public class PluginStorage extends ForestryPlugin {
backpackConf.comment = StringUtil.localizeAndFormat("config.backpacks.item.stacks.format", backpackName);
String[] backpackItemList = backpackConf.getStringList();
backpackItems = StackUtils.parseItemStackStrings(backpackItemList, OreDictionary.WILDCARD_VALUE);
backpackItems = ItemStackUtil.parseItemStackStrings(backpackItemList, OreDictionary.WILDCARD_VALUE);
}
{
@@ -464,7 +465,7 @@ public class PluginStorage extends ForestryPlugin {
}
public static void createCrateRecipes() {
MachineCarpenter.RecipeManager carpenterManager = (MachineCarpenter.RecipeManager) RecipeManagers.carpenterManager;
TileCarpenter.RecipeManager carpenterManager = (TileCarpenter.RecipeManager) RecipeManagers.carpenterManager;
for (ItemCrated crate : crates) {
ItemStack itemStack = new ItemStack(crate);
if (crate.usesOreDict()) {
@@ -486,12 +487,12 @@ public class PluginStorage extends ForestryPlugin {
if (!BackpackManager.definitions.containsKey(tokens[0])) {
String errorMessage = getInvalidIMCMessageText(message);
Proxies.log.warning("%s For non-existent backpack %s.", errorMessage, tokens[0]);
Log.warning("%s For non-existent backpack %s.", errorMessage, tokens[0]);
return true;
}
IBackpackDefinition backpackDefinition = BackpackManager.definitions.get(tokens[0]);
List<ItemStack> itemStacks = StackUtils.parseItemStackStrings(tokens[1], 0);
List<ItemStack> itemStacks = ItemStackUtil.parseItemStackStrings(tokens[1], 0);
backpackDefinition.addValidItems(itemStacks);
return true;
@@ -571,7 +572,7 @@ public class PluginStorage extends ForestryPlugin {
'#', Blocks.wool,
'X', Items.string,
'V', "stickWood",
'Y', ForestryBlock.apicultureChest.getItemStack(1, Defaults.DEFINITION_APIARISTCHEST_META));
'Y', ForestryBlock.apicultureChest.getItemStack(1, Constants.DEFINITION_APIARISTCHEST_META));
}
if (PluginManager.Module.LEPIDOPTEROLOGY.isEnabled()) {
@@ -583,7 +584,7 @@ public class PluginStorage extends ForestryPlugin {
'#', Blocks.wool,
'X', Items.string,
'V', "stickWood",
'Y', ForestryBlock.lepidopterology.getItemStack(1, Defaults.DEFINITION_LEPICHEST_META));
'Y', ForestryBlock.lepidopterology.getItemStack(1, Constants.DEFINITION_LEPICHEST_META));
}
// Miner's Backpack
@@ -26,15 +26,15 @@ import cpw.mods.fml.common.registry.GameRegistry;
import forestry.api.apiculture.FlowerManager;
import forestry.api.farming.Farmables;
import forestry.api.recipes.RecipeManagers;
import forestry.core.GameMode;
import forestry.core.config.Defaults;
import forestry.core.config.Constants;
import forestry.core.config.GameMode;
import forestry.core.fluids.Fluids;
import forestry.core.proxy.Proxies;
import forestry.core.utils.RecipeUtil;
import forestry.core.recipes.RecipeUtil;
import forestry.farming.logic.FarmableBasicFruit;
import forestry.farming.logic.FarmableGenericCrop;
@Plugin(pluginID = "Witchery", name = "Witchery", author = "Nirek", url = Defaults.URL, unlocalizedDescription = "for.plugin.witchery.description")
@Plugin(pluginID = "Witchery", name = "Witchery", author = "Nirek", url = Constants.URL, unlocalizedDescription = "for.plugin.witchery.description")
public class PluginWitchery extends ForestryPlugin {
private static final String Witch = "witchery";
@@ -72,10 +72,10 @@ public class PluginWitchery extends ForestryPlugin {
int seedamount = GameMode.getGameMode().getIntegerSetting("squeezer.liquid.seed");
Item saplingItem = GameRegistry.findItem(Witch, "witchsapling");
ItemStack saplingStack = new ItemStack(saplingItem, 1, Defaults.WILDCARD);
RecipeUtil.injectLeveledRecipe(saplingStack, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
ItemStack saplingStack = new ItemStack(saplingItem, 1, Constants.WILDCARD);
RecipeUtil.addFermenterRecipes(saplingStack, GameMode.getGameMode().getIntegerSetting("fermenter.yield.wheat"), Fluids.BIOMASS);
String saplingName = GameData.getItemRegistry().getNameForObject(saplingItem);
FMLInterModComms.sendMessage(Defaults.MOD, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName));
FMLInterModComms.sendMessage(Constants.MOD, "add-farmable-sapling", String.format("farmArboreal@%s.-1", saplingName));
for (String flowerAcceptName : flowersAccept) {
Block flowerBlock = GameRegistry.findBlock(Witch, flowerAcceptName);