static Chunk() { neighbors = new Vec3i[26]; var index = 0; for (int x = -1; x <= 1; x++) { for (int y = -1; y <= 1; y++) { for (int z = -1; z <= 1; z++) { if (x != 0 || y != 0 || z != 0) { neighbors[index++] = new Vec3i(x, y, z); } } } } }
bool Equals(Vec3i obj) { return(x == obj.x && y == obj.y && z == obj.z); }
public FacingD(int x, int y, int z, CompasEnum index) { vector = new Vec3i(x, y, z); this.index = index; }
public void Add(Vec3i offset) { x = x + offset.x; y = y + offset.y; z = z + offset.z; }
public void Set(Vec3i v) { x = v.x; y = v.y; z = v.z; }
public void Set(BlockPos pos, Vec3i offset) { this.x = pos.x + offset.x; this.y = pos.y + offset.y; this.z = pos.z + offset.z; }
public void AddChunk(Vec3i pos) { this.x += pos.x << 4; this.y += pos.y << 4; this.z += pos.z << 4; }
float GetNoise(BlockPos pos, float scale, Vec3i offset) { return((float)GetNoise(pos.x * scale + offset.x, pos.y * scale + offset.y, pos.z * scale + offset.z)); }