Restore 1.9.4 compatibility

Also includes cleanup of the stair class
This commit is contained in:
Nicholas Ignoffo 2016-09-06 17:13:43 -07:00
parent 2662114b7c
commit aec841ef85
4 changed files with 83 additions and 58 deletions

View file

@ -3,8 +3,10 @@ package WayofTime.bloodmagic.compat.minecraft;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import net.minecraftforge.common.ForgeModContainer;
import net.minecraftforge.fml.relauncher.ReflectionHelper;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
public class CrossVersionProxy110 implements ICrossVersionProxy {
@ -21,4 +23,17 @@ public class CrossVersionProxy110 implements ICrossVersionProxy {
return null;
}
}
@Override
public boolean disableStairSlabCulling()
{
Field disableStairSlabCulling = ReflectionHelper.findField(ForgeModContainer.class, "disableStairSlabCulling");
try
{
return (Boolean) disableStairSlabCulling.get(null);
} catch (Exception e)
{
return false;
}
}
}