Change "clone" to "deepClone", in line with PacketContainer.
Dieser Commit ist enthalten in:
Ursprung
8abb93114f
Commit
6b3d85af62
@ -48,5 +48,5 @@ public interface NbtBase<TType> {
|
||||
* Clone the current NBT tag.
|
||||
* @return The cloned tag.
|
||||
*/
|
||||
public abstract NbtBase<TType> clone();
|
||||
public abstract NbtBase<TType> deepClone();
|
||||
}
|
@ -141,8 +141,8 @@ public class NbtCompound implements NbtWrapper<Map<String, NbtBase<?>>>, Iterabl
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public NbtBase<Map<String, NbtBase<?>>> clone() {
|
||||
return (NbtBase) container.clone();
|
||||
public NbtBase<Map<String, NbtBase<?>>> deepClone() {
|
||||
return (NbtBase) container.deepClone();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -19,13 +19,13 @@ import com.google.common.base.Objects;
|
||||
*/
|
||||
public class NbtElement<TType> implements NbtWrapper<TType> {
|
||||
// Structure modifier for the base class
|
||||
private static StructureModifier<Object> baseModifier;
|
||||
private static volatile StructureModifier<Object> baseModifier;
|
||||
|
||||
// For retrieving the current type ID
|
||||
private static Method methodGetTypeID;
|
||||
private static volatile Method methodGetTypeID;
|
||||
|
||||
// For cloning handles
|
||||
private static Method methodClone;
|
||||
private static volatile Method methodClone;
|
||||
|
||||
// Structure modifiers for the different NBT elements
|
||||
private static StructureModifier<?>[] modifiers = new StructureModifier<?>[NbtType.values().length];
|
||||
@ -154,7 +154,7 @@ public class NbtElement<TType> implements NbtWrapper<TType> {
|
||||
}
|
||||
|
||||
@Override
|
||||
public NbtBase<TType> clone() {
|
||||
public NbtBase<TType> deepClone() {
|
||||
if (methodClone == null) {
|
||||
Class<?> base = MinecraftReflection.getNBTBaseClass();
|
||||
|
||||
|
@ -176,8 +176,8 @@ public class NbtList<TType> implements NbtWrapper<List<NbtBase<TType>>>, Iterabl
|
||||
}
|
||||
|
||||
@SuppressWarnings({"unchecked", "rawtypes"})
|
||||
public NbtBase<List<NbtBase<TType>>> clone() {
|
||||
return (NbtBase) container.clone();
|
||||
public NbtBase<List<NbtBase<TType>>> deepClone() {
|
||||
return (NbtBase) container.deepClone();
|
||||
}
|
||||
|
||||
public void add(NbtBase<TType> element) {
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren