Conversation
…his prevents using the returned `Entity` in incorrect parts of the API.
|
To be honest I don't really like the name |
|
Thanks! Im gonna look at that one later ^^ |
|
I don't think there's anything that is valid to do with the "Entity" returned by the |
|
Bumping the PR - it would make desired usage of value returned from |
As briefly discussed in Discord, this modifies the
CommandBufferto not return fakeEntityobjects. Instead it returns aPendingEntity. This makes the API less confusing and prevents all the mistakes you could make.Added a new test ("CommandBufferEntityErrors") which demonstrates all the possible errors this fixes:
Entitywith the world (fails type checking)Breaking Change
Note that this is a breaking change: The
Create() -> Entitymethod has becomeCreate() -> PendingEntity.Most code that is broken by this should either be extremely easy to fix (just change the type) or was already subtly broken and this more explicit break is a good thing.