-
Notifications
You must be signed in to change notification settings - Fork 55
/
APIProxyClient.java
94 lines (76 loc) · 3.41 KB
/
APIProxyClient.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
/*******************************************************************************
* @author Reika Kalseki
*
* Copyright 2017
*
* All rights reserved.
* Distribution of the software in any form is only allowed with
* explicit, prior permission from the owner.
******************************************************************************/
package Reika.DragonAPI;
import net.minecraft.client.Minecraft;
import net.minecraft.client.resources.SimpleReloadableResourceManager;
import net.minecraft.client.settings.KeyBinding;
import net.minecraft.world.World;
import net.minecraftforge.common.MinecraftForge;
import Reika.DragonAPI.Auxiliary.DebugOverlay;
import Reika.DragonAPI.Auxiliary.Trackers.PlayerSpecificRenderer;
import Reika.DragonAPI.Extras.ReikaShader;
import Reika.DragonAPI.Extras.ThrottleableEffectRenderer;
import Reika.DragonAPI.IO.DelegateFontRenderer;
import Reika.DragonAPI.IO.DirectResourceManager;
import Reika.DragonAPI.IO.VanillaOnlyResourceManager;
import Reika.DragonAPI.Instantiable.EntityTumblingBlock;
import Reika.DragonAPI.Instantiable.Event.Client.ResourceReloadEvent;
import Reika.DragonAPI.Instantiable.Rendering.ParticleEngine;
import Reika.DragonAPI.Instantiable.Rendering.RenderTumblingBlock;
import Reika.DragonAPI.Libraries.IO.ReikaSoundHelper;
import codechicken.lib.gui.GuiDraw;
import cpw.mods.fml.client.FMLClientHandler;
import cpw.mods.fml.client.registry.RenderingRegistry;
public class APIProxyClient extends APIProxy {
public static KeyBinding key_nbt;
private static final SimpleReloadableResourceManager rm = (SimpleReloadableResourceManager)Minecraft.getMinecraft().getResourceManager();
@Override
public void registerSounds() {
//MinecraftForge.EVENT_BUS.register(new SoundLoader(ReactorCraft.instance, SoundRegistry.soundList));
}
@Override
public void registerSidedHandlers() {
//Minecraft mc = Minecraft.getMinecraft();
//mc.mcResourceManager = new CustomResourceManager((SimpleReloadableResourceManager)mc.mcResourceManager);
MinecraftForge.EVENT_BUS.register(DebugOverlay.instance);
ResourceReloadEvent.registerPre();
//MinecraftForge.EVENT_BUS.register(PlayerModelRenderer.instance);
//MinecraftForge.EVENT_BUS.register(CustomSoundHandler.instance);
//key_nbt = new KeyBinding("TileEntity NBT Overlay", Keyboard.KEY_TAB, "DragonAPI");
//ClientRegistry.registerKeyBinding(key_nbt);
RenderingRegistry.registerEntityRenderingHandler(EntityTumblingBlock.class, new RenderTumblingBlock());
ReikaShader.instance.register();
}
@Override
public void registerSidedHandlersMain() {
rm.registerReloadListener(DirectResourceManager.getInstance());
rm.registerReloadListener(VanillaOnlyResourceManager.getInstance());
ReikaSoundHelper.injectPaulscodeAccesses();
Minecraft.getMinecraft().fontRenderer = new DelegateFontRenderer(Minecraft.getMinecraft().fontRenderer);
if (ModList.NEI.isLoaded())
GuiDraw.fontRenderer = Minecraft.getMinecraft().fontRenderer;
Minecraft.getMinecraft().effectRenderer = new ThrottleableEffectRenderer(Minecraft.getMinecraft().effectRenderer);
ParticleEngine.defaultCustomEngine.register();
}
@Override
public void registerSidedHandlersGameLoaded() {
PlayerSpecificRenderer.instance.registerIntercept();
ResourceReloadEvent.registerPost();
}
@Override
public World getClientWorld()
{
return FMLClientHandler.instance().getClient().theWorld;
}
@Override
public void postLoad() {
PlayerSpecificRenderer.instance.loadGlowFiles();
}
}