com.magistuarmory.client.render.entity.layer.PatternLayer Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of 1.20.2-epic-knights-common Show documentation
Show all versions of 1.20.2-epic-knights-common Show documentation
mod that adds medieval stuff to the game
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);
}
}
}
}