(String name)
| 910 | } |
| 911 | |
| 912 | public static IShaderPack getShaderPack(String name) |
| 913 | { |
| 914 | if (name == null) |
| 915 | { |
| 916 | return null; |
| 917 | } |
| 918 | else |
| 919 | { |
| 920 | name = name.trim(); |
| 921 | |
| 922 | if (!name.isEmpty() && !name.equals("OFF")) |
| 923 | { |
| 924 | if (name.equals("(internal)")) |
| 925 | { |
| 926 | return new ShaderPackDefault(); |
| 927 | } |
| 928 | else |
| 929 | { |
| 930 | try |
| 931 | { |
| 932 | File file1 = new File(shaderPacksDir, name); |
| 933 | return (IShaderPack)(file1.isDirectory() ? new ShaderPackFolder(name, file1) : (file1.isFile() && name.toLowerCase().endsWith(".zip") ? new ShaderPackZip(name, file1) : null)); |
| 934 | } |
| 935 | catch (Exception exception) |
| 936 | { |
| 937 | exception.printStackTrace(); |
| 938 | return null; |
| 939 | } |
| 940 | } |
| 941 | } |
| 942 | else |
| 943 | { |
| 944 | return null; |
| 945 | } |
| 946 | } |
| 947 | } |
| 948 | |
| 949 | public static IShaderPack getShaderPack() |
| 950 | { |
no test coverage detected