Cuberite Forum
Entity metadata - 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: Entity metadata (/thread-491.html)



Entity metadata - cedeel - 06-14-2012

From cPawn.h:
Quote:
Code:
enum MetaData {NORMAL, BURNING, CROUCHED, RIDING, SPRINTING, EATING, BLOCKING};

According to MinecraftCoalition, the entities can have a variety of metadata.

I was going to make slimes spawn in different sizes, but I couldn't find a way to set their metadata value to something not in that enum.

Should the enum be replaced or do we need another variable?



RE: Entity metadata - cedeel - 06-22-2012

Any opinions on this?


RE: Entity metadata - xoft - 06-22-2012

I haven't studied the MCC very thoroughly, but from that it seems that metadata can come in variety of flavors, I'd say we need to rework the cPawn's metadata concept altogether - make it a map<index, value>, where index is the lower 5 bits and value's type *somehow* depends on the index meaning.