use of WayofTime.bloodmagic.client.key.KeyBindings in project BloodMagic by WayofTime.
the class KeyProcessor method onMessage.
@Override
public IMessage onMessage(KeyProcessor msg, MessageContext ctx) {
EntityPlayer entityPlayer = ctx.getServerHandler().player;
if (entityPlayer != null) {
ItemStack heldStack = entityPlayer.getHeldItemMainhand();
if (heldStack.getItem() instanceof IKeybindable) {
if (msg.keyId < 0 || msg.keyId >= KeyBindings.values().length) {
return null;
}
KeyBindings key = KeyBindings.values()[msg.keyId];
((IKeybindable) heldStack.getItem()).onKeyPressed(heldStack, entityPlayer, key, msg.showInChat);
}
}
return null;
}
use of WayofTime.bloodmagic.client.key.KeyBindings in project BloodMagic by WayofTime.
the class ClientProxy method preInit.
@Override
public void preInit() {
super.preInit();
OBJLoader.INSTANCE.addDomain(BloodMagic.MODID);
ClientRegistry.bindTileEntitySpecialRenderer(TileInversionPillar.class, new AnimationTESR<TileInversionPillar>() {
@Override
public void handleEvents(TileInversionPillar chest, float time, Iterable<Event> pastEvents) {
chest.handleEvents(time, pastEvents);
}
});
ClientRegistry.bindTileEntitySpecialRenderer(TileAlchemyArray.class, new RenderAlchemyArray());
ClientRegistry.bindTileEntitySpecialRenderer(TileAltar.class, new RenderAltar());
ClientRegistry.bindTileEntitySpecialRenderer(TileRoutingNode.class, new RenderItemRoutingNode());
ClientRegistry.bindTileEntitySpecialRenderer(TileDemonCrucible.class, new RenderDemonCrucible());
ClientRegistry.bindTileEntitySpecialRenderer(TileMimic.class, new RenderMimic());
ClientRegistry.bindTileEntitySpecialRenderer(TileBloodTank.class, new RenderBloodTank());
// Initialize key-binds during startup so they load correctly
for (KeyBindings key : KeyBindings.values()) key.getKey();
}
Aggregations