mirror of
https://github.com/GTNewHorizons/ForestryMC.git
synced 2026-11-19 03:39:09 +00:00
Fixes #369 The Solding Iron and other Cicruit stuff should no longer crash if no layouts are defined.
The fix kind of grew out of control because I had to add a new EnumErrorCode and didn't want to keep breaking the API every time I did that. So I needed to decouple the ErrorStates from EnumErrorCode.
This commit is contained in:
1 parent
364ed4cf53
commit
ccdcce47cc
46 files changed
+336
-141
No files matched your search
@@ -23,10 +23,12 @@ import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeekeepingLogic;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.IErrorState;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.proxy.ProxyLog;
|
||||
import forestry.plugins.PluginApiculture;
|
||||
|
||||
public class BeekeepingLogic implements IBeekeepingLogic {
|
||||
@@ -261,7 +263,7 @@ public class BeekeepingLogic implements IBeekeepingLogic {
|
||||
try {
|
||||
boolean canWork = true;
|
||||
// Not while raining, at night or without light
|
||||
EnumErrorCode state = queen.canWork(housing);
|
||||
IErrorState state = queen.canWork(housing);
|
||||
if (state != EnumErrorCode.OK) {
|
||||
housing.setErrorState(state);
|
||||
canWork = false;
|
||||
@@ -270,6 +272,7 @@ public class BeekeepingLogic implements IBeekeepingLogic {
|
||||
}
|
||||
return canWork;
|
||||
} catch (Error e) {
|
||||
Proxies.log.logErrorAPI("Forestry", e, IBee.class);
|
||||
return queenCanWorkDeprecated();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,10 +18,11 @@ import forestry.api.apiculture.IBeeListener;
|
||||
import forestry.api.apiculture.IBeeModifier;
|
||||
import forestry.api.apiculture.IBeekeepingLogic;
|
||||
import forestry.api.core.BiomeHelper;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.IErrorState;
|
||||
import forestry.api.core.ISpecialInventory;
|
||||
import forestry.api.core.ITileStructure;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
@@ -424,7 +425,7 @@ public class TileAlvearyPlain extends TileAlveary implements ISidedInventory, IS
|
||||
|
||||
@Override
|
||||
public int getErrorOrdinal() {
|
||||
return getErrorState().ordinal();
|
||||
return getErrorState().getID();
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -803,7 +804,7 @@ public class TileAlvearyPlain extends TileAlveary implements ISidedInventory, IS
|
||||
|
||||
/* IERRORSOURCE */
|
||||
@Override
|
||||
public EnumErrorCode getErrorState() {
|
||||
public IErrorState getErrorState() {
|
||||
if (hasMaster()) {
|
||||
ITileStructure tile = this.getCentralTE();
|
||||
if (tile != null)
|
||||
|
||||
@@ -15,7 +15,7 @@ import forestry.api.apiculture.IBee;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeekeepingLogic;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
@@ -351,7 +351,7 @@ public class TileBeehouse extends TileBase implements IBeeHousing, IClimatised {
|
||||
|
||||
@Override
|
||||
public int getErrorOrdinal() {
|
||||
return getErrorState().ordinal();
|
||||
return getErrorState().getID();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -16,7 +16,7 @@ import forestry.api.apiculture.IAlleleBeeEffect;
|
||||
import forestry.api.apiculture.IBeeGenome;
|
||||
import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.genetics.Allele;
|
||||
import forestry.core.genetics.EffectData;
|
||||
import forestry.core.utils.Vect;
|
||||
@@ -55,14 +55,14 @@ public abstract class AlleleEffectThrottled extends Allele implements IAlleleBee
|
||||
|
||||
public boolean isHalted(IEffectData storedData, IBeeHousing housing) {
|
||||
|
||||
if (requiresWorkingQueen && housing.getErrorOrdinal() != EnumErrorCode.OK.ordinal())
|
||||
if (requiresWorkingQueen && housing.getErrorState() != EnumErrorCode.OK)
|
||||
return true;
|
||||
|
||||
int throttle = storedData.getInteger(0);
|
||||
throttle++;
|
||||
storedData.setInteger(0, throttle);
|
||||
int throt = storedData.getInteger(0);
|
||||
throt++;
|
||||
storedData.setInteger(0, throt);
|
||||
|
||||
if (throttle < getThrottle())
|
||||
if (throt < getThrottle())
|
||||
return true;
|
||||
|
||||
// Reset since we are done throttling.
|
||||
|
||||
@@ -20,7 +20,7 @@ import forestry.api.apiculture.IBeeHousing;
|
||||
import forestry.api.apiculture.IBeeMutation;
|
||||
import forestry.api.apiculture.IBeekeepingMode;
|
||||
import forestry.api.core.BiomeHelper;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
|
||||
@@ -19,7 +19,7 @@ import net.minecraft.world.World;
|
||||
import forestry.api.apiculture.IBee;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.Tabs;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.interfaces.IErrorSource;
|
||||
|
||||
@@ -30,7 +30,7 @@ import forestry.api.apiculture.IBee;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.Tabs;
|
||||
import forestry.apiculture.render.TextureBiomefinder;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.interfaces.IErrorSource;
|
||||
|
||||
@@ -12,7 +12,7 @@ package forestry.apiculture.trigger;
|
||||
|
||||
import buildcraft.api.statements.IStatementContainer;
|
||||
import buildcraft.api.statements.IStatementParameter;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.interfaces.IErrorSource;
|
||||
import forestry.core.triggers.Trigger;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@@ -12,7 +12,7 @@ package forestry.apiculture.trigger;
|
||||
|
||||
import buildcraft.api.statements.IStatementContainer;
|
||||
import buildcraft.api.statements.IStatementParameter;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.interfaces.IErrorSource;
|
||||
import forestry.core.triggers.Trigger;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
|
||||
@@ -17,9 +17,10 @@ import forestry.api.arboriculture.IAlleleFruit;
|
||||
import forestry.api.arboriculture.IFruitProvider;
|
||||
import forestry.api.arboriculture.ILeafTickHandler;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.core.IErrorState;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IEffectData;
|
||||
import forestry.api.genetics.IFruitBearer;
|
||||
@@ -442,7 +443,7 @@ public class TileLeaves extends TileTreeContainer implements IPollinatable, IFru
|
||||
@Override public void setErrorState(int state) {}
|
||||
|
||||
@Override
|
||||
public void setErrorState(EnumErrorCode state) {
|
||||
public void setErrorState(IErrorState state) {
|
||||
}
|
||||
|
||||
@Override public int getErrorOrdinal() { return 0; }
|
||||
|
||||
@@ -19,7 +19,7 @@ import forestry.core.utils.AlyzerInventory;
|
||||
import forestry.api.arboriculture.ITree;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.Tabs;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.interfaces.IErrorSource;
|
||||
|
||||
@@ -0,0 +1,105 @@
|
||||
/*******************************************************************************
|
||||
* Copyright 2011-2014 SirSengir
|
||||
*
|
||||
* This work (the API) is licensed under the "MIT" License, see LICENSE.txt for details.
|
||||
******************************************************************************/
|
||||
package forestry.core;
|
||||
|
||||
import net.minecraft.client.renderer.texture.IIconRegister;
|
||||
import net.minecraft.util.IIcon;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.ErrorStateRegistry;
|
||||
import forestry.api.core.IErrorState;
|
||||
|
||||
public enum EnumErrorCode implements IErrorState {
|
||||
|
||||
UNKNOWN("unknown"),
|
||||
OK("ok"),
|
||||
INVALIDBIOME("invalidBiome"),
|
||||
ISRAINING("isRaining"),
|
||||
NOTRAINING("notRaining"),
|
||||
NOFUEL("noFuel"), // Biogas & Peat-fired
|
||||
NOHEAT("noHeat"), // Biogas engine
|
||||
NODISPOSAL("noDisposal"),
|
||||
NORESOURCE("noResource"),
|
||||
NOTGLOOMY("notGloomy"),
|
||||
NOTLUCID("notLucid"),
|
||||
NOTDAY("notDay"),
|
||||
NOTNIGHT("notNight"),
|
||||
NOFLOWER("noFlower"),
|
||||
NOQUEEN("noQueen"),
|
||||
NODRONE("noDrone"),
|
||||
NOSKY("noSky"),
|
||||
NOSPACE("noSpace"),
|
||||
NORECIPE("noRecipe"),
|
||||
NOENERGYNET("noEnergyNet"),
|
||||
NOTHINGANALYZE("noSpecimen"),
|
||||
FORCEDCOOLDOWN("forcedCooldown"),
|
||||
NOHONEY("noHoney"),
|
||||
NOTPOSTPAID("notPostpaid", "noStamps"),
|
||||
NORECIPIENT("noRecipient"),
|
||||
NOTALPHANUMERIC("notAlphaNumeric"),
|
||||
NOTUNIQUE("notUnique"),
|
||||
NOSTAMPS("noStamps"),
|
||||
NOCIRCUITBOARD("noCircuitBoard"),
|
||||
NOCIRCUITLAYOUT("noCircuitLayout"),
|
||||
WRONGSTACKSIZE("wrongStacksize"),
|
||||
NOFERTILIZER("noFertilizer"),
|
||||
NOFARMLAND("noFarmland"),
|
||||
CIRCUITMISMATCH("circuitMismatch"),
|
||||
NOLIQUID("noLiquid"),
|
||||
NOPAPER("noPaper"),
|
||||
NOSTAMPSNOPAPER("noStampsNoPaper", "noStamps"),
|
||||
NOSUPPLIES("noSupplies", "noResource"),
|
||||
NOTRADE("noTrade", "noResource"),
|
||||
NOPOWER("noPower");
|
||||
|
||||
private String name;
|
||||
private String iconName;
|
||||
@SideOnly(Side.CLIENT)
|
||||
private IIcon icon;
|
||||
|
||||
private EnumErrorCode(String name) {
|
||||
this(name, name);
|
||||
}
|
||||
|
||||
private EnumErrorCode(String name, String iconName) {
|
||||
this.name = name;
|
||||
this.iconName = iconName;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getDescription() {
|
||||
return "errors." + name + ".desc";
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelp() {
|
||||
return "errors." + name + ".help";
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public void registerIcons(IIconRegister register) {
|
||||
icon = register.registerIcon("forestry:errors/" + iconName);
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@Override
|
||||
public IIcon getIcon() {
|
||||
return icon;
|
||||
}
|
||||
|
||||
@Override
|
||||
public short getID() {
|
||||
return (short) ordinal();
|
||||
}
|
||||
|
||||
public static void init() {
|
||||
for (IErrorState code : values()) {
|
||||
ErrorStateRegistry.registerErrorState(code);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,8 +21,8 @@ import cpw.mods.fml.common.eventhandler.Event.Result;
|
||||
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import forestry.api.core.ErrorStateRegistry;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.fluids.Fluids;
|
||||
import forestry.core.interfaces.IOreDictionaryHandler;
|
||||
import forestry.core.interfaces.IPickupHandler;
|
||||
@@ -87,7 +87,7 @@ public class EventHandlerCore {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void handleTextureRemap(TextureStitchEvent.Pre event) {
|
||||
if(event.map.getTextureType() == 1) {
|
||||
EnumErrorCode.initIcons(event.map);
|
||||
ErrorStateRegistry.initIcons(event.map);
|
||||
TextureManager.getInstance().initDefaultIcons(event.map);
|
||||
} else if(event.map.getTextureType() == 0)
|
||||
Fluids.resetFluidIcons(event.map);
|
||||
|
||||
@@ -58,6 +58,8 @@ public class ForestryCore {
|
||||
Config.load();
|
||||
if (!Config.disableVersionCheck)
|
||||
Version.versionCheck();
|
||||
|
||||
EnumErrorCode.init();
|
||||
|
||||
PluginManager.runPreInit();
|
||||
}
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2011-2014 SirSengir.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
******************************************************************************/
|
||||
package forestry.core.circuits;
|
||||
|
||||
public class CircuitBoardManager {
|
||||
}
|
||||
@@ -28,11 +28,11 @@ public class CircuitLayout implements ICircuitLayout {
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return StringUtil.localize("layout." + this.uid);
|
||||
return StringUtil.localize("circuit.layout." + this.uid + ".name");
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getUsage() {
|
||||
return StringUtil.localize("usage." + this.uid);
|
||||
return StringUtil.localize("circuit.layout." + this.uid + ".usage");
|
||||
}
|
||||
}
|
||||
@@ -23,12 +23,19 @@ import forestry.api.circuits.ICircuitLayout;
|
||||
import forestry.api.circuits.ICircuitLibrary;
|
||||
import forestry.api.circuits.ICircuitRegistry;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import java.util.Map;
|
||||
|
||||
public class CircuitRegistry implements ICircuitRegistry {
|
||||
|
||||
private final LinkedHashMap<String, ICircuitLayout> layoutMap = new LinkedHashMap<String, ICircuitLayout>();
|
||||
private final LinkedHashMap<String, ICircuit> circuitMap = new LinkedHashMap<String, ICircuit>();
|
||||
private final HashMap<Integer, String> legacyMap = new HashMap<Integer, String>();
|
||||
public static final ICircuitLayout DUMMY_LAYOUT = new CircuitLayout("dummy");
|
||||
public static final Map<String, ICircuitLayout> DUMMY_MAP = new LinkedHashMap<String, ICircuitLayout>();
|
||||
private final Map<String, ICircuitLayout> layoutMap = new LinkedHashMap<String, ICircuitLayout>();
|
||||
private final Map<String, ICircuit> circuitMap = new LinkedHashMap<String, ICircuit>();
|
||||
private final Map<Integer, String> legacyMap = new HashMap<Integer, String>();
|
||||
|
||||
static {
|
||||
DUMMY_MAP.put("dummy", DUMMY_LAYOUT);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ICircuitLibrary getCircuitLibrary(World world, String playername) {
|
||||
@@ -47,12 +54,16 @@ public class CircuitRegistry implements ICircuitRegistry {
|
||||
public ICircuitLayout getDefaultLayout() {
|
||||
if (layoutMap.containsKey("forestry.engine.tin"))
|
||||
return layoutMap.get("forestry.engine.tin");
|
||||
else
|
||||
else if (!layoutMap.isEmpty())
|
||||
return layoutMap.values().iterator().next();
|
||||
else
|
||||
return DUMMY_LAYOUT;
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinkedHashMap<String, ICircuitLayout> getRegisteredLayouts() {
|
||||
public Map<String, ICircuitLayout> getRegisteredLayouts() {
|
||||
if (layoutMap.isEmpty())
|
||||
return DUMMY_MAP;
|
||||
return layoutMap;
|
||||
}
|
||||
|
||||
@@ -71,7 +82,7 @@ public class CircuitRegistry implements ICircuitRegistry {
|
||||
|
||||
/* CIRCUITS */
|
||||
@Override
|
||||
public HashMap<String, ICircuit> getRegisteredCircuits() {
|
||||
public Map<String, ICircuit> getRegisteredCircuits() {
|
||||
return circuitMap;
|
||||
}
|
||||
|
||||
@@ -100,14 +111,12 @@ public class CircuitRegistry implements ICircuitRegistry {
|
||||
|
||||
public void initialize() {
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean isChipset(ItemStack itemstack) {
|
||||
return ForestryItem.circuitboards.isItemEqual(itemstack);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public ICircuitBoard getCircuitboard(ItemStack itemstack) {
|
||||
NBTTagCompound nbttagcompound = itemstack.getTagCompound();
|
||||
|
||||
@@ -12,8 +12,6 @@ package forestry.core.circuits;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -25,16 +23,19 @@ import forestry.api.circuits.ICircuit;
|
||||
import forestry.api.circuits.ICircuitLayout;
|
||||
import forestry.api.circuits.ISolderManager;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.api.core.IErrorState;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.interfaces.IErrorSource;
|
||||
import forestry.core.items.ItemForestry;
|
||||
import forestry.core.network.GuiId;
|
||||
import forestry.core.proxy.Proxies;
|
||||
import forestry.core.utils.ItemInventory;
|
||||
import forestry.core.utils.RevolvingList;
|
||||
|
||||
public class ItemSolderingIron extends ItemForestry implements ISolderingIron {
|
||||
|
||||
public static class CircuitRecipe {
|
||||
|
||||
private final ICircuitLayout layout;
|
||||
private final ItemStack resource;
|
||||
public final ICircuit circuit;
|
||||
@@ -54,6 +55,7 @@ public class ItemSolderingIron extends ItemForestry implements ISolderingIron {
|
||||
}
|
||||
|
||||
public static class SolderManager implements ISolderManager {
|
||||
|
||||
public static final ArrayList<CircuitRecipe> recipes = new ArrayList<CircuitRecipe>();
|
||||
|
||||
@Override
|
||||
@@ -71,9 +73,10 @@ public class ItemSolderingIron extends ItemForestry implements ISolderingIron {
|
||||
if (layout == null || resource == null)
|
||||
return null;
|
||||
|
||||
for (CircuitRecipe recipe : recipes)
|
||||
for (CircuitRecipe recipe : recipes) {
|
||||
if (recipe.matches(layout, resource))
|
||||
return recipe;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
@@ -82,7 +85,7 @@ public class ItemSolderingIron extends ItemForestry implements ISolderingIron {
|
||||
// / INVENTORY MANAGMENT
|
||||
public static class SolderingInventory extends ItemInventory implements IErrorSource {
|
||||
|
||||
private ICircuitLayout layout;
|
||||
private final RevolvingList<ICircuitLayout> layouts = new RevolvingList<ICircuitLayout>(ChipsetManager.circuitRegistry.getRegisteredLayouts().values());
|
||||
private EnumErrorCode errorState;
|
||||
|
||||
private final short blankSlot = 0;
|
||||
@@ -91,57 +94,32 @@ public class ItemSolderingIron extends ItemForestry implements ISolderingIron {
|
||||
|
||||
public SolderingInventory() {
|
||||
super(ItemSolderingIron.class, 6);
|
||||
layout = ChipsetManager.circuitRegistry.getDefaultLayout();
|
||||
init();
|
||||
}
|
||||
|
||||
public SolderingInventory(ItemStack itemstack) {
|
||||
super(ItemSolderingIron.class, 6, itemstack);
|
||||
layout = ChipsetManager.circuitRegistry.getDefaultLayout();
|
||||
init();
|
||||
}
|
||||
|
||||
private void init() {
|
||||
layouts.setCurrent(ChipsetManager.circuitRegistry.getDefaultLayout());
|
||||
}
|
||||
|
||||
public ICircuitLayout getLayout() {
|
||||
return this.layout;
|
||||
return layouts.getCurrent();
|
||||
}
|
||||
|
||||
public void setLayout(String uid) {
|
||||
this.layout = ChipsetManager.circuitRegistry.getLayout(uid);
|
||||
layouts.setCurrent(ChipsetManager.circuitRegistry.getLayout(uid));
|
||||
}
|
||||
|
||||
public void advanceLayout() {
|
||||
Iterator<Entry<String, ICircuitLayout>> it = ChipsetManager.circuitRegistry.getRegisteredLayouts().entrySet().iterator();
|
||||
while (it.hasNext()) {
|
||||
Entry<String, ICircuitLayout> entry = it.next();
|
||||
if (entry.getKey().equals(layout.getUID())) {
|
||||
|
||||
if (it.hasNext())
|
||||
layout = it.next().getValue();
|
||||
else
|
||||
layout = ChipsetManager.circuitRegistry.getRegisteredLayouts().entrySet().iterator().next().getValue();
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
layouts.rotateRight();
|
||||
}
|
||||
|
||||
public void regressLayout() {
|
||||
Iterator<Entry<String, ICircuitLayout>> it = ChipsetManager.circuitRegistry.getRegisteredLayouts().entrySet().iterator();
|
||||
|
||||
ICircuitLayout previous = null;
|
||||
while (it.hasNext()) {
|
||||
Entry<String, ICircuitLayout> entry = it.next();
|
||||
if (entry.getKey().equals(layout.getUID())) {
|
||||
|
||||
if (previous != null)
|
||||
layout = previous;
|
||||
else
|
||||
while (it.hasNext())
|
||||
layout = it.next().getValue();
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
previous = entry.getValue();
|
||||
}
|
||||
layouts.rotateLeft();
|
||||
}
|
||||
|
||||
private Collection<ICircuit> getCircuits(EnumCircuitBoardType type, boolean doConsume) {
|
||||
@@ -153,7 +131,7 @@ public class ItemSolderingIron extends ItemForestry implements ISolderingIron {
|
||||
if (ingredient == null)
|
||||
continue;
|
||||
|
||||
CircuitRecipe recipe = SolderManager.getMatchingRecipe(layout, ingredient);
|
||||
CircuitRecipe recipe = SolderManager.getMatchingRecipe(layouts.getCurrent(), ingredient);
|
||||
if (recipe == null)
|
||||
continue;
|
||||
|
||||
@@ -170,16 +148,18 @@ public class ItemSolderingIron extends ItemForestry implements ISolderingIron {
|
||||
}
|
||||
|
||||
public void trySolder() {
|
||||
|
||||
// Requires blank slot
|
||||
if (inventoryStacks[blankSlot] == null)
|
||||
if (layouts.getCurrent() == CircuitRegistry.DUMMY_LAYOUT)
|
||||
return;
|
||||
if (inventoryStacks[blankSlot].stackSize > 1)
|
||||
|
||||
ItemStack blank = inventoryStacks[blankSlot];
|
||||
// Requires blank slot
|
||||
if (blank == null)
|
||||
return;
|
||||
if (blank.stackSize > 1)
|
||||
return;
|
||||
if (inventoryStacks[finishedSlot] != null)
|
||||
return;
|
||||
|
||||
ItemStack blank = inventoryStacks[blankSlot];
|
||||
// Need a chipset item
|
||||
if (!ChipsetManager.circuitRegistry.isChipset(blank))
|
||||
return;
|
||||
@@ -199,15 +179,16 @@ public class ItemSolderingIron extends ItemForestry implements ISolderingIron {
|
||||
}
|
||||
|
||||
circuits = getCircuits(type, true);
|
||||
inventoryStacks[finishedSlot] = ItemCircuitBoard.createCircuitboard(type, layout, circuits.toArray(new ICircuit[circuits.size()]));
|
||||
inventoryStacks[finishedSlot] = ItemCircuitBoard.createCircuitboard(type, layouts.getCurrent(), circuits.toArray(new ICircuit[circuits.size()]));
|
||||
inventoryStacks[blankSlot] = null;
|
||||
}
|
||||
|
||||
public int getCount(ICircuit circuit, ArrayList<ICircuit> circuits) {
|
||||
int count = 0;
|
||||
for (ICircuit other : circuits)
|
||||
for (ICircuit other : circuits) {
|
||||
if (other.getUID().equals(circuit.getUID()))
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
@@ -231,7 +212,9 @@ public class ItemSolderingIron extends ItemForestry implements ISolderingIron {
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumErrorCode getErrorState() {
|
||||
public IErrorState getErrorState() {
|
||||
if (layouts.getCurrent() == CircuitRegistry.DUMMY_LAYOUT)
|
||||
return EnumErrorCode.NOCIRCUITLAYOUT;
|
||||
if (inventoryStacks[blankSlot] == null)
|
||||
return EnumErrorCode.NOCIRCUITBOARD;
|
||||
if (inventoryStacks[blankSlot].stackSize > 1)
|
||||
|
||||
@@ -26,7 +26,7 @@ import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.genetics.AlleleManager;
|
||||
import forestry.api.genetics.IIndividual;
|
||||
|
||||
@@ -16,7 +16,8 @@ import buildcraft.api.statements.ITriggerInternal;
|
||||
import buildcraft.api.statements.ITriggerProvider;
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.api.core.IErrorState;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.interfaces.IErrorSource;
|
||||
@@ -186,9 +187,9 @@ public abstract class TileForestry extends TileEntity implements INetworkedEntit
|
||||
this.sendNetworkUpdate();
|
||||
}
|
||||
// / ERROR HANDLING
|
||||
public EnumErrorCode errorState = EnumErrorCode.OK;
|
||||
public IErrorState errorState = EnumErrorCode.OK;
|
||||
|
||||
public void setErrorState(EnumErrorCode state) {
|
||||
public void setErrorState(IErrorState state) {
|
||||
if (this.errorState == state)
|
||||
return;
|
||||
this.errorState = state;
|
||||
@@ -201,7 +202,7 @@ public abstract class TileForestry extends TileEntity implements INetworkedEntit
|
||||
}
|
||||
|
||||
@Override
|
||||
public EnumErrorCode getErrorState() {
|
||||
public IErrorState getErrorState() {
|
||||
return errorState;
|
||||
}
|
||||
// / OWNERSHIP
|
||||
@@ -288,6 +289,7 @@ public abstract class TileForestry extends TileEntity implements INetworkedEntit
|
||||
|
||||
/**
|
||||
* Gets the tile's unlocalized name, based on the block at the location of this entity (client-only).
|
||||
* @return
|
||||
*/
|
||||
public String getUnlocalizedName() {
|
||||
String blockUnlocalizedName = getBlockType().getUnlocalizedName().replace("tile.for.","");
|
||||
|
||||
@@ -10,7 +10,8 @@
|
||||
******************************************************************************/
|
||||
package forestry.core.gui;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.IErrorState;
|
||||
import forestry.core.interfaces.IErrorSource;
|
||||
import forestry.core.utils.StringUtil;
|
||||
|
||||
@@ -30,7 +31,7 @@ public class ErrorLedger extends Ledger {
|
||||
|
||||
@Override
|
||||
public void draw(int x, int y) {
|
||||
EnumErrorCode state = tile.getErrorState();
|
||||
IErrorState state = tile.getErrorState();
|
||||
if (state == EnumErrorCode.OK)
|
||||
return;
|
||||
|
||||
@@ -52,11 +53,8 @@ public class ErrorLedger extends Ledger {
|
||||
|
||||
@Override
|
||||
public boolean isVisible() {
|
||||
EnumErrorCode state = tile.getErrorState();
|
||||
if (state == EnumErrorCode.OK)
|
||||
return false;
|
||||
else
|
||||
return true;
|
||||
IErrorState state = tile.getErrorState();
|
||||
return state != EnumErrorCode.OK;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
******************************************************************************/
|
||||
package forestry.core.interfaces;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.api.core.IErrorState;
|
||||
|
||||
public interface IErrorSource {
|
||||
|
||||
boolean throwsErrors();
|
||||
|
||||
EnumErrorCode getErrorState();
|
||||
IErrorState getErrorState();
|
||||
|
||||
}
|
||||
@@ -18,15 +18,17 @@ import java.util.UUID;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import com.mojang.authlib.GameProfile;
|
||||
import forestry.api.core.ErrorStateRegistry;
|
||||
import forestry.api.core.IErrorState;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.gadgets.TileForestry;
|
||||
import forestry.core.utils.EnumAccess;
|
||||
|
||||
public class PacketTileUpdate extends PacketUpdate {
|
||||
|
||||
private ForgeDirection orientation = ForgeDirection.WEST;
|
||||
private EnumErrorCode errorState = EnumErrorCode.OK;
|
||||
private IErrorState errorState = EnumErrorCode.OK;
|
||||
|
||||
private boolean isOwnable = false;
|
||||
private EnumAccess access = EnumAccess.SHARED;
|
||||
@@ -57,11 +59,14 @@ public class PacketTileUpdate extends PacketUpdate {
|
||||
data.writeInt(posY);
|
||||
data.writeInt(posZ);
|
||||
|
||||
data.writeInt(this.orientation.ordinal());
|
||||
data.writeInt(this.errorState.ordinal());
|
||||
data.writeByte(this.orientation.ordinal());
|
||||
data.writeShort(this.errorState.getID());
|
||||
|
||||
// TODO: Should this really be sent to the client? Huge network cost.
|
||||
// As far as I know, only GUIs need it, and there are better ways to get the information to a GUI.
|
||||
// -CovertJaguar
|
||||
if (isOwnable) {
|
||||
data.writeInt(access.ordinal());
|
||||
data.writeByte(access.ordinal());
|
||||
if (owner == null) {
|
||||
data.writeBoolean(false);
|
||||
} else {
|
||||
@@ -83,10 +88,10 @@ public class PacketTileUpdate extends PacketUpdate {
|
||||
posY = data.readInt();
|
||||
posZ = data.readInt();
|
||||
|
||||
orientation = ForgeDirection.values()[data.readInt()];
|
||||
errorState = EnumErrorCode.values()[data.readInt()];
|
||||
orientation = ForgeDirection.getOrientation(data.readByte());
|
||||
errorState = ErrorStateRegistry.getErrorStateFromCode(data.readShort());
|
||||
|
||||
int ordinal = data.readInt();
|
||||
int ordinal = data.readByte();
|
||||
isOwnable = ordinal >= 0;
|
||||
if (isOwnable) {
|
||||
access = EnumAccess.values()[ordinal];
|
||||
@@ -105,7 +110,7 @@ public class PacketTileUpdate extends PacketUpdate {
|
||||
return this.orientation;
|
||||
}
|
||||
|
||||
public EnumErrorCode getErrorState() {
|
||||
public IErrorState getErrorState() {
|
||||
return this.errorState;
|
||||
}
|
||||
|
||||
|
||||
@@ -101,4 +101,35 @@ public class ProxyLog {
|
||||
LogManager.getLogger(Defaults.MOD).log(logLevel, new MessageFormatMessage(String.format(message, params), params));
|
||||
}
|
||||
|
||||
/* EXCEPTIONS */
|
||||
public void logThrowable(String msg, Throwable error, Object... args) {
|
||||
logThrowable(Level.ERROR, msg, 3, error, args);
|
||||
}
|
||||
|
||||
public void logThrowable(String msg, int lines, Throwable error, Object... args) {
|
||||
logThrowable(Level.ERROR, msg, lines, error, args);
|
||||
}
|
||||
|
||||
public void logThrowable(Level level, String msg, int lines, Throwable error, Object... args) {
|
||||
StackTraceElement[] oldtrace = error.getStackTrace();
|
||||
if (lines < oldtrace.length) {
|
||||
StackTraceElement[] newtrace = new StackTraceElement[lines];
|
||||
System.arraycopy(oldtrace, 0, newtrace, 0, newtrace.length);
|
||||
error.setStackTrace(newtrace);
|
||||
}
|
||||
LogManager.getLogger(Defaults.MOD).log(level, new MessageFormatMessage(msg, args), error);
|
||||
}
|
||||
|
||||
public void logErrorAPI(String mod, Throwable error, Class classFile) {
|
||||
StringBuilder msg = new StringBuilder(mod);
|
||||
msg.append(" API error, please update your mods. Error: ").append(error);
|
||||
logThrowable(Level.ERROR, msg.toString(), 2, error);
|
||||
|
||||
if (classFile != null) {
|
||||
msg = new StringBuilder(mod);
|
||||
msg.append(" API error: ").append(classFile.getSimpleName()).append(" is loaded from ").append(classFile.getProtectionDomain().getCodeSource().getLocation());
|
||||
log(Level.ERROR, msg.toString());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,69 @@
|
||||
/*******************************************************************************
|
||||
* Copyright (c) 2011-2014 SirSengir.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the GNU Lesser Public License v3
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.gnu.org/licenses/lgpl-3.0.txt
|
||||
*
|
||||
* Various Contributors including, but not limited to:
|
||||
* SirSengir (original work), CovertJaguar, Player, Binnie, MysteriousAges
|
||||
******************************************************************************/
|
||||
package forestry.core.utils;
|
||||
|
||||
import com.google.common.collect.ForwardingCollection;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author CovertJaguar <http://www.railcraft.info>
|
||||
* @param <T>
|
||||
*/
|
||||
public class RevolvingList<T> extends ForwardingCollection<T> {
|
||||
|
||||
private final Deque<T> list = new LinkedList<T>();
|
||||
|
||||
public RevolvingList() {
|
||||
}
|
||||
|
||||
public RevolvingList(Collection<? extends T> collection) {
|
||||
list.addAll(collection);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected Collection<T> delegate() {
|
||||
return list;
|
||||
}
|
||||
|
||||
public void rotateLeft() {
|
||||
if (list.isEmpty())
|
||||
return;
|
||||
list.addFirst(list.removeLast());
|
||||
}
|
||||
|
||||
public void rotateRight() {
|
||||
if (list.isEmpty())
|
||||
return;
|
||||
list.addLast(list.removeFirst());
|
||||
}
|
||||
|
||||
public T getCurrent() {
|
||||
if (list.isEmpty())
|
||||
return null;
|
||||
return list.getFirst();
|
||||
}
|
||||
|
||||
public void setCurrent(T e) {
|
||||
if (!contains(e))
|
||||
return;
|
||||
|
||||
if (e == null)
|
||||
while (getCurrent() != null) {
|
||||
rotateRight();
|
||||
}
|
||||
else
|
||||
while (getCurrent() == null || !getCurrent().equals(e)) {
|
||||
rotateRight();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -24,7 +24,7 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.fuels.EngineBronzeFuel;
|
||||
import forestry.api.fuels.FuelManager;
|
||||
|
||||
@@ -13,7 +13,7 @@ package forestry.energy.gadgets;
|
||||
import buildcraft.api.statements.ITriggerExternal;
|
||||
import cpw.mods.fml.common.Optional;
|
||||
import cpw.mods.fml.common.registry.GameData;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.fuels.FuelManager;
|
||||
import forestry.core.TemperatureState;
|
||||
|
||||
@@ -22,7 +22,7 @@ import ic2.api.energy.prefab.BasicSink;
|
||||
import forestry.api.circuits.ChipsetManager;
|
||||
import forestry.api.circuits.ICircuitBoard;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.TemperatureState;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Defaults;
|
||||
|
||||
@@ -21,7 +21,7 @@ import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.ISpecialInventory;
|
||||
import forestry.api.fuels.FuelManager;
|
||||
|
||||
@@ -35,7 +35,7 @@ import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.recipes.ICraftingProvider;
|
||||
import forestry.core.config.Config;
|
||||
|
||||
@@ -32,7 +32,7 @@ import net.minecraftforge.fluids.FluidContainerRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.recipes.ICarpenterManager;
|
||||
import forestry.core.config.Config;
|
||||
|
||||
@@ -15,7 +15,7 @@ import cpw.mods.fml.common.Optional;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.ISpecialInventory;
|
||||
import forestry.api.recipes.ICentrifugeManager;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Defaults;
|
||||
import forestry.core.gadgets.TileBase;
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
******************************************************************************/
|
||||
package forestry.factory.gadgets;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.ISpecialInventory;
|
||||
import forestry.api.recipes.IFabricatorManager;
|
||||
|
||||
@@ -32,7 +32,7 @@ import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.fuels.FuelManager;
|
||||
import forestry.api.recipes.IFermenterManager;
|
||||
|
||||
@@ -27,7 +27,7 @@ import net.minecraftforge.fluids.FluidRegistry;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.ISpecialInventory;
|
||||
import forestry.api.fuels.FuelManager;
|
||||
|
||||
@@ -25,7 +25,7 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import forestry.api.core.BiomeHelper;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.Defaults;
|
||||
|
||||
@@ -30,7 +30,7 @@ import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.ISpecialInventory;
|
||||
import forestry.api.recipes.ISqueezerManager;
|
||||
|
||||
@@ -27,7 +27,7 @@ import net.minecraftforge.fluids.Fluid;
|
||||
import net.minecraftforge.fluids.FluidStack;
|
||||
import net.minecraftforge.fluids.FluidTankInfo;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.ISpecialInventory;
|
||||
import forestry.api.recipes.IStillManager;
|
||||
|
||||
@@ -35,7 +35,7 @@ import net.minecraftforge.fluids.FluidStack;
|
||||
import forestry.api.circuits.ChipsetManager;
|
||||
import forestry.api.circuits.ICircuitBoard;
|
||||
import forestry.api.core.BiomeHelper;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.EnumHumidity;
|
||||
import forestry.api.core.EnumTemperature;
|
||||
import forestry.api.farming.ICrop;
|
||||
|
||||
@@ -12,7 +12,7 @@ package forestry.farming.gadgets;
|
||||
|
||||
import forestry.api.core.ITileStructure;
|
||||
import forestry.api.farming.IFarmHousing;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.gadgets.TileForestry;
|
||||
import forestry.core.interfaces.IPowerHandler;
|
||||
import forestry.energy.EnergyManager;
|
||||
|
||||
@@ -19,7 +19,7 @@ import forestry.core.utils.AlyzerInventory;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.core.Tabs;
|
||||
import forestry.api.lepidopterology.IButterfly;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.config.ForestryItem;
|
||||
import forestry.core.interfaces.IErrorSource;
|
||||
|
||||
@@ -25,7 +25,7 @@ import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import cpw.mods.fml.common.Optional;
|
||||
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.mail.IMailAddress;
|
||||
import forestry.api.mail.IStamps;
|
||||
|
||||
@@ -25,7 +25,7 @@ import cpw.mods.fml.relauncher.SideOnly;
|
||||
|
||||
import forestry.api.core.ForestryAPI;
|
||||
import forestry.api.mail.ILetter;
|
||||
import forestry.api.core.EnumErrorCode;
|
||||
import forestry.core.EnumErrorCode;
|
||||
import forestry.core.config.Config;
|
||||
import forestry.core.interfaces.IErrorSource;
|
||||
import forestry.core.interfaces.IHintSource;
|
||||
|
||||
Reference in new issue
Block a user