Remove most deprecated things

This commit is contained in:
mezz committed 2016-02-25 04:45:19 -08:00
1 parent 65436a4e70
commit 78d836bc1f
31 files changed
+53 -475

No files matched your search

@@ -57,8 +57,6 @@ import forestry.api.core.ForestryAPI;
import forestry.api.genetics.AlleleManager;
import forestry.api.genetics.IClassification;
import forestry.api.genetics.IClassification.EnumClassLevel;
import forestry.api.genetics.IFlower;
import forestry.api.genetics.IFlowerRegistry;
import forestry.api.recipes.RecipeManagers;
import forestry.api.storage.ICrateRegistry;
import forestry.api.storage.StorageManager;
@@ -72,6 +70,7 @@ import forestry.apiculture.blocks.BlockTypeApicultureTesr;
import forestry.apiculture.commands.CommandBee;
import forestry.apiculture.entities.EntityMinecartApiary;
import forestry.apiculture.entities.EntityMinecartBeehouse;
import forestry.apiculture.flowers.Flower;
import forestry.apiculture.flowers.FlowerRegistry;
import forestry.apiculture.genetics.BeeBranchDefinition;
import forestry.apiculture.genetics.BeeDefinition;
@@ -227,7 +226,9 @@ public class PluginApiculture extends BlankForestryPlugin {
String acceptedFlowerMessage = StringUtil.localize("config.beekeeping.flowers.accepted.comment");
String plantableFlowerMessage = StringUtil.localize("config.beekeeping.flowers.plantable.comment");
for (String flowerType : FlowerManager.flowerRegistry.getFlowerTypes()) {
FlowerRegistry flowerRegistry = (FlowerRegistry) FlowerManager.flowerRegistry;
for (String flowerType : flowerRegistry.getFlowerTypes()) {
String[] defaultAccepted = defaultAcceptedFlowers.get(flowerType);
if (defaultAccepted == null) {
defaultAccepted = Constants.EMPTY_STRINGS;
@@ -244,7 +245,7 @@ public class PluginApiculture extends BlankForestryPlugin {
property.comment = plantableFlowerMessage;
parsePlantableFlowers(property, flowerType);
Set<IFlower> acceptableFlowers = FlowerManager.flowerRegistry.getAcceptableFlowers(flowerType);
Set<Flower> acceptableFlowers = flowerRegistry.getAcceptableFlowers(flowerType);
if (acceptableFlowers == null || acceptableFlowers.size() == 0) {
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.");
}
@@ -315,7 +316,7 @@ public class PluginApiculture extends BlankForestryPlugin {
private void setDefaultsForConfig() {
IFlowerRegistry flowerRegistry = FlowerManager.flowerRegistry;
FlowerRegistry flowerRegistry = (FlowerRegistry) FlowerManager.flowerRegistry;
// Register acceptable plants
flowerRegistry.registerAcceptableFlower(Blocks.dragon_egg, FlowerManager.FlowerTypeEnd);
@@ -342,12 +343,12 @@ public class PluginApiculture extends BlankForestryPlugin {
flowerRegistry.registerPlantableFlower(Blocks.red_mushroom, 0, 1.0, FlowerManager.FlowerTypeMushrooms);
flowerRegistry.registerPlantableFlower(Blocks.cactus, 0, 1.0, FlowerManager.FlowerTypeCacti);
for (String flowerType : FlowerManager.flowerRegistry.getFlowerTypes()) {
Set<IFlower> flowers = FlowerManager.flowerRegistry.getAcceptableFlowers(flowerType);
for (String flowerType : flowerRegistry.getFlowerTypes()) {
Set<Flower> flowers = flowerRegistry.getAcceptableFlowers(flowerType);
List<String> acceptedFlowerNames = new ArrayList<>();
List<String> plantableFlowerNames = new ArrayList<>();
if (flowers != null) {
for (IFlower flower : flowers) {
for (Flower flower : flowers) {
String name = ItemStackUtil.getBlockNameFromRegistryAsSting(flower.getBlock());
if (name == null) {
Log.severe("Could not find name for flower: " + flower + " with type: " + flowerType);
@@ -10,8 +10,6 @@
******************************************************************************/
package forestry.plugins;
import com.google.common.collect.ImmutableList;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
@@ -29,7 +27,6 @@ import forestry.api.fuels.FermenterFuel;
import forestry.api.fuels.FuelManager;
import forestry.api.fuels.MoistenerFuel;
import forestry.api.fuels.RainSubstrate;
import forestry.api.recipes.ICraftingProvider;
import forestry.api.recipes.RecipeManagers;
import forestry.apiculture.items.ItemRegistryApiculture;
import forestry.core.blocks.BlockSoil;
@@ -69,32 +66,28 @@ public class PluginFactory extends BlankForestryPlugin {
@Override
public void setupAPI() {
RecipeManagers.craftingProviders = ImmutableList.<ICraftingProvider>of(
RecipeManagers.carpenterManager = new CarpenterRecipeManager(),
RecipeManagers.centrifugeManager = new CentrifugeRecipeManager(),
RecipeManagers.fabricatorManager = new FabricatorRecipeManager(),
RecipeManagers.fabricatorSmeltingManager = new FabricatorSmeltingRecipeManager(),
RecipeManagers.fermenterManager = new FermenterRecipeManager(),
RecipeManagers.moistenerManager = new MoistenerRecipeManager(),
RecipeManagers.squeezerManager = new SqueezerRecipeManager(),
RecipeManagers.stillManager = new StillRecipeManager()
);
RecipeManagers.carpenterManager = new CarpenterRecipeManager();
RecipeManagers.centrifugeManager = new CentrifugeRecipeManager();
RecipeManagers.fabricatorManager = new FabricatorRecipeManager();
RecipeManagers.fabricatorSmeltingManager = new FabricatorSmeltingRecipeManager();
RecipeManagers.fermenterManager = new FermenterRecipeManager();
RecipeManagers.moistenerManager = new MoistenerRecipeManager();
RecipeManagers.squeezerManager = new SqueezerRecipeManager();
RecipeManagers.stillManager = new StillRecipeManager();
setupFuelManager();
}
@Override
public void disabledSetupAPI() {
RecipeManagers.craftingProviders = ImmutableList.<ICraftingProvider>of(
RecipeManagers.carpenterManager = new DummyManagers.DummyCarpenterManager(),
RecipeManagers.centrifugeManager = new DummyManagers.DummyCentrifugeManager(),
RecipeManagers.fabricatorManager = new DummyManagers.DummyFabricatorManager(),
RecipeManagers.fabricatorSmeltingManager = new DummyManagers.DummyFabricatorSmeltingManager(),
RecipeManagers.fermenterManager = new DummyManagers.DummyFermenterManager(),
RecipeManagers.moistenerManager = new DummyManagers.DummyMoistenerManager(),
RecipeManagers.squeezerManager = new DummyManagers.DummySqueezerManager(),
RecipeManagers.stillManager = new DummyManagers.DummyStillManager()
);
RecipeManagers.carpenterManager = new DummyManagers.DummyCarpenterManager();
RecipeManagers.centrifugeManager = new DummyManagers.DummyCentrifugeManager();
RecipeManagers.fabricatorManager = new DummyManagers.DummyFabricatorManager();
RecipeManagers.fabricatorSmeltingManager = new DummyManagers.DummyFabricatorSmeltingManager();
RecipeManagers.fermenterManager = new DummyManagers.DummyFermenterManager();
RecipeManagers.moistenerManager = new DummyManagers.DummyMoistenerManager();
RecipeManagers.squeezerManager = new DummyManagers.DummySqueezerManager();
RecipeManagers.stillManager = new DummyManagers.DummyStillManager();
setupFuelManager();
}