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

Class CustomGuis

src/main/java/net/optifine/CustomGuis.java:36–342  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

34import net.optifine.util.ResUtils;
35
36public class CustomGuis
37{
38 private static Minecraft mc = Config.getMinecraft();
39 private static PlayerControllerOF playerControllerOF = null;
40 private static CustomGuiProperties[][] guiProperties = (CustomGuiProperties[][])null;
41 public static boolean isChristmas = isChristmas();
42
43 public static ResourceLocation getTextureLocation(ResourceLocation loc)
44 {
45 if (guiProperties == null)
46 {
47 return loc;
48 }
49 else
50 {
51 GuiScreen guiscreen = mc.currentScreen;
52
53 if (!(guiscreen instanceof GuiContainer))
54 {
55 return loc;
56 }
57 else if (loc.getResourceDomain().equals("minecraft") && loc.getResourcePath().startsWith("textures/gui/"))
58 {
59 if (playerControllerOF == null)
60 {
61 return loc;
62 }
63 else
64 {
65 IBlockAccess iblockaccess = mc.theWorld;
66
67 if (iblockaccess == null)
68 {
69 return loc;
70 }
71 else if (guiscreen instanceof GuiContainerCreative)
72 {
73 return getTexturePos(CustomGuiProperties.EnumContainer.CREATIVE, mc.thePlayer.getPosition(), iblockaccess, loc, guiscreen);
74 }
75 else if (guiscreen instanceof GuiInventory)
76 {
77 return getTexturePos(CustomGuiProperties.EnumContainer.INVENTORY, mc.thePlayer.getPosition(), iblockaccess, loc, guiscreen);
78 }
79 else
80 {
81 BlockPos blockpos = playerControllerOF.getLastClickBlockPos();
82
83 if (blockpos != null)
84 {
85 if (guiscreen instanceof GuiRepair)
86 {
87 return getTexturePos(CustomGuiProperties.EnumContainer.ANVIL, blockpos, iblockaccess, loc, guiscreen);
88 }
89
90 if (guiscreen instanceof GuiBeacon)
91 {
92 return getTexturePos(CustomGuiProperties.EnumContainer.BEACON, blockpos, iblockaccess, loc, guiscreen);
93 }

Callers

nothing calls this directly

Calls 2

getMinecraftMethod · 0.95
isChristmasMethod · 0.95

Tested by

no test coverage detected