package com.daexsys.sbc.entity;

import com.daexsys.ijen3D.entity.Entity;
import com.daexsys.sbc.world.chunk.Chunk;
import com.daexsys.sbc.world.planet.Planet;

public class SBEntity extends Entity {
    private Planet planet;

    public SBEntity(float x, float y, float z) {
        super(x, y, z);
    }

    public SBEntity(float x, float y, float z, float width, float height, float length) {
        super(x, y, z, width, height, length);
    }

    /**
     * The current planet the entity is on
     * @return the entity's current entity
     */
    public Planet getPlanet() {
        return planet;
    }

    /**
     * The current chunk the entity is in
     * @return the entity's current chunk
     */
    public Chunk getCurrentChunk() {
        return getPlanet().getChunk(getChunkX(), getChunkY(), getChunkZ());
    }

    /**
     * Gets the X coordinate of the current chunk the entity is in
     * @return the X coordinate of the chunk the entity is in
     */
    public int getChunkX() {
        return (int) getX() / 32;
    }

    /**
     * Gets the Y coordinate of the current chunk the entity is in.
     * @return the Y coordinate of the chunk the entity is in
     */
    public int getChunkY() {
        return (int) getY() / 32;
    }

    /**
     * Gets the Z coordinate fo the current chunk the entity is in.
     * @return the Z coordinate fo the chunk the entity is in
     */
    public int getChunkZ() {
        return (int) getZ() / 32;
    }
}

@@ -437,32 +437,249 @@
 length);%0A    %7D%0A%0A
+    /**%0A     * Sets the planet that the player is currently on.%0A     * @param planet the planet that the player is currenlty on.%0A     */%0A    public void setPlanet(Planet planet) %7B%0A        this.planet = planet;%0A    %7D%0A%0A
     /**%0A     * T

Add setPlanet() method in SBEntity