d7f32a985d
- Added cables & parts rendering. - Facades got a completely new way of rendering. Anvil facades are totally a thing. - Added baking pipeline for simplified, highly configurable quad baking. NOTE: Yes, there are a lot of improvements to do, bugs to fix, stuff to add. I'm just pushing it prior to code structure change, so it does not get lost in stashes. But it actually works!
40 lines
866 B
Java
40 lines
866 B
Java
|
|
package appeng.client.render.model.pipeline;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
import net.minecraft.block.state.IBlockState;
|
|
import net.minecraft.client.renderer.block.model.IBakedModel;
|
|
import net.minecraft.util.EnumFacing;
|
|
import net.minecraftforge.common.model.TRSRTransformation;
|
|
|
|
|
|
public class FacingQuadRotator extends MatVecApplicator
|
|
{
|
|
|
|
private EnumFacing override;
|
|
|
|
public FacingQuadRotator( EnumFacing override )
|
|
{
|
|
super( TRSRTransformation.getMatrix( override ) );
|
|
this.override = override;
|
|
}
|
|
|
|
public FacingQuadRotator()
|
|
{
|
|
this.override = null;
|
|
}
|
|
|
|
@Override
|
|
public List<QuadVertexData> pipe( List<QuadVertexData> elements, IBakedModel parent, IBlockState state, EnumFacing side, long rand )
|
|
{
|
|
if( override == null )
|
|
{
|
|
setMatrix( TRSRTransformation.getMatrix( side ) );
|
|
}
|
|
return super.pipe( elements, parent, state, side, rand );
|
|
}
|
|
|
|
}
|