2015-04-24 03:38:37 -04:00
|
|
|
package com.cricketcraft.chisel.api.rendering;
|
2015-04-23 17:31:25 -04:00
|
|
|
|
2015-04-26 21:46:18 -04:00
|
|
|
import cpw.mods.fml.relauncher.Side;
|
|
|
|
|
import cpw.mods.fml.relauncher.SideOnly;
|
2015-04-23 17:31:25 -04:00
|
|
|
import net.minecraft.block.Block;
|
2015-04-24 03:38:37 -04:00
|
|
|
import net.minecraft.client.renderer.RenderBlocks;
|
2015-04-23 17:31:25 -04:00
|
|
|
import net.minecraft.client.renderer.texture.IIconRegister;
|
|
|
|
|
import net.minecraft.util.IIcon;
|
|
|
|
|
import net.minecraft.world.IBlockAccess;
|
2015-04-24 16:43:30 -04:00
|
|
|
import net.minecraftforge.common.util.ForgeDirection;
|
2015-04-23 17:31:25 -04:00
|
|
|
|
2015-04-24 16:43:30 -04:00
|
|
|
public interface ISubmapManager<T extends RenderBlocks> {
|
2015-04-23 17:31:25 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gets the icon for item rendering, based on side and item metadata.
|
|
|
|
|
*
|
|
|
|
|
* @param side
|
|
|
|
|
* Side of the ItemBlock.
|
|
|
|
|
* @param meta
|
|
|
|
|
* Metadata of the ItemBlock.
|
|
|
|
|
* @return The IIcon for rendering.
|
|
|
|
|
*/
|
|
|
|
|
IIcon getIcon(int side, int meta);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Gets the icon for world rendering, based on world position and side.
|
|
|
|
|
*/
|
|
|
|
|
IIcon getIcon(IBlockAccess world, int x, int y, int z, int side);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Hook for registering any custom icons you might need in this class. Will be called during the normal block method.
|
|
|
|
|
*
|
|
|
|
|
* @param modName
|
|
|
|
|
* The mod ID this submap was registered to.
|
|
|
|
|
* @param block
|
|
|
|
|
* The block being registered for.
|
|
|
|
|
* @param register
|
|
|
|
|
* The IIconRegister instance.
|
|
|
|
|
*/
|
2015-04-26 21:46:18 -04:00
|
|
|
@SideOnly(Side.CLIENT)
|
2015-04-23 17:31:25 -04:00
|
|
|
void registerIcons(String modName, Block block, IIconRegister register);
|
2015-04-26 21:46:18 -04:00
|
|
|
|
|
|
|
|
@SideOnly(Side.CLIENT)
|
2015-04-24 16:43:30 -04:00
|
|
|
T createRenderContext(RenderBlocks rendererOld, IBlockAccess world);
|
2015-04-26 21:46:18 -04:00
|
|
|
|
|
|
|
|
@SideOnly(Side.CLIENT)
|
2015-04-24 16:43:30 -04:00
|
|
|
void preRenderSide(T renderer, IBlockAccess world, int x, int y, int z, ForgeDirection side);
|
2015-04-26 21:46:18 -04:00
|
|
|
|
|
|
|
|
@SideOnly(Side.CLIENT)
|
2015-04-24 16:43:30 -04:00
|
|
|
void postRenderSide(T renderer, IBlockAccess world, int x, int y, int z, ForgeDirection side);
|
2015-04-23 17:31:25 -04:00
|
|
|
}
|