Flywheel/src/main/java/com/jozufozu/flywheel/util/RenderTextures.java
Jozufozu 79fe04c6ab Vanillaization
- 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
2021-12-06 15:23:26 -08:00

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;
}
}