Merge pull request #1792 from Prototik/mjapi

Remove unnecessary extends for ISidedBatteryProvider interface
This commit is contained in:
SpaceToad 2014-05-12 12:27:10 +02:00
commit b7e2a730df
2 changed files with 18 additions and 18 deletions

View file

@ -1,15 +1,15 @@
/**
* Copyright (c) 2014, Prototik and the BuildFactory Team
* http://buildfactory.org/
* Copyright (c) 2011-2014, SpaceToad and the BuildCraft Team
* http://www.mod-buildcraft.com
*
* BuildFactory is distributed under the terms of the Minecraft Mod Public
* BuildCraft is distributed under the terms of the Minecraft Mod Public
* License 1.0, or MMPL. Please check the contents of the license located in
* http://buildfactory.org/license
* http://www.mod-buildcraft.com/MMPL-1.0.txt
*/
package buildcraft.api.mj;
import net.minecraftforge.common.util.ForgeDirection;
public interface ISidedBatteryProvider extends IBatteryProvider {
public interface ISidedBatteryProvider {
IBatteryObject getMjBattery(String kind, ForgeDirection direction);
}

View file

@ -65,22 +65,22 @@ public final class MjAPI {
return null;
}
if (o instanceof IBatteryProvider) {
IBatteryObject battery;
IBatteryObject battery = null;
if (o instanceof ISidedBatteryProvider) {
battery = ((ISidedBatteryProvider) o).getMjBattery(kind, side);
if (battery == null && side != ForgeDirection.UNKNOWN) {
battery = ((ISidedBatteryProvider) o).getMjBattery(kind, ForgeDirection.UNKNOWN);
}
} else {
}
if (o instanceof IBatteryProvider) {
battery = ((IBatteryProvider) o).getMjBattery(kind);
}
if (battery != null) {
return battery;
}
}
BatteryField f = getMjBatteryField(o.getClass(), kind, side);
if (f == null && side != ForgeDirection.UNKNOWN) {