/*
 * SilentLib - DimPos
 * Copyright (C) 2018 SilentChaos512
 *
 * This library is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

package net.silentchaos512.lib.util;

import lombok.Getter;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.util.math.BlockPos;

public final class DimPos {
    public static final DimPos ZERO = new DimPos(0, 0, 0, 0);

    @Getter private final int posX;
    @Getter private final int posY;
    @Getter private final int posZ;
    @Getter private final int dimension;

    public static DimPos of(BlockPos pos, int dimension) {
        return new DimPos(pos, dimension);
    }

    public static DimPos of(int x, int y, int z, int dimension) {
        return new DimPos(x, y, z, dimension);
    }

    private DimPos(BlockPos pos, int dimension) {
        this(pos.getX(), pos.getY(), pos.getZ(), dimension);
    }

    private DimPos(int x, int y, int z, int dimension) {
        this.posX = x;
        this.posY = y;
        this.posZ = z;
        this.dimension = dimension;
    }

    public static DimPos read(NBTTagCompound tags) {
        return DimPos.of(
                tags.getInt("posX"),
                tags.getInt("posY"),
                tags.getInt("posZ"),
                tags.getInt("dim"));
    }

    public void write(NBTTagCompound tags) {
        tags.setInt("posX", posX);
        tags.setInt("posY", posY);
        tags.setInt("posZ", posZ);
        tags.setInt("dim", dimension);
    }

    public BlockPos getPos() {
        return new BlockPos(posX, posY, posZ);
    }

    @Override
    public String toString() {
        return String.format("(%d, %d, %d) in dimension %d", posX, posY, posZ, dimension);
    }

    @Override
    public boolean equals(Object other) {
        if (!(other instanceof DimPos)) {
            return false;
        }
        DimPos pos = (DimPos) other;
        return posX == pos.posX && posY == pos.posY && posZ == pos.posZ && dimension == pos.dimension;
    }
}

@@ -751,30 +751,8 @@
 l;%0A%0A
-import lombok.Getter;%0A
 impo
@@ -921,32 +921,24 @@
 0, 0);%0A%0A    
-@Getter 
 private fina
@@ -949,32 +949,24 @@
 t posX;%0A    
-@Getter 
 private fina
@@ -977,32 +977,24 @@
 t posY;%0A    
-@Getter 
 private fina
@@ -1013,16 +1013,8 @@
     
-@Getter 
 priv
@@ -1547,32 +1547,273 @@
 mension;%0A    %7D%0A%0A
+    public int getX() %7B%0A        return this.posX;%0A    %7D%0A%0A    public int getY() %7B%0A        return this.posY;%0A    %7D%0A%0A    public int getZ() %7B%0A        return this.posZ;%0A    %7D%0A%0A    public int getDimension() %7B%0A        return this.dimension;%0A    %7D%0A%0A
     public stati

replace lombok getters with normal getters