Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

displayName for AE2 listAvailableItems #224

Open
jztmanyl opened this issue Jul 4, 2019 · 5 comments
Open

displayName for AE2 listAvailableItems #224

jztmanyl opened this issue Jul 4, 2019 · 5 comments
Labels
enhancement An improvement to an existing feature, or a new one feedback wanted I'd like some feedback before progressing further

Comments

@jztmanyl
Copy link

jztmanyl commented Jul 4, 2019

As the title suggest I would like a displayName in the function listAvailableItems.
data.put("displayName", stack.getItem().getDisplayName()); I tried adding this line too getItemStackProperties() but it didn't work for me, I am a beginner at programming so probably my fault.

@jztmanyl jztmanyl added the enhancement An improvement to an existing feature, or a new one label Jul 4, 2019
@Wendelstein7
Copy link

Kudos for attempting to fix yourself, people like you rock. Also yes, I vouch for this enhancement.

@SquidDev
Copy link
Member

SquidDev commented Jul 5, 2019

Hrmr, going to need to have a wee think about this.

The general idea of item methods like list and listAvailableItems is that they provide sufficient metadata to uniquely determine the item, but most of the interesting stuff should only be accessible from .getItemMeta, findItem, etc...

On the other hand, I have compromised on this in the past, and I can definitely see why this would be a useful shortcut.

@SquidDev SquidDev added the feedback wanted I'd like some feedback before progressing further label Jul 5, 2019
@jztmanyl
Copy link
Author

jztmanyl commented Jul 5, 2019

data.put("displayName", stack.getDisplayName());
ended up adding this in method fillBasicMeta (org.squiddev.plethora.integration.vanilla.method.MethodsInventory) so list and listAvailableItems return a displayName, I did this cause I wanted to monitor my items

this might be bad, let me know if it is

@Wendelstein7
Copy link

@SquidDev You could probably motivate an implementation like this in the context of reducing server load, since getItemMeta is an entire peripheral call by itself, so compare needing to do .list once or .getItemMeta in a loop. Anyhow, if you're going to implement this be sure to have it consistent amongst all containers and inventories!

@fionera
Copy link
Contributor

fionera commented Jan 26, 2020

I would also like to see it added since calling finditem().getMetadata() on ae2 is very slow...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement An improvement to an existing feature, or a new one feedback wanted I'd like some feedback before progressing further
Projects
None yet
Development

No branches or pull requests

4 participants