SpongeAPI icon indicating copy to clipboard operation
SpongeAPI copied to clipboard

Add Keys#HANGING for lanterns

Open Lignium opened this issue 3 years ago • 1 comments

SpongeAPI | Sponge

Lignium avatar Jul 30 '22 04:07 Lignium

API9 https://github.com/SpongePowered/SpongeAPI/blob/api-9/src/main/java/org/spongepowered/api/state/BooleanStateProperties.java#L81

Faithcaio avatar Aug 06 '22 22:08 Faithcaio

@Faithcaio

Going to merge this for api-8 just to allow this version to have this feature. When you merge this upstream, you'll need to omit this commit. Or deprecate the data entry and mention to use the state properties?

Zidane avatar Aug 16 '22 15:08 Zidane

@Zidane If I understand you correctly, why are you suggesting to omit this in API 9? Isn't the Data API the preferred way to work with data? The State Property API is, and has always been, a secondary (fallback) way to get data when the data is not reflected in the Data API. Let me remind you that the more data is implemented using the Data API, the better methods such as mergeWith, values, etc. will work.

You also forgot to merge the implementation.

Lignium avatar Aug 17 '22 00:08 Lignium

@Lignium

I didn't forget to merge it, just haven't had the chance to merge your impl PR and bump the API ref. If you wanna help me out further, have your impl PR bump the API ref then it is a clean pull.

Also I only pointed it out to @Faithcaio in-case there was some reason this cannot remain in the data system. If no such reason exists, this will be a clean merge upstream.

Zidane avatar Aug 17 '22 01:08 Zidane

Its more work to have the properties as Data atm. as the properties get generated automatically. Also Keys becomes quite cluttered.

So the best option would be to improve how to register Properties as Data and then deprecate the properties entirely.

Faithcaio avatar Aug 17 '22 06:08 Faithcaio