Posted February 8, 20169 yr Hello all, I've been writing up a PR for 2 @Cancelable Events that are fired when the glint effect is rendered onto an ItemStack/ over the armor layer, respectively, and I'm looking for some suggestions for adding things to the events before finalizing and submitting. Currently it passes: Both int glintValue : The integer that represents the color. This is formatted in aaaarrrrggggbbbb in the RenderItem#renderEffect, and I've translated this to the LayerArmorBase's equivalent function ItemStack theStack : The ItemStack getting rendered (ItemArmor for the armor) ItemStacks IBakedModel theModel : The itemstack's baked model Armor ModelBase theModel : The armor's ModelBase int armorSlot : The slot that the armor is in I've also added methods into Forge section of the Item class public int getItemGlintColor(ItemStack stack): returns int value for the itemstack glint public int getArmorGlintColor(ItemStack stack, int armorSlot): returns int value for the armor glint Being cancelable you can cancel rendering the vanilla effect entirely, and with the models past to you, you can render your own overlays onto the model (ie instead have a fire effect on fire enchanted weapons). The glintValue in the event is also used so that you can manipulate the colors in the event if you desire. Working example of using event to change potion item & boot armor to a red glint: https://www.dropbox.com/s/24tenlcwhmqsgyd/Screenshot%202016-02-08%2020.33.53.png?dl=1[/img] Patched Classes RenderItem LayerArmorBase Item I think its my java of the variables.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.