FabricMC / fabric

Essential hooks for modding with Fabric.
Apache License 2.0
2.35k stars 416 forks source link

Simple API for getting info about a block/item/etc. #40

Closed RedstoneParadox closed 5 years ago

RedstoneParadox commented 5 years ago

Nikky mentioned this in the Discord, and I think it would be a good idea to have an API that does a general information dump of a target ItemStack, BlockState, Mob, or anything else that can have some sort of information with it. While it originally came up due to all the WAILA mods popping up, having a way to get an information dump should be general-purpose enough that a variety of mods could make use of it.

Prospector commented 5 years ago

Personally I think this is out of scope for Fabric because not only is this not critical, but I think very few mods would actually display/use this information usefully.

LemmaEOF commented 5 years ago

I definitely agree that this out of scope. If you wanna adapt a pre-existing mod that does this, I recommend ProbeDataProvider. It's for 1.12 right now and is the driving system behind FruitPhone, my personal favorite WAILA-like.

liach commented 5 years ago

i suggest doing this in your library code.

NikkyAI commented 5 years ago

i also would suggest making this in a separate library rather than in fabricAPI and i like ProbeDataProvider .. so adapting that would save a lot of api design work there were attempts to port it to Rift at least

asiekierka commented 5 years ago

I'm keen on making ProbeDataProvider a Fabric-approved project, but this doesn't belong in API.