Cuberite Forum
Oject keeping track if so called features - Printable Version

+- Cuberite Forum (https://forum.cuberite.org)
+-- Forum: Cuberite (https://forum.cuberite.org/forum-4.html)
+--- Forum: Development (https://forum.cuberite.org/forum-13.html)
+--- Thread: Oject keeping track if so called features (/thread-3319.html)



Oject keeping track if so called features - 12xx12 - 09-20-2020

Vanilla minecraft does keep track where it placed which structure (so called features).

I think this would make sense to add this too to cuberite. Features that need this:

- Limit mob spawning to locations (villagers, ...)
- eye of ender of fly route

Functions I would add to the object:

Code:
enum class eFeatures
{
    // List of all vanilla features...
};

bool IsFeatureAt(Vector3i, eFeature);
Vector3i GetNearestFeature(Vector3i, eFeature);
std::vector<Vector3i> GetAllFeatures(eFeatures);



RE: Oject keeping track if so called features - 12xx12 - 09-20-2020

Vanilla has to keept track of that somewhere but i didn't find out where Sad


RE: Oject keeping track if so called features - tigerw - 09-20-2020

I know that vanilla saves where structures got placed into chunk data. http://minecraft.gamepedia.com/Chunk_format