FountainMC / FountainAPI

A 'simple but beautiful' Minecraft Server Plugin API
https://fountainmc.org/
MIT License
5 stars 5 forks source link

Add a 'entity data api' to represent an entity's data #28

Closed Techcable closed 8 years ago

Techcable commented 8 years ago

There are immutable and mutable versions of each entity, and factories to create both. Plugins can also take thread-safe snapshots of entities, and copy from a data object to an entity.

I'm putting this here for your input/review, since this is a major change that has large ramifications. We're going to have to define data for every single entity!

phase commented 8 years ago

Why is this better than storing the data inside the Entity object?

And check the Travis for your format errors.

minecrafter commented 8 years ago

Immutable entity data might be useful for plugins like dynmap.

Techcable commented 8 years ago

@phase It still stores data inside the entity object. public interface Entity extends MutableEntityData This just lets plugins access/manipulate entity data independent of an entity in the world.

Techcable commented 8 years ago

@minecrafter @phase Is this good to go through?

phase commented 8 years ago

lgtm