Applied-Energistics-2-tiler.../container/implementations/ContainerWirelessTerm.java

34 lines
796 B
Java
Raw Normal View History

2014-02-03 05:33:50 +01:00
package appeng.container.implementations;
import net.minecraft.entity.player.InventoryPlayer;
2014-02-09 06:08:27 +01:00
import appeng.core.AEConfig;
import appeng.core.localization.PlayerMessages;
import appeng.helpers.WirelessTerminalGuiObject;
2014-02-03 05:33:50 +01:00
public class ContainerWirelessTerm extends ContainerMEPortableCell
{
WirelessTerminalGuiObject wtgo;
public ContainerWirelessTerm(InventoryPlayer ip, WirelessTerminalGuiObject montiorable) {
2014-02-03 05:33:50 +01:00
super( ip, montiorable );
wtgo = montiorable;
2014-02-03 05:33:50 +01:00
}
@Override
public void detectAndSendChanges()
{
super.detectAndSendChanges();
if ( !wtgo.rangeCheck() )
{
2014-02-09 02:34:52 +01:00
isContainerValid = false;
getPlayerInv().player.addChatMessage( PlayerMessages.OutOfRange.get() );
}
else
{
2014-02-09 06:08:27 +01:00
powerMultiplier = AEConfig.instance.wireless_getDrainRate( wtgo.getRange() );
}
}
2014-02-03 05:33:50 +01:00
}