Changed code for full Minecraft Forge Support