Kundello

Untitled

Apr 18th, 2018
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.79 KB | None | 0 0
  1. package fwldmod.common.blocks;
  2.  
  3. /**
  4. * Created by Mobius on 08.04.2018.
  5. */
  6. import java.util.Random;
  7.  
  8. import net.minecraft.block.Block;
  9. import net.minecraft.block.material.Material;
  10. import net.minecraft.client.renderer.texture.IIconRegister;
  11. import net.minecraft.item.Item;
  12. import net.minecraft.item.ItemStack;
  13. import net.minecraft.nbt.NBTTagCompound;
  14. import net.minecraft.util.IIcon;
  15. import net.minecraft.world.World;
  16. import net.minecraft.world.biome.BiomeGenBase;
  17. import fwldmod.FWLDMOD;
  18. /*import fwldmod.api.content.FWLDCBiomes;*/
  19. import fwldmod.api.content.FWLDCItems;
  20.  
  21. public class BlockFWLDSnowyStone extends Block
  22. {
  23. public enum BlockType
  24. {
  25. COBBLE, STONEBRICK, STONEBRICK_CIRCLE, STONEBRICK_CRACKED;
  26. }
  27.  
  28. private IIcon texture;
  29. private BlockType type;
  30.  
  31. public BlockFWLDSnowyStone(Material material, BlockType type)
  32. {
  33. super(material);
  34. this.setHarvestLevel("pickaxe", 3);
  35. this.type = type;
  36.  
  37. this.setCreativeTab(FWLDMOD.tabFWLDMOD);
  38.  
  39. switch (type)
  40. {
  41. case COBBLE:
  42. this.setHardness(1.0F);
  43. this.setStepSound(Block.soundTypePiston);
  44. break;
  45.  
  46. case STONEBRICK:
  47. this.setHardness(1.0F);
  48. this.setStepSound(Block.soundTypePiston);
  49. break;
  50. case STONEBRICK_CIRCLE:
  51. this.setHardness(1.0F);
  52. this.setStepSound(Block.soundTypePiston);
  53. break;
  54. case STONEBRICK_CRACKED:
  55. this.setHardness(1.0F);
  56. this.setStepSound(Block.soundTypePiston);
  57. break;
  58.  
  59.  
  60. default:
  61. break;
  62. }
  63. }
  64.  
  65. @Override
  66. public void registerBlockIcons(IIconRegister iconRegister)
  67. {
  68. switch (type)
  69. {
  70. case COBBLE:
  71. texture = iconRegister.registerIcon("fwldmod:snowy_cobble");
  72. break;
  73. case STONEBRICK:
  74. texture = iconRegister.registerIcon("fwldmod:snowy_stonebrick");
  75. break;
  76. case STONEBRICK_CIRCLE:
  77. texture = iconRegister.registerIcon("fwldmod:snowy_stonebrick_circle");
  78. break;
  79. case STONEBRICK_CRACKED:
  80. texture = iconRegister.registerIcon("fwldmod:snowy_stonebrick_cracked");
  81. break;
  82.  
  83.  
  84.  
  85. default:
  86. break;
  87. }
  88. }
  89.  
  90.  
  91.  
  92.  
  93.  
  94. @Override
  95. public int damageDropped(int meta)
  96. {
  97.  
  98. return meta;
  99. }
  100.  
  101. @Override
  102. public int quantityDropped(int meta, int fortune, Random random)
  103. {
  104.  
  105. return 1;
  106. }
  107.  
  108. @Override
  109. public IIcon getIcon(int side, int meta)
  110. {
  111. return texture;
  112. }
  113. }
Advertisement
Add Comment
Please, Sign In to add comment