Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package neg2013.acsension.infrastructure;
- import java.util.ArrayList;
- import cpw.mods.fml.relauncher.Side;
- import cpw.mods.fml.relauncher.SideOnly;
- import neg2013.acsension.block.BlockGenny;
- import neg2013.acsension.interfaces.EnergyStorage;
- import neg2013.acsension.interfaces.IAc;
- import net.minecraft.block.Block;
- import net.minecraft.block.ITileEntityProvider;
- import net.minecraft.block.material.Material;
- import net.minecraft.client.Minecraft;
- import net.minecraft.client.renderer.texture.IIconRegister;
- import net.minecraft.tileentity.TileEntity;
- import net.minecraft.util.IIcon;
- import net.minecraft.world.IBlockAccess;
- import net.minecraft.world.World;
- import net.minecraftforge.common.util.ForgeDirection;
- public class BlockSolarGenny extends BlockAC implements ITileEntityProvider
- {
- @SideOnly(Side.CLIENT)
- private IIcon field_150035_a;
- @SideOnly(Side.CLIENT)
- private IIcon field_150034_b;
- public BlockSolarGenny(Material material) {
- super(material);
- }//constructor
- @SideOnly(Side.CLIENT)
- public void registerBlockIcons(IIconRegister p_149651_1_)
- {
- this.blockIcon = p_149651_1_.registerIcon(this.getTextureName() + "_side" );
- this.field_150034_b = p_149651_1_.registerIcon(this.getTextureName() + "_side");
- this.field_150035_a = p_149651_1_.registerIcon(this.getTextureName() + "_top");
- }//register iicon
- @Override
- public IIcon getIcon(int p_149691_1_, int p_149691_2_)
- {
- return p_149691_1_ == 1 ? this.field_150035_a : (p_149691_1_ == 0 ? this.field_150035_a : (p_149691_1_ != 2 && p_149691_1_ != 4 ? this.blockIcon : this.field_150034_b));
- }//get iicon
- //power shit
- //done
- @Override
- public int MaxEnergyStored() {
- return 128;
- }
- //done
- @Override
- public boolean CanGenerateEnergy(int x, int y, int z) {
- if(Minecraft.getMinecraft().theWorld.canBlockSeeTheSky(x, y, z)){
- if(Minecraft.getMinecraft().theWorld.isDaytime()){
- return true;
- }//day
- }//sky
- return false;
- }
- //done
- @Override
- public boolean canAcceptEnergy() {
- return false;
- }
- @Override
- public int EnergyGenerating() {
- if (MaxEnergyStored() == 128){
- return 0;
- }
- else{return 8;}
- }
- //done
- @Override
- public boolean canConnectToAc() {
- return true;
- }
- //done
- @Override
- public boolean CanConsumeEnergy() {
- return false;
- }
- @Override
- public int EnergyStored(IBlockAccess access, int x, int y, int z, World world) {
- int tick = tickRate(Minecraft.getMinecraft().theWorld);
- int energyStored = tick * EnergyGenerating();
- return energyStored;
- }
- //done
- @Override
- public int EnergyIn(IBlockAccess access, int x, int y, int z, World world) {
- return 0;
- }
- //done
- @Override
- public int EnergyPush(IBlockAccess access, int x, int y, int z, World world) {
- return 8;
- }
- @Override
- public int EnergyConsuming() {
- return 0;
- }
- @Override
- public TileEntity createNewTileEntity(World p_149915_1_, int p_149915_2_) {
- // TODO Auto-generated method stub
- return null;
- }
- /*
- @Override
- public int EnergyOut(IBlockAccess access, int x, int y, int z, World world) {
- if(EnergyDraw(access, x, y, z, world) >= 1){
- return EnergyDraw(access, x, y, z, world);
- }
- else{return 0;}
- }
- */
- }//class body
Add Comment
Please, Sign In to add comment