package tld.testmod.common.animation;

import net.minecraft.world.World;
import net.minecraftforge.client.model.animation.Animation;
import tld.testmod.ModLogger;

public enum ModAnimation
{

    INSTANCE;
    static long timeOffset;
    static Object lastWorld;
    
    /**
     * Get the global world time for the current tick, in seconds.
     */
    public static float getWorldTime(World world)
    {
        return getWorldTime(world, 0);
    }

    /**
     * Get the global world time for the current tick + partial tick progress, in seconds.
     */
    public static float getWorldTime(World world, float tickProgress)
    {
        if (!world.equals(lastWorld))
        {
            timeOffset = world.getTotalWorldTime();
            lastWorld = world;
        }
        long diff = world.getTotalWorldTime() - timeOffset;
        //ModLogger.info("Animation#getWorldTime: World: %s, time: %d, offset %d, diff: %d", lastWorld, world.getTotalWorldTime(), timeOffset, diff);
        return (world.getTotalWorldTime() - timeOffset  + tickProgress) / 20;
    }

    /**
     * Get current partialTickTime.
     */
    public static float getPartialTickTime()
    {
        return Animation.getPartialTickTime();
    }
    
}

@@ -129,38 +129,8 @@
 ion;
-%0Aimport tld.testmod.ModLogger;
 %0A%0Apu
@@ -212,13 +212,10 @@
 tic 
-Objec
+in
 t la
@@ -217,24 +217,32 @@
 nt lastWorld
+HashCode
 ;%0A    %0A    /
@@ -617,25 +617,74 @@
    i
-f (!world.equals(
+nt worldHashCode = world.hashCode();%0A        if (worldHashCode != 
 last
@@ -688,17 +688,24 @@
 astWorld
-)
+HashCode
 )%0A      
@@ -781,24 +781,40 @@
 astWorld
- = world
+HashCode = worldHashCode
 ;%0A      
@@ -825,16 +825,18 @@
         
+//
 long dif
@@ -981,16 +981,24 @@
 astWorld
+HashCode
 , world.

Use the world hashcode instead of the world instance.