Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.rabidpotato.colony.blocks.clock;
- import com.rabidpotato.colony.libs.RefStrings;
- import net.minecraft.block.Block;
- import net.minecraft.block.material.Material;
- import net.minecraft.client.renderer.texture.IIconRegister;
- import net.minecraft.entity.EntityLivingBase;
- import net.minecraft.item.ItemStack;
- import net.minecraft.util.IIcon;
- import net.minecraft.world.World;
- public class bBen extends Block{
- protected bBen(Material mat) {
- super(mat);
- this.setHardness(14.2F);
- this.setResistance(6.0F);
- this.setStepSound(soundTypeMetal);
- this.setHarvestLevel("pickaxe", 3);
- //s0 is Wood, 1 is Stone, 2 is Iron and 3 is Diamond.
- }
- @Override
- public void onBlockPlacedBy(World world, int x, int y, int z, EntityLivingBase player, ItemStack stack)
- {
- boolean status;
- Block needed = RotateClock.anClock;
- for(int k = 0; k < 3; k++){
- if(world.getBlock(x + k, y , z) == needed){
- if(world.getBlock(x, y + k, z) == needed){
- if(world.getBlock(x,y,z + k) == needed){
- status = true;
- }
- }
- }
- }
- if(status = true){
- for(int i = 0; i < 16; i++){
- world.setBlockMetadataWithNotify(x,y,z,i,3);
- }
- }
- }
- public IIcon[] icons = new IIcon[16];
- @Override
- public void registerBlockIcons(IIconRegister reg) {
- for (int i = 1; i < 16; i ++) {
- this.icons[i] = reg.registerIcon(RefStrings.MODID + ":clock/clocktower_" + i);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment