Improve ErrorStateRegistry

This commit is contained in:
CovertJaguar committed 2014-12-17 00:28:21 -08:00
1 parent 947717873d
commit 4e963ca6e1
3 files changed
+8 -2

No files matched your search

@@ -9,6 +9,7 @@ import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import forestry.api.core.ErrorStateRegistry;
import forestry.api.core.IErrorState;
import forestry.core.config.Defaults;
import net.minecraft.client.renderer.texture.IIconRegister;
import net.minecraft.util.IIcon;
@@ -96,6 +97,11 @@ public enum EnumErrorCode implements IErrorState {
return (short) ordinal();
}
@Override
public String getUniqueName() {
return Defaults.MOD + ":" + name;
}
public static void init() {
for (IErrorState code : values()) {
ErrorStateRegistry.registerErrorState(code);
@@ -86,7 +86,7 @@ public class PacketTileUpdate extends PacketUpdate {
posZ = data.readInt();
orientation = ForgeDirection.getOrientation(data.readByte());
errorState = ErrorStateRegistry.getErrorStateFromCode(data.readShort());
errorState = ErrorStateRegistry.getErrorState(data.readShort());
int ordinal = data.readByte();
isOwnable = ordinal >= 0;