mirror of
https://github.com/GTNewHorizons/ThaumicEnergistics.git
synced 2026-11-23 21:49:39 +00:00
Wireless Essentia Terminal Charging
Fixes #130: Wireless Essentia Terminal can be charged from other power systems.
This commit is contained in:
1 parent
200ab01a20
commit
8a32ff6ea4
3 files changed
+9
-31
No files matched your search
@@ -3,6 +3,7 @@
|
||||
Version numbers simplified.
|
||||
Fixes #179: Export Bus now has void jar support.
|
||||
Fixes #181: Vis Relay Interfaces now support full P2P, can export vis.
|
||||
Fixes #130: Wireless Essentia Terminal can be charged from other power systems.
|
||||
Merged RV2 branch into main branch.
|
||||
API Updated to support third-party code setting ACT Crafting Grid. #135
|
||||
|
||||
|
||||
+1
-1
@@ -22,7 +22,7 @@ group= "thaumicenergistics" // http://maven.apache.org/guides/mini/guide-naming-
|
||||
archivesBaseName = "ThaumicEnergistics"
|
||||
|
||||
minecraft {
|
||||
version = "1.7.10-10.13.2.1291"
|
||||
version = "1.7.10-10.13.3.1403-1.7.10"
|
||||
runDir = "eclipse/assets"
|
||||
}
|
||||
|
||||
|
||||
@@ -11,14 +11,16 @@ import net.minecraft.world.World;
|
||||
import thaumicenergistics.ThaumicEnergistics;
|
||||
import thaumicenergistics.api.IWirelessEssentiaTerminal;
|
||||
import thaumicenergistics.api.ThEApi;
|
||||
import thaumicenergistics.inventory.HandlerWirelessEssentiaTerminal;
|
||||
import thaumicenergistics.registries.ThEStrings;
|
||||
import appeng.api.config.AccessRestriction;
|
||||
import appeng.api.config.PowerMultiplier;
|
||||
import appeng.core.localization.GuiText;
|
||||
import appeng.items.tools.powered.powersink.AEBasePoweredItem;
|
||||
import com.google.common.base.Optional;
|
||||
|
||||
// Note to fix inconsistent hierarchy: Include the COFHCore & IC2 Api's into
|
||||
// build path
|
||||
public class ItemWirelessEssentiaTerminal
|
||||
extends Item
|
||||
extends AEBasePoweredItem
|
||||
implements IWirelessEssentiaTerminal
|
||||
{
|
||||
/**
|
||||
@@ -41,6 +43,8 @@ public class ItemWirelessEssentiaTerminal
|
||||
*/
|
||||
public ItemWirelessEssentiaTerminal()
|
||||
{
|
||||
super( POWER_STORAGE, Optional.<String> absent() );
|
||||
|
||||
// Can not stack
|
||||
this.setMaxStackSize( 1 );
|
||||
|
||||
@@ -74,33 +78,6 @@ public class ItemWirelessEssentiaTerminal
|
||||
return dataTag;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds information about the wireless terminal to its tooltip.
|
||||
*/
|
||||
@Override
|
||||
public void addInformation( final ItemStack wirelessTerminal, final EntityPlayer player, final List tooltip, final boolean advancedItemTooltips )
|
||||
{
|
||||
// Get the current power
|
||||
double storedPower = this.getAECurrentPower( wirelessTerminal );
|
||||
|
||||
// Add the energy amount
|
||||
tooltip.add( String.format( "%s %.0f AE - %.1f%%", GuiText.StoredEnergy.getLocal(), storedPower,
|
||||
100.0D * ( storedPower / ItemWirelessEssentiaTerminal.POWER_STORAGE ) ) );
|
||||
|
||||
// Add link info
|
||||
if( HandlerWirelessEssentiaTerminal.isTerminalLinked( this, wirelessTerminal ) )
|
||||
{
|
||||
// Is linked
|
||||
tooltip.add( GuiText.Linked.getLocal() );
|
||||
}
|
||||
else
|
||||
{
|
||||
// Is not linked
|
||||
tooltip.add( GuiText.Unlinked.getLocal() );
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Takes power from the wireless terminal.
|
||||
*
|
||||
|
||||
Reference in new issue
Block a user