Mirror von
https://github.com/ViaVersion/ViaVersion.git
synchronisiert 2024-12-27 08:30:09 +01:00
Add Item#copy
Dieser Commit ist enthalten in:
Ursprung
d5a568b3fc
Commit
d5f2388723
@ -92,6 +92,11 @@ public class DataItem implements Item {
|
||||
this.tag = tag;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Item copy() {
|
||||
return new DataItem(identifier, amount, data, tag);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (this == o) return true;
|
||||
|
@ -87,4 +87,11 @@ public interface Item {
|
||||
* @param tag item tag
|
||||
*/
|
||||
void setTag(@Nullable CompoundTag tag);
|
||||
|
||||
/**
|
||||
* Returns a copy of the item.
|
||||
*
|
||||
* @return copy of the item
|
||||
*/
|
||||
Item copy();
|
||||
}
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren