Guest User

Untitled

a guest
Apr 23rd, 2016
188
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. package neg2013.acsension.infrastructure;
  2.  
  3. import neg2013.acsension.Acsension;
  4. import neg2013.acsension.interfaces.IAc;
  5. import net.minecraft.block.Block;
  6. import net.minecraft.block.material.Material;
  7. import net.minecraft.client.Minecraft;
  8. import net.minecraft.world.IBlockAccess;
  9. import net.minecraft.world.World;
  10.  
  11. public class BlockRedstoneConverter extends BlockAC{
  12.  
  13. public BlockRedstoneConverter(Material material) {
  14. super(material);
  15.  
  16.  
  17. }
  18.  
  19. @Override
  20. public int MaxEnergyStored() {
  21. // TODO Auto-generated method stub
  22. return 2;
  23. }
  24.  
  25. @Override
  26. public boolean CanGenerateEnergy(int x, int y, int z) {
  27. // TODO Auto-generated method stub
  28. return false;
  29. }
  30.  
  31. @Override
  32. public boolean CanConsumeEnergy() {
  33. // TODO Auto-generated method stub
  34. return true;
  35. }
  36.  
  37. @Override
  38. public boolean canAcceptEnergy() {
  39. // TODO Auto-generated method stub
  40. return true;
  41. }
  42.  
  43. //done
  44. @Override
  45. public boolean canConnectToAc() {
  46.  
  47. return true;
  48. }
  49.  
  50. //done
  51. @Override
  52. public int EnergyOut(IBlockAccess access, int x, int y, int z, World world) {
  53.  
  54. return 0;
  55. }
  56.  
  57. //done
  58. @Override
  59. public int EnergyDraw(IBlockAccess access, int x, int y, int z, World world) {
  60.  
  61. return 1;
  62. }
  63.  
  64. //done
  65. @Override
  66. public int EnergyPush(IBlockAccess access, int x, int y, int z, World world) {
  67. return 0;
  68. }
  69.  
  70. /*@Override
  71. public int EnergyIn (IBlockAccess access, int x, int y, int z, World world) {
  72.  
  73. Block block = access.getBlock(x, y, z);
  74.  
  75. if(block == Acsension.blockDuct){
  76.  
  77. }
  78.  
  79. return 0;
  80. }*/
  81.  
  82. @Override
  83. public int EnergyConsuming() {
  84.  
  85. return 1;
  86. }
  87.  
  88.  
  89. @Override
  90. public int EnergyStored(IBlockAccess access, int x, int y, int z, World world) {
  91. int energyStored = EnergyStored( access, x, y, z, world);
  92.  
  93.  
  94.  
  95. return super.EnergyStored( access, x, y, z, world);
  96.  
  97. }
  98.  
  99.  
  100. @Override
  101. public boolean IsPowered(IBlockAccess access, int x, int y, int z, World world) {
  102.  
  103. this.isProvidingStrongPower(access, x, y, z, 6);
  104.  
  105. if(IsPowered(access, x, y, z, world)){
  106. this.setLightLevel(15f);
  107. this.lightValue = 15;
  108. }
  109.  
  110. return super.IsPowered(access, x, y, z, world);
  111. }
  112.  
  113.  
  114. @Override
  115. public boolean canConnectRedstone(IBlockAccess world, int x, int y, int z, int side) {
  116.  
  117. return true;
  118. }
  119.  
  120. public boolean canProvidePower()
  121. {
  122. return true;
  123. }
  124.  
  125. }
Advertisement
Add Comment
Please, Sign In to add comment