package com.bartbes.openblocksElevatorIndicator;

import net.minecraft.block.Block;

import cpw.mods.fml.common.Mod;
import cpw.mods.fml.common.SidedProxy;
import cpw.mods.fml.common.Mod.EventHandler;
import cpw.mods.fml.common.event.FMLInitializationEvent;

@Mod(name = IndicatorMod.MODNAME,
		modid = IndicatorMod.MODID,
		dependencies = "required-after:OpenBlocks")
public class IndicatorMod
{
	public static final String MODNAME = "OpenBlocks Elevator Indicator";
	public static final String MODID = "openblocksElevatorIndicator";

	@Mod.Instance(MODID)
	public static IndicatorMod instance;

	@SidedProxy(modId = MODID,
			clientSide = "com.bartbes.openblocksElevatorIndicator.Proxy$Client",
			serverSide = "com.bartbes.openblocksElevatorIndicator.Proxy$Common")
	public static Proxy proxy;

	private IndicatorOverlay overlay;
	Block elevatorBlock;

	@EventHandler
	public void init(FMLInitializationEvent event)
	{
		for (Object o : Block.blockRegistry)
		{
			Block b = (Block) o;
			String name = b.getUnlocalizedName();
			if (name.equals("tile.openblocks.elevator"))
			{
				elevatorBlock = b;
				break;
			}
		}

		if (elevatorBlock == null)
			System.err.println("Failed to find elevator!");

		overlay = new IndicatorOverlay();
		proxy.registerTickHandler(overlay);
		proxy.registerOverlay(overlay);
	}
}

@@ -194,16 +194,66 @@
 andler;%0A
+import cpw.mods.fml.common.registry.GameRegistry;%0A
 import c
@@ -971,150 +971,62 @@
 %7B%0A%09%09
-for (Object o : Block.blockRegistry)%0A%09%09%7B%0A%09%09%09Block b = (Block) o;%0A%09%09%09String name = b.getUnlocalizedName();%0A%09%09%09if (name.equals(%22tile.openb
+elevatorBlock = GameRegistry.findBlock(%22OpenB
 locks
-.
+%22, %22
 elev
@@ -1035,57 +1035,9 @@
 or%22)
-)%0A%09%09%09%7B%0A%09%09%09%09elevatorBlock = b;%0A%09%09%09%09break;%0A%09%09%09%7D%0A%09%09%7D
+;
 %0A%0A%09%09
@@ -1090,17 +1090,13 @@
 ln(%22
-Failed to
+Can't
  fin

Use the GameRegistry to find the elevator block instead