In sponge 7.0 I can set Item into the frame by this code.
itemFrame.offer(Keys.REPRESENTED_ITEM, snapshot);
but In sponge 8.0 I couldn’t find the way to set Item into the frame.
How can I set Item in Frame (in sponge 8.0) ?
Please help me.
In sponge 7.0 I can set Item into the frame by this code.
itemFrame.offer(Keys.REPRESENTED_ITEM, snapshot);
but In sponge 8.0 I couldn’t find the way to set Item into the frame.
How can I set Item in Frame (in sponge 8.0) ?
Please help me.
So there are two ways of doing this.
First. The Key way
Keys.ITEM_STACK_SNAPSHOT
Or the none key way
ItemStackSnapshot item;
ItemFrame frame:
frame.item().set(item);
Thank for you care!