mirror of
https://github.com/Minestom/Minestom.git
synced 2025-02-09 08:51:38 +01:00
ItemMetaBuilder doesnt need to be cloneable
This commit is contained in:
parent
e19af0377c
commit
4f5fd125c4
@ -11,7 +11,7 @@ import org.jglrxavpok.hephaistos.nbt.NBTCompound;
|
||||
import java.util.*;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
public abstract class ItemMetaBuilder implements Cloneable {
|
||||
public abstract class ItemMetaBuilder {
|
||||
|
||||
protected int damage;
|
||||
protected boolean unbreakable;
|
||||
@ -132,21 +132,6 @@ public abstract class ItemMetaBuilder implements Cloneable {
|
||||
return dest;
|
||||
}
|
||||
|
||||
@Override
|
||||
protected ItemMetaBuilder clone() {
|
||||
try {
|
||||
NBTCompound nbtCompound = new NBTCompound();
|
||||
write(nbtCompound);
|
||||
var builder = (ItemMetaBuilder) super.clone();
|
||||
builder.read(nbtCompound);
|
||||
return builder;
|
||||
} catch (CloneNotSupportedException e) {
|
||||
// Should never happen, because ItemMetaBuilder implements Cloneable
|
||||
e.printStackTrace();
|
||||
throw new UnsupportedOperationException("Weird thing happened");
|
||||
}
|
||||
}
|
||||
|
||||
public interface Provider<T> {
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user