superyuuki / yuukomponent

component framework for block game
2 stars 0 forks source link

Add structure, slots to initial #21

Open superyuuki opened 2 years ago

superyuuki commented 2 years ago

etc

zoeself commented 2 years ago

@superyuuki thank you for your Pull Request. I'll assign someone to review it soon.

If this PR solves a todo from the code, please don't forget to remove it.

zoeself commented 2 years ago

@superyuuki I couldn't find any assignee for this task. This is either because there are no contributors with role REV available or because the project does not have enough funds.

Please, make sure there is at least one available contributor with the required role and the project can afford to pay them.

superyuuki commented 2 years ago

Due to how component loading has been made an explicit task (only one entry and exit) we'll need a separate idempotency core addon for Spigot in order to make sure the following case is safe:

A user in creative mode copies a component with uuid x. We have two components with uuid x now. Accessing either of them will act as the same item which is problematic since server owners may want to let items be copied in order to create duplicates.

With idempotent loading, we can do the following: Assign a component's Spigot representation a separate idempotent access counter. If we have multiple components with uuid x, the first one to query load will have it's idempotent access counter incremented. If another component with the same uuid queries load we will make a clone of the component by uuid.

This is a admittedly pretty terrible solution, but this or a similar solution will be necessary in order to allow the ability for users to simply drag and drop yuukomponent items into simple minecraft plugins which can't add yuukomponent api support.

Alternatively, we could assign every component's spigot representation a generator id (although this would create a dependency on the generator addon). If duplicate ids are found, the spigot representation can simply create an entirely new component stack using the generator id and assign a new uuid. This solution is better but introduces a dependency on generator, making it less optimal.

zoeself commented 2 years ago

@superyuuki I couldn't find any assignee for this task. This is either because there are no contributors with role REV available or because the project does not have enough funds.

Please, make sure there is at least one available contributor with the required role and the project can afford to pay them.