package org.cyclops.cyclopscore.datastructure;

import lombok.Data;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import org.cyclops.cyclopscore.helper.MinecraftHelpers;

/**
 * A simple data class for a block position inside a world.
 * @author rubensworks
 */
@Data(staticConstructor = "of")
public class DimPos implements Comparable<DimPos> {

    private final World world;
    private final BlockPos blockPos;

    @Override
    public int compareTo(DimPos o) {
        int compareDim = Integer.compare(getWorld().provider.getDimension(),
                o.getWorld().provider.getDimension());
        if(compareDim == 0) {
            return MinecraftHelpers.compareBlockPos(getBlockPos(), o.getBlockPos());
        }
        return compareDim;
    }
}

@@ -778,11 +778,258 @@
 m;%0A    %7D
+%0A%0A    @Override%0A    public boolean equals(Object o) %7B%0A        return o instanceof DimPos && compareTo((DimPos) o) == 0;%0A    %7D%0A%0A    @Override%0A    public int hashCode() %7B%0A        return 31 * world.provider.getDimension() + blockPos.hashCode();%0A    %7D
 %0A%7D%0A

Add DimPos hashCode