Fix ItemLayerModel erroneously adding particle texture to layer texture list (#9441)

This commit is contained in:
Dennis C authored and GitHub committed 2023-04-07 08:16:17 +02:00
1 parent e6aaaff3f3
commit 01846c729a
3 files changed
+5 -4

No files matched your search

@@ -56,10 +56,9 @@ public class ItemLayerModel implements IUnbakedGeometry<ItemLayerModel>
@Override
public BakedModel bake(IGeometryBakingContext context, ModelBaker baker, Function<Material, TextureAtlasSprite> spriteGetter, ModelState modelState, ItemOverrides overrides, ResourceLocation modelLocation)
{
if (textures == null) {
if (textures == null)
{
ImmutableList.Builder<Material> builder = ImmutableList.builder();
if (context.hasMaterial("particle"))
builder.add(context.getMaterial("particle"));
for (int i = 0; context.hasMaterial("layer" + i); i++)
{
builder.add(context.getMaterial("layer" + i));