mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-10 02:20:05 +00:00
16 lines
259 B
Go
16 lines
259 B
Go
package entity
|
|
|
|
import "github.com/CPunch/gopenfusion/config"
|
|
|
|
type ChunkPosition struct {
|
|
X int
|
|
Y int
|
|
}
|
|
|
|
func MakeChunkPosition(x, y int) ChunkPosition {
|
|
return ChunkPosition{
|
|
X: x / (config.VIEW_DISTANCE / 3),
|
|
Y: y / (config.VIEW_DISTANCE / 3),
|
|
}
|
|
}
|