Locks???
This commit is contained in:
parent
4823d6d78c
commit
895b20bcd5
1 changed files with 2 additions and 2 deletions
|
@ -10,12 +10,12 @@ import java.util.Set;
|
||||||
public class SearchForNeighbours {
|
public class SearchForNeighbours {
|
||||||
public static Set<EnergyBlock> searchForNeighbours(World world, BlockPos pos) {
|
public static Set<EnergyBlock> searchForNeighbours(World world, BlockPos pos) {
|
||||||
var neighbours = new HashSet<EnergyBlock>();
|
var neighbours = new HashSet<EnergyBlock>();
|
||||||
Direction.stream().forEach(direction -> {
|
for (var direction : Direction.values()) {
|
||||||
var entity = world.getBlockEntity(pos.offset(direction));
|
var entity = world.getBlockEntity(pos.offset(direction));
|
||||||
if (entity instanceof EnergyBlock) {
|
if (entity instanceof EnergyBlock) {
|
||||||
neighbours.add((EnergyBlock) entity);
|
neighbours.add((EnergyBlock) entity);
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
return neighbours;
|
return neighbours;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue