New facade system (#3702)
Completely new system to render facades. It will now support many more cases compared to the old system. For example connected textures are now possible, as well as multilayer models and so on.
This commit is contained in:
@@ -2,12 +2,7 @@
|
||||
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;
|
||||
|
||||
|
||||
/**
|
||||
@@ -19,17 +14,12 @@ 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;
|
||||
private final boolean transparent;
|
||||
|
||||
// For resolving the tint indices of a facade
|
||||
private final ItemStack textureItem;
|
||||
|
||||
public FacadeRenderState( IBlockState sourceBlock, EnumSet<EnumFacing> openFaces, ItemStack textureItem )
|
||||
public FacadeRenderState( IBlockState sourceBlock, boolean transparent )
|
||||
{
|
||||
this.sourceBlock = sourceBlock;
|
||||
this.openFaces = openFaces;
|
||||
this.textureItem = textureItem;
|
||||
this.transparent = transparent;
|
||||
}
|
||||
|
||||
public IBlockState getSourceBlock()
|
||||
@@ -37,14 +27,8 @@ public class FacadeRenderState
|
||||
return this.sourceBlock;
|
||||
}
|
||||
|
||||
public EnumSet<EnumFacing> getOpenFaces()
|
||||
public boolean isTransparent()
|
||||
{
|
||||
return this.openFaces;
|
||||
return this.transparent;
|
||||
}
|
||||
|
||||
public int resolveTintColor( int tintIndex )
|
||||
{
|
||||
return Minecraft.getMinecraft().getItemColors().colorMultiplier( this.textureItem, tintIndex );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user