Upload files to "src/openonyx/interaction/internal"
This commit is contained in:
1 parent
41ce7d6f8d
commit
8f7c0de72a
5 files changed
+299
No files matched your search
@@ -0,0 +1,38 @@
|
||||
package openonyx.interaction.internal;
|
||||
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import net.minecraft.entity.Entity;
|
||||
import net.minecraft.util.BlockPos;
|
||||
import net.minecraft.util.Vec3;
|
||||
import net.minecraft.util.Vec3i;
|
||||
import openonyx.core.MinecraftAccess;
|
||||
import openonyx.interaction.BlockUtils;
|
||||
import openonyx.utilities.BoxUtils;
|
||||
import openonyx.utilities.PlayerUtils;
|
||||
|
||||
public class PlacementSearchPattern implements MinecraftAccess {
|
||||
private final List<? extends Vec3i> vec3is;
|
||||
private final Comparator<BlockPos> comparator;
|
||||
|
||||
public static PlacementSearchPattern L() {
|
||||
return new PlacementSearchPattern(PlacementOffset.NO_OFFSET.getBlockPosList(), Comparator.comparingDouble(blockPos -> {
|
||||
BlockPos blockPos1 = blockPos;
|
||||
Vec3 vec3 = PlayerUtils.D((Entity)mc.thePlayer);
|
||||
return -BoxUtils.L(BlockUtils.L(blockPos1).offset(blockPos1.getX(), blockPos1.getY(), blockPos1.getZ()), vec3);
|
||||
}));
|
||||
}
|
||||
|
||||
public List<? extends Vec3i> getVec3is() {
|
||||
return this.vec3is;
|
||||
}
|
||||
|
||||
public Comparator<BlockPos> getComparator() {
|
||||
return this.comparator;
|
||||
}
|
||||
|
||||
public PlacementSearchPattern(List<? extends Vec3i> list, Comparator<BlockPos> comparator) {
|
||||
this.vec3is = list;
|
||||
this.comparator = comparatorx;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user