mirror of
https://github.com/CPunch/gopenfusion.git
synced 2024-11-14 20:10:06 +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),
|
||
|
}
|
||
|
}
|