644194d0d6
* Updated Forge to 1.12.2 RB Updated mappings to the MDK defaults for 1.12.2 Updated related depdencies * With Forge 14.23 not available for < 1.12.2, we have to drop support. With one potential fix for TE corruption, this step should be reasonable.
51 lines
1.1 KiB
Java
51 lines
1.1 KiB
Java
|
|
package appeng.client.render.cablebus;
|
|
|
|
|
|
import java.util.EnumSet;
|
|
|
|
import net.minecraft.block.state.IBlockState;
|
|
import net.minecraft.client.Minecraft;
|
|
import net.minecraft.item.ItemStack;
|
|
import net.minecraft.util.EnumFacing;
|
|
|
|
|
|
/**
|
|
* Captures the state required to render a facade properly.
|
|
*/
|
|
public class FacadeRenderState
|
|
{
|
|
|
|
// The block state to use for rendering this facade
|
|
private final IBlockState sourceBlock;
|
|
|
|
// Which faces of the cube should be rendered for this particular facade
|
|
private final EnumSet<EnumFacing> openFaces;
|
|
|
|
// For resolving the tint indices of a facade
|
|
private final ItemStack textureItem;
|
|
|
|
public FacadeRenderState( IBlockState sourceBlock, EnumSet<EnumFacing> openFaces, ItemStack textureItem )
|
|
{
|
|
this.sourceBlock = sourceBlock;
|
|
this.openFaces = openFaces;
|
|
this.textureItem = textureItem;
|
|
}
|
|
|
|
public IBlockState getSourceBlock()
|
|
{
|
|
return this.sourceBlock;
|
|
}
|
|
|
|
public EnumSet<EnumFacing> getOpenFaces()
|
|
{
|
|
return this.openFaces;
|
|
}
|
|
|
|
public int resolveTintColor( int tintIndex )
|
|
{
|
|
return Minecraft.getMinecraft().getItemColors().colorMultiplier( this.textureItem, tintIndex );
|
|
}
|
|
|
|
}
|