mirror of
https://github.com/GTNewHorizons/StructureLib.git
synced 2026-11-16 18:44:43 +00:00
Make IStructureElement contravariant.
This commit is contained in:
6 files changed
+32
-29
No files matched your search
@@ -3325,7 +3325,7 @@ public class StructureUtility {
|
||||
return (builder.toString().replaceAll("\"\"", "E"));
|
||||
}
|
||||
|
||||
static <T> boolean iterateV2(IStructureElement<T>[] elements, World world, ExtendedFacing extendedFacing,
|
||||
static <T> boolean iterateV2(IStructureElement<? super T>[] elements, World world, ExtendedFacing extendedFacing,
|
||||
int basePositionX, int basePositionY, int basePositionZ, int basePositionA, int basePositionB,
|
||||
int basePositionC, IStructureWalker<T> predicate, String iterateType) {
|
||||
// change base position to base offset
|
||||
@@ -3336,7 +3336,7 @@ public class StructureUtility {
|
||||
int[] abc = new int[] { basePositionA, basePositionB, basePositionC };
|
||||
int[] xyz = new int[3];
|
||||
|
||||
for (IStructureElement<T> element : elements) {
|
||||
for (IStructureElement<? super T> element : elements) {
|
||||
if (element.isNavigating()) {
|
||||
abc[0] = (element.resetA() ? basePositionA : abc[0]) + element.getStepA();
|
||||
abc[1] = (element.resetB() ? basePositionB : abc[1]) + element.getStepB();
|
||||
|
||||
Reference in new issue
Block a user