The lambda has to be replaced with an explicit method to annotate it with @OnlyIn.
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
package appeng.block.crafting;
|
||||
|
||||
import net.minecraft.client.renderer.RenderType;
|
||||
import net.minecraft.client.renderer.model.IBakedModel;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
import net.minecraftforge.api.distmarker.Dist;
|
||||
import net.minecraftforge.api.distmarker.OnlyIn;
|
||||
|
||||
@@ -16,13 +18,16 @@ public class CraftingMonitorBlockRendering extends BlockRenderingCustomizer {
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
public void customize(IBlockRendering rendering, IItemRendering itemRendering) {
|
||||
rendering.renderType(RenderType.getCutout());
|
||||
rendering.modelCustomizer((path, model) -> {
|
||||
// The formed model handles rotations itself, the unformed one does not
|
||||
if (model instanceof MonitorBakedModel) {
|
||||
return model;
|
||||
}
|
||||
return new AutoRotatingBakedModel(model);
|
||||
});
|
||||
rendering.modelCustomizer(CraftingMonitorBlockRendering::customizeModel);
|
||||
}
|
||||
|
||||
@OnlyIn(Dist.CLIENT)
|
||||
private static IBakedModel customizeModel(ResourceLocation path, IBakedModel model) {
|
||||
// The formed model handles rotations itself, the unformed one does not
|
||||
if (model instanceof MonitorBakedModel) {
|
||||
return model;
|
||||
}
|
||||
return new AutoRotatingBakedModel(model);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user