Fix what SoundLogic broke >_>

This commit is contained in:
Lizbeth Rika committed 2015-06-28 23:24:24 +01:00
1 parent 98bf5306db
commit 439c1a71e0
3 files changed
+12 -3

No files matched your search

@@ -101,7 +101,7 @@ public final class HUDHandler {
renderCrystalCubeHUD(event.resolution, (TileCorporeaCrystalCube) tile);
}
if(!TileCorporeaIndex.input.getNearbyIndexes(mc.thePlayer).isEmpty() && mc.currentScreen != null && mc.currentScreen instanceof GuiChat) {
if(!TileCorporeaIndex.getInputHandler().getNearbyIndexes(mc.thePlayer).isEmpty() && mc.currentScreen != null && mc.currentScreen instanceof GuiChat) {
profiler.startSection("nearIndex");
renderNearIndexDisplay(event.resolution);
profiler.endSection();
@@ -40,12 +40,14 @@ import vazkii.botania.common.core.helper.MathHelper;
import vazkii.botania.common.lib.LibBlockNames;
import cpw.mods.fml.common.eventhandler.EventPriority;
import cpw.mods.fml.common.eventhandler.SubscribeEvent;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
public class TileCorporeaIndex extends TileCorporeaBase {
public static final double RADIUS = 2.5;
public static final InputHandler input = new InputHandler();
private static InputHandler input;
public static final Set<TileCorporeaIndex> indexes = Collections.newSetFromMap(new WeakHashMap());
private static final Map<Pattern, IRegexStacker> patterns = new LinkedHashMap();
@@ -215,6 +217,12 @@ public class TileCorporeaIndex extends TileCorporeaBase {
}
}
public static InputHandler getInputHandler() {
if(input == null)
input = new InputHandler();
return input;
}
public static final class InputHandler implements ICorporeaAutoCompleteController {
public InputHandler() {
@@ -277,6 +285,7 @@ public class TileCorporeaIndex extends TileCorporeaBase {
}
@Override
@SideOnly(Side.CLIENT)
public boolean shouldAutoComplete() {
return !getNearbyIndexes(Minecraft.getMinecraft().thePlayer).isEmpty();
}
@@ -111,7 +111,7 @@ public class CommonProxy {
MinecraftForge.EVENT_BUS.register(new SheddingHandler());
MinecraftForge.EVENT_BUS.register(new SpawnerChangingHandler());
MinecraftForge.EVENT_BUS.register(new SubTileNarslimmus.SpawnIntercepter());
MinecraftForge.EVENT_BUS.register(TileCorporeaIndex.input);
MinecraftForge.EVENT_BUS.register(TileCorporeaIndex.getInputHandler());
FMLCommonHandler.instance().bus().register(new CommonTickHandler());