mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-10-26 14:24:30 +00:00
Make API functions for enderstorage to use (#2244)
* Make API functions for enderstorage to use * move it into its own package
This commit is contained in:
1 parent
2f1f380e8e
commit
d29a8278cd
2 files changed
+35
No files matched your search
@@ -0,0 +1,31 @@
|
||||
package com.gtnewhorizons.angelica.api.shaders;
|
||||
|
||||
import com.gtnewhorizons.angelica.config.AngelicaConfig;
|
||||
import net.coderbot.iris.uniforms.CapturedRenderingState;
|
||||
import net.coderbot.iris.uniforms.SystemTimeUniforms;
|
||||
import net.irisshaders.iris.api.v0.IrisApi;
|
||||
import net.minecraft.block.Block;
|
||||
|
||||
public final class ShaderPacks {
|
||||
|
||||
private ShaderPacks() {}
|
||||
|
||||
public static boolean isInUse() {
|
||||
return AngelicaConfig.enableIris && IrisApi.getInstance().isShaderPackInUse();
|
||||
}
|
||||
|
||||
public static float getFrameTimeCounter() {
|
||||
return SystemTimeUniforms.TIMER.getFrameTimeCounter();
|
||||
}
|
||||
|
||||
public static void beginBlockEntity(Block block, int metadata) {
|
||||
if (!AngelicaConfig.enableIris) return;
|
||||
CapturedRenderingState.INSTANCE.pushCurrentBlockEntity();
|
||||
CapturedRenderingState.INSTANCE.setCurrentBlockEntity(block, metadata);
|
||||
}
|
||||
|
||||
public static void endBlockEntity() {
|
||||
if (!AngelicaConfig.enableIris) return;
|
||||
CapturedRenderingState.INSTANCE.popCurrentBlockEntity();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
@API(owner = "angelica", provides = "angelica|shaders", apiVersion = "1")
|
||||
package com.gtnewhorizons.angelica.api.shaders;
|
||||
|
||||
import cpw.mods.fml.common.API;
|
||||
Reference in new issue
Block a user