use of baritone.api.selection.ISelection in project Spark-Client by Spark-Client-Development.
the class SelectionManager method expand.
@Override
public synchronized ISelection expand(ISelection selection, EnumFacing direction, int blocks) {
for (ListIterator<ISelection> it = selections.listIterator(); it.hasNext(); ) {
ISelection current = it.next();
if (current == selection) {
it.remove();
it.add(current.expand(direction, blocks));
resetSelectionsArr();
return it.previous();
}
}
return null;
}
use of baritone.api.selection.ISelection in project Spark-Client by Spark-Client-Development.
the class SelectionManager method shift.
@Override
public synchronized ISelection shift(ISelection selection, EnumFacing direction, int blocks) {
for (ListIterator<ISelection> it = selections.listIterator(); it.hasNext(); ) {
ISelection current = it.next();
if (current == selection) {
it.remove();
it.add(current.shift(direction, blocks));
resetSelectionsArr();
return it.previous();
}
}
return null;
}
use of baritone.api.selection.ISelection in project Spark-Client by Spark-Client-Development.
the class SelectionRenderer method renderSelections.
public static void renderSelections(ISelection[] selections) {
float opacity = settings.selectionOpacity.getValue().floatValue();
boolean ignoreDepth = settings.renderSelectionIgnoreDepth.getValue();
float lineWidth = settings.selectionLineWidth.getValue().floatValue();
if (!settings.renderSelection.getValue()) {
return;
}
IRenderer.startLines(settings.colorSelection.getValue(), opacity, lineWidth, ignoreDepth);
for (ISelection selection : selections) {
IRenderer.drawAABB(selection.aabb(), SELECTION_BOX_EXPANSION);
}
if (settings.renderSelectionCorners.getValue()) {
IRenderer.glColor(settings.colorSelectionPos1.getValue(), opacity);
for (ISelection selection : selections) {
IRenderer.drawAABB(new AxisAlignedBB(selection.pos1(), selection.pos1().add(1, 1, 1)));
}
IRenderer.glColor(settings.colorSelectionPos2.getValue(), opacity);
for (ISelection selection : selections) {
IRenderer.drawAABB(new AxisAlignedBB(selection.pos2(), selection.pos2().add(1, 1, 1)));
}
}
IRenderer.endLines(ignoreDepth);
}
use of baritone.api.selection.ISelection in project baritone by cabaletta.
the class SelectionManager method shift.
@Override
public synchronized ISelection shift(ISelection selection, EnumFacing direction, int blocks) {
for (ListIterator<ISelection> it = selections.listIterator(); it.hasNext(); ) {
ISelection current = it.next();
if (current == selection) {
it.remove();
it.add(current.shift(direction, blocks));
resetSelectionsArr();
return it.previous();
}
}
return null;
}
use of baritone.api.selection.ISelection in project baritone by cabaletta.
the class SelectionManager method contract.
@Override
public synchronized ISelection contract(ISelection selection, EnumFacing direction, int blocks) {
for (ListIterator<ISelection> it = selections.listIterator(); it.hasNext(); ) {
ISelection current = it.next();
if (current == selection) {
it.remove();
it.add(current.contract(direction, blocks));
resetSelectionsArr();
return it.previous();
}
}
return null;
}
Aggregations