2014-04-29 10:54:20 +10:00
|
|
|
package codechicken.nei;
|
|
|
|
|
|
|
|
|
|
import codechicken.nei.api.IStackPositioner;
|
2023-01-28 17:55:51 -08:00
|
|
|
|
2023-09-25 00:34:42 +02:00
|
|
|
import java.util.ArrayList;
|
|
|
|
|
|
2022-06-24 12:32:13 +01:00
|
|
|
public class OffsetPositioner implements IStackPositioner {
|
2023-01-28 17:55:51 -08:00
|
|
|
|
2022-06-24 12:32:13 +01:00
|
|
|
public OffsetPositioner(int x, int y) {
|
2014-04-29 10:54:20 +10:00
|
|
|
offsetx = x;
|
|
|
|
|
offsety = y;
|
|
|
|
|
}
|
2022-06-24 12:32:13 +01:00
|
|
|
|
2014-04-29 10:54:20 +10:00
|
|
|
@Override
|
2022-06-24 12:32:13 +01:00
|
|
|
public ArrayList<PositionedStack> positionStacks(ArrayList<PositionedStack> ai) {
|
|
|
|
|
for (PositionedStack stack : ai) {
|
|
|
|
|
stack.relx += offsetx;
|
|
|
|
|
stack.rely += offsety;
|
2014-04-29 10:54:20 +10:00
|
|
|
}
|
|
|
|
|
return ai;
|
|
|
|
|
}
|
2022-06-24 12:32:13 +01:00
|
|
|
|
2014-04-29 10:54:20 +10:00
|
|
|
public int offsetx;
|
2019-12-30 20:19:16 -08:00
|
|
|
public int offsety;
|
2014-04-29 10:54:20 +10:00
|
|
|
}
|