All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.magistuarmory.client.render.entity.layer.PatternLayer Maven / Gradle / Ivy

There is a newer version: 8.10
Show newest version
package com.magistuarmory.client.render.entity.layer;

import com.magistuarmory.EpicKnights;
import com.mojang.datafixers.util.Pair;
import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.class_1767;
import net.minecraft.class_1921;
import net.minecraft.class_2582;
import net.minecraft.class_2960;
import net.minecraft.class_4587;
import net.minecraft.class_4588;
import net.minecraft.class_4597;
import net.minecraft.class_630;
import net.minecraft.class_6880;
import net.minecraft.class_918;
import java.util.List;

@Environment(EnvType.CLIENT)
public interface PatternLayer
{
   default void renderPatterns(class_4587 pose, class_4597 buffer, int p, int overlay, List, class_1767>> list, boolean hasfoil, class_630[] modelparts, float r, float g, float b, String dirprefix, class_2960 basetexture)
   {
      class_4588 vertexconsumer = class_918.method_27952(buffer, class_1921.method_23576(basetexture), false, hasfoil);

      for (class_630 part : modelparts)
      {
         part.method_22699(pose, vertexconsumer, p, overlay, r, g, b, 1.0F);

         for (int i = 0; i < 17 && i < list.size(); ++i)
         {
            Pair, class_1767> pair = list.get(i);
            float[] color = pair.getSecond().method_7787();
            class_4588 vertexconsumer2 = class_918.method_27952(buffer, class_1921.method_23588(new class_2960(EpicKnights.ID, dirprefix + pair.getFirst().method_40230().get().method_29177().method_12832() + ".png")), false, hasfoil);

            part.method_22699(pose, vertexconsumer2, p, overlay, color[0], color[1], color[2], 1.0F);
         }
      }
   }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy