buildActionCommands method
List<Widget>
buildActionCommands(
- Interactive s, {
- dynamic copyFrom,
- required String copyFromPath,
Implementation
List<Widget> buildActionCommands(Interactive s,
{dynamic copyFrom, required String copyFromPath}) =>
[
...s.actions,
If(Data.get(copyFrom, path: '$copyFromPath[{Slot:${s.slot!.id}b}]'),
then: [
Summon(
Entities.item,
tags: ['objd_gui_dropitem'],
nbt: {
'Item': Item(
Items.stone,
count: 1,
nbt: {
'objd': {'gui': true},
},
).getMap(),
},
),
Data.copy(
Entity(type: Entities.item, limit: 1, nbt: {
'Item': {
'tag': {
'objd': {'gui': true},
},
}
}).sort(Sort.nearest),
path: 'Item',
from: copyFrom,
fromPath: '$copyFromPath[{Slot:${s.slot!.id}b}]',
)
])
];