mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2025-02-22 09:55:33 +01:00

- IModels now accept a VertexConsumer - IRenderState -> RenderType - AbstractInstancer for dealing with InstanceData tidyness - Alter crumbling renderer to match new system - Add hack to keep track of bound atlas textures
26 lines
694 B
Java
26 lines
694 B
Java
package com.jozufozu.flywheel.util;
|
|
|
|
import javax.annotation.Nullable;
|
|
|
|
import net.minecraft.resources.ResourceLocation;
|
|
|
|
/**
|
|
* Helper class to keep track of what texture atlases are bound to what texture units.
|
|
*
|
|
* <p>
|
|
* Works with {@link com.jozufozu.flywheel.mixin.RenderTexturesMixin}.
|
|
* </p>
|
|
*/
|
|
public class RenderTextures {
|
|
|
|
private static final ResourceLocation[] shaderTextures = new ResourceLocation[12];
|
|
|
|
@Nullable
|
|
public static ResourceLocation getShaderTexture(int pShaderTexture) {
|
|
return shaderTextures[pShaderTexture];
|
|
}
|
|
|
|
public static void _setShaderTexture(int pShaderTexture, ResourceLocation pTextureId) {
|
|
shaderTextures[pShaderTexture] = pTextureId;
|
|
}
|
|
}
|