Restore 1.9.4 compatibility
Also includes cleanup of the stair class
This commit is contained in:
parent
2662114b7c
commit
aec841ef85
4 changed files with 83 additions and 58 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,7 +7,8 @@ import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
|||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class CrossVersionProxy19 implements ICrossVersionProxy {
|
||||
public class CrossVersionProxy19 implements ICrossVersionProxy
|
||||
{
|
||||
|
||||
@Override
|
||||
public TileEntity createTileFromData(World world, NBTTagCompound tagCompound)
|
||||
|
@ -21,4 +22,10 @@ public class CrossVersionProxy19 implements ICrossVersionProxy {
|
|||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disableStairSlabCulling()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,4 +12,6 @@ import net.minecraft.world.World;
|
|||
public interface ICrossVersionProxy
|
||||
{
|
||||
TileEntity createTileFromData(World world, NBTTagCompound tagCompound);
|
||||
|
||||
boolean disableStairSlabCulling();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue