use of com.bewitchment.api.ritual.EnumGlyphType in project Bewitchment by Um-Mitternacht.
the class ClientProxy method init.
@Override
public void init(FMLInitializationEvent event) {
Keybinds.registerKeys();
BlockColors blocks = Minecraft.getMinecraft().getBlockColors();
// Block Colors
blocks.registerBlockColorHandler(new BlockCandleColorHandler(), ModBlocks.candle_medium, ModBlocks.candle_small, ModBlocks.candle_medium_lit, ModBlocks.candle_small_lit);
blocks.registerBlockColorHandler(new IBlockColor() {
@Override
public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos, int tintIndex) {
EnumGlyphType type = state.getValue(BlockCircleGlyph.TYPE);
switch(type) {
case ENDER:
return 0x770077;
case GOLDEN:
return 0xe3dc3c;
case NETHER:
return 0xbb0000;
default:
case NORMAL:
return 0xFFFFFF;
case ANY:
// A green one should never happen!
return 0x00FF00;
}
}
}, ModBlocks.ritual_glyphs);
blocks.registerBlockColorHandler(new IBlockColor() {
@Override
public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos, int tintIndex) {
if (tintIndex == 1) {
return Color.HSBtoRGB((pos.getX() + pos.getY() + pos.getZ()) % 50 / 50f, 0.4f, 1f);
}
return -1;
}
}, ModBlocks.crystal_ball);
ItemColors items = Minecraft.getMinecraft().getItemColors();
// Item Colors
items.registerItemColorHandler(new ItemCandleColorHandler(), Item.getItemFromBlock(ModBlocks.candle_medium), Item.getItemFromBlock(ModBlocks.candle_small));
items.registerItemColorHandler(new BrewItemColorHandler(), ModItems.brew_phial_drink, ModItems.brew_phial_splash, ModItems.brew_phial_linger);
items.registerItemColorHandler(new IItemColor() {
@Override
public int colorMultiplier(ItemStack stack, int tintIndex) {
if (tintIndex == 0) {
ISpell s = ItemSpellPage.getSpellFromItemStack(stack);
if (s != null)
return s.getColor();
}
return -1;
}
}, ModItems.spell_page);
NetworkRegistry.INSTANCE.registerGuiHandler(Bewitchment.instance, new GuiHandler());
}
Aggregations