Fix build issues outside IDE (again)

This commit is contained in:
simibubi 2020-05-29 00:19:47 +02:00
parent c53f9c2079
commit 9973a853cc
3 changed files with 5 additions and 4 deletions

View file

@ -116,7 +116,7 @@ public class AllItems {
.register(); .register();
public static final ItemEntry<VerticalGearboxItem> VERTICAL_GEARBOX = REGISTRATE.item("vertical_gearbox", VerticalGearboxItem::new) public static final ItemEntry<VerticalGearboxItem> VERTICAL_GEARBOX = REGISTRATE.item("vertical_gearbox", VerticalGearboxItem::new)
.model(AssetLookup.customItemModel("gearbox", "item_vertical")) .model(AssetLookup.<VerticalGearboxItem>customItemModel("gearbox", "item_vertical"))
.register(); .register();
public static final ItemEntry<SuperGlueItem> SUPER_GLUE = REGISTRATE.item("super_glue", SuperGlueItem::new) public static final ItemEntry<SuperGlueItem> SUPER_GLUE = REGISTRATE.item("super_glue", SuperGlueItem::new)

View file

@ -46,7 +46,7 @@ public class AssetLookup {
* Generate item model inheriting from a seperate model in * Generate item model inheriting from a seperate model in
* models/block/x/item.json * models/block/x/item.json
*/ */
public static ItemModelBuilder customItemModel(DataGenContext<Item, ? extends BlockItem> ctx, public static <I extends BlockItem> ItemModelBuilder customItemModel(DataGenContext<Item, I> ctx,
RegistrateItemModelProvider prov) { RegistrateItemModelProvider prov) {
return prov.blockItem(() -> ctx.getEntry() return prov.blockItem(() -> ctx.getEntry()
.getBlock(), "/item"); .getBlock(), "/item");

View file

@ -135,8 +135,9 @@ public class CreateRegistrate extends AbstractRegistrate<CreateRegistrate> {
public static <T extends Item, P> NonNullUnaryOperator<ItemBuilder<T, P>> customRenderedItem( public static <T extends Item, P> NonNullUnaryOperator<ItemBuilder<T, P>> customRenderedItem(
Supplier<NonNullFunction<IBakedModel, ? extends CustomRenderedItemModel>> func) { Supplier<NonNullFunction<IBakedModel, ? extends CustomRenderedItemModel>> func) {
return b -> b.properties(p -> p.setISTER(() -> func.get() return b -> b.properties(p -> p.setISTER(() -> () -> func.get()
.apply(null)::createRenderer)) .apply(null)
.createRenderer()))
.onRegister(entry -> onClient(() -> () -> registerCustomRenderedItem(entry, func))); .onRegister(entry -> onClient(() -> () -> registerCustomRenderedItem(entry, func)));
} }