mirror of
https://github.com/HbmMods/Hbm-s-Nuclear-Tech-GIT.git
synced 2026-01-25 10:32:49 +00:00
49 lines
1.3 KiB
Java
49 lines
1.3 KiB
Java
package com.hbm.blocks.generic;
|
|
|
|
import com.hbm.blocks.ModBlocks;
|
|
import com.hbm.render.block.ct.CT;
|
|
import com.hbm.render.block.ct.CTStitchReceiver;
|
|
import com.hbm.render.block.ct.IBlockCT;
|
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
|
import net.minecraft.block.Block;
|
|
import net.minecraft.block.material.Material;
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
import net.minecraft.util.IIcon;
|
|
import net.minecraft.world.IBlockAccess;
|
|
|
|
public class BlockDecoCT extends BlockOre implements IBlockCT {
|
|
|
|
public BlockDecoCT(Material mat) {
|
|
super(mat);
|
|
}
|
|
|
|
@Override
|
|
public int getRenderType() {
|
|
return CT.renderID;
|
|
}
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
public CTStitchReceiver rec;
|
|
|
|
@SideOnly(Side.CLIENT)
|
|
public void registerBlockIcons(IIconRegister reg) {
|
|
this.blockIcon = reg.registerIcon(this.getTextureName());
|
|
this.rec = IBlockCT.primeReceiver(reg, this.getTextureName(), this.blockIcon);
|
|
}
|
|
|
|
@Override
|
|
public IIcon[] getFragments(IBlockAccess world, int x, int y, int z) {
|
|
return rec.fragCache;
|
|
}
|
|
|
|
@Override
|
|
public boolean canConnect(IBlockAccess world, int x, int y, int z, Block block) {
|
|
// i don't care
|
|
if(this == ModBlocks.deco_steel && block == ModBlocks.deco_rusty_steel) return true;
|
|
if(this == ModBlocks.deco_rusty_steel && block == ModBlocks.deco_steel) return true;
|
|
return this == block;
|
|
}
|
|
}
|