Added skystone, skystone block, skystone brick, skystone small brick, certus quartz, certus quartz pillar, chiseled certus quartz and fluix stars

To integrate these into the current system, some changes to the background had to be done, especially to the feature handler. It now uses an interface to work against which you can implement to get your own feature handler instead modifying the base one and add several special cases code
This commit is contained in:
thatsIch
2014-11-18 16:47:30 +01:00
parent 1572351a54
commit 56aad10ffe
46 changed files with 2624 additions and 1401 deletions
@@ -18,41 +18,48 @@
package appeng.items.tools.powered.powersink;
import com.google.common.base.Optional;
import net.minecraft.item.ItemStack;
import appeng.api.config.PowerUnits;
import appeng.transformer.annotations.integration.Interface;
import cofh.api.energy.IEnergyContainerItem;
@Interface(iface = "cofh.api.energy.IEnergyContainerItem", iname = "RFItem")
import appeng.api.config.PowerUnits;
import appeng.transformer.annotations.integration.Interface;
@Interface( iface = "cofh.api.energy.IEnergyContainerItem", iname = "RFItem" )
public class RedstoneFlux extends IC2 implements IEnergyContainerItem
{
public RedstoneFlux(Class c, String subName) {
public RedstoneFlux( Class c, Optional<String> subName )
{
super( c, subName );
}
@Override
public int receiveEnergy(ItemStack is, int maxReceive, boolean simulate)
public int receiveEnergy( ItemStack is, int maxReceive, boolean simulate )
{
return maxReceive - (int) injectExternalPower( PowerUnits.RF, is, maxReceive, simulate );
return maxReceive - ( int ) injectExternalPower( PowerUnits.RF, is, maxReceive, simulate );
}
@Override
public int extractEnergy(ItemStack container, int maxExtract, boolean simulate)
public int extractEnergy( ItemStack container, int maxExtract, boolean simulate )
{
return 0;
}
@Override
public int getEnergyStored(ItemStack is)
public int getEnergyStored( ItemStack is )
{
return (int) PowerUnits.AE.convertTo( PowerUnits.RF, getAECurrentPower( is ) );
return ( int ) PowerUnits.AE.convertTo( PowerUnits.RF, getAECurrentPower( is ) );
}
@Override
public int getMaxEnergyStored(ItemStack is)
public int getMaxEnergyStored( ItemStack is )
{
return (int) PowerUnits.AE.convertTo( PowerUnits.RF, getAEMaxPower( is ) );
return ( int ) PowerUnits.AE.convertTo( PowerUnits.RF, getAEMaxPower( is ) );
}
}