begin work

This commit is contained in:
GlodBlock committed 2022-05-10 17:57:38 +08:00
commit db2ad29b52
124 files changed
+11799

No files matched your search

@@ -0,0 +1,46 @@
package com.glodblock.github.util;
import net.minecraft.tileentity.TileEntity;
import javax.annotation.Nonnull;
public class BlockPos {
private final int x;
private final int y;
private final int z;
public BlockPos(int x, int y, int z) {
this.x = x;
this.y = y;
this.z = z;
}
public BlockPos(@Nonnull TileEntity te) {
this.x = te.xCoord;
this.y = te.yCoord;
this.z = te.zCoord;
}
public int getX() {
return x;
}
public int getY() {
return y;
}
public int getZ() {
return z;
}
@Override
public boolean equals(Object obj) {
if (obj instanceof BlockPos) {
BlockPos pos = (BlockPos) obj;
return pos.x == x && pos.y == y && pos.z == z;
}
return false;
}
}