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!
38 lines
887 B
Java
38 lines
887 B
Java
|
|
package appeng.client.render.model.pipeline;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import com.google.common.collect.ImmutableList;
|
|
|
|
import net.minecraft.block.state.IBlockState;
|
|
import net.minecraft.client.renderer.block.model.IBakedModel;
|
|
import net.minecraft.util.EnumFacing;
|
|
|
|
import appeng.api.client.BakingPipelineElement;
|
|
|
|
|
|
public class Merge<F, T> implements BakingPipelineElement<F, T>
|
|
{
|
|
|
|
private final ImmutableList<BakingPipelineElement<?, ?>> pipeline;
|
|
|
|
public Merge( BakingPipelineElement<?, ?>... pipeline )
|
|
{
|
|
this.pipeline = ImmutableList.copyOf( pipeline );
|
|
}
|
|
|
|
@Override
|
|
public List pipe( List elements, IBakedModel parent, IBlockState state, EnumFacing side, long rand )
|
|
{
|
|
for( BakingPipelineElement<?, ?> element : pipeline )
|
|
{
|
|
elements.addAll( element.pipe( new ArrayList<>(), parent, state, side, rand ) );
|
|
}
|
|
return elements;
|
|
}
|
|
|
|
}
|