mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-10-25 20:22:23 +00:00
restore some old integrations and remove dead integrations (#1274)
This commit is contained in:
1 parent
0949465539
commit
755d827594
16 files changed
+233
-309
No files matched your search
@@ -32,6 +32,7 @@ dependencies {
|
||||
compileOnly('com.github.GTNewHorizons:ae2stuff:0.10.19-GTNH:dev') {
|
||||
exclude module: "Applied-Energistics-2-Unofficial"
|
||||
}
|
||||
compileOnly('curse.maven:rotarycraft-235596:4721191')
|
||||
|
||||
compileOnly('com.github.GTNewHorizons:Baubles-Expanded:2.2.11-GTNH:dev')
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@ import appeng.core.localization.GuiText;
|
||||
public interface IPortableCell extends ITerminalHost, IEnergySource, IGuiItemObject, IInventorySlotAware {
|
||||
|
||||
@Override
|
||||
default GuiText getName() {
|
||||
default GuiText getHostName() {
|
||||
return GuiText.PortableCell;
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ import appeng.core.localization.GuiText;
|
||||
|
||||
public interface ITerminalHost extends IStorageMonitorable, IConfigurableObject {
|
||||
|
||||
default GuiText getName() {
|
||||
default GuiText getHostName() {
|
||||
return GuiText.Terminal;
|
||||
}
|
||||
|
||||
|
||||
@@ -185,7 +185,7 @@ public class GuiMEMonitorable extends AEBaseGui
|
||||
|
||||
this.viewCell = te instanceof IViewCellStorage;
|
||||
|
||||
this.myName = te.getName();
|
||||
this.myName = te.getHostName();
|
||||
|
||||
hasPinHost = te instanceof ITerminalPins;
|
||||
|
||||
|
||||
@@ -256,7 +256,7 @@ public class WirelessTerminalGuiObject implements IPortableCell, IActionHost, II
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuiText getName() {
|
||||
public GuiText getHostName() {
|
||||
return GuiText.WirelessTerminal;
|
||||
}
|
||||
|
||||
|
||||
@@ -39,8 +39,6 @@ public enum IntegrationType {
|
||||
|
||||
RB(IntegrationSide.BOTH, "Rotatable Blocks", "RotatableBlocks"),
|
||||
|
||||
CLApi(IntegrationSide.BOTH, "Colored Lights Core", "coloredlightscore"),
|
||||
|
||||
Waila(IntegrationSide.BOTH, "Waila", "Waila"),
|
||||
|
||||
InvTweaks(IntegrationSide.CLIENT, "Inventory Tweaks", "inventorytweaks"),
|
||||
|
||||
@@ -15,6 +15,7 @@ import net.minecraft.nbt.NBTTagCompound;
|
||||
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
import appeng.integration.IntegrationHelper;
|
||||
import appeng.integration.abstraction.IMekanism;
|
||||
import cpw.mods.fml.common.event.FMLInterModComms;
|
||||
|
||||
@@ -25,7 +26,7 @@ public final class Mekanism implements IMekanism, IIntegrationModule {
|
||||
|
||||
@Reflected
|
||||
public Mekanism() {
|
||||
// IntegrationHelper.testClassExistence( this, mekanism.api.energy.IStrictEnergyAcceptor.class );
|
||||
IntegrationHelper.testClassExistence(this, mekanism.api.energy.IStrictEnergyAcceptor.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+19
-4
@@ -8,11 +8,26 @@
|
||||
* Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.integration.abstraction;
|
||||
package appeng.integration.modules;
|
||||
|
||||
import appeng.api.util.AEColor;
|
||||
import appeng.helpers.Reflected;
|
||||
import appeng.integration.IIntegrationModule;
|
||||
import appeng.integration.IntegrationHelper;
|
||||
|
||||
public interface ICLApi {
|
||||
public class RotaryCraft implements IIntegrationModule {
|
||||
|
||||
int colorLight(AEColor color, int light);
|
||||
@Reflected
|
||||
public static RotaryCraft instance;
|
||||
|
||||
@Reflected
|
||||
public RotaryCraft() {
|
||||
IntegrationHelper.testClassExistence(this, Reika.RotaryCraft.API.Power.AdvancedShaftPowerReceiver.class);
|
||||
IntegrationHelper.testClassExistence(this, Reika.RotaryCraft.API.Interfaces.Transducerable.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void init() throws Throwable {}
|
||||
|
||||
@Override
|
||||
public void postInit() {}
|
||||
}
|
||||
@@ -52,9 +52,6 @@ import appeng.client.render.CableRenderHelper;
|
||||
import appeng.core.AELog;
|
||||
import appeng.facade.FacadeContainer;
|
||||
import appeng.helpers.AEMultiTile;
|
||||
import appeng.integration.IntegrationRegistry;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.integration.abstraction.ICLApi;
|
||||
import appeng.me.GridConnection;
|
||||
import appeng.util.Platform;
|
||||
import codechicken.multipart.TileMultipart;
|
||||
@@ -723,11 +720,6 @@ public class CableBusContainer extends CableBusStorage implements AEMultiTile, I
|
||||
}
|
||||
}
|
||||
|
||||
if (light > 0 && IntegrationRegistry.INSTANCE.isEnabled(IntegrationType.CLApi)) {
|
||||
return ((ICLApi) IntegrationRegistry.INSTANCE.getInstance(IntegrationType.CLApi))
|
||||
.colorLight(this.getColor(), light);
|
||||
}
|
||||
|
||||
return light;
|
||||
}
|
||||
|
||||
|
||||
@@ -309,7 +309,7 @@ public class TileSecurity extends AENetworkTile implements ITerminalHost, IAEApp
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuiText getName() {
|
||||
public GuiText getHostName() {
|
||||
return GuiText.Security;
|
||||
}
|
||||
}
|
||||
@@ -10,5 +10,5 @@
|
||||
|
||||
package appeng.tile.powersink;
|
||||
|
||||
public abstract class AEBasePoweredTile extends RedstoneFlux {
|
||||
public abstract class AEBasePoweredTile extends MekJoules {
|
||||
}
|
||||
@@ -1,70 +1,54 @@
|
||||
/// *
|
||||
// * This file is part of Applied Energistics 2.
|
||||
// * Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
// *
|
||||
// * Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
// * it under the terms of the GNU Lesser General Public License as published by
|
||||
// * the Free Software Foundation, either version 3 of the License, or
|
||||
// * (at your option) any later version.
|
||||
// *
|
||||
// * Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// * GNU Lesser General Public License for more details.
|
||||
// *
|
||||
// * You should have received a copy of the GNU Lesser General Public License
|
||||
// * along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
// */
|
||||
//
|
||||
// package appeng.tile.powersink;
|
||||
//
|
||||
//
|
||||
// import appeng.api.config.PowerUnits;
|
||||
// import appeng.integration.IntegrationType;
|
||||
// import appeng.transformer.annotations.Integration.Interface;
|
||||
// import mekanism.api.energy.IStrictEnergyAcceptor;
|
||||
// import net.minecraftforge.common.util.ForgeDirection;
|
||||
//
|
||||
//
|
||||
// @Interface( iname = IntegrationType.Mekanism, iface = "mekanism.api.energy.IStrictEnergyAcceptor" )
|
||||
// public abstract class MekJoules extends RedstoneFlux implements IStrictEnergyAcceptor
|
||||
// {
|
||||
//
|
||||
// @Override
|
||||
// public double getEnergy()
|
||||
// {
|
||||
// return 0;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public void setEnergy( final double energy )
|
||||
// {
|
||||
// final double extra = this.injectExternalPower( PowerUnits.MK, energy );
|
||||
// this.setInternalCurrentPower( this.getInternalCurrentPower() + PowerUnits.MK.convertTo( PowerUnits.AE, extra ) );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public double getMaxEnergy()
|
||||
// {
|
||||
// return this.getExternalPowerDemand( PowerUnits.MK, 100000 );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public double transferEnergyToAcceptor( final ForgeDirection side, double amount )
|
||||
// {
|
||||
// final double demand = this.getExternalPowerDemand( PowerUnits.MK, Double.MAX_VALUE );
|
||||
// if( amount > demand )
|
||||
// {
|
||||
// amount = demand;
|
||||
// }
|
||||
//
|
||||
// final double overflow = this.injectExternalPower( PowerUnits.MK, amount );
|
||||
// return amount - overflow;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public boolean canReceiveEnergy( final ForgeDirection side )
|
||||
// {
|
||||
// return this.getPowerSides().contains( side );
|
||||
// }
|
||||
// }
|
||||
/*
|
||||
* This file is part of Applied Energistics 2. Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved. Applied
|
||||
* Energistics 2 is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version. Applied Energistics 2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||
* Public License for more details. You should have received a copy of the GNU Lesser General Public License along with
|
||||
* Applied Energistics 2. If not, see <http:www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.tile.powersink;
|
||||
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import appeng.api.config.PowerUnits;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.transformer.annotations.Integration.Interface;
|
||||
import mekanism.api.energy.IStrictEnergyAcceptor;
|
||||
|
||||
@Interface(iname = IntegrationType.Mekanism, iface = "mekanism.api.energy.IStrictEnergyAcceptor")
|
||||
public abstract class MekJoules extends RedstoneFlux implements IStrictEnergyAcceptor {
|
||||
|
||||
@Override
|
||||
public double getEnergy() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setEnergy(final double energy) {
|
||||
final double extra = this.injectExternalPower(PowerUnits.MK, energy);
|
||||
this.setInternalCurrentPower(this.getInternalCurrentPower() + PowerUnits.MK.convertTo(PowerUnits.AE, extra));
|
||||
}
|
||||
|
||||
@Override
|
||||
public double getMaxEnergy() {
|
||||
return this.getExternalPowerDemand(PowerUnits.MK, 100000);
|
||||
}
|
||||
|
||||
@Override
|
||||
public double transferEnergyToAcceptor(final ForgeDirection side, double amount) {
|
||||
final double demand = this.getExternalPowerDemand(PowerUnits.MK, Double.MAX_VALUE);
|
||||
if (amount > demand) {
|
||||
amount = demand;
|
||||
}
|
||||
|
||||
final double overflow = this.injectExternalPower(PowerUnits.MK, amount);
|
||||
return amount - overflow;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean canReceiveEnergy(final ForgeDirection side) {
|
||||
return this.getPowerSides().contains(side);
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ import appeng.transformer.annotations.Integration.Interface;
|
||||
import cofh.api.energy.IEnergyReceiver;
|
||||
|
||||
@Interface(iname = IntegrationType.RF, iface = "cofh.api.energy.IEnergyReceiver")
|
||||
public abstract class RedstoneFlux extends IC2 implements IEnergyReceiver {
|
||||
public abstract class RedstoneFlux extends RotaryCraft implements IEnergyReceiver {
|
||||
|
||||
@Override
|
||||
public final int receiveEnergy(final ForgeDirection from, final int maxReceive, final boolean simulate) {
|
||||
|
||||
@@ -1,186 +1,149 @@
|
||||
/// *
|
||||
// * This file is part of Applied Energistics 2.
|
||||
// * Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved.
|
||||
// *
|
||||
// * Applied Energistics 2 is free software: you can redistribute it and/or modify
|
||||
// * it under the terms of the GNU Lesser General Public License as published by
|
||||
// * the Free Software Foundation, either version 3 of the License, or
|
||||
// * (at your option) any later version.
|
||||
// *
|
||||
// * Applied Energistics 2 is distributed in the hope that it will be useful,
|
||||
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// * GNU Lesser General Public License for more details.
|
||||
// *
|
||||
// * You should have received a copy of the GNU Lesser General Public License
|
||||
// * along with Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
// */
|
||||
//
|
||||
// package appeng.tile.powersink;
|
||||
//
|
||||
//
|
||||
// import Reika.RotaryCraft.API.Interfaces.Transducerable;
|
||||
// import Reika.RotaryCraft.API.Power.AdvancedShaftPowerReceiver;
|
||||
// import appeng.api.config.PowerUnits;
|
||||
// import appeng.integration.IntegrationType;
|
||||
// import appeng.tile.TileEvent;
|
||||
// import appeng.tile.events.TileEventType;
|
||||
// import appeng.transformer.annotations.Integration.Interface;
|
||||
// import appeng.transformer.annotations.Integration.InterfaceList;
|
||||
// import appeng.transformer.annotations.Integration.Method;
|
||||
// import net.minecraft.world.World;
|
||||
// import net.minecraftforge.common.util.ForgeDirection;
|
||||
//
|
||||
// import java.util.ArrayList;
|
||||
//
|
||||
//
|
||||
// @InterfaceList( value = { @Interface( iname = IntegrationType.RotaryCraft, iface =
|
||||
// "Reika.RotaryCraft.API.Power.AdvancedShaftPowerReceiver" ), @Interface( iname = IntegrationType.RotaryCraft, iface =
|
||||
// "Reika.RotaryCraft.API.Interfaces.Transducerable" ) } )
|
||||
// public abstract class RotaryCraft extends IC2 implements AdvancedShaftPowerReceiver, Transducerable
|
||||
// {
|
||||
//
|
||||
// private int omega = 0;
|
||||
// private int torque = 0;
|
||||
// private long power = 0;
|
||||
// private int alpha = 0;
|
||||
//
|
||||
// private long currentPower = 0;
|
||||
//
|
||||
// @TileEvent( TileEventType.TICK )
|
||||
// @Method( iname = IntegrationType.RotaryCraft )
|
||||
// public void Tick_RotaryCraft()
|
||||
// {
|
||||
// if( this.worldObj != null && !this.worldObj.isRemote && this.currentPower > 0 )
|
||||
// {
|
||||
// this.injectExternalPower( PowerUnits.WA, this.currentPower );
|
||||
// this.currentPower = 0;
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public final boolean addPower( final int torque, final int omega, final long power, final ForgeDirection side )
|
||||
// {
|
||||
// this.omega = omega;
|
||||
// this.torque = torque;
|
||||
// this.power = power;
|
||||
//
|
||||
// this.currentPower += power;
|
||||
//
|
||||
// return true;
|
||||
//
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public final int getOmega()
|
||||
// {
|
||||
// return this.omega;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public final int getTorque()
|
||||
// {
|
||||
// return this.torque;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public final long getPower()
|
||||
// {
|
||||
// return this.power;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public final String getName()
|
||||
// {
|
||||
// return "AE";
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public final int getIORenderAlpha()
|
||||
// {
|
||||
// return this.alpha;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public final void setIORenderAlpha( final int io )
|
||||
// {
|
||||
// this.alpha = io;
|
||||
// }
|
||||
//
|
||||
// public final boolean canReadFromBlock( final int x, final int y, final int z )
|
||||
// {
|
||||
// ForgeDirection side = ForgeDirection.UNKNOWN;
|
||||
//
|
||||
// if( x == this.xCoord - 1 )
|
||||
// {
|
||||
// side = ForgeDirection.WEST;
|
||||
// }
|
||||
// else if( x == this.xCoord + 1 )
|
||||
// {
|
||||
// side = ForgeDirection.EAST;
|
||||
// }
|
||||
// else if( z == this.zCoord - 1 )
|
||||
// {
|
||||
// side = ForgeDirection.NORTH;
|
||||
// }
|
||||
// else if( z == this.zCoord + 1 )
|
||||
// {
|
||||
// side = ForgeDirection.SOUTH;
|
||||
// }
|
||||
// else if( y == this.yCoord - 1 )
|
||||
// {
|
||||
// side = ForgeDirection.DOWN;
|
||||
// }
|
||||
// else if( y == this.yCoord + 1 )
|
||||
// {
|
||||
// side = ForgeDirection.UP;
|
||||
// }
|
||||
//
|
||||
// return this.getPowerSides().contains( side );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public final boolean canReadFrom( final ForgeDirection side )
|
||||
// {
|
||||
// return this.getPowerSides().contains( side );
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public final boolean isReceiving()
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public final int getMinTorque( final int available )
|
||||
// {
|
||||
// return 1;
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public final ArrayList<String> getMessages( final World world, final int x, final int y, final int z, final int side
|
||||
// )
|
||||
// {
|
||||
// final String out;
|
||||
// if( this.power >= 1000000000 )
|
||||
// {
|
||||
// out = String.format( "Receiving %.3f GW @ %d rad/s.", this.power / 1000000000.0D, this.omega );
|
||||
// }
|
||||
// else if( this.power >= 1000000 )
|
||||
// {
|
||||
// out = String.format( "Receiving %.3f MW @ %d rad/s.", this.power / 1000000.0D, this.omega );
|
||||
// }
|
||||
// else if( this.power >= 1000 )
|
||||
// {
|
||||
// out = String.format( "Receiving %.3f kW @ %d rad/s.", this.power / 1000.0D, this.omega );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// out = String.format( "Receiving %d W @ %d rad/s.", this.power, this.omega );
|
||||
// }
|
||||
//
|
||||
// final ArrayList<String> messages = new ArrayList<String>( 1 );
|
||||
// messages.add( out );
|
||||
// return messages;
|
||||
// }
|
||||
// }
|
||||
/*
|
||||
* This file is part of Applied Energistics 2. Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved. Applied
|
||||
* Energistics 2 is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version. Applied Energistics 2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||
* Public License for more details. You should have received a copy of the GNU Lesser General Public License along with
|
||||
* Applied Energistics 2. If not, see <http:www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.tile.powersink;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.common.util.ForgeDirection;
|
||||
|
||||
import Reika.RotaryCraft.API.Interfaces.Transducerable;
|
||||
import Reika.RotaryCraft.API.Power.AdvancedShaftPowerReceiver;
|
||||
import appeng.api.config.PowerUnits;
|
||||
import appeng.integration.IntegrationType;
|
||||
import appeng.tile.TileEvent;
|
||||
import appeng.tile.events.TileEventType;
|
||||
import appeng.transformer.annotations.Integration.Interface;
|
||||
import appeng.transformer.annotations.Integration.InterfaceList;
|
||||
import appeng.transformer.annotations.Integration.Method;
|
||||
|
||||
@InterfaceList(
|
||||
value = {
|
||||
@Interface(
|
||||
iname = IntegrationType.RotaryCraft,
|
||||
iface = "Reika.RotaryCraft.API.Power.AdvancedShaftPowerReceiver"),
|
||||
@Interface(
|
||||
iname = IntegrationType.RotaryCraft,
|
||||
iface = "Reika.RotaryCraft.API.Interfaces.Transducerable") })
|
||||
public abstract class RotaryCraft extends IC2 implements AdvancedShaftPowerReceiver, Transducerable {
|
||||
|
||||
private int omega = 0;
|
||||
private int torque = 0;
|
||||
private long power = 0;
|
||||
private int alpha = 0;
|
||||
|
||||
private long currentPower = 0;
|
||||
|
||||
@TileEvent(TileEventType.TICK)
|
||||
@Method(iname = IntegrationType.RotaryCraft)
|
||||
public void Tick_RotaryCraft() {
|
||||
if (this.worldObj != null && !this.worldObj.isRemote && this.currentPower > 0) {
|
||||
this.injectExternalPower(PowerUnits.WA, this.currentPower);
|
||||
this.currentPower = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean addPower(final int torque, final int omega, final long power, final ForgeDirection side) {
|
||||
this.omega = omega;
|
||||
this.torque = torque;
|
||||
this.power = power;
|
||||
|
||||
this.currentPower += power;
|
||||
|
||||
return true;
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getOmega() {
|
||||
return this.omega;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getTorque() {
|
||||
return this.torque;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final long getPower() {
|
||||
return this.power;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final String getName() {
|
||||
return "AE";
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getIORenderAlpha() {
|
||||
return this.alpha;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final void setIORenderAlpha(final int io) {
|
||||
this.alpha = io;
|
||||
}
|
||||
|
||||
public final boolean canReadFromBlock(final int x, final int y, final int z) {
|
||||
ForgeDirection side = ForgeDirection.UNKNOWN;
|
||||
|
||||
if (x == this.xCoord - 1) {
|
||||
side = ForgeDirection.WEST;
|
||||
} else if (x == this.xCoord + 1) {
|
||||
side = ForgeDirection.EAST;
|
||||
} else if (z == this.zCoord - 1) {
|
||||
side = ForgeDirection.NORTH;
|
||||
} else if (z == this.zCoord + 1) {
|
||||
side = ForgeDirection.SOUTH;
|
||||
} else if (y == this.yCoord - 1) {
|
||||
side = ForgeDirection.DOWN;
|
||||
} else if (y == this.yCoord + 1) {
|
||||
side = ForgeDirection.UP;
|
||||
}
|
||||
|
||||
return this.getPowerSides().contains(side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean canReadFrom(final ForgeDirection side) {
|
||||
return this.getPowerSides().contains(side);
|
||||
}
|
||||
|
||||
@Override
|
||||
public final boolean isReceiving() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final int getMinTorque(final int available) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public final ArrayList<String> getMessages(final World world, final int x, final int y, final int z,
|
||||
final int side) {
|
||||
final String out;
|
||||
if (this.power >= 1000000000) {
|
||||
out = String.format("Receiving %.3f GW @ %d rad/s.", this.power / 1000000000.0D, this.omega);
|
||||
} else if (this.power >= 1000000) {
|
||||
out = String.format("Receiving %.3f MW @ %d rad/s.", this.power / 1000000.0D, this.omega);
|
||||
} else if (this.power >= 1000) {
|
||||
out = String.format("Receiving %.3f kW @ %d rad/s.", this.power / 1000.0D, this.omega);
|
||||
} else {
|
||||
out = String.format("Receiving %d W @ %d rad/s.", this.power, this.omega);
|
||||
}
|
||||
|
||||
final ArrayList<String> messages = new ArrayList<String>(1);
|
||||
messages.add(out);
|
||||
return messages;
|
||||
}
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
/*
|
||||
* This file is part of Applied Energistics 2. Copyright (c) 2013 - 2014, AlgorithmX2, All rights reserved. Applied
|
||||
* Energistics 2 is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General
|
||||
* Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version. Applied Energistics 2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
|
||||
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
||||
* Public License for more details. You should have received a copy of the GNU Lesser General Public License along with
|
||||
* Applied Energistics 2. If not, see <http://www.gnu.org/licenses/lgpl>.
|
||||
*/
|
||||
|
||||
package appeng.tile.powersink;
|
||||
|
||||
/*
|
||||
* import net.minecraftforge.common.util.ForgeDirection; import universalelectricity.core.block.IElectrical; import
|
||||
* universalelectricity.core.electricity.ElectricityPack; import appeng.api.config.PowerUnits; public abstract class
|
||||
* UniversalElectricity extends ThermalExpansion implements IElectrical {
|
||||
* @Override public final boolean canConnect(ForgeDirection direction) { return internalCanAcceptPower &&
|
||||
* getPowerSides().contains( direction ); }
|
||||
* @Override public final float receiveElectricity(ForgeDirection from, ElectricityPack receive, boolean doReceive) {
|
||||
* float accepted = 0; double receivedPower = receive.getWatts(); if ( doReceive ) { accepted = (float) (receivedPower -
|
||||
* injectExternalPower( PowerUnits.KJ, receivedPower )); } else { double whatIWant = getExternalPowerDemand(
|
||||
* PowerUnits.KJ ); if ( whatIWant > receivedPower ) accepted = (float) receivedPower; else accepted = (float)
|
||||
* whatIWant; } return accepted; }
|
||||
* @Override public final float getRequest(ForgeDirection direction) { return (float) getExternalPowerDemand(
|
||||
* PowerUnits.KJ ); }
|
||||
* @Override public final float getVoltage() { return 120; }
|
||||
* @Override public final ElectricityPack provideElectricity(ForgeDirection from, ElectricityPack request, boolean
|
||||
* doProvide) { return null; // cannot be dis-charged }
|
||||
* @Override public final float getProvide(ForgeDirection direction) { return 0; } }
|
||||
*/
|
||||
@@ -882,7 +882,7 @@ public class TileChest extends AENetworkPowerTile implements IMEChest, IFluidHan
|
||||
}
|
||||
|
||||
@Override
|
||||
public GuiText getName() {
|
||||
public GuiText getHostName() {
|
||||
return GuiText.Chest;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user