Fix build issues outside IDE

This commit is contained in:
simibubi 2020-05-25 13:34:25 +02:00
parent 67f88e666c
commit 85a30afc2b
2 changed files with 4 additions and 4 deletions

View File

@ -44,8 +44,7 @@ public class PalettesVariantEntry {
if (pattern.hasFoliage())
builder.item()
.transform(CreateRegistrate.itemColors(() -> AllColorHandlers::getGrassyItem)::apply)
.build();
.transform(CreateRegistrate.itemColors(() -> AllColorHandlers::getGrassyItem));
else
builder.simpleItem();

View File

@ -124,9 +124,10 @@ public class CreateRegistrate extends AbstractRegistrate<CreateRegistrate> {
return b -> b.onRegister(entry -> onClient(() -> () -> registerBlockVertexColor(entry, colorFunc)));
}
public static NonNullUnaryOperator<ItemBuilder<? extends BlockItem, ?>> itemColors(
public static <I extends BlockItem, P> NonNullFunction<ItemBuilder<I, P>, P> itemColors(
Supplier<Supplier<IItemColor>> colorFunc) {
return b -> b.onRegister(entry -> onClient(() -> () -> registerItemColor(entry, colorFunc)));
return b -> b.onRegister(entry -> onClient(() -> () -> registerItemColor(entry, colorFunc)))
.build();
}
protected static void onClient(Supplier<Runnable> toRun) {