Highly incomplete code. First work on porting to 1.12. Still need to rework a LOT of things.

This commit is contained in:
Gunther De Wachter
2017-07-06 01:57:19 +02:00
parent d67f97cd16
commit fbcf8c4705
127 changed files with 850 additions and 425 deletions
@@ -23,9 +23,11 @@ import java.text.MessageFormat;
import java.util.List;
import net.minecraft.block.Block;
import net.minecraft.client.util.ITooltipFlag;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;
@@ -48,9 +50,9 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
@Override
@SideOnly( Side.CLIENT )
public void addCheckedInformation( final ItemStack itemStack, final EntityPlayer player, final List<String> toolTip, final boolean advancedTooltips )
public void addCheckedInformation( final ItemStack stack, final World world, final List<String> lines, final ITooltipFlag advancedTooltips )
{
final NBTTagCompound tag = itemStack.getTagCompound();
final NBTTagCompound tag = stack.getTagCompound();
double internalCurrentPower = 0;
final double internalMaxPower = this.getMaxEnergyCapacity();
@@ -61,7 +63,7 @@ public class AEBaseItemBlockChargeable extends AEBaseItemBlock implements IAEIte
final double percent = internalCurrentPower / internalMaxPower;
toolTip.add( GuiText.StoredEnergy.getLocal() + ':' + MessageFormat.format( " {0,number,#} ", internalCurrentPower ) + Platform.gui_localize( PowerUnits.AE.unlocalizedName ) + " - " + MessageFormat.format( " {0,number,#.##%} ", percent ) );
lines.add( GuiText.StoredEnergy.getLocal() + ':' + MessageFormat.format( " {0,number,#} ", internalCurrentPower ) + Platform.gui_localize( PowerUnits.AE.unlocalizedName ) + " - " + MessageFormat.format( " {0,number,#.##%} ", percent ) );
}
private double getMaxEnergyCapacity()