Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package net.minecraft.src;
- import java.util.Random;
- public class BlockStepBase extends Block
- {
- public BlockStepBase(int i, int j)
- {
- super(i,j,Material.ground);
- if(i==110)
- {
- setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
- }
- setLightOpacity(255);
- }
- public int getBlockTextureFromSideAndMetadata(int i, int j)
- {
- switch(j)
- {
- case 0://first metadata
- return mod_Block.blockBaseTexture;
- case 1://second metadata
- return mod_Block.blockBlank1Texture;
- case 2:
- return mod_Block.blockBlank2Texture;
- default://any other metadata
- return mod_Block.blockBaseTexture;
- }
- }
- public boolean isOpaqueCube()
- {
- return false;
- }
- public int getRenderBlockPass()
- {
- return 1;
- }
- public int idDropped(int i, Random random)
- {
- return 110;
- }
- public int quantityDropped(Random random)
- {
- if(blockID==110)
- {
- return 1;
- }
- return 2;
- }
- public void onBlockAdded(World world, int i, int j, int k)
- {
- if(blockID != 110)
- {
- super.onBlockAdded(world, i, j, k);
- }
- int l = world.getBlockId(i, j - 1, k);
- int i1 = world.getBlockMetadata(i, j, k);
- int j1 = world.getBlockMetadata(i, j - 1, k);
- if(i1 != j1)
- {
- return;
- }
- if(l == 110)
- {
- world.setBlockWithNotify(i, j, k, 0);
- world.setBlockAndMetadataWithNotify(i, j - 1, k, 111, i1);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement