use of net.silentchaos512.gear.item.gear.GearArmorItem in project Silent-Gear by SilentChaos512.
the class ColorHandlers method onItemColors.
public static void onItemColors(ColorHandlerEvent.Item event) {
ItemColors itemColors = event.getItemColors();
if (itemColors == null) {
SilentGear.LOGGER.error("ItemColors is null?", new IllegalStateException("wat?"));
return;
}
// Tools, armor, shields, etc.
ForgeRegistries.ITEMS.getValues().stream().filter(item -> item instanceof GearArmorItem || item instanceof GearShieldItem).map(item -> (ICoreItem) item).forEach(item -> itemColors.register(item.getItemColors(), item));
Registration.getItems(item -> item instanceof IColoredMaterialItem).forEach(item -> {
IColoredMaterialItem coloredMaterialItem = (IColoredMaterialItem) item;
itemColors.register(coloredMaterialItem::getColor, item);
});
}
Aggregations