snowgears / shopbugs

Shop bug tracker
8 stars 4 forks source link

Add option to more loosely compare items with BlockStateMeta #215

Open snowgears opened 3 years ago

snowgears commented 3 years ago

"I love this and it works great except for one thing I have noticed. Beehives with bees all have unique IDs. So if I wanted to sell a bunch of beehives with bees in them, I have to reset the shop with that specific beehive every time. I can't just drop 20 hives in the chest. I can only sell 1 at a time. If that were to ever get fixed it would be perfect."

snowgears commented 3 years ago

if(((Beehive)((BlockStateMeta)i1Meta).getBlockState()).getEntityCount() == ((Beehive)((BlockStateMeta)i2Meta).getBlockState()).getEntityCount())

itemstacksAreSimilar method should be rewritten to more loosely sell items with BlockStateMeta (for example, allowing beehives to be sold if they have the same amount of bees assuming there is no custom name or lore that differs from the item being sold