Files
Chisel/src/main/java/com/cricketcraft/chisel/utils/BlockTexturedOre.java
T
tterrag1098 82792ed22e The great format and clean up. IMPORTANT: Read below.
All devs and contributors should use the provided formatter settings. 
If your IDE does not support the format, the rules are simple, it is the
default java formatting rules, with 200char line lengths and 1 extra
line after class definitions.
2015-01-07 19:50:18 -05:00

56 lines
994 B
Java

package com.cricketcraft.chisel.utils;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
public class BlockTexturedOre extends Block {
int currentPass;
Block base;
IIcon icon;
String iconFile;
public BlockTexturedOre(Material mat, Block base) {
super(mat);
this.base = base;
}
public BlockTexturedOre(Material mat, String iconFile) {
super(mat);
this.iconFile = iconFile;
}
@Override
public boolean renderAsNormalBlock() {
return false;
}
@Override
public int getRenderType() {
return BlockTexturedOreRenderer.id;
}
@Override
public int getRenderBlockPass() {
return 1;
}
@Override
public boolean canRenderInPass(int pass) {
currentPass = pass;
return pass == 1 || pass == 0;
}
@Override
public void registerBlockIcons(IIconRegister register) {
if (iconFile != null)
icon = register.registerIcon(iconFile);
}
}