use of com.simibubi.create.AllSpecialTextures in project Create by Creators-of-Create.
the class BlockClusterOutline method render.
@Override
public void render(PoseStack ms, SuperRenderTypeBuffer buffer, float pt) {
cluster.visibleEdges.forEach(edge -> {
Vec3 start = Vec3.atLowerCornerOf(edge.pos);
Direction direction = Direction.get(AxisDirection.POSITIVE, edge.axis);
renderAACuboidLine(ms, buffer, start, Vec3.atLowerCornerOf(edge.pos.relative(direction)));
});
Optional<AllSpecialTextures> faceTexture = params.faceTexture;
if (!faceTexture.isPresent())
return;
RenderType translucentType = RenderTypes.getOutlineTranslucent(faceTexture.get().getLocation(), true);
VertexConsumer builder = buffer.getLateBuffer(translucentType);
cluster.visibleFaces.forEach((face, axisDirection) -> {
Direction direction = Direction.get(axisDirection, face.axis);
BlockPos pos = face.pos;
if (axisDirection == AxisDirection.POSITIVE)
pos = pos.relative(direction.getOpposite());
renderBlockFace(ms, builder, pos, direction);
});
}
use of com.simibubi.create.AllSpecialTextures in project Create by Creators-of-Create.
the class FlipTool method renderOnSchematic.
@Override
public void renderOnSchematic(PoseStack ms, SuperRenderTypeBuffer buffer) {
if (!schematicSelected || !selectedFace.getAxis().isHorizontal()) {
super.renderOnSchematic(ms, buffer);
return;
}
Direction facing = selectedFace.getClockWise();
AABB bounds = schematicHandler.getBounds();
Vec3 directionVec = Vec3.atLowerCornerOf(Direction.get(AxisDirection.POSITIVE, facing.getAxis()).getNormal());
Vec3 boundsSize = new Vec3(bounds.getXsize(), bounds.getYsize(), bounds.getZsize());
Vec3 vec = boundsSize.multiply(directionVec);
bounds = bounds.contract(vec.x, vec.y, vec.z).inflate(1 - directionVec.x, 1 - directionVec.y, 1 - directionVec.z);
bounds = bounds.move(directionVec.scale(.5f).multiply(boundsSize));
outline.setBounds(bounds);
AllSpecialTextures tex = AllSpecialTextures.CHECKERED;
outline.getParams().lineWidth(1 / 16f).disableNormals().colored(0xdddddd).withFaceTextures(tex, tex);
outline.render(ms, buffer, AnimationTickHolder.getPartialTicks());
super.renderOnSchematic(ms, buffer);
}
Aggregations