(ResourceLocation loc)
| 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 | } |
| 94 | |
| 95 | if (guiscreen instanceof GuiBrewingStand) |
| 96 | { |
| 97 | return getTexturePos(CustomGuiProperties.EnumContainer.BREWING_STAND, blockpos, iblockaccess, loc, guiscreen); |
| 98 | } |
| 99 | |
| 100 | if (guiscreen instanceof GuiChest) |
no test coverage detected