Remove cross-version proxy
1.9.4 support has been dropped. Extremely little gain for major drawbacks.
This commit is contained in:
parent
6ff12aa0fe
commit
7b21439a03
8 changed files with 14 additions and 141 deletions
|
@ -1,39 +0,0 @@
|
|||
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 {
|
||||
|
||||
@Override
|
||||
public TileEntity createTileFromData(World world, NBTTagCompound tagCompound)
|
||||
{
|
||||
Method m = ReflectionHelper.findMethod(TileEntity.class, null, new String[] { "create", "func_190200_a", "a" }, World.class, NBTTagCompound.class);
|
||||
try
|
||||
{
|
||||
return (TileEntity) m.invoke(null, world, tagCompound);
|
||||
} catch (Exception e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disableStairSlabCulling()
|
||||
{
|
||||
Field disableStairSlabCulling = ReflectionHelper.findField(ForgeModContainer.class, "disableStairSlabCulling");
|
||||
try
|
||||
{
|
||||
return (Boolean) disableStairSlabCulling.get(null);
|
||||
} catch (Exception e)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,31 +0,0 @@
|
|||
package WayofTime.bloodmagic.compat.minecraft;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraftforge.fml.relauncher.ReflectionHelper;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
public class CrossVersionProxy19 implements ICrossVersionProxy
|
||||
{
|
||||
|
||||
@Override
|
||||
public TileEntity createTileFromData(World world, NBTTagCompound tagCompound)
|
||||
{
|
||||
Method m = ReflectionHelper.findMethod(TileEntity.class, null, new String[] { "create", "func_189514_c", "c" }, NBTTagCompound.class);
|
||||
try
|
||||
{
|
||||
return (TileEntity) m.invoke(null, tagCompound);
|
||||
} catch (Exception e)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean disableStairSlabCulling()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,17 +0,0 @@
|
|||
package WayofTime.bloodmagic.compat.minecraft;
|
||||
|
||||
import net.minecraft.nbt.NBTTagCompound;
|
||||
import net.minecraft.tileentity.TileEntity;
|
||||
import net.minecraft.world.World;
|
||||
|
||||
/**
|
||||
* Allows for Blood Magic to support multiple MC versions that have only slight changes.
|
||||
*
|
||||
* Implementation copied from <a href="https://github.com/williewillus/Botania">Botania</a>.
|
||||
*/
|
||||
public interface ICrossVersionProxy
|
||||
{
|
||||
TileEntity createTileFromData(World world, NBTTagCompound tagCompound);
|
||||
|
||||
boolean disableStairSlabCulling();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue