use of micdoodle8.mods.galacticraft.api.client.tabs.TabRegistry in project Galacticraft by micdoodle8.
the class ClientProxyCore method postInit.
@Override
public void postInit(FMLPostInitializationEvent event) {
ClientProxyCore.registerInventoryTabs();
ClientProxyCore.addVariants();
ItemSchematic.registerTextures();
MinecraftForge.EVENT_BUS.register(new TabRegistry());
if (!CompatibilityManager.RenderPlayerAPILoaded) {
try {
Field field = RenderManager.class.getDeclaredField(GCCoreUtil.isDeobfuscated() ? "playerRenderer" : "field_178637_m");
field.setAccessible(true);
field.set(FMLClientHandler.instance().getClient().getRenderManager(), new RenderPlayerGC());
field = RenderManager.class.getDeclaredField(GCCoreUtil.isDeobfuscated() ? "skinMap" : "field_178636_l");
field.setAccessible(true);
Map<String, RenderPlayer> skinMap = (Map<String, RenderPlayer>) field.get(FMLClientHandler.instance().getClient().getRenderManager());
skinMap.put("default", new RenderPlayerGC(skinMap.get("default"), false));
skinMap.put("slim", new RenderPlayerGC(skinMap.get("slim"), true));
} catch (Exception e) {
e.printStackTrace();
}
}
try {
Field ftc = Minecraft.getMinecraft().getClass().getDeclaredField(GCCoreUtil.isDeobfuscated() ? "mcMusicTicker" : "field_147126_aw");
ftc.setAccessible(true);
ftc.set(Minecraft.getMinecraft(), new MusicTickerGC(Minecraft.getMinecraft()));
} catch (Exception e) {
e.printStackTrace();
}
}
Aggregations