use of logictechcorp.libraryex.item.ModSpawnEggItem in project NetherEx by LogicTechCorp.
the class NetherEx method onRegisterItemColor.
@OnlyIn(Dist.CLIENT)
private void onRegisterItemColor(ColorHandlerEvent.Item event) {
ItemColors colors = event.getItemColors();
NetherExItems.getItems().forEach(registryObject -> {
registryObject.ifPresent(item -> {
if (item instanceof ModSpawnEggItem) {
colors.register((color, index) -> ((ModSpawnEggItem) item).getColor(index), item);
}
});
});
}
Aggregations