SpongePowered / SpongeAPI

A Minecraft plugin API
http://www.spongepowered.org/
MIT License
1.14k stars 342 forks source link

Inventory from BlockSnapshot #2467

Open mosemister opened 11 months ago

mosemister commented 11 months ago

Major SpongeAPI version

8

Is this likely to be a breaking change?

No

What are you requesting?

Ability to gain access the items in a container from the BlockSnapshot. This would allow plugins to read the contents of the inventory.

BlockSnapshot snapshot;
List<ItemStackSnapshot> slots = snapshot.getInventory();

Or maybe

Inventory inv = snapshot.getInventory();