Fixed #4402
This commit is contained in:
@@ -221,12 +221,15 @@ public class PowerNode extends PowerBlock{
|
||||
|
||||
@Override
|
||||
public void drawRequestConfigTop(BuildPlan req, Eachable<BuildPlan> list){
|
||||
if(req.config instanceof Point2[]){
|
||||
if(req.config instanceof Point2[] ps){
|
||||
setupColor(1f);
|
||||
for(Point2 point : (Point2[])req.config){
|
||||
for(Point2 point : ps){
|
||||
int px = req.x + point.x, py = req.y + point.y;
|
||||
otherReq = null;
|
||||
list.each(other -> {
|
||||
if((other.x == req.x + point.x && other.y == req.y + point.y) && other != req && other.block != null && other.block.hasPower){
|
||||
if(other.block != null
|
||||
&& (px >= other.x - ((other.block.size-1)/2) && py >= other.y - ((other.block.size-1)/2) && px <= other.x + other.block.size/2 && py <= other.y + other.block.size/2)
|
||||
&& other != req && other.block.hasPower){
|
||||
otherReq = other;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user