gopenfusion/core/entity/chunkposition.go

16 lines
259 B
Go
Raw Normal View History

2023-06-25 08:33:17 +00:00
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),
}
}