use of net.minecraftforge.client.model.BakedItemModel in project LogisticsPipes by RS485.
the class FluidContainerRenderer method bake.
@Nonnull
@Override
public IBakedModel bake(@Nonnull IModelState state, @Nonnull VertexFormat format, @Nonnull Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
ImmutableMap<ItemCameraTransforms.TransformType, TRSRTransformation> transformMap = PerspectiveMapWrapper.getTransforms(state);
ImmutableList.Builder<BakedQuad> builder = ImmutableList.builder();
IBakedModel model = (new ItemLayerModel(ImmutableList.of(EMPTY))).bake(state, format, bakedTextureGetter);
builder.addAll(model.getQuads(null, null, 0));
TextureAtlasSprite particleSprite = model.getParticleTexture();
return new BakedItemModel(builder.build(), particleSprite, Maps.immutableEnumMap(transformMap), new FluidContainerItemOverrideList(state, format, transformMap, bakedTextureGetter));
}
Aggregations