MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / loadShaderPack

Method loadShaderPack

src/main/java/net/optifine/shaders/Shaders.java:802–910  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

800 }
801
802 public static void loadShaderPack()
803 {
804 boolean flag = shaderPackLoaded;
805 boolean flag1 = isOldLighting();
806
807 if (mc.renderGlobal != null)
808 {
809 mc.renderGlobal.pauseChunkUpdates();
810 }
811
812 shaderPackLoaded = false;
813
814 if (shaderPack != null)
815 {
816 shaderPack.close();
817 shaderPack = null;
818 shaderPackResources.clear();
819 shaderPackDimensions.clear();
820 shaderPackOptions = null;
821 shaderPackOptionSliders = null;
822 shaderPackProfiles = null;
823 shaderPackGuiScreens = null;
824 shaderPackProgramConditions.clear();
825 shaderPackClouds.resetValue();
826 shaderPackOldHandLight.resetValue();
827 shaderPackDynamicHandLight.resetValue();
828 shaderPackOldLighting.resetValue();
829 resetCustomTextures();
830 noiseTexturePath = null;
831 }
832
833 boolean flag2 = false;
834
835 if (Config.isAntialiasing())
836 {
837 SMCLog.info("Shaders can not be loaded, Antialiasing is enabled: " + Config.getAntialiasingLevel() + "x");
838 flag2 = true;
839 }
840
841 if (Config.isAnisotropicFiltering())
842 {
843 SMCLog.info("Shaders can not be loaded, Anisotropic Filtering is enabled: " + Config.getAnisotropicFilterLevel() + "x");
844 flag2 = true;
845 }
846
847 if (Config.isFastRender())
848 {
849 SMCLog.info("Shaders can not be loaded, Fast Render is enabled.");
850 flag2 = true;
851 }
852
853 String s = shadersConfig.getProperty(EnumShaderOption.SHADER_PACK.getPropertyKey(), "(internal)");
854
855 if (!flag2)
856 {
857 shaderPack = getShaderPack(s);
858 shaderPackLoaded = shaderPack != null;
859 }

Callers 4

loadConfigMethod · 0.95
setShaderPackMethod · 0.95
checkCustomCommandMethod · 0.95
updateCloudsMethod · 0.95

Calls 15

isOldLightingMethod · 0.95
resetCustomTexturesMethod · 0.95
isAntialiasingMethod · 0.95
infoMethod · 0.95
getAntialiasingLevelMethod · 0.95
isFastRenderMethod · 0.95
getShaderPackMethod · 0.95
getShaderPackNameMethod · 0.95
clearDirectoryMethod · 0.95

Tested by

no test coverage detected