Remove generics from ISubmapManager to prevent serverside errors

This commit is contained in:
tterrag1098 committed 2015-05-13 13:19:24 -04:00
1 parent 62a38e9816
commit 31328b0ac1
12 files changed
+43 -47

No files matched your search

@@ -9,7 +9,7 @@ import net.minecraft.util.IIcon;
import net.minecraft.world.IBlockAccess;
import net.minecraftforge.common.util.ForgeDirection;
public interface ISubmapManager<T extends RenderBlocks> {
public interface ISubmapManager {
/**
* Gets the icon for item rendering, based on side and item metadata.
@@ -41,11 +41,11 @@ public interface ISubmapManager<T extends RenderBlocks> {
void registerIcons(String modName, Block block, IIconRegister register);
@SideOnly(Side.CLIENT)
T createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world);
RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world);
@SideOnly(Side.CLIENT)
void preRenderSide(T renderer, IBlockAccess world, int x, int y, int z, ForgeDirection side);
void preRenderSide(RenderBlocks renderer, IBlockAccess world, int x, int y, int z, ForgeDirection side);
@SideOnly(Side.CLIENT)
void postRenderSide(T renderer, IBlockAccess world, int x, int y, int z, ForgeDirection side);
void postRenderSide(RenderBlocks renderer, IBlockAccess world, int x, int y, int z, ForgeDirection side);
}
@@ -173,7 +173,7 @@ public class RenderBlocksCTM extends RenderBlocks {
public TextureSubmap submap;
public TextureSubmap submapSmall;
public RenderBlocks rendererOld;
public ISubmapManager<RenderBlocksCTM> manager;
public ISubmapManager manager;
protected int[][] lightmap = new int[3][3];
protected float[][] redmap = new float[3][3];
@@ -316,11 +316,11 @@ public enum TextureType {
}
}
public ISubmapManager<?> createManagerFor(ICarvingVariation variation, String texturePath) {
public ISubmapManager createManagerFor(ICarvingVariation variation, String texturePath) {
return new SubmapManagerDefault(this, variation, texturePath);
}
public ISubmapManager<?> createManagerFor(ICarvingVariation variation, Block block, int meta) {
public ISubmapManager createManagerFor(ICarvingVariation variation, Block block, int meta) {
return new SubmapManagerExistingIcon(this, variation, block, meta);
}
@@ -372,7 +372,7 @@ public enum TextureType {
}
@SideOnly(Side.CLIENT)
private abstract static class SubmapManagerBase<T extends RenderBlocks> implements ISubmapManager<T> {
private abstract static class SubmapManagerBase implements ISubmapManager {
protected final TextureType type;
protected ICarvingVariation variation;
protected Object cachedObject;
@@ -393,9 +393,9 @@ public enum TextureType {
}
@Override
public T createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
public RenderBlocks createRenderContext(RenderBlocks rendererOld, Block block, IBlockAccess world) {
initStatics();
T rb = (T) type.createRenderContext(rendererOld, world, cachedObject);
RenderBlocks rb = type.createRenderContext(rendererOld, world, cachedObject);
rb.setRenderBoundsFromBlock(block);
return rb;
}
@@ -410,7 +410,7 @@ public enum TextureType {
}
@SideOnly(Side.CLIENT)
private static class SubmapManagerDefault extends SubmapManagerBase<RenderBlocks> {
private static class SubmapManagerDefault extends SubmapManagerBase {
private String texturePath;
@@ -426,7 +426,7 @@ public enum TextureType {
}
@SideOnly(Side.CLIENT)
private static class SubmapManagerExistingIcon extends SubmapManagerBase<RenderBlocks> {
private static class SubmapManagerExistingIcon extends SubmapManagerBase {
private Block block;
private int meta;