mirror of
https://github.com/PolyhedralDev/Terra.git
synced 2025-07-02 16:05:29 +00:00
create Column interface
This commit is contained in:
parent
d93f11b5f2
commit
c46f84a00e
@ -0,0 +1,18 @@
|
||||
package com.dfsek.terra.api.util;
|
||||
|
||||
import java.util.function.Consumer;
|
||||
|
||||
|
||||
public interface Column<T> {
|
||||
int getMinY();
|
||||
|
||||
int getMaxY();
|
||||
|
||||
T get(int y);
|
||||
|
||||
default void forEach(Consumer<T> consumer) {
|
||||
for(int y = getMinY(); y < getMaxY(); y++) {
|
||||
consumer.accept(get(y));
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user