Skip to content

Instantly share code, notes, and snippets.

@porl
Created June 9, 2013 15:34
Show Gist options
  • Save porl/5743958 to your computer and use it in GitHub Desktop.
Save porl/5743958 to your computer and use it in GitHub Desktop.
Java Version
package porl.testmod;
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.IconRegister;
import porl.scalatest.CreativeTabPorlMods$;
/**
* Created with IntelliJ IDEA.
* User: porl
* Date: 9/06/13
* Time: 7:07 PM
* To change this template use File | Settings | File Templates.
*/
public class BlockTutorialBlock extends Block{
public BlockTutorialBlock(int id, Material par2Material) {
super(id, par2Material);
this.setCreativeTab(CreativeTabPorlMods$.MODULE$); // call scala object
}
@SideOnly(Side.CLIENT)
public void registerIcons(IconRegister par1IconRegister)
{
this.blockIcon = par1IconRegister.registerIcon(Tutorial.modid + ":" + this.getUnlocalizedName2());
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment