added checked way to obain sub blocks
This commit is contained in:
@@ -3,6 +3,8 @@ package appeng.block.networking;
|
||||
import java.util.EnumSet;
|
||||
import java.util.List;
|
||||
|
||||
import cpw.mods.fml.relauncher.Side;
|
||||
import cpw.mods.fml.relauncher.SideOnly;
|
||||
import net.minecraft.creativetab.CreativeTabs;
|
||||
import net.minecraft.item.Item;
|
||||
import net.minecraft.item.ItemStack;
|
||||
@@ -37,15 +39,17 @@ public class BlockEnergyCell extends AEBaseBlock
|
||||
}
|
||||
|
||||
@Override
|
||||
public void getSubBlocks(Item id, CreativeTabs tab, List list)
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void getCheckedSubBlocks(Item item, CreativeTabs tabs, List<ItemStack> itemStacks)
|
||||
{
|
||||
super.getSubBlocks( id, tab, list );
|
||||
super.getCheckedSubBlocks( item, tabs, itemStacks );
|
||||
|
||||
ItemStack charged = new ItemStack( this, 1 );
|
||||
NBTTagCompound tag = Platform.openNbtData( charged );
|
||||
tag.setDouble( "internalCurrentPower", getMaxPower() );
|
||||
tag.setDouble( "internalMaxPower", getMaxPower() );
|
||||
list.add( charged );
|
||||
|
||||
itemStacks.add( charged );
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user